<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>LaTeX Matters</title>
	<atom:link href="http://texblog.org/feed/" rel="self" type="application/rss+xml" />
	<link>http://texblog.org</link>
	<description>Reporting without troubles</description>
	<lastBuildDate>Fri, 01 Jun 2012 12:23:37 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='texblog.org' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://0.gravatar.com/blavatar/622f5463c2708cc7510d4781bd38b677?s=96&#038;d=http%3A%2F%2Fs2.wp.com%2Fi%2Fbuttonw-com.png</url>
		<title>LaTeX Matters</title>
		<link>http://texblog.org</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://texblog.org/osd.xml" title="LaTeX Matters" />
	<atom:link rel='hub' href='http://texblog.org/?pushpress=hub'/>
		<item>
		<title>Generate LaTeX tables from CSV files (Excel)</title>
		<link>http://texblog.org/2012/05/30/generate-latex-tables-from-csv-files-excel/</link>
		<comments>http://texblog.org/2012/05/30/generate-latex-tables-from-csv-files-excel/#comments</comments>
		<pubDate>Wed, 30 May 2012 06:30:48 +0000</pubDate>
		<dc:creator>tom</dc:creator>
				<category><![CDATA[Figure & table]]></category>
		<category><![CDATA[Introduction]]></category>
		<category><![CDATA[LaTeX]]></category>
		<category><![CDATA[Package]]></category>
		<category><![CDATA[Tips & tricks]]></category>
		<category><![CDATA[csv2latex]]></category>
		<category><![CDATA[csvsimple]]></category>
		<category><![CDATA[datatool]]></category>
		<category><![CDATA[excel2latex]]></category>
		<category><![CDATA[multicolumn]]></category>
		<category><![CDATA[pgfplotstable]]></category>
		<category><![CDATA[table]]></category>
		<category><![CDATA[tabular]]></category>
		<category><![CDATA[usepackage]]></category>

		<guid isPermaLink="false">http://texblog.org/?p=1050</guid>
		<description><![CDATA[Besides various online services and scripts, there are several LaTeX packages that generate tables directly from CSV (comma separated value) files. The advantage is everything is in the tex-file in one place and one doesn&#8217;t have to switch back and forth between website/script and LaTeX when changes are made. The drawback clearly is their limited [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=texblog.org&#038;blog=1106511&#038;post=1050&#038;subd=texblog&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Besides various online services and scripts, there are several LaTeX packages that generate tables directly from CSV (comma separated value) files. The advantage is everything is in the tex-file in one place and one doesn&#8217;t have to switch back and forth between website/script and LaTeX when changes are made. The drawback clearly is their limited flexibility or high complexity for sophisticated tables.</p>
<p>Note, I used the following few lines of code to generate a simple CSV file using LaTeX. All examples assume the existence of the file &#8220;scientists.csv&#8221;. Just copy the code into a tex-file and typeset.</p>
<p><pre class="brush: latex;">\documentclass{minimal}
\begin{filecontents*}{scientists.csv}
name,surname,age
Albert,Einstein,133
Marie,Curie,145
Thomas,Edison,165
\end{filecontents*}</pre></p>
<p>The star suppresses additional information on the file creation from being added.</p>
<p>Let&#8217;s start with a simple package.</p>
<p>&nbsp;<br />
<strong>Package csvsimple</strong></p>
<p>Here is a very basic example. Elements of the first row are considered column titles. To separate them from the table content, a horizontal line is automatically added in between.</p>
<p><pre class="brush: latex;">\documentclass{article}
\usepackage{csvsimple}
\begin{document}
\csvautotabular{scientists.csv}
\end{document}</pre></p>
<p><a href="http://texblog.files.wordpress.com/2012/05/csvsimple1.png"><img class="aligncenter size-full wp-image-1313" title="csvsimple1" src="http://texblog.files.wordpress.com/2012/05/csvsimple1.png?w=490" alt=""   /></a></p>
<p>The command <code>csvreader</code> provides a better control of the column style, titles and content, but makes things slightly more complicated. </p>
<p>Here is an example:</p>
<p><pre class="brush: latex;">\documentclass{article}
\usepackage{csvsimple}
\begin{document}
\csvreader[tabular=|l|l|c|,
	table head=\hline &amp; Name &amp; Age\\\hline,
	late after line=\\\hline]%
{scientists.csv}{name=\name,surname=\surename,age=\age}%
{\thecsvrow &amp; \firstname~\name &amp; \age}%
\end{document}</pre></p>
<p><a href="http://texblog.files.wordpress.com/2012/05/csvsimple2.png"><img class="aligncenter size-full wp-image-1314" title="csvsimple2" src="http://texblog.files.wordpress.com/2012/05/csvsimple2.png?w=490" alt=""   /></a></p>
<p>The first part of the optional argument controls the alignment of the content per column (<code>tabular</code>). The second sets the column titles and adds a horizontal line before and after them (<code>table head</code>). Finally, another horizontal line is added to the end of the table (<code>late after line</code>). Furthermore, &#8220;commands&#8221; are defined for every column using the column title from the CSV file (name, surname and age). These commands allow reordering and combining column content. The command <code>thecsvrow</code> is a row counter and therefore an easy way to enumerate the rows.</p>
<p>Here is the <a href="http://mirror.ctan.org/macros/latex/contrib/csvsimple/csvsimple.pdf" title="Csvsimple package documentation" target="_blank">complete package documentation</a>.</p>
<p>&nbsp;<br />
<strong>Package pgfplotstable</strong></p>
<p>A more flexible package is pgfplotstable (<a href="http://mirror.ctan.org/graphics/pgf/contrib/pgfplots/doc/latex/pgfplots/pgfplotstable.pdf" title="Pgfplotstable package documentation" target="_blank">package documentation</a>). It allows generating tables from different data files types. However, we will only consider CSV files here.</p>
<p>Again, an optional argument serves to customize what the table looks like, using key-value-pairs. Here is a minimal example with the file generated earlier. A simple example without anything special is quite complicated:</p>
<p><pre class="brush: latex;">\documentclass{article}
\usepackage{pgfplotstable}
\begin{document}
\pgfplotstabletypeset[
	col sep=comma,
	string type,
	columns/name/.style={column name=Name, column type={|l}},
	columns/surname/.style={column name=Surname, column type={|l}},
	columns/age/.style={column name=Age, column type={|c|}},
	every head row/.style={before row=\hline,after row=\hline},
	every last row/.style={after row=\hline},
	]{scientists.csv}
\end{document}</pre></p>
<p><a href="http://texblog.files.wordpress.com/2012/05/pgfplotstable1.png"><img src="http://texblog.files.wordpress.com/2012/05/pgfplotstable1.png?w=490" alt="" title="pgfplotstable1"   class="aligncenter size-full wp-image-1317" /></a></p>
<p>One of the things that makes this package interesting is, it supports <code>multicolumn</code>.</p>
<p><pre class="brush: latex; highlight: [9];">\documentclass{article}
\usepackage{pgfplotstable}
\begin{document}
\pgfplotstabletypeset[
	col sep=comma,
	string type,
	every head row/.style={%
		before row={\hline
			\multicolumn{2}{c}{Full Name} &amp; \\
		},
		after row=\hline
	},
	every last row/.style={after row=\hline},
	columns/name/.style={column name=Name, column type=l},
	columns/surname/.style={column name=Surname, column type=l},
	columns/age/.style={column name=Age, column type=c},
	]{scientists.csv}
\end{document}</pre></p>
<p><a href="http://texblog.files.wordpress.com/2012/05/pgfplotstable21.png"><img src="http://texblog.files.wordpress.com/2012/05/pgfplotstable21.png?w=490" alt="" title="pgfplotstable2"   class="aligncenter size-full wp-image-1336" /></a></p>
<p>Furthermore, the package allows generation of <a href="http://texblog.org/2011/05/15/multi-page-tables-using-longtable/" title="Multipage tables using longtable" target="_blank">multi-page tables with longtable</a> (<a href="ftp://tug.ctan.org/ctan/macros/latex/required/tools/longtable.pdf" title="Longtable package documentation" target="_blank">package documentation</a>) with <code>pgfplotstable</code> (see the <a href="http://mirror.ctan.org/graphics/pgf/contrib/pgfplots/doc/latex/pgfplots/pgfplotstable.pdf" title="Pgfplotstable package documentation" target="_blank">package documentation</a> for more details).</p>
<p>&nbsp;<br />
The <a href="http://mirror.ctan.org/macros/latex/contrib/csvsimple/csvsimple.pdf" title="Csvsimple package documentation" target="_blank">csvsimple</a> as well as the <a href="http://mirror.ctan.org/graphics/pgf/contrib/pgfplots/doc/latex/pgfplots/pgfplotstable.pdf" title="Pgfplotstable package documentation" target="_blank">pgfplotstable</a> package documentations are both comprehensive and very nicely formatted. It seems, the authors put in quite a bit of effort writing them. Check it out!</p>
<p>&nbsp;<br />
<strong>Further packages and other approaches</strong></p>
<p>Other packages that I will not discuss here include:</p>
<ul>
<li><a href="http://www.ctan.org/tex-archive/macros/latex/contrib/datatool/datatool.pdf" title="Datatool package documentation" target="_blank">datatool</a></li>
<li><a href="http://mirrors.ctan.org/obsolete/macros/latex/contrib/csvtools/doc/csvtools.pdf" title="Csvtools package documentation" target="_blank">csvtools</a> (obsolete, replaced by datatool)</li>
<li><a href="http://ggorjan.blogspot.com/2008/09/excel-and-latex.html" title="Gregor Gorjanc's blog" target="_blank">Excel and LaTeX by Gregor Gorjanc</a></li>
<li>R and the <a href="http://texblog.org/2011/06/02/r-convert-table-r2latex/" title="R: convert table R2LaTeX" target="_blank">xtable package</a></li>
</ul>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/texblog.wordpress.com/1050/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/texblog.wordpress.com/1050/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/texblog.wordpress.com/1050/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/texblog.wordpress.com/1050/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/texblog.wordpress.com/1050/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/texblog.wordpress.com/1050/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/texblog.wordpress.com/1050/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/texblog.wordpress.com/1050/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/texblog.wordpress.com/1050/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/texblog.wordpress.com/1050/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/texblog.wordpress.com/1050/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/texblog.wordpress.com/1050/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/texblog.wordpress.com/1050/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/texblog.wordpress.com/1050/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=texblog.org&#038;blog=1106511&#038;post=1050&#038;subd=texblog&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://texblog.org/2012/05/30/generate-latex-tables-from-csv-files-excel/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/45435628abb56dd1acc9ac2ef104a2b1?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">tom</media:title>
		</media:content>

		<media:content url="http://texblog.files.wordpress.com/2012/05/csvsimple1.png" medium="image">
			<media:title type="html">csvsimple1</media:title>
		</media:content>

		<media:content url="http://texblog.files.wordpress.com/2012/05/csvsimple2.png" medium="image">
			<media:title type="html">csvsimple2</media:title>
		</media:content>

		<media:content url="http://texblog.files.wordpress.com/2012/05/pgfplotstable1.png" medium="image">
			<media:title type="html">pgfplotstable1</media:title>
		</media:content>

		<media:content url="http://texblog.files.wordpress.com/2012/05/pgfplotstable21.png" medium="image">
			<media:title type="html">pgfplotstable2</media:title>
		</media:content>
	</item>
		<item>
		<title>Correct total number of pages in beamer presentations with backup slides</title>
		<link>http://texblog.org/2012/05/24/correct-total-number-of-pages-with-backup-slides-in-beamer-presentations/</link>
		<comments>http://texblog.org/2012/05/24/correct-total-number-of-pages-with-backup-slides-in-beamer-presentations/#comments</comments>
		<pubDate>Thu, 24 May 2012 06:20:38 +0000</pubDate>
		<dc:creator>tom</dc:creator>
				<category><![CDATA[LaTeX]]></category>
		<category><![CDATA[Package]]></category>
		<category><![CDATA[Tips & tricks]]></category>
		<category><![CDATA[appendix]]></category>
		<category><![CDATA[appendixnumberbeamer]]></category>
		<category><![CDATA[backup slides]]></category>
		<category><![CDATA[beamer]]></category>
		<category><![CDATA[page number]]></category>
		<category><![CDATA[presentation]]></category>

		<guid isPermaLink="false">http://texblog.org/?p=1276</guid>
		<description><![CDATA[While writing a presentation with beamer it may be convenient to have some backup/appendix slides ready as a support for answers to potential questions. By default, beamer will count the total number of slides, including the backup slides at the end of the presentation, leading to a wrong number of total slides intended for presentation. The package [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=texblog.org&#038;blog=1106511&#038;post=1276&#038;subd=texblog&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>While writing a presentation with <a title="Beamer user guide" href="http://mirror.ctan.org/macros/latex/contrib/beamer/doc/beameruserguide.pdf" target="_blank">beamer</a> it may be convenient to have some backup/appendix slides ready as a support for answers to potential questions. By default, beamer will count the total number of slides, including the backup slides at the end of the presentation, leading to a wrong number of total slides intended for presentation.</p>
<p>The package <code>appendixnumberbeamer</code> solves the problem through the <code>\appendix</code> command which marks the end of the presentation and resets the page number counter. The total number of slides will be the page number of the last slide before <code>\appendix</code>.</p>
<p><pre class="brush: latex;">\usepackage{appendixnumberbeamer}
%Presentation slides
\appendix
%Backup slides</pre></p>
<p>Here is a minimal example to illustrate the result.</p>
<p><pre class="brush: latex; highlight: [2,15];">\documentclass{beamer}
\usepackage{appendixnumberbeamer}
\setbeamertemplate{footline}[page number]
\newcommand{\myframe}[1]{%
	\begin{frame}
		\begin{center}
			\Large #1 slide \insertframenumber/\inserttotalframenumber\\
			Page number \thepage/\inserttotalframenumber
		\end{center}
	\end{frame}
}
\begin{document}
\myframe{Presentation}
\myframe{Presentation}
\appendix
\myframe{Appendix/backup}
\myframe{Appendix/backup}
\end{document}</pre></p>
<p><a href="http://texblog.files.wordpress.com/2012/05/appendixnumberbeamer2.png"><img src="http://texblog.files.wordpress.com/2012/05/appendixnumberbeamer2.png?w=490&h=346" alt="" title="appendixnumberbeamer" width="490" height="346" class="aligncenter size-full wp-image-1300" /></a></p>
<p>The documentation for the package is sparse, but there is not that much to be said. For those interested, the package description can be found in the header of the <a title="Appendixnumberbeamer package" href="http://mirrors.ctan.org/macros/latex/contrib/beamer-contrib/appendixnumberbeamer/appendixnumberbeamer.sty" target="_blank">package</a> (style file) itself. In case your distribution does not include the package, download the style file and place it into your project directory.</p>
<p>Ps. I used the following few lines of code in the preamble to print the handouts &#8220;4 on 1&#8243;:</p>
<p><pre class="brush: latex;">\usepackage{pgfpages}
\pgfpagesuselayout{4 on 1}[a4paper, landscape, border shrink=5mm]
\pgfpageslogicalpageoptions{1}{border code=\pgfusepath{stroke}}
\pgfpageslogicalpageoptions{2}{border code=\pgfusepath{stroke}}
\pgfpageslogicalpageoptions{3}{border code=\pgfusepath{stroke}}
\pgfpageslogicalpageoptions{4}{border code=\pgfusepath{stroke}}</pre></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/texblog.wordpress.com/1276/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/texblog.wordpress.com/1276/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/texblog.wordpress.com/1276/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/texblog.wordpress.com/1276/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/texblog.wordpress.com/1276/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/texblog.wordpress.com/1276/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/texblog.wordpress.com/1276/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/texblog.wordpress.com/1276/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/texblog.wordpress.com/1276/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/texblog.wordpress.com/1276/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/texblog.wordpress.com/1276/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/texblog.wordpress.com/1276/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/texblog.wordpress.com/1276/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/texblog.wordpress.com/1276/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=texblog.org&#038;blog=1106511&#038;post=1276&#038;subd=texblog&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://texblog.org/2012/05/24/correct-total-number-of-pages-with-backup-slides-in-beamer-presentations/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/45435628abb56dd1acc9ac2ef104a2b1?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">tom</media:title>
		</media:content>

		<media:content url="http://texblog.files.wordpress.com/2012/05/appendixnumberbeamer2.png" medium="image">
			<media:title type="html">appendixnumberbeamer</media:title>
		</media:content>
	</item>
		<item>
		<title>List of symbols or abbreviations (nomenclature)</title>
		<link>http://texblog.org/2012/05/14/list-of-symbols-or-abbreviations-nomenclature/</link>
		<comments>http://texblog.org/2012/05/14/list-of-symbols-or-abbreviations-nomenclature/#comments</comments>
		<pubDate>Mon, 14 May 2012 06:00:45 +0000</pubDate>
		<dc:creator>tom</dc:creator>
				<category><![CDATA[Introduction]]></category>
		<category><![CDATA[LaTeX]]></category>
		<category><![CDATA[Package]]></category>
		<category><![CDATA[Tips & tricks]]></category>
		<category><![CDATA[abbreviations]]></category>
		<category><![CDATA[makeindex]]></category>
		<category><![CDATA[makenomenclature]]></category>
		<category><![CDATA[nomencl]]></category>
		<category><![CDATA[nomenclature]]></category>
		<category><![CDATA[nomname]]></category>
		<category><![CDATA[printnomenclature]]></category>
		<category><![CDATA[symbols]]></category>
		<category><![CDATA[usepackage]]></category>

		<guid isPermaLink="false">http://texblog.org/?p=1194</guid>
		<description><![CDATA[Printing a list of abbreviations or symbols is one of these things (like so many) LaTeX provides a very simple and elegant solution for. The nomencl package implements a few basic commands to do that. &#160; First load the package in the preamble. The makenomenclature command is required for the generation of the nomenclature file (.nlo). [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=texblog.org&#038;blog=1106511&#038;post=1194&#038;subd=texblog&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Printing a list of abbreviations or symbols is one of these things (like so many) LaTeX provides a very simple and elegant solution for. The <a title="Nomencl package documentation" href="http://mirror.ctan.org/macros/latex/contrib/nomencl/nomencl.pdf" target="_blank">nomencl package</a> implements a few basic commands to do that.</p>
<p>&nbsp;<br />
First load the package in the preamble. The <code>makenomenclature</code> command is required for the generation of the nomenclature file (.nlo). Commenting it out is a convenient way to &#8220;switch it off&#8221;.</p>
<p><pre class="brush: latex;">\usepackage{nomencl}
\makenomenclature</pre></p>
<p>Next, add abbreviations together with their description or long form to your document. Ideally, this is done immediately after an abbreviation is mentioned for the first time.</p>
<p><pre class="brush: latex;">\nomenclature{Fig.}{Figure}
\nomenclature{$A_i$}{Area of the $i^{th}$ component}</pre></p>
<p>This command has an optional argument which provides control over the order of the entries. Consider the following example:</p>
<p><pre class="brush: latex;">I want $\beta$\nomenclature{$\beta$}{The second letter of the greek alphabet} to be listed after $\alpha$\nomenclature{$\alpha$}{The first letter of the greek alphabet}</pre></p>
<p><a href="http://texblog.files.wordpress.com/2012/05/beta_before_alpha.png"><img src="http://texblog.files.wordpress.com/2012/05/beta_before_alpha.png?w=490" alt="" title="beta_before_alpha"   class="aligncenter size-full wp-image-1260" /></a></p>
<p>Makeindex, the command that generates the list of abbreviations (see below), will automatically sort the entries. Therefore, <img src='http://s0.wp.com/latex.php?latex=%5Calpha&amp;bg=f9fbf9&amp;fg=666666&amp;s=0' alt='&#92;alpha' title='&#92;alpha' class='latex' /> and <img src='http://s0.wp.com/latex.php?latex=%5Cbeta&amp;bg=f9fbf9&amp;fg=666666&amp;s=0' alt='&#92;beta' title='&#92;beta' class='latex' /> will appear in an &#8220;alphabetic&#8221; order. To change this order manually, one can use a sorting prefix (optional argument), the simplest would just be consecutive numbers, and the symbols will be sorted accordingly.</p>
<p><pre class="brush: latex; highlight: [2,4];">I want $\beta$
\nomenclature[2]{$\beta$}{The second letter of the greek alphabet}
to be listed after $\alpha$
\nomenclature[1]{$\alpha$}{The first letter of the greek alphabet}</pre></p>
<p>Linebreaks were added for presentation purposes only.</p>
<p><a href="http://texblog.files.wordpress.com/2012/05/beta_after_alpha.png"><img src="http://texblog.files.wordpress.com/2012/05/beta_after_alpha.png?w=490" alt="" title="beta_after_alpha"   class="aligncenter size-full wp-image-1261" /></a></p>
<p>The following command prints the abbreviation/symbol list at the corresponding position of the document.</p>
<p><pre class="brush: latex;">\printnomenclature</pre></p>
<p>To control the distance between the symbol or abbreviation and the explaining text use the optional distance argument.</p>
<p><pre class="brush: latex;">\printnomenclature[5em]</pre></p>
<p>To change the name of the list use</p>
<p><pre class="brush: latex;">\renewcommand{\nomname}{List of Symbols}</pre></p>
<p>Similar to a glossary or bibliography, the document is typesetted once (latex). Next, the nomenclature is generated using <code>makeindex</code>. Finally, the document is typesetted again, adding the nomenclature to it.</p>
<p><pre class="brush: bash;">latex filename.tex
makeindex filename.nlo -s nomencl.ist -o filename.nls
latex filename.tex</pre></p>
<p>The <code>makeindex</code> command takes the nomenclature file (.nlo), the style file (nomencl.ist) and the name of the output file (.nls) as input arguments.</p>
<p>&nbsp;<br />
<strong>Complete code of a working example and its output</strong></p>
<p><pre class="brush: latex;">\documentclass{article}
\usepackage{nomencl}
\makenomenclature
\renewcommand{\nomname}{Time Zones}
\begin{document} 
UTC\nomenclature{UTC}{Coordinated Universal Time} is 3 hours behind ADT\nomenclature{ADT}{Atlantic Daylight Time} and 10 hours ahead of EST\nomenclature{EST}{Eastern Standard Time}.
\printnomenclature
\small\hfill Created by http://texblog.org
\end{document}</pre></p>
<p><a href="http://texblog.files.wordpress.com/2012/05/nomencl_minimal.png"><img src="http://texblog.files.wordpress.com/2012/05/nomencl_minimal.png?w=490" alt="" title="nomencl_minimal"   class="aligncenter size-full wp-image-1265" /></a></p>
<p>Note, to save some typing, you can define your own nomenclature command that prints the symbol/abbreviation and generates a list entry at the same time.</p>
<p><pre class="brush: latex;">\newcommand*{\nom}[2]{#1\nomenclature{#1}{#2}}
...
\nom{EST}{Eastern Standard Time}</pre></p>
<p>Refer to the <a title="Nomencl package documentation" href="http://mirror.ctan.org/macros/latex/contrib/nomencl/nomencl.pdf" target="_blank">nomencl package documentation</a> for more details.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/texblog.wordpress.com/1194/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/texblog.wordpress.com/1194/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/texblog.wordpress.com/1194/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/texblog.wordpress.com/1194/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/texblog.wordpress.com/1194/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/texblog.wordpress.com/1194/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/texblog.wordpress.com/1194/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/texblog.wordpress.com/1194/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/texblog.wordpress.com/1194/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/texblog.wordpress.com/1194/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/texblog.wordpress.com/1194/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/texblog.wordpress.com/1194/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/texblog.wordpress.com/1194/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/texblog.wordpress.com/1194/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=texblog.org&#038;blog=1106511&#038;post=1194&#038;subd=texblog&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://texblog.org/2012/05/14/list-of-symbols-or-abbreviations-nomenclature/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/45435628abb56dd1acc9ac2ef104a2b1?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">tom</media:title>
		</media:content>

		<media:content url="http://texblog.files.wordpress.com/2012/05/beta_before_alpha.png" medium="image">
			<media:title type="html">beta_before_alpha</media:title>
		</media:content>

		<media:content url="http://texblog.files.wordpress.com/2012/05/beta_after_alpha.png" medium="image">
			<media:title type="html">beta_after_alpha</media:title>
		</media:content>

		<media:content url="http://texblog.files.wordpress.com/2012/05/nomencl_minimal.png" medium="image">
			<media:title type="html">nomencl_minimal</media:title>
		</media:content>
	</item>
		<item>
		<title>Writing a CV in LaTeX</title>
		<link>http://texblog.org/2012/04/25/writing-a-cv-in-latex/</link>
		<comments>http://texblog.org/2012/04/25/writing-a-cv-in-latex/#comments</comments>
		<pubDate>Wed, 25 Apr 2012 07:00:03 +0000</pubDate>
		<dc:creator>tom</dc:creator>
				<category><![CDATA[Bibtex]]></category>
		<category><![CDATA[Introduction]]></category>
		<category><![CDATA[LaTeX]]></category>
		<category><![CDATA[Package]]></category>
		<category><![CDATA[Tips & tricks]]></category>
		<category><![CDATA[article]]></category>
		<category><![CDATA[bibentry]]></category>
		<category><![CDATA[curriculum]]></category>
		<category><![CDATA[curriculum vitae]]></category>
		<category><![CDATA[cv]]></category>
		<category><![CDATA[education]]></category>
		<category><![CDATA[languages]]></category>
		<category><![CDATA[professional experience]]></category>
		<category><![CDATA[publications]]></category>
		<category><![CDATA[usepackage]]></category>

		<guid isPermaLink="false">http://texblog.org/?p=1196</guid>
		<description><![CDATA[Writing my curriculum in LaTeX was a task that has been on my TODO-list for quite a while. I liked the style of my Word-written CV and I believed it would take hours to come up with a reasonable CV in LaTeX. Nevertheless, I recently sat down, began writing, and after not too long, I [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=texblog.org&#038;blog=1106511&#038;post=1196&#038;subd=texblog&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Writing my curriculum in LaTeX was a task that has been on my TODO-list for quite a while. I liked the style of my Word-written CV and I believed it would take hours to come up with a reasonable CV in LaTeX. Nevertheless, I recently sat down, began writing, and after not too long, I came up with a presentable result that I would like to share.</p>
<p>A complete minimal example can be found at the end of this post.</p>
<p><strong>The Title</strong></p>
<p>In order to even spacing all around, we change the page margins to 3cm using the geometry package. We further make use of the standard article maketitle command, printing the person&#8217;s name (title field) and e-mail address (author field).</p>
<p><pre class="brush: latex;">\documentclass[10pt]{article}
\usepackage[margin=3cm]{geometry}
\title{\bfseries\Huge Tom T. Thurnherr}
\author{texblog+cv@gmail.com}
\date{}
\begin{document}
\maketitle
\end{document}</pre></p>
<p><a href="http://texblog.files.wordpress.com/2012/04/cv-title1.png"><img class="aligncenter size-full wp-image-1202" title="cv.title" src="http://texblog.files.wordpress.com/2012/04/cv-title1.png?w=490&h=156" alt="" width="490" height="156" /></a></p>
<p>In case you prefer to add a photo to your CV, try the following slightly more complex code, using minipage:</p>
<p><pre class="brush: latex;">\documentclass[10pt]{article}
\usepackage[margin=3cm]{geometry}
\title{\bfseries\Huge Tom T. Texblog}
\author{texblog+cv@gmail.com}
\date{}
\begin{document}
\begin{minipage}{0.65\textwidth}
\begingroup
\let\center\flushleft
\let\endcenter\endflushleft
\maketitle
\endgroup
\end{minipage}
\begin{minipage}{0.3\textwidth}
\flushright{\rule{3.5cm}{4.5cm}}
\end{minipage}
\end{document}</pre></p>
<p><a href="http://texblog.files.wordpress.com/2012/04/cv-title-photo.png"><img class="aligncenter size-full wp-image-1204" title="cv.title.photo" src="http://texblog.files.wordpress.com/2012/04/cv-title-photo.png?w=490&h=179" alt="" width="490" height="179" /></a></p>
<p><strong>Address and Personal Information</strong></p>
<p>We use minipage again to split the page into two parts, one for the address and the second for some personal information if that&#8217;s required. Straight forward.</p>
<p><pre class="brush: latex;">\begin{minipage}[ht]{0.48\textwidth}
Main Road 25\\
City 12345\\
State of Sabotage
\end{minipage}
\begin{minipage}[ht]{0.48\textwidth}
Nonlandian\\
January 3rd, 2020\\
+12 34 56 789
\end{minipage}</pre></p>
<p><a href="http://texblog.files.wordpress.com/2012/04/cv-address.png"><img class="aligncenter size-full wp-image-1206" title="cv.address" src="http://texblog.files.wordpress.com/2012/04/cv-address.png?w=490&h=103" alt="" width="490" height="103" /></a></p>
<p>The space between the title and the address is just about right. To add more space, use:</p>
<p><pre class="brush: latex;">\vspace{2em}</pre></p>
<p><strong>The Content</strong></p>
<p>After the cosmetics, we now add the actual content. We use the standard article section with a star to omit numbering. Sections may include: Objective (of the CV), Professional Experience, Education, Languages, Publications, Programming Languages, etc. We will show a few examples here, the structure is always the same.</p>
<p>Let&#8217;s first prepare the content with some code in the preamble. We use the tabular environment to divide the page into two columns, a small column for the year/title and a wide column for the description. In order to minimize typing, we define two new columntypes in the preamble, &#8220;L&#8221; and &#8220;R&#8221; as well as a thin light-gray line in between, \VRule.</p>
<p><pre class="brush: plain;">\usepackage{array, xcolor}
\definecolor{lightgray}{gray}{0.8}
\newcolumntype{L}{&gt;{\raggedleft}p{0.14\textwidth}}
\newcolumntype{R}{p{0.8\textwidth}}
\newcommand\VRule{\color{lightgray}\vrule width 0.5pt}</pre></p>
<p>Now we can start creating content sections using the tabular environment as follows:</p>
<p><pre class="brush: latex;">\section*{Heading}
\begin{tabular}{L!{\VRule}R}
2012&amp;Some text\vspace{5pt}\\
2011&amp;Some other text\\
\end{tabular}</pre></p>
<p>For better readability, we add small vertical spaces between rows in the tabular.</p>
<p><strong>Education</strong></p>
<p>Let&#8217;s start by looking at the example with education. We highlighted the parts in bold which are most recent or most important.</p>
<p><pre class="brush: latex;">\section*{Education}
\begin{tabular}{L!{\VRule}R}
2005--2007&amp;{\bf MSc in Computer Science, Great University, Country.}\vspace{5pt}\\
2001--2005&amp;BSc in Life Science, Great University, Country.\\
\end{tabular}
</pre></p>
<p><a href="http://texblog.files.wordpress.com/2012/04/cv-education.png"><img class="aligncenter size-full wp-image-1208" title="cv.education" src="http://texblog.files.wordpress.com/2012/04/cv-education.png?w=490&h=85" alt="" width="490" height="85" /></a></p>
<p><strong>Languages</strong></p>
<p>Here, we use the left column for the language and the right column for the level of proficiency.</p>
<p><pre class="brush: latex;">\section*{Languages}
\begin{tabular}{L!{\VRule}R}
Klingon&amp;Mother tongue\\
{\bf English}&amp;{\bf Fluent}\\
French&amp;Fluent (DELF 2010)\\
Japanese&amp;Fair\\
\end{tabular}</pre></p>
<p><a href="http://texblog.files.wordpress.com/2012/04/cv-language.png"><img class="aligncenter size-full wp-image-1210" title="cv.language" src="http://texblog.files.wordpress.com/2012/04/cv-language.png?w=490&h=98" alt="" width="490" height="98" /></a></p>
<p><strong>Professional Experience</strong></p>
<p><pre class="brush: latex;">\usepackage{lipsum}
...
\section*{Professional Experience}
\begin{tabular}{L!{\VRule}R}
2011--today&amp;{\bf Work at company XY.}\\
&amp;\lipsum[66]\vspace{5pt}\\
2008--2010&amp;{\bf Trainee at company ZY.}\\
&amp;\lipsum[66]\\
\end{tabular}</pre></p>
<p><a href="http://texblog.files.wordpress.com/2012/04/cv-profexp1.png"><img class="aligncenter size-full wp-image-1214" title="cv.profexp" src="http://texblog.files.wordpress.com/2012/04/cv-profexp1.png?w=490&h=186" alt="" width="490" height="186" /></a><br />
<strong></strong></p>
<p><strong>Publications</strong></p>
<p>We use the <a title="Bibentry package documentation" href="http://www.ctex.org/documents/packages/bibref/bibentry.pdf" target="_blank">bibentry package</a> to generate an inline list of publications. The references are stored in a bibtex file.</p>
<p><pre class="brush: latex;">\usepackage{bibentry}
...
\bibliographystyle{plain}
\nobibliography{publication.bib}
\section*{Publications}
\begin{tabular}{L!{\VRule}R}
2006&amp;\bibentry{knuth2006art}\vspace{5pt}\\
1968&amp;\bibentry{lamport1986latex}\\
\end{tabular}</pre></p>
<p><a href="http://texblog.files.wordpress.com/2012/04/cv-publication.png"><img class="aligncenter size-full wp-image-1213" title="cv.publication" src="http://texblog.files.wordpress.com/2012/04/cv-publication.png?w=490&h=93" alt="" width="490" height="93" /></a></p>
<p><strong>Minimal Example CV</strong></p>
<p><pre class="brush: plain; collapse: true; light: false; toolbar: true;">\documentclass[10pt]{article}
\usepackage{array, xcolor, lipsum, bibentry}
\usepackage[margin=3cm]{geometry}

\title{\bfseries\Huge Tom T. Texblog}
\author{texblog+cv@gmail.com}
\date{}

\definecolor{lightgray}{gray}{0.8}
\newcolumntype{L}{&gt;{\raggedleft}p{0.14\textwidth}}
\newcolumntype{R}{p{0.8\textwidth}}
\newcommand\VRule{\color{lightgray}\vrule width 0.5pt}

\begin{filecontents}{publication.bib}
@article{lamport1986latex,
  title={LaTEX: User's Guide \&amp;amp; Reference Manual},
  author={Lamport, L.},
  year={1986},
  publisher={Addison-Wesley}
}
@book{knuth2006art,
  title={The art of computer programming: Generating all trees: history of combinatorial generation},
  author={Knuth, D.E.},
  volume={4},
  year={2006},
  publisher={addison-Wesley}
}
\end{filecontents}

\begin{document}
\maketitle
\vspace{1em}
\begin{minipage}[ht]{0.48\textwidth}
Main Road 25\\
City 12345\\
State of Sabotage
\end{minipage}
\begin{minipage}[ht]{0.48\textwidth}
Nonlandian\\
January 3rd, 2020\\
+12 34 56 789
\end{minipage}
\vspace{20pt}

\section*{Objective}
Find a job.

\section*{Professional Experience}
\begin{tabular}{L!{\VRule}R}
2011--today&amp;{\bf Work at company XY.}\\
&amp;\lipsum[66]\\
\end{tabular}

\section*{Education}
\begin{tabular}{L!{\VRule}R}
2005--2007&amp;{\bf MSc in Computer Science, Great University, Country.}\vspace{5pt}\\
2001--2005&amp;BSc in Life Science, Great University, Country.\\
\end{tabular}

\section*{Languages}
\begin{tabular}{L!{\VRule}R}
Klingon&amp;Mother tongue\\
{\bf English}&amp;{\bf Fluent}\\
French&amp;Fluent (DELF 2010)\\
Japanese&amp;Fair\\
\end{tabular}

\bibliographystyle{plain}
\nobibliography{publication.bib}

\section*{Publications}
\begin{tabular}{L!{\VRule}R}
2006&amp;\bibentry{knuth2006art}\vspace{5pt}\\
1986&amp;\bibentry{lamport1986latex}\\
\end{tabular}
{\vspace{20pt}\newline\newline
\vspace{20pt}
\scriptsize\hfill Created by http://texblog.org}

\end{document}
</pre></p>
<p><a href="http://texblog.files.wordpress.com/2012/04/cv-test-full.png"><img class="aligncenter size-full wp-image-1217" title="cv.test.full" src="http://texblog.files.wordpress.com/2012/04/cv-test-full.png?w=490&h=634" alt="" width="490" height="634" /></a></p>
<p><strong>Additional Resources</strong></p>
<ul>
<li><a title="CV Rob Oakes" href="http://blog.oak-tree.us/index.php/writing/latex" target="_blank">Typeset your CV (xetexCV) by Rob Oakes</a></li>
<li><a title="CV template Rob J Hyndman" href="http://robjhyndman.com/researchtips/cv/" target="_blank">A LeTeX template for a CV by Rob J Hyndman</a></li>
<li><a title="Resumé/CV example Ted Pavlic" href="http://www.tedpavlic.com/post_resume_cv_latex_example.php" target="_blank">LaTeX example resumé/CV by Ted Pavlic</a></li>
<li><a title="Resumé/CV template Chris Paciorek" href="http://biosun1.harvard.edu/~paciorek/computingTips/Latex_template_creating_CV_.html" target="_blank">LaTeX resumé/CV template by Chris Paciorek</a></li>
<li><strong><a title="moderncv package on CTAN" href="http://www.ctan.org/pkg/moderncv" target="_blank">moderncv: A modern curriculum vitae class</a></strong></li>
<li><a title="Europecv package on CTAN" href="http://www.ctan.org/tex-archive/macros/latex/contrib/europecv" target="_blank">Unofficial class for European curricula vitae</a></li>
<li><a title="Typsetting your academic CV in LaTeX" href="http://nitens.org/taraborelli/cvtex" target="_blank">Typesetting your academic CV in LATEX</a></li>
<li><a title="CVs on LaTeX templates" href="http://www.latextemplates.com/cat/curricula-vitaes" target="_blank">CVs on LaTeX templates</a></li>
<li><a title="CurVe class on CTAN" href="http://www.ctan.org/tex-archive/macros/latex/contrib/curve" target="_blank">CurVe: A class for making curriculum vitae</a></li>
</ul>
<p>Drop me a comment if you know of other resources and I will add them to the list.</p>
<p><strong>Update</strong></p>
<p>A few days after publishing this post, a vivid discussion took place with lots of interesting CV examples on <a title="LaTeX CV discussion on hackerne.ws" href="http://hackerne.ws/item?id=3901506" target="_blank">hackerne.ws</a>.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/texblog.wordpress.com/1196/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/texblog.wordpress.com/1196/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/texblog.wordpress.com/1196/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/texblog.wordpress.com/1196/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/texblog.wordpress.com/1196/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/texblog.wordpress.com/1196/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/texblog.wordpress.com/1196/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/texblog.wordpress.com/1196/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/texblog.wordpress.com/1196/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/texblog.wordpress.com/1196/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/texblog.wordpress.com/1196/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/texblog.wordpress.com/1196/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/texblog.wordpress.com/1196/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/texblog.wordpress.com/1196/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=texblog.org&#038;blog=1106511&#038;post=1196&#038;subd=texblog&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://texblog.org/2012/04/25/writing-a-cv-in-latex/feed/</wfw:commentRss>
		<slash:comments>23</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/45435628abb56dd1acc9ac2ef104a2b1?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">tom</media:title>
		</media:content>

		<media:content url="http://texblog.files.wordpress.com/2012/04/cv-title1.png" medium="image">
			<media:title type="html">cv.title</media:title>
		</media:content>

		<media:content url="http://texblog.files.wordpress.com/2012/04/cv-title-photo.png" medium="image">
			<media:title type="html">cv.title.photo</media:title>
		</media:content>

		<media:content url="http://texblog.files.wordpress.com/2012/04/cv-address.png" medium="image">
			<media:title type="html">cv.address</media:title>
		</media:content>

		<media:content url="http://texblog.files.wordpress.com/2012/04/cv-education.png" medium="image">
			<media:title type="html">cv.education</media:title>
		</media:content>

		<media:content url="http://texblog.files.wordpress.com/2012/04/cv-language.png" medium="image">
			<media:title type="html">cv.language</media:title>
		</media:content>

		<media:content url="http://texblog.files.wordpress.com/2012/04/cv-profexp1.png" medium="image">
			<media:title type="html">cv.profexp</media:title>
		</media:content>

		<media:content url="http://texblog.files.wordpress.com/2012/04/cv-publication.png" medium="image">
			<media:title type="html">cv.publication</media:title>
		</media:content>

		<media:content url="http://texblog.files.wordpress.com/2012/04/cv-test-full.png" medium="image">
			<media:title type="html">cv.test.full</media:title>
		</media:content>
	</item>
		<item>
		<title>Counting the total number of&#8230;</title>
		<link>http://texblog.org/2012/04/16/counting-the-total-number-of/</link>
		<comments>http://texblog.org/2012/04/16/counting-the-total-number-of/#comments</comments>
		<pubDate>Mon, 16 Apr 2012 06:00:18 +0000</pubDate>
		<dc:creator>tom</dc:creator>
				<category><![CDATA[LaTeX]]></category>
		<category><![CDATA[Package]]></category>
		<category><![CDATA[Tips & tricks]]></category>
		<category><![CDATA[bibliography]]></category>
		<category><![CDATA[cite]]></category>
		<category><![CDATA[counter]]></category>
		<category><![CDATA[equation]]></category>
		<category><![CDATA[label]]></category>
		<category><![CDATA[mathtools]]></category>
		<category><![CDATA[totcount]]></category>
		<category><![CDATA[usepackage]]></category>

		<guid isPermaLink="false">http://texblog.org/?p=1173</guid>
		<description><![CDATA[&#8230;sections, chapters, pages, theorems, equations, references, etc. There are numerous potential commands in LaTeX one may consider counting in order to automatically output their total number of appearances in a document. The totcount package provides a simple way to do that. We will to consider two different cases, single commands (cite, section, chapter, etc.) and [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=texblog.org&#038;blog=1106511&#038;post=1173&#038;subd=texblog&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>&#8230;sections, chapters, pages, theorems, equations, references, etc. There are numerous potential commands in LaTeX one may consider counting in order to automatically output their total number of appearances in a document. The <a href="http://mirrors.ctan.org/macros/latex/contrib/totcount/totcount.pdf" title="Totcount package documentation" target="_blank">totcount package</a> provides a simple way to do that.</p>
<p>We will to consider two different cases, single commands (cite, section, chapter, etc.) and environments (equation, align, theorem) which are treated slightly differently. In fact, many environments have their particularities and may therefore need special manipulation. Let&#8217;s start with the more consistent case for which the author provided a minimal working example in the <a href="http://mirrors.ctan.org/macros/latex/contrib/totcount/totcount.pdf" title="Totcount package documentation" target="_blank">package documentation</a>.</p>
<p>&nbsp;<br />
<strong>References (cite)</strong></p>
<p>First, we define a new counter, in this case <code>citenum</code>. Next, we redefine the command <code>cite</code>, increasing the newly defined counter every time the command is called. Finally, we redefine the bibliography title in order to display the total number of references.</p>
<p>Below you will find a code example along with the pdf output:</p>
<p><pre class="brush: latex; highlight: [2,3,6,7];">\documentclass[11pt]{article}
\usepackage{totcount}
\newtotcounter{citenum}
\def\oldcite{}
\let\oldcite=\bibcite
\def\bibcite{\stepcounter{citenum}\oldcite}
\renewcommand\refname{References (\total{citenum})} %For article
%\renewcommand\bibname{} %For book and report
\begin{document}
A few \TeX\ references by Lamport \cite{lamport1986, lamport1987, lamport1994}
\bibliographystyle{plain}
\bibliography{references}
\tiny\hfill Created by http://texblog.org
\end{document}</pre></p>
<p><a href="http://texblog.files.wordpress.com/2012/04/citenum.png"><img src="http://texblog.files.wordpress.com/2012/04/citenum.png?w=490&h=188" alt="" title="citenum" width="490" height="188" class="aligncenter size-full wp-image-1176" /></a></p>
<p>For simple commands, displaying their total number is relatively straight forward. Let&#8217;s have a look at an example where the command defines an environment.</p>
<p>&nbsp;<br />
<strong>Equation</strong></p>
<p>As mentioned before, different environments behave differently and therefore need special handling. As an example, we will now show how to display the total number of equations along with the equation label on the right-hand side of every equation.</p>
<p>There are several ways to do it. In the example below, we use the <a href="http://mirror.ctan.org/macros/latex/contrib/mh/mathtools.pdf" title="Mathtools package documentation" target="_blank">mathtools package</a> which provides the <code>tag</code> command, allowing  to change the equation label. The label change will automatically be reflected when referencing the equations (see pdf output below). For practical reasons and to reduce typing, we implement the command <code>eqn</code> in the preamble. The command takes care of the counters and uses the standard <code>equation</code> environment to display the equation.</p>
<p><pre class="brush: latex; highlight: [2,3,7,8,9];">\documentclass[11pt]{article}
\usepackage{totcount, mathtools}
\newtotcounter{eqnnum}
\newcommand*{\eqn}[2]{%
	\stepcounter{eqnnum}%
	\stepcounter{equation}%
	\begin{equation}\label{#2}%
		#1\tag{\arabic{equation}/\protect\total{eqnnum}}%
	\end{equation}%
}
\begin{document}
\eqn{f_1(x)=a_1x^2+b_1x+c_1}{eqn:first}
\eqn{f_2(x)=a_2x^2+b_2x+c_2}{eqn:second}
See equation (\ref{eqn:first}) and (\ref{eqn:second}).
\tiny\hfill Created by http://texblog.org
\end{document}</pre></p>
<p><a href="http://texblog.files.wordpress.com/2012/04/eqnnum.png"><img src="http://texblog.files.wordpress.com/2012/04/eqnnum.png?w=490&h=102" alt="" title="eqnnum" width="490" height="102" class="aligncenter size-full wp-image-1180" /></a></p>
<p>&nbsp;<br />
<strong>Page numbers</strong></p>
<p>See <a href="http://texblog.org/2008/10/15/tip-showing-page-4-of-65/" title="Page 4 of 65.">this posts</a> for an example on how to display to the total number of pages in a document, e.g. Page 4 of 65.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/texblog.wordpress.com/1173/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/texblog.wordpress.com/1173/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/texblog.wordpress.com/1173/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/texblog.wordpress.com/1173/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/texblog.wordpress.com/1173/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/texblog.wordpress.com/1173/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/texblog.wordpress.com/1173/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/texblog.wordpress.com/1173/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/texblog.wordpress.com/1173/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/texblog.wordpress.com/1173/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/texblog.wordpress.com/1173/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/texblog.wordpress.com/1173/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/texblog.wordpress.com/1173/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/texblog.wordpress.com/1173/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=texblog.org&#038;blog=1106511&#038;post=1173&#038;subd=texblog&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://texblog.org/2012/04/16/counting-the-total-number-of/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/45435628abb56dd1acc9ac2ef104a2b1?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">tom</media:title>
		</media:content>

		<media:content url="http://texblog.files.wordpress.com/2012/04/citenum.png" medium="image">
			<media:title type="html">citenum</media:title>
		</media:content>

		<media:content url="http://texblog.files.wordpress.com/2012/04/eqnnum.png" medium="image">
			<media:title type="html">eqnnum</media:title>
		</media:content>
	</item>
		<item>
		<title>Left equation numbering</title>
		<link>http://texblog.org/2012/04/05/left-equation-numbering/</link>
		<comments>http://texblog.org/2012/04/05/left-equation-numbering/#comments</comments>
		<pubDate>Thu, 05 Apr 2012 07:42:15 +0000</pubDate>
		<dc:creator>tom</dc:creator>
				<category><![CDATA[Introduction]]></category>
		<category><![CDATA[LaTeX]]></category>
		<category><![CDATA[Package]]></category>
		<category><![CDATA[Tips & tricks]]></category>
		<category><![CDATA[align]]></category>
		<category><![CDATA[amsmath]]></category>
		<category><![CDATA[documentclass]]></category>
		<category><![CDATA[equation]]></category>
		<category><![CDATA[left number]]></category>
		<category><![CDATA[leqno]]></category>
		<category><![CDATA[math]]></category>
		<category><![CDATA[reqno]]></category>
		<category><![CDATA[usepackage]]></category>

		<guid isPermaLink="false">http://texblog.org/?p=1149</guid>
		<description><![CDATA[By default, equation numbers are place on the right side of an equation for any numbered math environment, such as equation, eqnarray, and align. Surprisingly, the equation number position can is changed through the optional documentclass argument leqno: Left numbering Right numbering (by default and therefore usually skipped): Here is a minimal working example: Align [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=texblog.org&#038;blog=1106511&#038;post=1149&#038;subd=texblog&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>By default, equation numbers are place on the right side of an equation for any numbered math environment, such as <code>equation</code>, <code>eqnarray</code>, and <code>align</code>. Surprisingly, the equation number position can is changed through the optional <code>documentclass</code> argument <code>leqno</code>:</p>
<p><strong>Left numbering</strong><br />
<pre class="brush: latex; light: true;">\documentclass[leqno]{article}</pre></p>
<p><strong>Right numbering</strong> (by default and therefore usually skipped):<br />
<pre class="brush: latex; light: true;">\documentclass[reqno]{article}</pre></p>
<p>Here is a minimal working example:</p>
<p><pre class="brush: latex; highlight: [1];">\documentclass[a4paper,12pt, leqno]{article}
\usepackage{amsmath}
\begin{document}
\subsubsection*{Equation:}
\begin{equation}
	f(x)=ax^2+bx+c
\end{equation}
\subsubsection*{Align:}
\begin{align}
	f_1(x)&amp;=a_1x^2+b_1x+c_1\\
	f_2(x)&amp;=a_2x^2+b_2x+c_2
\end{align}
\end{document}</pre></p>
<p><a href="http://texblog.files.wordpress.com/2012/04/leqno.png"><img src="http://texblog.files.wordpress.com/2012/04/leqno.png?w=490&h=195" alt="" title="leqno" width="490" height="195" class="aligncenter size-full wp-image-1151" /></a></p>
<p>Align is part of the <a href="ftp://ftp.ams.org/pub/tex/doc/amsmath/amsldoc.pdf" title="Amsmath package documentation" target="_blank">amsmath package</a> which was used here because there are several reasons to <a href="http://tug.org/pracjourn/2006-4/madsen/madsen.pdf" title="Avoid eqnarray" target="_blank">avoid eqnarray</a>.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/texblog.wordpress.com/1149/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/texblog.wordpress.com/1149/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/texblog.wordpress.com/1149/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/texblog.wordpress.com/1149/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/texblog.wordpress.com/1149/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/texblog.wordpress.com/1149/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/texblog.wordpress.com/1149/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/texblog.wordpress.com/1149/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/texblog.wordpress.com/1149/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/texblog.wordpress.com/1149/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/texblog.wordpress.com/1149/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/texblog.wordpress.com/1149/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/texblog.wordpress.com/1149/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/texblog.wordpress.com/1149/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=texblog.org&#038;blog=1106511&#038;post=1149&#038;subd=texblog&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://texblog.org/2012/04/05/left-equation-numbering/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/45435628abb56dd1acc9ac2ef104a2b1?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">tom</media:title>
		</media:content>

		<media:content url="http://texblog.files.wordpress.com/2012/04/leqno.png" medium="image">
			<media:title type="html">leqno</media:title>
		</media:content>
	</item>
		<item>
		<title>Cross-referencing list items</title>
		<link>http://texblog.org/2012/03/21/cross-referencing-list-items/</link>
		<comments>http://texblog.org/2012/03/21/cross-referencing-list-items/#comments</comments>
		<pubDate>Wed, 21 Mar 2012 04:12:35 +0000</pubDate>
		<dc:creator>tom</dc:creator>
				<category><![CDATA[Introduction]]></category>
		<category><![CDATA[LaTeX]]></category>
		<category><![CDATA[Tips & tricks]]></category>
		<category><![CDATA[description]]></category>
		<category><![CDATA[enumerate]]></category>
		<category><![CDATA[enumitem]]></category>
		<category><![CDATA[item]]></category>
		<category><![CDATA[itemize]]></category>
		<category><![CDATA[label]]></category>
		<category><![CDATA[list]]></category>
		<category><![CDATA[ref]]></category>
		<category><![CDATA[usepackage]]></category>

		<guid isPermaLink="false">http://texblog.org/?p=1127</guid>
		<description><![CDATA[List items of numbered lists (enumerate) can be cross-referenced using the standard \label{} and \ref{} command pair. Cross-referencing description items is not supported by default, but can be done with a few additional lines of code in the preamble. Enumerate Ordered or numbered lists are cross-referenced with the label-ref command pair similar to figures, tables [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=texblog.org&#038;blog=1106511&#038;post=1127&#038;subd=texblog&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>List items of numbered lists (<code>enumerate</code>) can be cross-referenced using the standard <code>\label{}</code> and <code>\ref{}</code> command pair. Cross-referencing <code>description</code> items is not supported by default, but can be done with a few additional lines of code in the preamble. </p>
<p><strong>Enumerate</strong><br />
Ordered or numbered lists are cross-referenced with the <code>label-ref</code> command pair similar to figures, tables or chapters. The <code>label</code> can either be place right after <code>\item</code> or after the item&#8217;s text. The cross-reference <code>\ref{}</code> works within and outside the list as shown in the example below.</p>
<p><pre class="brush: latex; highlight: [5,7];">\documentclass[11pt]{article}
\usepackage{hyperref}
\begin{document}
\begin{enumerate}
	\item \label{itm:first} This is a numbered item
	\item Another numbered item \label{itm:second}
	\item \label{itm:third} Same as \ref{itm:first}
\end{enumerate}
Cross-referencing items \ref{itm:second} and \ref{itm:third}.
\end{document}</pre></p>
<div id="attachment_1131" class="wp-caption aligncenter" style="width: 300px"><a href="http://texblog.files.wordpress.com/2012/03/cross-reference_enumerate.png"><img src="http://texblog.files.wordpress.com/2012/03/cross-reference_enumerate.png?w=490" alt="" title="Cross-reference_enumerate"   class="size-full wp-image-1131" /></a><p class="wp-caption-text">Cross-referencing numbered items in lists (enumerate).</p></div>
<p>Loading the <code>hyperref</code> package, automatically adds links to cross-references and allows navigation to list items by clicking the reference.</p>
<p><strong>Description</strong><br />
By default, items in a <code>description</code> can&#8217;t be cross-referenced. LaTeX would just use the number of the section/chapter. <a href="http://tex.stackexchange.com/questions/1230/reference-name-of-description-list-item-in-latex" title="Cross-referencing description items" target="_blank">SX has a solution</a> with a few lines of additional code in the preamble.</p>
<p><pre class="brush: latex;">\documentclass[11pt]{article}
\usepackage{enumitem, hyperref}
\makeatletter
\def\namedlabel#1#2{\begingroup
	#2%
	\def\@currentlabel{#2}%
	\phantomsection\label{#1}\endgroup
}
\makeatother
\begin{document}
\begin{description}[style=multiline, labelwidth=1.5cm]
	\item[\namedlabel{itm:rule1}{Rule 1}] Everything is easy with \LaTeX
	\item[\namedlabel{itm:rule2}{Rule 2}] Sometimes it is not that easy\\
		$\to$ \ref{itm:rule1} applies
\end{description}
\end{document}</pre></p>
<div id="attachment_1132" class="wp-caption aligncenter" style="width: 381px"><a href="http://texblog.files.wordpress.com/2012/03/cross-reference_description.png"><img src="http://texblog.files.wordpress.com/2012/03/cross-reference_description.png?w=490" alt="" title="Cross-reference_description"   class="size-full wp-image-1132" /></a><p class="wp-caption-text">Cross-referencing description items</p></div>
<p>The code in the preamble defines a new command <code>namedlabel</code> which produces the name when cross-referencing the item. In the example, the <code>enumitem</code> package is loaded for a correct alignment of multiline items (<a href="http://mirror.ctan.org/macros/latex/contrib/enumitem/enumitem.pdf" title="Enumitem package documentation" target="_blank">see documentation for details</a>)</p>
<p><strong>Itemize</strong><br />
Cross-referencing items in unordered lists (bullet items) is not supported and wouldn&#8217;t make sense anyway, since individual items don&#8217;t have an unique identifier.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/texblog.wordpress.com/1127/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/texblog.wordpress.com/1127/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/texblog.wordpress.com/1127/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/texblog.wordpress.com/1127/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/texblog.wordpress.com/1127/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/texblog.wordpress.com/1127/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/texblog.wordpress.com/1127/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/texblog.wordpress.com/1127/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/texblog.wordpress.com/1127/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/texblog.wordpress.com/1127/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/texblog.wordpress.com/1127/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/texblog.wordpress.com/1127/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/texblog.wordpress.com/1127/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/texblog.wordpress.com/1127/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=texblog.org&#038;blog=1106511&#038;post=1127&#038;subd=texblog&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://texblog.org/2012/03/21/cross-referencing-list-items/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/45435628abb56dd1acc9ac2ef104a2b1?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">tom</media:title>
		</media:content>

		<media:content url="http://texblog.files.wordpress.com/2012/03/cross-reference_enumerate.png" medium="image">
			<media:title type="html">Cross-reference_enumerate</media:title>
		</media:content>

		<media:content url="http://texblog.files.wordpress.com/2012/03/cross-reference_description.png" medium="image">
			<media:title type="html">Cross-reference_description</media:title>
		</media:content>
	</item>
		<item>
		<title>Greek letters in text without changing to math mode</title>
		<link>http://texblog.org/2012/03/15/greek-letters-in-text-without-changing-to-math-mode/</link>
		<comments>http://texblog.org/2012/03/15/greek-letters-in-text-without-changing-to-math-mode/#comments</comments>
		<pubDate>Thu, 15 Mar 2012 06:50:10 +0000</pubDate>
		<dc:creator>tom</dc:creator>
				<category><![CDATA[Introduction]]></category>
		<category><![CDATA[LaTeX]]></category>
		<category><![CDATA[Package]]></category>
		<category><![CDATA[Tips & tricks]]></category>
		<category><![CDATA[alpha]]></category>
		<category><![CDATA[beta]]></category>
		<category><![CDATA[euler]]></category>
		<category><![CDATA[gamma]]></category>
		<category><![CDATA[greek letters]]></category>
		<category><![CDATA[mu]]></category>
		<category><![CDATA[symbols]]></category>
		<category><![CDATA[textgreek]]></category>
		<category><![CDATA[usepackage]]></category>

		<guid isPermaLink="false">http://texblog.org/?p=1046</guid>
		<description><![CDATA[You don&#8217;t need to change to math mode every time you want to type a greek letter in normal text. Loading the textgreek package allows typesetting greek letters, generally just by adding a text-prefix to the letter name, e.g. for it would be: The letters will adapt to the font style you are using (bold, [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=texblog.org&#038;blog=1106511&#038;post=1046&#038;subd=texblog&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>You don&#8217;t need to change to math mode every time you want to type a greek letter in normal text. Loading the <code>textgreek</code> <a href="http://mirrors.ctan.org/macros/latex/contrib/textgreek/textgreek.pdf" title="Textgreek package documentation" target="_blank">package</a> allows typesetting greek letters, generally just by adding a <code>text</code>-prefix to the letter name, e.g. for <img src='http://s0.wp.com/latex.php?latex=%5CDelta%5Cbeta&amp;bg=f9fbf9&amp;fg=666666&amp;s=0' alt='&#92;Delta&#92;beta' title='&#92;Delta&#92;beta' class='latex' /> it would be:</p>
<p><pre class="brush: latex; highlight: [3];">\usepackage{textgreek}
...
\textDelta\textbeta</pre></p>
<p>The letters will adapt to the font style you are using (bold, italics, small capitals, etc.)</p>
<p>Furthermore, the author provides three different font types, <code>cbgreek</code> (default), <code>euler</code>, and <code>anthemisia</code>. The font type can be change through the optional argument, when loading the package:</p>
<p><pre class="brush: latex;">\usepackage[euler]{textgreek}</pre></p>
<p>The differences are minor for most letters, check the <a href="http://mirrors.ctan.org/macros/latex/contrib/textgreek/textgreek.pdf" title="Textgreek package documentation" target="_blank">documentation</a> for details.</p>
<p>Complete command list (copied from the documentation):</p>
<div id="attachment_1121" class="wp-caption aligncenter" style="width: 498px"><a href="http://texblog.files.wordpress.com/2012/03/textgreek_commands.png"><img src="http://texblog.files.wordpress.com/2012/03/textgreek_commands.png?w=490" alt="" title="textgreek_commands"   class="size-full wp-image-1121" /></a><p class="wp-caption-text">Commands for greek letters in normal text.</p></div>
<p>Note, <img src='http://s0.wp.com/latex.php?latex=%5Cmu&amp;bg=f9fbf9&amp;fg=666666&amp;s=0' alt='&#92;mu' title='&#92;mu' class='latex' /> is an exception. Since the <code>textcomp</code> package already provided a command <code>textmu</code>, the author decided to call it <code>textmugreek</code> instead. Use the latter to avoid unexpected results.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/texblog.wordpress.com/1046/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/texblog.wordpress.com/1046/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/texblog.wordpress.com/1046/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/texblog.wordpress.com/1046/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/texblog.wordpress.com/1046/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/texblog.wordpress.com/1046/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/texblog.wordpress.com/1046/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/texblog.wordpress.com/1046/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/texblog.wordpress.com/1046/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/texblog.wordpress.com/1046/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/texblog.wordpress.com/1046/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/texblog.wordpress.com/1046/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/texblog.wordpress.com/1046/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/texblog.wordpress.com/1046/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=texblog.org&#038;blog=1106511&#038;post=1046&#038;subd=texblog&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://texblog.org/2012/03/15/greek-letters-in-text-without-changing-to-math-mode/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/45435628abb56dd1acc9ac2ef104a2b1?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">tom</media:title>
		</media:content>

		<media:content url="http://texblog.files.wordpress.com/2012/03/textgreek_commands.png" medium="image">
			<media:title type="html">textgreek_commands</media:title>
		</media:content>
	</item>
		<item>
		<title>Writing a memo in LaTeX</title>
		<link>http://texblog.org/2012/03/07/writing-a-memo-in-latex/</link>
		<comments>http://texblog.org/2012/03/07/writing-a-memo-in-latex/#comments</comments>
		<pubDate>Wed, 07 Mar 2012 03:31:28 +0000</pubDate>
		<dc:creator>tom</dc:creator>
				<category><![CDATA[Introduction]]></category>
		<category><![CDATA[LaTeX]]></category>
		<category><![CDATA[Package]]></category>
		<category><![CDATA[Tips & tricks]]></category>
		<category><![CDATA[date]]></category>
		<category><![CDATA[from]]></category>
		<category><![CDATA[graphicx]]></category>
		<category><![CDATA[includegraphics]]></category>
		<category><![CDATA[logo]]></category>
		<category><![CDATA[memo]]></category>
		<category><![CDATA[memodate]]></category>
		<category><![CDATA[memofrom]]></category>
		<category><![CDATA[memorandum]]></category>
		<category><![CDATA[memosubject]]></category>
		<category><![CDATA[memoto]]></category>
		<category><![CDATA[subject]]></category>
		<category><![CDATA[texMemo]]></category>
		<category><![CDATA[to]]></category>
		<category><![CDATA[usepackage]]></category>

		<guid isPermaLink="false">http://texblog.org/?p=1089</guid>
		<description><![CDATA[I was recently looking for a memorandum template when I came across a neat memo class, texMemo, written by Rob Oakes. It is based on the article documentclass and provides the following five commands: To: \memoto{}, From: \memofrom{}, Subject: \memosubject{}, Date: \memodate{}, and Logo: \logo{}. The usage is very simple, here is an example: The [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=texblog.org&#038;blog=1106511&#038;post=1089&#038;subd=texblog&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I was recently looking for a memorandum template when I came across a neat memo class, <a href="http://www.oak-tree.us/2010/08/02/texmemo/" title="texMemo website" target="_blank">texMemo</a>, written by Rob Oakes. It is based on the <code>article documentclass</code> and provides the following five commands:</p>
<ul>
<li>To: <code>\memoto{}</code>,</li>
<li>From: <code>\memofrom{}</code>,</li>
<li>Subject: <code>\memosubject{}</code>,</li>
<li>Date: <code>\memodate{}</code>, and</li>
<li>Logo: <code>\logo{}</code>.</li>
</ul>
<p>The usage is very simple, here is an example:</p>
<p><pre class="brush: latex; highlight: [1,4,5,6,7,8,10];">\documentclass[a4paper,11pt]{texMemo}
\usepackage[english]{babel}
\usepackage{graphicx, blindtext}
\memoto{Mr. Unknown}
\memofrom{Tom}
\memosubject{Some fancy subject}
\memodate{\today}
\logo{\includegraphics[width=0.3\textwidth]{wp}}
\begin{document}
\maketitle
\blindtext
\end{document}</pre></p>
<div id="attachment_1091" class="wp-caption aligncenter" style="width: 500px"><a href="http://texblog.files.wordpress.com/2012/03/example_std_texmemo.png"><img src="http://texblog.files.wordpress.com/2012/03/example_std_texmemo.png?w=490&h=341" alt="" title="Example_std_texMemo" width="490" height="341" class="size-full wp-image-1091" /></a><p class="wp-caption-text">Sample output of texMemo class.</p></div>
<p>The WordPress logo was the first thing that came to my mind, I downloaded it from <a href="http://wordpress.org/about/logos/" title="Wordpress logos" target="_blank">here</a> (see the <a href="http://wordpressfoundation.org/trademark-policy/" title="Wordpress foundation trademark policy" target="_blank">trademark policy</a> for details on usage).</p>
<p><strong>Changing the looks</strong><br />
Since everyone has different requirements in terms of looks, I will show how to make simple changes to the class file. Let&#8217;s assume we want to get rid of the logo and have a centered title (Memorandum) instead. </p>
<p>To Remove the logo simply delete the <code>logo</code> command. In fact, this works with all texMemo-specific commands. To add a title, however, we need to make a slight modification in the <code>texMemo.cls</code> file. First, open the class file with any text editor, ideally with your preferred LaTeX editor. Scroll all the way down to the last block (&#8220;% To, From, Subject Block&#8221;) and add the following code just before that:</p>
<p><pre class="brush: latex;">{\begin{center}
\Large\bf
M\textsc{emorandum}
\end{center}}</pre></p>
<p>It adds the word &#8220;Memorandum&#8221; as a centered title in bold small capitals. Save the class file. To see the result, use the sample code from the beginning and remove the <code>\logo{}</code> command.</p>
<div id="attachment_1093" class="wp-caption aligncenter" style="width: 500px"><a href="http://texblog.files.wordpress.com/2012/03/example_mod_texmemo.png"><img src="http://texblog.files.wordpress.com/2012/03/example_mod_texmemo.png?w=490&h=265" alt="" title="Example_mod_texMemo" width="490" height="265" class="size-full wp-image-1093" /></a><p class="wp-caption-text">Sample output of modified texMemo class.</p></div>
<p>The texMemo files can be downloaded as a <a href="http://oak-tree.us/stuff/LyX/texMemo.zip" title="texMemo files." target="_blank">compressed file</a> from <a href="http://www.oak-tree.us/2010/08/02/texmemo/" title="TexMemo on Rob Oakes' website" target="_blank">Rob&#8217;s website</a>. The main file is the document-class: <code>texMemo.cls</code>. For illustration purposes, Rob provides some example tex-files with output.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/texblog.wordpress.com/1089/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/texblog.wordpress.com/1089/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/texblog.wordpress.com/1089/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/texblog.wordpress.com/1089/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/texblog.wordpress.com/1089/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/texblog.wordpress.com/1089/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/texblog.wordpress.com/1089/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/texblog.wordpress.com/1089/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/texblog.wordpress.com/1089/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/texblog.wordpress.com/1089/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/texblog.wordpress.com/1089/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/texblog.wordpress.com/1089/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/texblog.wordpress.com/1089/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/texblog.wordpress.com/1089/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=texblog.org&#038;blog=1106511&#038;post=1089&#038;subd=texblog&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://texblog.org/2012/03/07/writing-a-memo-in-latex/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/45435628abb56dd1acc9ac2ef104a2b1?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">tom</media:title>
		</media:content>

		<media:content url="http://texblog.files.wordpress.com/2012/03/example_std_texmemo.png" medium="image">
			<media:title type="html">Example_std_texMemo</media:title>
		</media:content>

		<media:content url="http://texblog.files.wordpress.com/2012/03/example_mod_texmemo.png" medium="image">
			<media:title type="html">Example_mod_texMemo</media:title>
		</media:content>
	</item>
		<item>
		<title>Latex page, line and font settings</title>
		<link>http://texblog.org/2012/03/01/latex-page-line-and-font-settings/</link>
		<comments>http://texblog.org/2012/03/01/latex-page-line-and-font-settings/#comments</comments>
		<pubDate>Thu, 01 Mar 2012 17:13:33 +0000</pubDate>
		<dc:creator>tom</dc:creator>
				<category><![CDATA[Introduction]]></category>
		<category><![CDATA[LaTeX]]></category>
		<category><![CDATA[Package]]></category>
		<category><![CDATA[Tips & tricks]]></category>
		<category><![CDATA[Arial]]></category>
		<category><![CDATA[font]]></category>
		<category><![CDATA[font size]]></category>
		<category><![CDATA[fontspec]]></category>
		<category><![CDATA[geometry]]></category>
		<category><![CDATA[Helvetica]]></category>
		<category><![CDATA[margin]]></category>
		<category><![CDATA[onehalfspacing]]></category>
		<category><![CDATA[setspace]]></category>
		<category><![CDATA[usepackage]]></category>
		<category><![CDATA[XeLaTeX]]></category>

		<guid isPermaLink="false">http://texblog.org/?p=1077</guid>
		<description><![CDATA[I was recently asked to write a three page assignment/case study using the following page, line and font settings: Arial, size 12 1.5 line spacing 2.5cm margin all round Let&#8217;s do one by one. &#160; Font type and size Font types are actually a bit of a pain in Latex and so far, I have [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=texblog.org&#038;blog=1106511&#038;post=1077&#038;subd=texblog&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I was recently asked to write a three page assignment/case study using the following page, line and font settings:</p>
<ul>
<li>Arial, size 12</li>
<li>1.5 line spacing</li>
<li>2.5cm margin all round</li>
</ul>
<p>Let&#8217;s do one by one.</p>
<p>&nbsp;</p>
<p><strong>Font type and size</strong></p>
<p>Font types are actually a bit of a pain in Latex and so far, I have almost always been using the standard font, Knuth&#8217;s Computer Modern. The reason for not using the fonts provided by the system is that Tex and Latex will give the same distinctive look no matter which platform a document was compile on, making the language system independent.</p>
<p>Some fonts are available, including Times Roman, Helvetica and Courier. Arial however is a &#8220;non-free-font&#8221; from Microsoft and has to be installed manually &#8212; I give up, it&#8217;s getting late and I tried various things without success, including <a title="Font installation" href="http://www.tug.org/fonts/fontinstall.html" target="_blank">installation</a> of the <a title="Arial font" href="http://www.ctan.org/tex-archive/fonts/urw/arial" target="_blank">Arial font family</a>.</p>
<p>I will go with <strong>XeLaTeX</strong> using system fonts, nice <img src='http://s0.wp.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> .</p>
<p><pre class="brush: latex;">\documentclass[11pt]{article}
\usepackage[english]{babel}
\usepackage{blindtext}
\usepackage{fontspec}
\setmainfont{Arial}
\begin{document}
\blindtext
\end{document}</pre></p>
<p>Another, less clean approach <a title="Arial font in LaTeX " href="http://how2s.org/index.php/Howto_use_Arial_Font_in_LaTeX" target="_blank">I came across</a> uses Latex with the following two lines added to the preamble:</p>
<p><pre class="brush: latex;">\renewcommand{\rmdefault}{phv}
\renewcommand{\sfdefault}{phv}</pre></p>
<p>It changes the font family to Helvetica, which is very similar to Arial, but it&#8217;s not the same.</p>
<p>The font size is easy, just use the <code>documentclass</code> option:</p>
<p><pre class="brush: latex;">\documentclass[12pt]{article}</pre></p>
<p>This brings me to the next point on the list above. I will stick to XeLaTeX, but all the examples will perfectly work with LaTeX, assuming you are using <strong>Helvetica</strong> and not Arial.</p>
<p>&nbsp;</p>
<p><strong>Linespacing</strong></p>
<p>Basically, 1.5 line spacing is done using the <code>setspace</code> package as follows:</p>
<p><pre class="brush: latex;">\usepackage{setspace}
\onehalfspacing</pre></p>
<p>Please see my <a title="Line spacing in LaTeX" href="http://texblog.org/2011/09/30/quick-note-on-line-spacing/" target="_blank">previous post on that topic</a> for more details on line spacing.</p>
<p>&nbsp;</p>
<p><strong>Setting the margins</strong></p>
<p>If you are lucky enough to require an equal margin on all sides, the geometry package with the margin option will do the trick:</p>
<p><pre class="brush: latex;">\usepackage[margin=2.5cm]{geometry}</pre></p>
<p>For different margins on every side, the package provides four options: <code>top</code>, <code>left</code>, <code>bottom</code>, <code>right</code>:</p>
<p><pre class="brush: latex;">\usepackage[top=1.2in, left=0.9in, bottom=1.2in, right=0.9in]{geometry}</pre></p>
<p>See the <a title="Geometry package." href="http://mirrors.ctan.org/macros/latex/contrib/geometry/geometry.pdf" target="_blank">package documentation</a> for more details.</p>
<p>&nbsp;</p>
<p><strong>Complete example (XeLaTeX)</strong></p>
<p><pre class="brush: latex;">\documentclass[12pt]{article}
\usepackage[english]{babel}
\usepackage{blindtext, fontspec, setspace}
\usepackage[margin=2.5cm]{geometry}
\setmainfont{Arial}
\onehalfspacing
\begin{document}
\blindtext
\end{document}</pre></p>
<div id="attachment_1079" class="wp-caption aligncenter" style="width: 500px"><a href="http://texblog.files.wordpress.com/2012/03/custom.png"><img class="size-full wp-image-1079" title="custom font, margins and line spacing" src="http://texblog.files.wordpress.com/2012/03/custom.png?w=490&h=190" alt="" width="490" height="190" /></a><p class="wp-caption-text">Customizing font, margins and line spacing.</p></div>
<p>Please leave me a comment if you know of a simple and nice tutorial on how to install non-free-fonts like Arial. Thanks!</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/texblog.wordpress.com/1077/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/texblog.wordpress.com/1077/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/texblog.wordpress.com/1077/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/texblog.wordpress.com/1077/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/texblog.wordpress.com/1077/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/texblog.wordpress.com/1077/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/texblog.wordpress.com/1077/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/texblog.wordpress.com/1077/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/texblog.wordpress.com/1077/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/texblog.wordpress.com/1077/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/texblog.wordpress.com/1077/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/texblog.wordpress.com/1077/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/texblog.wordpress.com/1077/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/texblog.wordpress.com/1077/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=texblog.org&#038;blog=1106511&#038;post=1077&#038;subd=texblog&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://texblog.org/2012/03/01/latex-page-line-and-font-settings/feed/</wfw:commentRss>
		<slash:comments>16</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/45435628abb56dd1acc9ac2ef104a2b1?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">tom</media:title>
		</media:content>

		<media:content url="http://texblog.files.wordpress.com/2012/03/custom.png" medium="image">
			<media:title type="html">custom font, margins and line spacing</media:title>
		</media:content>
	</item>
	</channel>
</rss>
