<?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/"
	>

<channel>
	<title>Apolitically Incorrect &#187; LaTeX</title>
	<atom:link href="http://www.oak-tree.us/blog/index.php/tag/latex/feed" rel="self" type="application/rss+xml" />
	<link>http://www.oak-tree.us/blog</link>
	<description>The Rants and Raves of an Unsettled Mind</description>
	<lastBuildDate>Mon, 31 Oct 2011 21:56:43 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>Typeset Your Curriculum Vitae &#8211; Part 3: Automatically Generate a List of Publications</title>
		<link>http://www.oak-tree.us/blog/index.php/2009/12/02/latex-cv-part3</link>
		<comments>http://www.oak-tree.us/blog/index.php/2009/12/02/latex-cv-part3#comments</comments>
		<pubDate>Wed, 02 Dec 2009 15:19:44 +0000</pubDate>
		<dc:creator>Rob Oakes</dc:creator>
				<category><![CDATA[Computer]]></category>
		<category><![CDATA[rapidBOOKS]]></category>
		<category><![CDATA[Writing and Literature]]></category>
		<category><![CDATA[Curiculum Vitae]]></category>
		<category><![CDATA[LaTeX]]></category>
		<category><![CDATA[Typesetting]]></category>

		<guid isPermaLink="false">http://www.oak-tree.us/blog/?p=1332</guid>
		<description><![CDATA[	
	<span class="Z3988" title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Adc&amp;rfr_id=info%3Asid%2Focoins.info%3Agenerator&amp;rft.title=Typeset+Your+Curriculum+Vitae+%26ndash%3B+Part+3%3A+Automatically+Generate+a+List+of+Publications&amp;rft.aulast=Oakes&amp;rft.aufirst=Rob&amp;rft.subject=Computer&amp;rft.subject=rapidBOOKS&amp;rft.subject=Writing+and+Literature&amp;rft.source=Apolitically+Incorrect&amp;rft.date=2009-12-02&amp;rft.type=blogPost&amp;rft.format=text&amp;rft.identifier=http://www.oak-tree.us/blog/index.php/2009/12/02/latex-cv-part3&amp;rft.language=English"></span>
Publications are the currency of ideas.  Through them the experts, thinkers and dreamers of this world can share their thoughts and insights.  A good publication is not only influential, but it’s even capable of shifting the course of a whole society, as Martin Luther King demonstrated with his “Letter from a Birmingham Jail”. Since publications [...]<p>Copywrite 2009: Rob Oakes.  <a href="http://www.oak-tree.us/blog">Apolitically Incorrect</a><br/><br/><a href="http://www.oak-tree.us/blog/index.php/2009/12/02/latex-cv-part3">Typeset Your Curriculum Vitae &ndash; Part 3: Automatically Generate a List of Publications</a></p>
]]></description>
			<content:encoded><![CDATA[	
	<span class="Z3988" title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Adc&amp;rfr_id=info%3Asid%2Focoins.info%3Agenerator&amp;rft.title=Typeset+Your+Curriculum+Vitae+%26ndash%3B+Part+3%3A+Automatically+Generate+a+List+of+Publications&amp;rft.aulast=Oakes&amp;rft.aufirst=Rob&amp;rft.subject=Computer&amp;rft.subject=rapidBOOKS&amp;rft.subject=Writing+and+Literature&amp;rft.source=Apolitically+Incorrect&amp;rft.date=2009-12-02&amp;rft.type=blogPost&amp;rft.format=text&amp;rft.identifier=http://www.oak-tree.us/blog/index.php/2009/12/02/latex-cv-part3&amp;rft.language=English"></span>
<p><img style="margin: 0px 15px 10px 0px; display: inline;" src="http://shelfelf.files.wordpress.com/2008/01/trinity-college-library-dub.jpg" alt="" width="350" height="276" align="left" />Publications are the currency of ideas.  Through them the experts, thinkers and dreamers of this world can share their thoughts and insights.  A good publication is not only influential, but it’s even capable of shifting the course of a whole society, as Martin Luther King demonstrated with his “<a href="http://www.oak-tree.us/stuff/King-Birmingham.pdf">Letter from a Birmingham Jail</a>”.</p>
<p>Since publications are so important to the dissemination of knowledge, there is a rather high expectation that an academic author should publish prolifically.  The mantra “Publish or Perish” is not just a clever quip, but a very serious way of life.</p>
<p>It is ironic, then, that the most prolific of academic writers can suffer from a surprising problem: it can be very difficult to keep track of all of their work.  Yet, an up to date CV is very important.  After all, publishing your work in influential journals is an important first step toward establishing tenure!</p>
<p>Members of a research team or those who collaborate outside of their institution experience this same problem, only more so.  Such a person may work on many projects at once, but only have direct responsibility for one or two of them.  This places the researcher in the unenviable position of trying to track the work of others.  This situation becomes even more complicated if the collaborator refuses to play by the rules of common decency.</p>
<p><!--adsensestart--></p>
<p>It would be nice, for example, if the primary author of a publication would <em>notify</em> the co-authors of its progress, or when it has been submitted.  But … that doesn’t always happen.  Academic researchers are busy people and soliciting feedback from all of your collaborators can be difficult … and there is a tendency for difficult things to go undone.  Thus, if you don’t follow what your team mates are working on, it is quite possible that an abstract might have gotten submitted while your back was turned.</p>
<p>To stay on top of the “delightful chaos”, you need to have some kind of system.  Personally, I keep my list of projects and publications in three places. The first (and perhaps most important) is the hand-written list in my experimental notebook. Any time I hear about a new project, it gets added to this list. I keep track of what I’ve contributed, what papers or abstracts have been created from the data, and what their status is. When I know that an abstract or paper has been accepted, I then create an entry for the item in my bibliography manager. Once in the bibliography manager, I can cite the reference in other documents such as proposals or related papers.</p>
<p>About once a year, I go through the tedious process of updating my CV. This typically involves manually sorting through both my project list and my reference database and account for new items or reconcile differences. Every time I do this, it's painful; and because I’ve historically formatted the reference list by hand, it's not uncommon for a typo to sneak its way in or for an author to accidentally get left off of a citation. These mistakes are never intentional, but they do happen.</p>
<p>When I find such an error in the reference database, I fix it. But since I often import these references from websites, the errors tend to be few and far between. Moreover, my reference database is something that I use every day; as a result, it gets a lot of scrutiny. My CV, on the other hand, gets updated much less frequently and errors tend to persist longer.</p>
<p>For a very long time, I've wanted to automate the process. Instead of keeping three separate lists – active projects, reference database, and CV – I’d prefer to keep only one (or two). But I've never found a really satisfactory way of doing so.  Or at least I hadn’t found a system until quite recently.</p>
<p>In my last review of different ways to typeset a CV, I came across an interesting article by <a href="http://nitens.org/taraborelli/home">Dario Taraborelli</a>.  In it, he described how to create a CV based on the standard “article” document class.  It was well designed, elegant, simple and attractive.  From his work, I created the <a href="http://www.oak-tree.us/blog/index.php/2009/11/25/latex-cv-part1">xetexCV document class</a>.  Additional research turned up an add-on module that makes it convenient to automatically generate a list of publications.  So, for the first time  in a great while, I have finally found a way to automatically generate a publications list in a simple and automated manner.  In this article, I will demonstrate how that is done.</p>
<p><span id="more-1332"></span></p>
<h2>The Basic Requirements</h2>
<p>For any automated solution to be successful, it needs to meet three primary criteria:</p>
<ul>
<li>When generating a list of references, bibliographic details should be pulled from the database.  This ensures that the information is always up to date.</li>
<li>The citation style must be customizable. I want the ability to specify whether my CV includes page numbers and hyperlinks.  Not all citation styles do.</li>
<li>The publication list should be broken into different categories.  Book chapters should not be listed with peer-reviewed journal articles, nor should abstracts be listed amongst the books.</li>
</ul>
<h2>cvsplitbib and xetexCV</h2>
<p>All three of these requirements can be met by using the xetexCV document class and the cvsplitbib style (both are provided in this <a href="http://www.oak-tree.us/stuff/LyX/xetexCV.zip">zipped directory</a>).  cvsplitbib is a version of regular <a href="http://www.ctan.org/tex-archive/macros/latex/contrib/splitbib/">splitbib</a>, a package that makes it possible to create categories in your bibliography. While all of the main features work as described in the <a href="ftp://indian.cse.msu.edu/pub/mirrors/CTAN/macros/latex/contrib/splitbib/splitbib.pdf">splitbib manual</a>, the macros have been changed to use the \cvsection and \cvsubsection macros of the xetexCV document class.  This ensures that formatting and indentation of the publications list is consistent with the rest of the document.</p>
<p>This combination also has an additional benefit.  Because cvsplitbib works entirely through LaTeX, any bibtex citaiton style can be used.  In the example below, I've used the the "plain" style, though it would have been just as easy to use ama, MLA, chicago or any other style in my distribution.</p>
<p><em>Note: There is an important difference between cvsplitbib and splitbib.  In the standard version of splitbib, it is possible to create subsubcategories (a second level of nested references).  Cvsplitbib does not support this as xetexCV does not define a \cvsubsubsection macro.</em></p>
<h2>Creating a Categorized List</h2>
<p>Creating different bibliography sections is achieved through the use of the “category” environment.  The arguments of the environment define the title of the section while the \SBentries macro is used to specify the citation key of any reference that should be included in that particular list.</p>
<p><em>Note: Citation keys should be added as a list separated by commas, any spaces will result in an error.</em></p>
<p>The following example creates a categorized bibliography with three different sections (<em>Novels</em>, <em>Children’s Literature</em> and <em>Comics, Graphic Novels</em>).  The bibliography data is pulled from the file “NeilGaiman-Publications.bib”, part of the xetexCV examples (see below):</p>
<blockquote><p>\begin{category}[A]{Novels}<br />
\SBentries{Gaiman2001-American-Gods,Gaiman2005-Anansi,<br />
Gaiman1990-Good-Omens,Gaiman1996-Neverwhere,<br />
Gaiman1999a-Stardust,Gaiman1985-Ghastly}<br />
\end{category}</p>
<p>\begin{category}[B]{Children's Literature}<br />
\SBentries{Gaiman1998a-Goldfish,Gaiman2008-Graveyard}<br />
\end{category}</p>
<p>\begin{category}[C]{Comics and Graphic Novels}<br />
\SBentries{Gaiman1994b-Angela,Gaiman1993-Angels,<br />
Gaiman1989-Black-Orchid,Gaiman1993a-<br />
Books-Magic,Gaiman1994a-Death-Living,Gaiman1997-Death-Time-Life,<br />
Gaiman2000a-Green-Lantern,Gaiman2003-Marvel-1602,<br />
Gaiman1999-Midnight-Days,Gaiman1994-Anthology-Virus,<br />
Gaiman2000-End-World,Gaiman1992-Signal-to-Noise,<br />
Gaiman1998b-Smoke-Mirrors,Gaiman1998-Inkeeper,<br />
Gaiman1991-Sandman,Gaiman1987-Violent-Cases}<br />
\end{category}</p></blockquote>
<p>Any reference that is not included in a specified category will be added to a fourth category, titled: “Miscellaneous”.</p>
<h2>Generating the Bibliography</h2>
<p>Once the various references have been categorized, you can generate the bibliography as you would in any other document:</p>
<blockquote><p>\nocite{*}\bibliographystyle{plain}<br />
\bibliography{NeilGaiman-Publications}</p></blockquote>
<p>Here the \nocite{*} command is used to list all of the publications in the .bib database.  \bibliographystyle{plain} specifies the BibTeX style to use, and \bibliography{Database-Name} tells BibTeX which database file to pull the information from.  Part of the formatted output from the example is shown below.</p>
<p><img style="display: inline; border-width: 0px;" title="image" src="http://www.oak-tree.us/blog/wp-content/uploads/2009/12/image.png" border="0" alt="image" width="525" height="210" /></p>
<h2>Examples and Class Files</h2>
<ul>
<li><a href="http://www.oak-tree.us/stuff/LyX/xetexCV.zip">Document Class and Examples (.zip)</a>.  This file contains the document class, cvsplitbib package, examples and other supporting files.</li>
<li>Neil Gaiman (Automatic Bibliography).  <a href="http://www.oak-tree.us/stuff/LyX/xetexCV/example3-xetexCV-AutomaticBib.tex">LaTeX Source</a>, <a href="http://www.oak-tree.us/stuff/LyX/xetexCV/example3-xetexCV-AutomaticBib.pdf">PDF Output</a>, <a href="http://www.oak-tree.us/stuff/LyX/xetexCV/NeilGaiman-Publications.bib">Reference Database</a></li>
<li>Albert Einstein.  <a href="http://www.oak-tree.us/stuff/LyX/xetexCV/example-xetexCV.tex">LaTeX Source</a>, <a href="http://www.oak-tree.us/stuff/LyX/xetexCV/example-xetexCV.pdf">PDF Output</a></li>
<li>Isaac Newton.  <a href="http://www.oak-tree.us/stuff/LyX/xetexCV/example2-xetexCV.tex">LaTeX Source</a>, <a href="http://www.oak-tree.us/stuff/LyX/xetexCV/example2-xetexCV.pdf">PDF Output</a></li>
</ul>
<p>______________________________________________________</p>
<h2>Acknowledgements and Further Reading</h2>
<p>The xetexCV document style is based on work from <a href="http://nitens.org/taraborelli/home">Dario Taraborelli’s website</a>.  The cvsplitbib package is a modified version of <a href="http://www.ctan.org/tex-archive/macros/latex/contrib/splitbib/">splitbib</a>, by <a href="http://www.lsv.ens-cachan.fr/~markey/">Nicolas Markey</a>.</p>
<p>This article is part 3 of a four part series.  <a href="http://www.oak-tree.us/blog/index.php/2009/11/30/latex-cv-part2">Part 1</a> introduces the xetexCV document class and describes its use.  <a href="http://www.oak-tree.us/blog/index.php/2009/11/30/latex-cv-part2">Part 2</a> dissects the code and explains how it works.  Part 4 describes how to use the document class and a corresponding layout file with LyX<br />
<h3>Similar Posts:</h3>
<ul class="similar-posts">
<li><a href="http://www.oak-tree.us/blog/index.php/2009/11/25/latex-cv-part1" rel="bookmark" title="November 25, 2009">Typeset Your Curriculum Vitae &ndash; Part 1: The xetexCV Document Class</a></li>
<li><a href="http://www.oak-tree.us/blog/index.php/2009/08/23/time-drive-bugs" rel="bookmark" title="August 23, 2009">Filing Bugs for Time Drive or LyX-Outline</a></li>
<li><a href="http://www.oak-tree.us/blog/index.php/2009/11/30/latex-cv-part2" rel="bookmark" title="November 30, 2009">Typeset Your Curriculum Vitae &ndash; Part 2: Extending and Customizing an Existing Document Class</a></li>
<li><a href="http://www.oak-tree.us/blog/index.php/2008/12/08/ironpython-part7" rel="bookmark" title="December 8, 2008">Learning IronPython - Part 7 - A Summary of Lessons Learned</a></li>
<li><a href="http://www.oak-tree.us/blog/index.php/2009/10/05/install-timedrive-ubuntu" rel="bookmark" title="October 5, 2009">Install Time Drive On Ubuntu and Other Debian Linux Distributions</a></li>
</ul>
<p><!-- Similar Posts took 28.526 ms --></p>
<p>Copywrite 2009: Rob Oakes.  <a href="http://www.oak-tree.us/blog">Apolitically Incorrect</a><br/><br/><a href="http://www.oak-tree.us/blog/index.php/2009/12/02/latex-cv-part3">Typeset Your Curriculum Vitae &ndash; Part 3: Automatically Generate a List of Publications</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.oak-tree.us/blog/index.php/2009/12/02/latex-cv-part3/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Typeset Your Curriculum Vitae &#8211; Part 2: Extending and Customizing an Existing Document Class</title>
		<link>http://www.oak-tree.us/blog/index.php/2009/11/30/latex-cv-part2</link>
		<comments>http://www.oak-tree.us/blog/index.php/2009/11/30/latex-cv-part2#comments</comments>
		<pubDate>Mon, 30 Nov 2009 18:54:16 +0000</pubDate>
		<dc:creator>Rob Oakes</dc:creator>
				<category><![CDATA[Computer]]></category>
		<category><![CDATA[rapidBOOKS]]></category>
		<category><![CDATA[Writing and Literature]]></category>
		<category><![CDATA[Curiculum Vitae]]></category>
		<category><![CDATA[LaTeX]]></category>
		<category><![CDATA[Typesetting]]></category>

		<guid isPermaLink="false">http://www.oak-tree.us/blog/?p=1327</guid>
		<description><![CDATA[	
	<span class="Z3988" title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Adc&amp;rfr_id=info%3Asid%2Focoins.info%3Agenerator&amp;rft.title=Typeset+Your+Curriculum+Vitae+%26ndash%3B+Part+2%3A+Extending+and+Customizing+an+Existing+Document+Class&amp;rft.aulast=Oakes&amp;rft.aufirst=Rob&amp;rft.subject=Computer&amp;rft.subject=rapidBOOKS&amp;rft.subject=Writing+and+Literature&amp;rft.source=Apolitically+Incorrect&amp;rft.date=2009-11-30&amp;rft.type=blogPost&amp;rft.format=text&amp;rft.identifier=http://www.oak-tree.us/blog/index.php/2009/11/30/latex-cv-part2&amp;rft.language=English"></span>
Many first-time users of LaTeX often mistakenly look at the language as a a type of glorified word processing software – albeit a particularly complicated one.  While such an analogy may be apt in helping new users become acclimatized to the language, it suffers from a rather nasty problem: LaTeX isn’t a word processor. If [...]<p>Copywrite 2009: Rob Oakes.  <a href="http://www.oak-tree.us/blog">Apolitically Incorrect</a><br/><br/><a href="http://www.oak-tree.us/blog/index.php/2009/11/30/latex-cv-part2">Typeset Your Curriculum Vitae &ndash; Part 2: Extending and Customizing an Existing Document Class</a></p>
]]></description>
			<content:encoded><![CDATA[	
	<span class="Z3988" title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Adc&amp;rfr_id=info%3Asid%2Focoins.info%3Agenerator&amp;rft.title=Typeset+Your+Curriculum+Vitae+%26ndash%3B+Part+2%3A+Extending+and+Customizing+an+Existing+Document+Class&amp;rft.aulast=Oakes&amp;rft.aufirst=Rob&amp;rft.subject=Computer&amp;rft.subject=rapidBOOKS&amp;rft.subject=Writing+and+Literature&amp;rft.source=Apolitically+Incorrect&amp;rft.date=2009-11-30&amp;rft.type=blogPost&amp;rft.format=text&amp;rft.identifier=http://www.oak-tree.us/blog/index.php/2009/11/30/latex-cv-part2&amp;rft.language=English"></span>
<p><img src="http://www.wordinfo.info/words/images/evolution-man-computer.gif" alt="" /></p>
<p><!--adsensestart--></p>
<p>Many first-time users of LaTeX often mistakenly look at the language as a a type of glorified word processing software – albeit a particularly complicated one.  While such an analogy may be apt in helping new users become acclimatized to the language, it suffers from a rather nasty problem: LaTeX isn’t a word processor.</p>
<p>If anything, LaTeX shares more in common with a programming languages than any type of application.  In fact, the document processing system is really nothing more than a bunch of re-usable pieces of programming called macros.  <em>Everything </em>is a macro.  That includes the commands that every user is familiar with: \title{}, \section{}, \subsection{}; in addition to the internal formatting commands that allows LaTeX to function.  (Most of the macros were originally created or packaged by <a href="http://en.wikipedia.org/wiki/Leslie_Lamport">Leslie Lamport</a> as a way of making TeX – the typesetting system created by <a href="http://www-cs-faculty.stanford.edu/~knuth/">Donald Knuth</a> – easier to work with.)</p>
<p>This has some rather practical consequence; because everything in LaTeX is a macro, it is far more extensible than a word processor could ever hope to be.  If you require a feature that doesn’t yet exist, it typically isn’t all that difficult to add it.  And when your extension is packaged inside a style or class, you can use those customizations in anything that you want to write.</p>
<p>But though creating macros isn’t particularly complicated, it is a different beast than just using the stock macros for writing.  This is not surprising, the craft of design is inherently different than the craft of writing.  There are different conventions to follow and different topics to obsess about.  In the <a href="http://www.oak-tree.us/blog/index.php/2009/11/25/latex-cv-part1">first article</a> of this series, I introduced the <a href="http://www.oak-tree.us/stuff/LyX/xetexCV.zip">xetexCV document class</a>, which is one example of where I decided to don the designer hat.</p>
<p>But before you get too far down the road of customizing and extending, there are a some important things that you need to know.  These include the general conventions used when working with document classes, their internal anatomy, an understanding of how macros are created, and how to handle formatting and layout challenges.  In this article, I will look at these issues more in detail, particularly as they pertain to xetexCV.  In the process of reviewing these topics, I will also explain some of my design choices.</p>
<p><span id="more-1327"></span></p>
<h2>Understanding Conventions</h2>
<p>When trying to customize or extend a document class, perhaps the very first thing to understand is that there are certain conventions.  The document “LateX 2E for class and package designers” describes them this way:</p>
<blockquote><p>LaTeX has three types of commands.</p>
<p>There are the author commands, such as \section, \emph and \times: most of these have short names, all in lower case.</p>
<p>There are also the class and package writer commands.  Most of these have long mixed-case names such as the following:</p>
<p>\InputIfFileExists    \RequirePackage    \PassOptionsToClass</p>
<p>Finally, there are the internal commands used in the LaTeX implementation, such as \@tempcnta, \@ifnextchar and \@eha: most of these commands contain @ in their names, which means they should not be used in documents, only in class and package files.</p></blockquote>
<p>These conventions help to better separate  procedural formatting from the descriptive tags used in writing a document.  But it also makes it easier to identify what different sections of the code do.  Sections that are responsible for importing and configuring packages will typically use mixed case names, while variables will contain the @ symbol, and user facing macros will be in lower case.</p>
<h2>The Internal Anatomy of a Document Class</h2>
<p>The next important thing to understand is that all document classes have a few well defined components.  That is to say, they have an internal anatomy which contributes to their function and physiology.  The internal bits include the class description and required statements, a block that imports and configures packages which new features will depend on, and a section where new macro commands are created or existing commands are redefined.</p>
<h3>Class Description and Required Statements</h3>
<h4>\ProvidesClass</h4>
<p>The very first such section gives the package name and description.  Also included is a definition of the most recent version of LaTeX that the document class will work with.  The relevant code from xetexCV is shown below:</p>
<blockquote><p>\NeedsTeXFormat{LaTeX2e}<br />
\ProvidesClass{xetexCV}[2009/11/30 – Modern looking résumé which uses<br />
the xetex typesetting system]<br />
…</p></blockquote>
<p>Here, the \NeedsTeXFormat{LaTeX2e} command is the earliest version of LaTeX that the document class will work with.  \ProvidesClass{xetexCV} identifies the class name (xeteCV) and everything in square brackets is the document description.</p>
<h4>\LoadClassWithOptions</h4>
<p>Generally speaking, there are two major types of LaTeX document classes: those that are free standing, and those that are variations of other document classes.  The standard classes (article.cls, report.cls, and book.cls) are examples of the former.  They contain all of the code needed to compile and work without additional extensions.  xetexCV, is an example of the second type.</p>
<p>To load an existing class as the foundation, you can use the \LoadClassWithOptions macro:</p>
<blockquote><p>…<br />
\LoadClassWithOptions{article}<br />
…</p></blockquote>
<p>xetexCV uses “article” for its foundation.  For that reason it is likely that other packages and styles will work without conflict.</p>
<h3>Building on the Foundation</h3>
<h4>\RequirePackage</h4>
<p>After the base class has been loaded, the new package is fully functional, if identical to the foundation class.  The next step in the customization process, then, is to begin adding new features and modifying old ones.  In the case of xetexCV, there were several changes which I wanted to make.  First,  I wanted to use an 8 1/2 inch by 11 inch paper (US letter) by default.  I also wanted to set a 1 inch margin.  Next, I wanted to use the XeTeX typesetting system and a pair of advanced OpenType fonts.</p>
<p>These changes are made through the use of other LaTeX packages.  In a document class, add-on modules are loaded through the \RequirePackage command.  Below is the related code from xetexCV:</p>
<blockquote><p>…<br />
\RequirePackage{fontspec}<br />
\RequirePackage{xunicode}<br />
\RequirePackage{xlxtra}</p>
<p>\RequirePackage{graphicx}<br />
\RequirePackage[colorlinks]{hyperref}</p>
<p>\RequirePackage{ifthen}<br />
…</p></blockquote>
<p>The first three packages (fontspec, xunicode, and xlxtra) are used by XeTeX to set fonts and provide unicode support.  <a href="http://www.ctan.org/tex-archive/help/Catalogue/entries/fontspec.html">fontspec</a>, in particular, is very important.  It provides convenience macros that make it easy to change the the various font families: \setmainfont{fontname}, \setromanfont, \setsansfont, and \setmonofont.  It also provides a way to manipulate font mappings, color, scaling, and inter-word spacing.  graphicx is used to add images to the document and manipulate their size.</p>
<p>hyperref makes it possible to add clickable hyperlinks and bookmarks.  The [colorlinks] option specifies that these special links should be rendered in a different color than other text.  The hyperref package is then configured using the \hypersetup{} macro.  By default, I’ve configured xetexCV to use blue for urls and webpages and black for filenames:</p>
<blockquote><p>\hypersetup{linkcolor=blue,citecolor=blue,filecolor=black,urlcolor=blue}</p></blockquote>
<p>The ifthen package provides several macros that make it easier to apply conditional formatting.  These will be discussed in more detail below.</p>
<h3>Creating New Features and Modifying Old Ones</h3>
<p>The last major section of a document class is where new macros are defined and old ones are modified.  As might be expected, this section typically accounts for the majority of the code.</p>
<h4>\def and \newcommand</h4>
<p>There are two major commands used to define macros and variables: \def and \newcommand.  \def is a TeX primitive while \newcommand is a LaTeX macro that checks for name clashes or other problems.  In many cases, they may be used interchangeably or in concert.  Consider the code block below which defines the \cvname macro:</p>
<blockquote><p>…<br />
\def\@cvname{\relax}<br />
\newcommand{\cvname}[1]{\gdef\@cvname{#1}}<br />
…</p></blockquote>
<p>\@cvname (according to the LaTeX conventions) is a variable/macro which should only be used from inside the LaTeX document class.  Consequently, it needs a user-facing macro that can be used to assign it a value.  This is what \cvname does.  In this example, the first line of code creates the variable and assigns it the LaTeX equivalent of a null value (\relax).  The second line is a little more interesting.  It defines a macro called \cvname with one argument [1].  Then, it takes the \cname argument and assigns it to \@cvname.</p>
<p>A second, related example can be seen in the definitions of \@cvimage and \cvimage:</p>
<blockquote><p>…<br />
\def\@cvimage{\relax}<br />
\newcommand{\cvimage}[1]{\gdef\@cvimage{#1}}<br />
…</p></blockquote>
<p>Again, the first line of code creates a variable (\@cvimage) with a null value, and the second line creates the user facing macro (\cvimage).  In later commands, the internal variables are used for layout and formatting (see below).</p>
<h4>\renewcommand</h4>
<p>If I need to modify a particular piece of code, those changes can be made using the \renewcommand macro.  This is similar to over-riding a method in an object-oriented programming language like C++ or Python.  Everything that hasn’t been changed continues to work as before.  In xetexCV, I wanted to modify the \section and \subsection macros.  To do so requires \@startsection and six arguments:</p>
<blockquote><p>\@startsection {NAME}{LEVEL}{INDENT}{BEFORESKIP}{AFTERSKIP}{STYLE}</p>
<p>Generic command to start a section.</p>
<p>NAME : e.g., “subsection”<br />
LEVEL : a number, denoting the depth of the section in the table of contents<br />
INDENT : Indentation of the heading from the left margin<br />
BEFORESKIP : Space to leave above the heading<br />
AFTERSKIP : Space to leave after the heading<br />
STYLE : Commands to set the font and style of the heading</p></blockquote>
<p>I, therefore, copied over the definitions from article.cls and modified the spacing and fonts:</p>
<blockquote><p>\renewcommand\section{\@startsection<br />
{section}{1}{\z@}%<br />
{-3.5ex \@plus –1ex<br />
\@minus -.2ex \vspace{1mm}}%<br />
{0.5mm}%<br />
{\sffamily\large\bfseries}}</p>
<p>\renewcommand\subsection{\@startsection<br />
{subsection}{1}{\z@}%<br />
{-3.5ex \@plus -1ex \@minus -.2ex}%<br />
{3.0mm}%<br />
{\sffamily\mdseries}}</p></blockquote>
<p>But while I chose to completely rewrite my section definitions, much the same thing could have been accomplished through the <a href="http://www.ctan.org/tex-archive/help/Catalogue/entries/sectsty.html">sectsty package</a>.  Despite the ease of sectsty, I felt that it would be better to define my styles from scratch.  sectsty often throws errors when used with other document classes, like scrbook.</p>
<h2>Rules for Creating New Macros</h2>
<p>The third important thing to understand when writing a document class is when you should add new macros rather than modifying the behavior of old ones.  In trying to make this decision, it is good to think about how changing a macro’s behavior will influence other document features.  In cases where a change might cause other features to break, it is better to add a new macro.</p>
<h3>Managing Complex Formatting - \cvsection and \cvsubsection</h3>
<p>While I was redefining the \section and \subsection macros, I ran into one such difficulty.  I wanted to set one indentation level for the header and another for the body text.  Further, I wanted to include a decorative line following the header.  Yet, no matter how I chose to define the STYLE or AFTERSKIP arguments, I couldn’t quite achieve the formatting I wished (shown below).</p>
<p><img style="display: inline; border-width: 0px;" title="image" src="http://www.oak-tree.us/blog/wp-content/uploads/2009/11/image6.png" border="0" alt="image" width="600" height="149" /></p>
<p>I finally decided that the formatting was too complex and required a new macro that could be used instead of \section and \subsection.  These new additions became \cvsection and \cvsubsection:</p>
<blockquote><p>\newcommand{\cvsection}[1]{\leftskip 0cm<br />
\section*{#1}\decorativeline\marginpar{\vspace{0.3ex}}<br />
\leftskip 116pt}</p></blockquote>
<p>As in the previous examples, \newcommand was used to define a code block with a single argument – the text to be formatted).  Then, I specified the procedure that I wanted to apply to the text</p>
<ul>
<li>The left text margin is moved so that it is flush with the page margin (\leftskip 0cm)</li>
<li>A non-numbered section header is added (\section*{#1})</li>
<li>The  decorative line is included (\decorativeline)</li>
<li>The text indentation is returned to the previous value (\leftskip 116pt).</li>
</ul>
<p><!--adsensestop--></p>
<p>The definition of \cvsubsection is similar, with two exceptions.  First, the \cvsubsection style does not include a decorative life.  The second major difference is more substantial.  I found the vertical spacing <em>preceding</em> the \subsection definition to be too large, I therefore moved the entire text block up by 0.2 cm (\vspace{-0.2cm}).  This was ultimately easier than trying to find a better value for the BEFORESKIP argument:</p>
<blockquote><p>\newcommand{\cvsubsection}[1]{\leftskip 0cm \vspace{-0.2cm}<br />
\subsection*{#1}\vspace{1.0mm} \leftskip 116pt}</p></blockquote>
<p><em>Note: When given a negative value, \vspace moves up the block of text by the specified amount</em>.</p>
<h2>Layout and Formatting<img style="margin: 0px 0px 10px 15px; display: inline; border-width: 0px;" title="image" src="http://www.oak-tree.us/blog/wp-content/uploads/2009/11/image7.png" border="0" alt="image" width="387" height="245" align="right" /></h2>
<p>One of the very best features of TeX is the automatic layout algorithm that it uses to position content.  In nearly all cases, allowing for LaTeX to manage spacing and layout will result in a better looking document than if you try and do so yourself.  There will be circumstances, however, where it is necessary to manually specify the position of photos or text in a more precise manner.</p>
<p>In xetexCV, there are two such cases.  In the first, special handling is required so that the CV contact information is correctly labeled and typeset.  Additional formatting commands are required so that the images and text of the title section have a “balanced” feel to them.  All of this processing occurs in the \makecvtitle macro.</p>
<h3>Conditional Formatting - \ifthenelse</h3>
<p>While it may appear simple, the formatting of the xetexCV contact section (which includes the institution, address, phone, fax, email and website information) is rather involved.  First, in order to simplify the use of the document class, I chose to add this information through the use of special macros (\email, \website\, \cvname, etc.).  Because the information is added through tags, this means that logical rules must be set up to handle to handle the layout.  What should happen, for example, if a fax number or website isn’t supplied?</p>
<p>The obvious answer is that the information should be left out of the contact details.  That also means that the label (“Fax:”, “Phone:”, “Email:”) should be omitted.  To accomplish this goal requires conditional formatting, better known to programmers as the “if, then, else” loop.  “If” a condition exists, “then” do one thing, “else” do another.</p>
<p>In LaTeX, conditional formatting is performed by the “ifthen” package and uses the \ifthenelse macro.</p>
<p>\ifthenelse takes three arguments:</p>
<blockquote><p>\ifthenelse{CONDITION}{IF TRUE}{ELSE}</p>
<p>CONDITION : The test condition, often expressed as \equals{VARIABLE}{VALUE}<br />
IF TRUE : The code that should be executed if the condition is satisfied<br />
ELSE : What to do if the condition is false</p></blockquote>
<p>At several instances in xetexCV, \ifthenelse is used to test if there is a null (or empty) value for a particular tag.  In the cases where it finds a null value, then no formatting commands are executed.  If, however, there is a value, then text is added.  A few of the simpler examples are shown below:</p>
<blockquote><p>\ifthenelse{\equal{\@phonenumber}{\relax}}<br />
{}{Phone: \texttt{\@phonenumber}\\}<br />
\ifthenelse{\equal{\@faxnumber}{\relax}}<br />
{}{Fax: \texttt{\@faxnumber}\<p style='text-align:center;'><span class='MathJax_Preview'><img src='http://www.oak-tree.us/blog/wp-content/plugins/latex/cache/tex_a284b26481d8734fcbdc5a5d9037aa4f.gif' style='' class='tex' alt="0.2cm]}<br />
\ifthenelse{\equal{\@email}{\relax}}<br />
{}{Email: \href{mailto:\@email}{\@email}\\}<br />
\ifthenelse{\equal{\@website}{\relax}}<br />
{}{Website: \href{\@website}{\@website}\\}</p></blockquote>
<p>In each of these cases, the \equal macro is used to check if the pertinent variable (specified by the \@ symbol) still has a value of \relax (\equal{\@variablename}{relax}).</p>
<p><em>Note: \relax can be thought of as an equivalent to null in other language.</em></p>
<p>If the value is still set to \relax, then nothing is done (denoted by the empty diamond brackets). If there is a non-null value, however, then the appropriate label and formatted text is added to the document.</p>
<p>While these examples are relatively simple, the same principle can be used to for very complicated formatting. \makecvtitle, for example, uses a similar conditional statement to see if the user has specified an image. If not, then it will use one formatting style for the entire title section. If so, then it uses the layout shown in the examples.</p>
<h3>Balancing Images and Text - \makecvtitle</h3>
<p>In addition to the conditional formatting issues, \makecvtitle must also wrestle with the best way of creating a single, unified title block. The CV name, contact information and photo should all be included. Moreover, subsequent sections should be added after the end of the photo, rather than wrapping around it. One of the easiest ways to create such a unified block of content is to use the minipage environment.</p>
<p>The minipage is extremely flexible. It can have text, formatting and image within a self-enclosed space. Furthermore, they can be embedded within one another. By creating a series of embedded minipages (as shown below), you can group related content. You can additionally specify how wide you want each minipage environment to be, or you can let the LaTeX engine make those determinations.</p>
<p><em>Note: An additional advantage of minipage is that any footnotes added to text within the minipage are part of that environment instead of the main document. This is useful for adding footnotes to figures or text. Accomplishing the same thing in Microsoft Word without tedious manual formatting is impossible.</em></p>
<p><img style="display: inline; border-width: 0px;" title="Embedded Minipages" src="http://www.oak-tree.us/blog/wp-content/uploads/2009/11/EmbeddedMinipages.png" border="0" alt="Embedded Minipages" width="400" height="365" /></p>
<p>I?ve used this strategy to ensure that text containing the contact details is properly aligned against the cv photo. The minipage environment from xetexCV is shown below:</p>
<blockquote><p>\begin{minipage}{6in}<br />
\begin{minipage}{114pt}<br />
\resizebox*{100pt}{!}<br />
{\includegraphics{\@cvimage}}<br />
\end{minipage}<br />
\begin{minipage}{4in}<br />
\ifthenelse{\equal{\@institution}{\relax}}<br />
{}{\bfseries\@institution\\}<br />
\mdseries\@contactaddress\" /></span></p>!0.2cm]<br />
\ifthenelse{\equal{\@phonenumber}{\relax}}<br />
{}{Phone: \texttt{\@phonenumber}\\}<br />
\ifthenelse{\equal{\@faxnumber}{\relax}}<br />
{}{Fax: \texttt{\@faxnumber}\$$!0.2cm]}<br />
\ifthenelse{\equal{\@email}{\relax}}<br />
{}{Email: \href{mailto:\@email}{\@email}\\}<br />
\ifthenelse{\equal{\@website}{\relax}}<br />
{}{Website: \href{\@website}{\@website}\\}<br />
\end{minipage}<br />
\end{minipage}</p></blockquote>
<p>As you may notice, there are three embedded minipages here (the main minipage and two sub pages).  The main minipage is set to span the entire width of the text.  However, the first embedded minipage is only 114 pt in width (about 1.6 inches).  Within this first box, I place the cvphoto, resized to a width of 100 pt:</p>
<blockquote><p>\resizebox*{100pt}{!}<br />
{\includegraphics{\@cvimage}}</p></blockquote>
<p><em>Note: The {!} argument in \resizebox allows the image to stretch proportionally in the vertical direction.</em></p>
<p>The second minipage is allowed to take up the rest of the paper width and includes the conditional formatting for the contact details.</p>
<h2>Conclusion</h2>
<p>Through the use of custom formatting, packages and macros, I’ve created a document that is substantially different from the foundation class (article.cls).  Despite those differences, nearly every major customization was made using simple LaTeX macros which many users will be familiar with.  Further, because it is built on a solid foundation, the ability to use other add-on packages is retained.</p>
<p>Extending an existing document class does not need to be difficult.  It is possible to use many of the commands used for writing a document.  Additionally, the modifications could be packaged as a style (.sty) and used to enhance any content that I might write in the future.</p>
<p>This flexibility is one of the reasons why LaTeX is such a good candidate for the typesetting of scientific and technical material.  It’s also why LaTeX is a good candidate for creating design heavy documents, such as a curiculum vitae.</p>
<p>______________________________________________________</p>
<h2>Acknowledgements and Further Reading</h2>
<p>Additional information on the structure of document classes can be found in the article “<a href="http://www.tug.org/TUGboat/Articles/tb28-1/tb88flynn.pdf">Rolling your own Document Class: Using LaTeX to keep away from the Dark Side</a>” by Peter Flynn of Silmaril Consultants.</p>
<p>A second article called “<a href="http://www.tug.org/TUGboat/Articles/tb29-3/tb93mansfield.pdf">How to develop your own document class – our experience</a>” describes additional techniques for documents that might have non-standard formatting.  It outlines several common mistakes and ways to get avoid them.</p>
<p>This article is part 2 of a four part series.  <a href="http://www.oak-tree.us/blog/index.php/2009/11/25/latex-cv-part1">Part 1</a> introduces the xetexCV document class and describes its use.  <a href="http://www.oak-tree.us/blog/index.php/2009/12/02/latex-cv-part3">Part 3</a> shows how to generate a publications list through the use of a .bib database and custom BibTeX style.  Part 4 describes how to use the document class and a corresponding layout file with LyX.<br />
<h3>Similar Posts:</h3>
<ul class="similar-posts">
<li><a href="http://www.oak-tree.us/blog/index.php/2009/11/25/latex-cv-part1" rel="bookmark" title="November 25, 2009">Typeset Your Curriculum Vitae &ndash; Part 1: The xetexCV Document Class</a></li>
<li><a href="http://www.oak-tree.us/blog/index.php/2009/11/14/customize-lyx-character-styles" rel="bookmark" title="November 14, 2009">Customizing LyX: Character Styles and the LyX Local Layout</a></li>
<li><a href="http://www.oak-tree.us/blog/index.php/2009/12/02/latex-cv-part3" rel="bookmark" title="December 2, 2009">Typeset Your Curriculum Vitae &ndash; Part 3: Automatically Generate a List of Publications</a></li>
<li><a href="http://www.oak-tree.us/blog/index.php/2008/11/19/ironpython-part3" rel="bookmark" title="November 19, 2008">Learning IronPython – Part 3 – A Beautiful Start</a></li>
<li><a href="http://www.oak-tree.us/blog/index.php/2009/03/04/perfect-tool" rel="bookmark" title="March 4, 2009">Creating the Perfect Writing Tool: A Proposal</a></li>
</ul>
<p><!-- Similar Posts took 104.374 ms --></p>
<p>Copywrite 2009: Rob Oakes.  <a href="http://www.oak-tree.us/blog">Apolitically Incorrect</a><br/><br/><a href="http://www.oak-tree.us/blog/index.php/2009/11/30/latex-cv-part2">Typeset Your Curriculum Vitae &ndash; Part 2: Extending and Customizing an Existing Document Class</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.oak-tree.us/blog/index.php/2009/11/30/latex-cv-part2/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Typeset Your Curriculum Vitae &#8211; Part 1: The xetexCV Document Class</title>
		<link>http://www.oak-tree.us/blog/index.php/2009/11/25/latex-cv-part1</link>
		<comments>http://www.oak-tree.us/blog/index.php/2009/11/25/latex-cv-part1#comments</comments>
		<pubDate>Wed, 25 Nov 2009 04:02:27 +0000</pubDate>
		<dc:creator>Rob Oakes</dc:creator>
				<category><![CDATA[Computer]]></category>
		<category><![CDATA[rapidBOOKS]]></category>
		<category><![CDATA[Writing and Literature]]></category>
		<category><![CDATA[Curiculum Vitae]]></category>
		<category><![CDATA[LaTeX]]></category>
		<category><![CDATA[Typesetting]]></category>

		<guid isPermaLink="false">http://www.oak-tree.us/blog/?p=1321</guid>
		<description><![CDATA[	
	<span class="Z3988" title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Adc&amp;rfr_id=info%3Asid%2Focoins.info%3Agenerator&amp;rft.title=Typeset+Your+Curriculum+Vitae+%26ndash%3B+Part+1%3A+The+xetexCV+Document+Class&amp;rft.aulast=Oakes&amp;rft.aufirst=Rob&amp;rft.subject=Computer&amp;rft.subject=rapidBOOKS&amp;rft.subject=Writing+and+Literature&amp;rft.source=Apolitically+Incorrect&amp;rft.date=2009-11-25&amp;rft.type=blogPost&amp;rft.format=text&amp;rft.identifier=http://www.oak-tree.us/blog/index.php/2009/11/25/latex-cv-part1&amp;rft.language=English"></span>
Very few documents are more personal than a curriculum vitae (CV).  A CV lists a person’s educational history, who they’ve worked for and what they’ve accomplished.  Moreover, a CV is frequently used to judge a person’s inherent worth and value (or at least exploitability).  A quality curiculum vitae matters, a lot. For that reason, a [...]<p>Copywrite 2009: Rob Oakes.  <a href="http://www.oak-tree.us/blog">Apolitically Incorrect</a><br/><br/><a href="http://www.oak-tree.us/blog/index.php/2009/11/25/latex-cv-part1">Typeset Your Curriculum Vitae &ndash; Part 1: The xetexCV Document Class</a></p>
]]></description>
			<content:encoded><![CDATA[	
	<span class="Z3988" title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Adc&amp;rfr_id=info%3Asid%2Focoins.info%3Agenerator&amp;rft.title=Typeset+Your+Curriculum+Vitae+%26ndash%3B+Part+1%3A+The+xetexCV+Document+Class&amp;rft.aulast=Oakes&amp;rft.aufirst=Rob&amp;rft.subject=Computer&amp;rft.subject=rapidBOOKS&amp;rft.subject=Writing+and+Literature&amp;rft.source=Apolitically+Incorrect&amp;rft.date=2009-11-25&amp;rft.type=blogPost&amp;rft.format=text&amp;rft.identifier=http://www.oak-tree.us/blog/index.php/2009/11/25/latex-cv-part1&amp;rft.language=English"></span>
<p><!--adsensestart-->Very few documents are more personal than a curriculum vitae (CV).  A CV lists a person’s educational history, who they’ve worked for and what they’ve accomplished.  Moreover, a CV is frequently used to judge a person’s inherent worth and value (or at least exploitability).  A quality curiculum vitae <em>matters</em>, a lot.</p>
<p>For that reason, a CV not only needs to include all the pertinent information of a person’s life, but it also needs to look <em>good. </em>An attractive CV with good spacing and contrast leaves a positive impression and makes it easier to find information.  When laid out correctly, a reviewer might just find themselves scouring past accomplishments for interesting tidbits: “I didn’t realize that this applicant organized a lecture series with Patch Adams and other notables, that’s <em>interesting</em>!”</p>
<p><span id="more-1321"></span>There are many dedicated CV classes which can be used to typeset a CV with LaTeX.  Unfortunately, they all share one thing in common: they’re complicated.  To ensure that the spacing and fonts are correct, far too often a document based on these classes will devolve into a jumbled mess of tags and obscure page layout commands.</p>
<p>I’ve tried to typeset my CV with LaTeX a number of times, and in nearly every case, I’ve been unhappy with the output.  Sure, the end product is attractive <em>enough; </em>but it doesn’t quite match the CV that I have in my head.  To really arrive at my coveted ideal of perfection, I would need to manually specify the font and position of nearly every element on the page; which is why I’ve normally used a dedicated layout program (such as Adobe InDesign) for the job.</p>
<p>This is unfortunate, however, since a CV based on LaTeX would be much easier to keep current.  Additionally, a well designed document class and corresponding BibTeX style would allow me to use my existing bibliographic database to automate the process.</p>
<p>Thus, any time that I need to make major updates, I always check the internet for information and new LaTeX classes.  While conducting one such review a few days ago, I came across <a href="http://nitens.org/taraborelli/cvtex">a very interesting article</a> and set of examples by <a href="http://nitens.org/taraborelli/home">Dario Taraborelli</a> of the <a href="http://cress.soc.surrey.ac.uk/">University of Surrey</a>.  In his write-up, Dr. Taraborelli expresses frustrations which are similar to my own;  but instead of complaining and throwing his hands up in exasperation, he went on to solve the problems in an elegant way.</p>
<p>Rather than use or modify one of the existing CV classes (as I would have done), Taraborelli opted to extend the article class by adding additional features.  Perhaps the most important addition was the use of <a href="http://scripts.sil.org/cms/scripts/page.php?site_id=nrsi&amp;id=XeTeX">XeTeX</a> and the \fontspec package, which allows for OpenType or <a href="http://nitens.org/taraborelli/latex">expert fonts</a> to be used and other advanced features.  The end result of this work is an attractive and <em>flexible </em>document template.</p>
<p>Dr. Taraborelli’s example also shows how easy it can be to extend an existing document class to meet a more specific need.  As I read through the example code, I realized that it would be straightforward to build upon his work and create something that would suit my particular aesthetic.<!--adsensestop--></p>
<p>So … I did, and this series is the result of my efforts.</p>
<p>In the remainder of this article, I will introduce the new CV document class I created (called xetexCV) and provide a few examples of how to work with it.  In <a href="http://www.oak-tree.us/blog/index.php/2009/11/30/latex-cv-part2">part 2</a>, I will dissect the class code and explain how it works.  I will also provide hints on how it might be modified.  In <a href="http://www.oak-tree.us/blog/index.php/2009/12/02/latex-cv-part3">part 3</a>, I will show how to generate a publications list through the use of a .bib database and custom BibTeX style.  In Part 4, I will describe how the document class and corresponding layout file can be used with LyX.</p>
<p><img style="display: inline; border-width: 0px;" title="image" src="http://www.oak-tree.us/blog/wp-content/uploads/2009/11/image3.png" border="0" alt="image" width="550" height="286" /></p>
<h2>xetexCV – An Attractive and Easy to Use CV Document Class</h2>
<h3>Downloads and Installation</h3>
<p>All of the files needed to use the class (including xetexCV.cls, examples and supporting files) can be found <a href="http://www.oak-tree.us/stuff/LyX/xetexCV.zip">here</a>.  To install, copy to an appropriate folder in your tex path and refresh the tex database:</p>
<blockquote><p>sudo texhash</p></blockquote>
<h4>Package Requirements</h4>
<ul>
<li>XeTeX Typesetting Engine.  For users of Mac OS X and Windows, XeTeX is included in the MacTeX and MikTeX distributions (respectively).  Users of Linux, however, will need to install the texlive-xetex package</li>
<li>Fontspec package (included with MacTeX, MikTeX or texlive-xetex)</li>
<li>OpenType Expert Fonts.  By default, the document class uses <a href="http://www.josbuivenga.demon.nl/fontin.html">Fontin</a> and <a href="http://www.josbuivenga.demon.nl/fontinsans.html">Fontin sans</a>.</li>
</ul>
<h3>Curiculum Vitae Examples</h3>
<ul>
<li>Albert Einstein.  <a href="http://www.oak-tree.us/stuff/LyX/xetexCV/example-xetexCV.tex">LaTeX Source</a>, <a href="http://www.oak-tree.us/stuff/LyX/xetexCV/example-xetexCV.pdf">PDF Output</a></li>
<li>Isaac Newton.  <a href="http://www.oak-tree.us/stuff/LyX/xetexCV/example2-xetexCV.tex">LaTeX Source</a>, <a href="http://www.oak-tree.us/stuff/LyX/xetexCV/example2-xetexCV.pdf">PDF Output</a></li>
</ul>
<h3>xetexCV Class Usage</h3>
<p>To use the xetexCV class, there are a few important macros.  These include:</p>
<ul>
<li>The \makecvtitle macro and title block tags</li>
<li>The \cvsection and \cvsubsection macros</li>
<li>The \years tag for hanging notes</li>
</ul>
<h4>\makecvtitle</h4>
<p>The title block is created through the use of the \makecvtitle macro.  The name, institution and contact information are all specified by descriptive tags.  The example below shows what these are and how they are used:</p>
<blockquote><p>\documentclass{xetexCV}</p>
<p>\cvname{Albert Einstein}<br />
\cvimage{Albert-Einstein.jpg}<br />
\institution{Institute for Advanced Study}</p>
<p>\contactaddress{Einstein Drive\\<br />
Princeton, New Jersey 08450<br />
United States of America}</p>
<p>\phone number{609-734-8000}<br />
\faxnumber{609-924-8399}<br />
\email{a.einstein@ias.edu}<br />
\website{http://www.ias.edu/spfeatures/einstein}</p>
<p><img style="margin: 0px 0px 0px 15px; display: inline; border-width: 0px;" title="image" src="http://www.oak-tree.us/blog/wp-content/uploads/2009/11/image4.png" border="0" alt="image" width="335" height="322" align="right" />\makecvtitle</p></blockquote>
<h4>\cvsection and \cvsubsection</h4>
<p>Sections and subsections can be added through the \cvsection{section name} and \cvsubsection{subsection name} macros.  The following codeblock creates the “Publications” section header and “Peer Reviewed Journals” subhead seen at right:</p>
<blockquote><p>\cvsection{Publications}<br />
\cvsubsection{Journal Articles}</p>
<p>…</p></blockquote>
<h4>Hanging Notes</h4>
<p>Hanging notes can be specified through the use of the \years macro.  This is helpful for typesetting education, employment history, and awards.  The following example produces the output seen below:</p>
<blockquote><p>\cvsection{Appointments Held}</p>
<p>University of Bern \years{1908-1911}\\<br />
University of Zurich \years{1911-1912}\\<br />
Charles University of Prague \years{1912-1914}\\<br />
Prussian Academy of Sciences, Berlin \years{1914-1932}\\<br />
University of Leiden \years{1920-1930}\\<br />
Institute for Advanced Study, Princeton \years{1932-1955}</p></blockquote>
<p><img style="display: inline; border-width: 0px;" title="image" src="http://www.oak-tree.us/blog/wp-content/uploads/2009/11/image5.png" border="0" alt="image" width="431" height="160" /></p>
<h4>Choosing a Font</h4>
<p>To change the font, use the \fontspec package and appropriate \settext macro.  The example below shows how to change the main font and sans font to Warnock Pro and Frutiger LT Std (commercial fonts available as part of the Adobe Font Folio 11):</p>
<blockquote><p>\setmainfont[Ligatures={Common}, Numbers={OldStyle}]{Warnock Pro}<br />
\setsansfont{Frutiger LT Std}</p></blockquote>
<p>All of the examples shown here were typeset with Warner Pro and Frutiger.  By default, however, the document class uses <a href="http://www.josbuivenga.demon.nl/fontin.html">Fontin</a> and <a href="http://www.josbuivenga.demon.nl/fontinsans.html">Fontin sans</a>, which are available as free downloads.  Another excellent font alternative is <a href="http://scripts.sil.org/cms/scripts/page.php?site_id=nrsi&amp;item_id=Gentium_basic">Gentium Basic</a>.  Because XeTeX can use OpenType fonts, however, you can use any font installed on your computer.</p>
<h3>Other Features</h3>
<ul>
<li>Font features such as ligatures and glyph variants can be accessed through the <a href="http://www.ctan.org/tex-archive/help/Catalogue/entries/fontspec.html">fontspec</a> package</li>
<li>The examples and class are unicode compatible.  This means means that you can write in Chinese, Cyrillic or Greek without additional packages</li>
</ul>
<p>______________________________________________________</p>
<h2>Acknowledgements and Further Reading</h2>
<p>As noted above, this document class is based on a <a href="http://nitens.org/taraborelli/cvtex">similar example</a> available from <a href="http://nitens.org/taraborelli/home">Dario Taraborelli’s website</a>.  Other examples of how to create a resume or CV are available from <a href="http://matthewm.boedicker.org/code/latex_resume_tips.php">Matthew Boedicker</a> and <a href="http://linux.dsplabs.com.au/resume-writing-example-latex-template-linux-curriculum-vitae-professional-cv-layout-format-text-p54/">Kamil Wójcicki</a>.<br />
<h3>Similar Posts:</h3>
<ul class="similar-posts">
<li><a href="http://www.oak-tree.us/blog/index.php/2009/11/30/latex-cv-part2" rel="bookmark" title="November 30, 2009">Typeset Your Curriculum Vitae &ndash; Part 2: Extending and Customizing an Existing Document Class</a></li>
<li><a href="http://www.oak-tree.us/blog/index.php/2009/11/14/customize-lyx-character-styles" rel="bookmark" title="November 14, 2009">Customizing LyX: Character Styles and the LyX Local Layout</a></li>
<li><a href="http://www.oak-tree.us/blog/index.php/2009/12/02/latex-cv-part3" rel="bookmark" title="December 2, 2009">Typeset Your Curriculum Vitae &ndash; Part 3: Automatically Generate a List of Publications</a></li>
<li><a href="http://www.oak-tree.us/blog/index.php/2008/12/05/the-win32-api-and-simplicity" rel="bookmark" title="December 5, 2008">The Win32 API and Simplicity</a></li>
<li><a href="http://www.oak-tree.us/blog/index.php/2008/12/14/wpf-svg-xaml-part2" rel="bookmark" title="December 14, 2008">WPF – SVG Graphics and XAML – Part 2</a></li>
</ul>
<p><!-- Similar Posts took 28.445 ms --></p>
<p>Copywrite 2009: Rob Oakes.  <a href="http://www.oak-tree.us/blog">Apolitically Incorrect</a><br/><br/><a href="http://www.oak-tree.us/blog/index.php/2009/11/25/latex-cv-part1">Typeset Your Curriculum Vitae &ndash; Part 1: The xetexCV Document Class</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.oak-tree.us/blog/index.php/2009/11/25/latex-cv-part1/feed</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Customizing LyX: Character Styles and the LyX Local Layout</title>
		<link>http://www.oak-tree.us/blog/index.php/2009/11/14/customize-lyx-character-styles</link>
		<comments>http://www.oak-tree.us/blog/index.php/2009/11/14/customize-lyx-character-styles#comments</comments>
		<pubDate>Sat, 14 Nov 2009 21:00:00 +0000</pubDate>
		<dc:creator>Rob Oakes</dc:creator>
				<category><![CDATA[Computer]]></category>
		<category><![CDATA[rapidBOOKS]]></category>
		<category><![CDATA[Writing and Literature]]></category>
		<category><![CDATA[Customization]]></category>
		<category><![CDATA[LaTeX]]></category>
		<category><![CDATA[LyX]]></category>

		<guid isPermaLink="false">http://www.oak-tree.us/blog/?p=1315</guid>
		<description><![CDATA[	
	<span class="Z3988" title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Adc&amp;rfr_id=info%3Asid%2Focoins.info%3Agenerator&amp;rft.title=Customizing+LyX%3A+Character+Styles+and+the+LyX+Local+Layout&amp;rft.aulast=Oakes&amp;rft.aufirst=Rob&amp;rft.subject=Computer&amp;rft.subject=rapidBOOKS&amp;rft.subject=Writing+and+Literature&amp;rft.source=Apolitically+Incorrect&amp;rft.date=2009-11-14&amp;rft.type=blogPost&amp;rft.format=text&amp;rft.identifier=http://www.oak-tree.us/blog/index.php/2009/11/14/customize-lyx-character-styles&amp;rft.language=English"></span>
Imagine for a minute that you’re writing a book or technical manual.  Let’s say it’s a book on technology, maybe the open source tools used for scientific writing (to randomly pick an example).  As you write this book, you realize that you need some way to cue the reader into different parts of the text. [...]<p>Copywrite 2009: Rob Oakes.  <a href="http://www.oak-tree.us/blog">Apolitically Incorrect</a><br/><br/><a href="http://www.oak-tree.us/blog/index.php/2009/11/14/customize-lyx-character-styles">Customizing LyX: Character Styles and the LyX Local Layout</a></p>
]]></description>
			<content:encoded><![CDATA[	
	<span class="Z3988" title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Adc&amp;rfr_id=info%3Asid%2Focoins.info%3Agenerator&amp;rft.title=Customizing+LyX%3A+Character+Styles+and+the+LyX+Local+Layout&amp;rft.aulast=Oakes&amp;rft.aufirst=Rob&amp;rft.subject=Computer&amp;rft.subject=rapidBOOKS&amp;rft.subject=Writing+and+Literature&amp;rft.source=Apolitically+Incorrect&amp;rft.date=2009-11-14&amp;rft.type=blogPost&amp;rft.format=text&amp;rft.identifier=http://www.oak-tree.us/blog/index.php/2009/11/14/customize-lyx-character-styles&amp;rft.language=English"></span>
<p><img style="margin: 0px 15px 10px 0px;" src="http://www.giovanniferranti.it/images/lyx_logo.png" alt="" align="left" />Imagine for a minute that you’re writing a book or technical manual.  Let’s say it’s a book on technology, maybe the open source tools used for scientific writing (to randomly pick an example).  As you write this book, you realize that you need some way to cue the reader into different parts of the text.</p>
<p>For instance, you might want all definitions to appear in bolded text so that a reader pick out key terms quickly.  Or you might want code examples to appear in a different font than the regular text, again, so they’re easy to find.  What’s the best way to do this?</p>
<p>Sure, you could just bold the definitions, or manually change the font for the code examples.  But that’s painful!  Changing typeface and size every time that you have a section of code will eventually result in a lot of lost time.  Moreover, you might make a mistake, which destroys your consistency and makes your writing look unprofessional.  There must be a better way!</p>
<p>Thankfully, there is.  It’s through the consistent use of styles.</p>
<p><span id="more-1315"></span></p>
<h2>Styles Defined</h2>
<p>A style is a collection of formatting commands with a meaningful name.  Examples in Microsoft Word include “Heading 1”, “Body”, and “Figure”.  When you use them consistently, styles allow for “logical markup” of a document.  That is to say, you tell the computer what the section, paragraph or text corresponds to and then it handles the formatting.  For this reason, styles form the basis of the “What You See Is What You Mean (WYSIWYM)” philosophy used by LyX and other “document processors".</p>
<p>There are three major types of styles: section styles, paragraph styles and character styles.  You are likely familiar with section and paragraph styles, as they populate the main drop down box of LyX’s main toolbar. The most common section styles are: chapter, section, subsection.  Examples of paragraph styles include: standard text, quotations, and code.  But the third main type of style, “a character style” may be a stranger.  It isn’t as common as it’s two older brethren and easier to lose track of; which is a huge shame, because it is just as important.</p>
<p>Character styles, as the name implies, work on individual characters <em>within</em> the text of a paragraph.  To extend the examples given in the introduction, the most efficient way to bold a definition would be to use a pre-defined character style called “definition”.  Ditto for an in-paragraph sample of code.</p>
<p>“Now wait a minute,” you’re probably saying, “I’m not sure that I follow the difference between character styles and other text formatting commands like ‘bold’, ‘italic’, or ‘underline’!”</p>
<p>That is perfectly alright, the distinction can be a bit hazy.  Nonetheless, it is still key in understanding the difference between “logical markup” and formatting.  Let me see if I can clear it up.</p>
<p>As described above, a style is typically used to describe what a part of the document is, rather than how it should look.  Subsequently, you are unlikely to see a style called “bold”, “italic” or “center”.  Those terms describe how the text should appear; which is to say, they are formatting commands.  Bolded text uses a heavier line stroke and centered text appears in the middle of the page.  A style, on the other hand, is used to describe a “definition”.  You then associate that style with how you want “definition” to look.  It could be numbered, bolded and centered; or it might be larger than the surrounding text and italicized.  The appearance is determined by a “style sheet”.</p>
<p><em>Note: Since the use and customization of section and paragraph styles is well explained in the LyX help documentation, this article will focus on character styles.</em></p>
<h2>Using Character Styles in LyX</h2>
<p>LyX provides some common character styles through the use of its “Logical Markup” module.  These include styles for nouns, emphasizing text, and code – which may be useful for highlighting filenames or programming syntax within the body of the paragraph.</p>
<p>The character styles are not loaded by default, however.  Instead, they come as part of an optional module.  You can use them by going to the “<strong>Document-&gt;Settings-&gt;Modules”</strong> pane and adding “<strong>Logical Markup</strong>” to your document.</p>
<p><img style="display: inline; border-width: 0px;" title="LyX supports several character styles (including noun, emphasize, strong and code) through the &quot;Logical Markup&quot; module." src="http://www.oak-tree.us/blog/wp-content/uploads/2009/11/LyXModules.png" border="0" alt="LyX supports several character styles (including noun, emphasize, strong and code) through the &quot;Logical Markup&quot; module." width="600" height="436" /></p>
<p>Once the “<strong>Logical Markup</strong>” module has been loaded, you  use of apply a particular character style through the “<strong>Edit-&gt;Text Styles</strong>” menu, or by first highlighting a block of text and selecting “Text Style” from the right click context menu.</p>
<p><em>Note: The emphasize style is distinct in that it can also be toggled on and off through the “Ctrl+E” keyboard shortcut.</em></p>
<p><img style="display: inline; border-width: 0px;" title="You can add a character style to a document either through the &quot;Edit&quot; menu, or by selecting a block of text and then right clicking on it." src="http://www.oak-tree.us/blog/wp-content/uploads/2009/11/LyXCharacterStylesRightClick.png" border="0" alt="You can add a character style to a document either through the &quot;Edit&quot; menu, or by selecting a block of text and then right clicking on it." width="600" height="380" /></p>
<p>After you’ve formatted a block of text with character style, it will appear differently from the surrounding text.  It will not only use a different font, but will also be surrounded by a set of hash marks.  The example below shows a document with two instances of the “Code” character style.  Optionally, character styles have a label which you be toggled on and off.  The screen shot below shows what this looks like.  The first instance, “TEXMFLOCAL”, has the label toggled off while the instance, “/var/lib/texmf/tex/latex”, shows the same character style with the label visible.</p>
<p><img style="display: inline; border-width: 0px;" title="This example shows two blocks of text formatted with the &quot;code&quot; character style. " src="http://www.oak-tree.us/blog/wp-content/uploads/2009/11/image1.png" border="0" alt="This example shows two blocks of text formatted with the &quot;code&quot; character style. " width="581" height="79" /></p>
<h2>Customizing Character Styles</h2>
<p>But what if you need access to other character styles?  Perhaps you’re writing a novel and would like to have a dedicated style for specifying when a character is talking to himself (called internal dialogue)?  Or you’d finally get back to working on your textbook with bolded definitions.  Such styles aren’t defined by the “Logical Markup” module, or any module at all for that matter.  Nor are they likely to be used so frequently that it is worth trying to modify the built-in modules or create a new one to support them.</p>
<p>Luckily, there is a solution to this problem.  In the <a href="http://www.oak-tree.us/blog/index.php/2009/11/02/custom-lyx-nih">first article in this series</a>, I looked at how to create a template for an NIH grant proposal from an existing LaTeX document class.  In that article, the secret to using the “nih.cls” document class lay in its corresponding LyX layout file ("nih.layout").  Also in that article, I explained how LyX layout files primarily contain information concerned with on-screen presentation.</p>
<p><em>Note: For more detail, see: <a href="http://www.oak-tree.us/blog/index.php/2009/11/02/custom-lyx-nih#bigpicture">Customizing LyX – Part 1, Understanding the Big Picture</a>.</em></p>
<p>As a first approximation, what I said in that article is mostly true.  But, naturally, the reality is more complex.  LyX layout files can also contain information about character styles.  This includes both information about how they should be presented on-screen and how the underlying LaTeX typesetting language should process them.  Moreover, that information can either live in a global layout file (like nih.layout) or in the .lyx file you are working on (meaning that it can be conveniently added to a template).  In the remainder of this post, I will show how to create custom character styles by modifying the local layout.</p>
<h3>Example: Creating a “User Interface” Character Style</h3>
<p>As you might have guessed, the example introduced above isn’t so random.  For the past several weeks, I have been working on a book about scientific and technical writing.  The book will cover a number of programs and technologies including <a href="http://www.lyx.org/">LyX</a>, LaTeX, BibTeX, <a href="http://www.mendeley.com/">Mendeley</a>, <a href="http://www.scribus.net/">Scribus</a> and <a href="http://kile.sourceforge.net/">Kile</a>.</p>
<p>Since it is geared to a somewhat technical audience, it includes both instructions on how to use program's UI and code samples.  For my code examples, I can use the internal LyX character style.  But I’ve found that I would also like to highlight references to the UI.  There isn't a pre-defined UI character style.</p>
<p>Fortunately, I not the first person writing a book with UI references.  If you look at the LyX user manuals, you will see that the LyX documentation team created a character style specifically for highlighting LyX menu commands.  It uses a sans serif font and I think it is rather attractive.  But, how do you go about adding it to another document?</p>
<p>It’s actually pretty straightforward:</p>
<ol>
<li>Since there isn’t a UI to modify the local layout in LyX, open your document in a text editor</li>
<li>Create a local_layout section</li>
<li>Define how you want your character style to appear (both on screen and in the LaTeX output)</li>
</ol>
<h4>Step 1: Open your document in a text editor</h4>
<p>As explained above, custom character styles live in the local_layout section (enclosed with the “\begin_local_layout” and “\end_local_layout”) near the beginning of a LyX document.  Unfortunately, there is not currently a user interface pane within LyX to edit this section.  As a result, open the document in your favorite text editor.  The figure shows what this looks like for a file called “Book Chapter – Technical.lyx”.</p>
<p><em>Note: There is nothing to be afraid of, LyX’s file format is relatively easy to parse; even for human beings.</em></p>
<p><img style="display: inline; border-width: 0px;" title="A sample LyX document for a technical book chapter." src="http://www.oak-tree.us/blog/wp-content/uploads/2009/11/LyXCharacterStylesKateExample.png" border="0" alt="A sample LyX document for a technical book chapter." width="600" height="360" /></p>
<p>“Book Chapter – Technical.lyx” has three major sections:</p>
<ul>
<li>
<div>Document: enclosed by “\begin_document” and “\end_document” (off-screen)</div>
</li>
<li>
<div>LaTeX Preamble: enclosed by “\begin_preamble” and “\end_preamble”</div>
</li>
<li>
<div>Local Layout: enclosed by “\begin_local_layout” and “end_local_layout” (off-screen)</div>
</li>
</ul>
<p>I have added some text to the LateX preamble in this example.  The command tells LyX to use the “Latin Modern” fonts instead of the LaTeX default fonts, which I find to be rather ugly:</p>
<blockquote><p>% set fonts for nicer pdf view<br />
\IfFileExists{\lmodern.sty}{\usepackage{lmodern}}{}</p></blockquote>
<p><!--adsensestart--></p>
<h4>Step 2: Create a Local Layout Section</h4>
<p>If it doesn’t already exist, insert a local_layout section.  For organizational purposes, I like for it to appear following the preamble.  Below is the full text of the layout section for “Book Chapter – Technical.lyx”:</p>
<blockquote><p>\begin_local_layout<br />
    Format 7<br />
        InsetLayout    CharStyle:UserInterface<br />
        LyxType               charstyle<br />
        LabelString           userinterface<br />
        LatexType             command<br />
        LatexName             userinterface<br />
        Font<br />
            Family              Sans<br />
        EndFont<br />
        Preamble<br />
            \newcommand*{\userinterface}[1]{{\sffamily #1}}<br />
        EndPreamble<br />
    End<br />
\end_local_layout</p></blockquote>
<p>In the example, there is some template code (also known as boilerplate), and values that you can modify in order to better customize the appearance of your character style.  The boilerplate includes “Format 7”, LyXType      charstyle”, and “LatexType    command”.  These values will be constant for all character styles, but everything else can be customized.</p>
<h4>Step 3: Define how you want the character style to look</h4>
<p>When customizing the appearance of your character style, the first thing to do is to decide what you want to call your style.  This is done by modifying the “InsetLayout” argument.  Since my book project covers many different programs, I’ve decided that I will use this character style for any reference to the ui.  That includes menus, button names, or dialog box text.  As a result, I’ve called it “CharStyle:UserInterface”.  This is what appears when I go to the “<strong>Edit-&gt;Text Style</strong>” menu and in the dialog box that appears when I right click.</p>
<p>Next, you need to decide what you would like the “label” to be.  The label appears when the “show label” option is toggled on.  In this example, it’s “userinterface”.</p>
<p>I also need to associate my character style with a LaTeX name.  Again, I’ve opted to call it “userinterface”.</p>
<p>The next block of options, “Font”, specify how the text will look on screen.  You could be extremely ornate specifying text size, typeface, and  font weight.  In this case, however, I want to go with something simple.  I'm just going to use the “Sans” font family for on-screen to display.  Boring, but functional.</p>
<p><em>Note: A complete list of available options can be found in the LyX help documentation: “Customizing LyX: Features for the Advanced User”.  See section 5.3.6.</em></p>
<p>The Preamble block tells LaTeX how it should process the character style.  Again, I don’t want to do anything fancy, so I'm just going to use the “Sans Serif” font family.  This is accomplished by the following LaTeX command:</p>
<blockquote><p>\newcommand*{\userinterface}[1]{{\\sffamily #1}}</p></blockquote>
<p><!--adsensestop--></p>
<p>The “\newcommand” syntax tells LaTeX about my custom style, while everything after is specifying the text and the font family. “\ssfamily” refers to the sans serif font family.  Other options I could have used include the roman font family (“\rmfamily”), the typewriter family (“\ttfamily”), medium text (“\mdseries”), italic ("\itshape”), or small caps (“\scshape”).</p>
<p><em>Note: For a more complete list with sample output, see </em><a href="http://theoval.cmp.uea.ac.uk/~nlct/latex/novices/fontstyle.html"><em>here</em></a><em> (Table 4.5).</em></p>
<p>When finished, save your document and exit the text editor.  When you load the document back into LyX, your style should appear in the “<strong>Edit-&gt;Text Style</strong>” menu.  The screenshot below shows how the “User Interface” character style looks in use.</p>
<p><img style="display: inline; border-width: 0px;" src="http://www.oak-tree.us/blog/wp-content/uploads/2009/11/image2.png" border="0" alt="" width="584" height="123" /></p>
<h2>Miscellaneous Things and Conclusion</h2>
<p>Like the example in the previous article, I like to save documents with custom character styles as templates.  This means that I can create additional documents very easily by going to the “<strong>File”</strong> menu and choosing the “<strong>New from template”</strong> option.  The new document will have all of the template’s settings, including the LaTeX preamble and the custom character styles.  It also means that I can keep separate templates for technical documents, scientific articles, book chapters and fiction.  Each has character styles defined that make sense for that type of publication.</p>
<p>Character styles make writing long documents much easier.  It’s so much better to label a piece of text as “code” or “userinterface” than it is to remember the exact formatting specifications.  Moreover, it makes the document more consistent and provides an easy path to change formatting at a later date.  As a first time author, I have no complaints about anything that makes my writing easier, more organized, and flexible.<br />
<h3>Similar Posts:</h3>
<ul class="similar-posts">
<li><a href="http://www.oak-tree.us/blog/index.php/2009/11/30/latex-cv-part2" rel="bookmark" title="November 30, 2009">Typeset Your Curriculum Vitae &ndash; Part 2: Extending and Customizing an Existing Document Class</a></li>
<li><a href="http://www.oak-tree.us/blog/index.php/2009/11/25/latex-cv-part1" rel="bookmark" title="November 25, 2009">Typeset Your Curriculum Vitae &ndash; Part 1: The xetexCV Document Class</a></li>
<li><a href="http://www.oak-tree.us/blog/index.php/2008/12/11/ironpython-wpf-tutorials" rel="bookmark" title="December 11, 2008">IronPython – Windows Presentation Foundation Tutorials</a></li>
<li><a href="http://www.oak-tree.us/blog/index.php/2009/07/30/time-traveler" rel="bookmark" title="July 30, 2009">A Better Previous Versions: Time Traveler</a></li>
<li><a href="http://www.oak-tree.us/blog/index.php/2009/05/09/barn-architecture" rel="bookmark" title="May 9, 2009">Barn Architecture</a></li>
</ul>
<p><!-- Similar Posts took 23.012 ms --></p>
<p>Copywrite 2009: Rob Oakes.  <a href="http://www.oak-tree.us/blog">Apolitically Incorrect</a><br/><br/><a href="http://www.oak-tree.us/blog/index.php/2009/11/14/customize-lyx-character-styles">Customizing LyX: Character Styles and the LyX Local Layout</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.oak-tree.us/blog/index.php/2009/11/14/customize-lyx-character-styles/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Customizing LyX: Create an NIH Grant Proposal Template</title>
		<link>http://www.oak-tree.us/blog/index.php/2009/11/02/custom-lyx-nih</link>
		<comments>http://www.oak-tree.us/blog/index.php/2009/11/02/custom-lyx-nih#comments</comments>
		<pubDate>Mon, 02 Nov 2009 22:21:54 +0000</pubDate>
		<dc:creator>Rob Oakes</dc:creator>
				<category><![CDATA[Computer]]></category>
		<category><![CDATA[rapidBOOKS]]></category>
		<category><![CDATA[Writing and Literature]]></category>
		<category><![CDATA[LaTeX]]></category>
		<category><![CDATA[LyX]]></category>

		<guid isPermaLink="false">http://www.oak-tree.us/blog/?p=1291</guid>
		<description><![CDATA[	
	<span class="Z3988" title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Adc&amp;rfr_id=info%3Asid%2Focoins.info%3Agenerator&amp;rft.title=Customizing+LyX%3A+Create+an+NIH+Grant+Proposal+Template&amp;rft.aulast=Oakes&amp;rft.aufirst=Rob&amp;rft.subject=Computer&amp;rft.subject=rapidBOOKS&amp;rft.subject=Writing+and+Literature&amp;rft.source=Apolitically+Incorrect&amp;rft.date=2009-11-02&amp;rft.type=blogPost&amp;rft.format=text&amp;rft.identifier=http://www.oak-tree.us/blog/index.php/2009/11/02/custom-lyx-nih&amp;rft.language=English"></span>
LyX is a wonderful writing program.  It’s easy to use and produces beautifully typeset output.  More importantly, though, it lets an author focus on the content and structure of his writing; rather than the formatting.  It isn’t so easy to customize, though, which limits its usefulness in a big way.  What if you need to [...]<p>Copywrite 2009: Rob Oakes.  <a href="http://www.oak-tree.us/blog">Apolitically Incorrect</a><br/><br/><a href="http://www.oak-tree.us/blog/index.php/2009/11/02/custom-lyx-nih">Customizing LyX: Create an NIH Grant Proposal Template</a></p>
]]></description>
			<content:encoded><![CDATA[	
	<span class="Z3988" title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Adc&amp;rfr_id=info%3Asid%2Focoins.info%3Agenerator&amp;rft.title=Customizing+LyX%3A+Create+an+NIH+Grant+Proposal+Template&amp;rft.aulast=Oakes&amp;rft.aufirst=Rob&amp;rft.subject=Computer&amp;rft.subject=rapidBOOKS&amp;rft.subject=Writing+and+Literature&amp;rft.source=Apolitically+Incorrect&amp;rft.date=2009-11-02&amp;rft.type=blogPost&amp;rft.format=text&amp;rft.identifier=http://www.oak-tree.us/blog/index.php/2009/11/02/custom-lyx-nih&amp;rft.language=English"></span>
<p><img style="margin: 0px 20px 0px 0px; display: inline;" src="http://www.giovanniferranti.it/images/lyx_logo.png" alt="" align="left" />LyX is a wonderful writing program.  It’s easy to use and produces beautifully typeset output.  More importantly, though, it lets an author focus on the content and structure of his writing; rather than the formatting.  It isn’t so easy to customize, though, which limits its usefulness in a big way.  What if you need to create a new layout or take advantage of one of the thousands of specialized  LaTeX styles?  How, exactly, do you go about doing that?</p>
<p>That’s why this article was written.  Recently, I was asked to help with a National Institutes of Health (NIH) R21 grant proposal.  After some talk amongst the different investigators, it was decided that we would use LaTeX and LyX to draft it.  Unfortunately, we hit a rather substantial hurdle early in the process:  LyX doesn’t have an NIH grant template.</p>
<p>After additional debate, we decided to proceed with LyX anyway.  But in the process, I found myself saddled with an additional job.  In addition to responsibilities as research flunky and copy editor, I was tasked with creating a LyX and LaTeX template for our NIH grant.  This article will summarize the steps I took and describe how to create a custom template using an available style on <a href="http://www.ctan.org/">CTAN</a>.</p>
<p><img style="display: inline; border-width: 0px;" title="image" src="http://www.oak-tree.us/blog/wp-content/uploads/2009/11/image.png" border="0" alt="image" width="659" height="179" /></p>
<p><em>Note: All of the files in this tutorial can downloaded </em><a href="http://www.oak-tree.us/stuff/LyX/nih.zip"><em>here</em></a><em> (.zip).</em><br />
<span id="more-1291"></span><!--adsensestart--></p>
<h2>Understanding the Big Picture</h2>
<p><a name="bigpicture"></a>Before laying out the procedure, I will start with the theory. That includes understanding how LyX and LaTeX interact, as well as what files they use for their respective jobs.</p>
<h3>An Introduction to LyX and LaTeX</h3>
<p>As you probably already know, LyX is a document preparation system which supports LaTeX, DocBook, and other typesetting technologies.  Writing with LyX is easier than using regular LaTeX or DocBook because it abstracts away the markup language and most of the associated pain.  Want to insert a citation?  Just hit <strong>Insert –&gt; Citation</strong>.  There’s no fussing with markup tags or macro commands.  The same goes for inserting figure legends, tags, labels, footnotes or any other relatively complex formatting.  LyX takes care of all the minutiae for you.</p>
<p>When you want to customize LyX, however, all of the ugliness and complexity gets shoved right back into your face.  Instead of just writing and letting the program sort out the details, all of a sudden you are transformed from a user into a collaborating developer.  You need to know how the underlying technologies work.  What’s the difference between a LaTeX class and a style sheet?  What does a LyX layout document do?  How does that differ from a LyX template document?  How do you install them and get the system to recognize that they’re present?</p>
<p>To get a handle on these questions, you need to understand that LyX and LaTeX accomplish two different (though complementary) goals.  LaTeX is largely in the job of creating printed documents (typesetting), whereas LyX is about helping you to write and organize the document (on-screen display).</p>
<p>I like to think of LyX as an editorial assistant while LaTeX is the production staff.  The editorial assistant organizes the various elements into a more logical layout, puts references and other material at your fingertips, and finally helps collate everything into a package that the production people can make sense of.  Once the package has been assembled, the production staff then goes about laying it all out on paper, making sure that references are all numbered and formatted correctly, and otherwise handling the business of making the document beautiful.</p>
<h3>LaTeX Classes and Styles</h3>
<p>To go about its work, LaTeX uses a couple of important files: document classes (.cls) and styles (.sty).  As mentioned, the entire purpose behind LaTeX is that you should be able to focus on the content of your writing without being distracted by its visual presentation.  Classes and styles are what make this possible.  As you are writing, you tell LyX (and by extension LaTeX) whether a block of text is a chapter, figure legend, table, or footnote.  When ready, you can then transform the markup (which makes sense to a computer) into something that makes sense to a human being.</p>
<p><strong>LaTeX classes</strong> are the first step in the transformation.  They contain important information about what the structure of the document should be and where things should go.  You might even say that a class file tells a document “what” it is.  Subsequently, the most common types of document classes are articles, reports, and books.</p>
<p>A <strong>LaTeX style</strong>, in contrast, tells the file “how” it should look.  If a class says, “You’re a book,” then a style will say, “you should have one inch margins” and “the chapter heading should be in Arial 16 point font with 0.2 inches of space above and below them”.  Any given document will only have a single document class, but may use many different styles.</p>
<h3>LyX Layout and Template Files</h3>
<p>In contrast, a LyX layout file corresponds to a LaTeX class and tells LyX how to draw things on screen; and this is where things can get a little confusing.  Even though a LyX layout is supposed to look like the printed page, this isn’t always true.  For example, the final document may have two or three columns; but on-screen the LyX document will only have one.  What is true, however, is that a LyX layout file will contain information about what document elements are available.  If you’re writing a book, for example, the LyX layout will have an option called “Chapter”; even though the fonts and spacing used won’t always be exactly the same.</p>
<p>The final fie type that you need to know about is called a template.  Whereas a layout file largely contains information about the on-screen display, the template file has information about typesetting and presentation.  In many ways it inherits both the properties of the LaTeX .cls and .sty files and the LyX layout properties.  This means  that you can add both LaTeX and LyX information to it.</p>
<p>The figure below shows these relationships graphically.</p>
<p><!--adsensestop--></p>
<p><img style="margin: 20px 0px; display: inline; border-width: 0px;" title="How LyX Works" src="http://www.oak-tree.us/blog/wp-content/uploads/2009/11/HowLyXWorks.png" border="0" alt="How LyX Works" width="434" height="374" /></p>
<h2>Creating a Custom LyX Template – NIH Grant Proposal</h2>
<p>With the definitions out of the way, here is the procedure for creating a custom document template.  There are four basic steps:</p>
<ol>
<li>Download the necessary document classes and styles</li>
<li>Install the files into the proper folder of your LaTeX distribution</li>
<li>Create an appropriate layout file corresponding to the document class or style</li>
<li>Create a template file with additional details and information</li>
</ol>
<h3>Step 1: Download the necessary styles and templates</h3>
<p>The very first step is to locate the document class that you need to use.  There are many good resources to do this.  The first is <a href="http://www.ctan.org/">CTAN</a>, which is probably the most comprehensive resource available.  (You can also find very good package lists on <a href="http://en.wikibooks.org/wiki/LaTeX/Packages">Wikipedia</a> and through Google.)  Since I already know the name of the document class I need (<a href="http://www.ctan.org/tex-archive/macros/latex/contrib/nih/">NIH</a>), I will download it from the associated CTAN page.</p>
<h3>Step 2: Install the files into the proper folder for your  LaTeX distribution</h3>
<p>Once you have saved the files onto your computer, you need to place them in one of several locations.  If all users of the computer need it, install it to the system wide LaTeX tree.  If, however, you are the only person who will be using the package, you can place it in your own “user” folder.</p>
<p>The location of the system tree varies depending on which version of LaTeX you happen to be running.  It is typically defined by the “TEXMFLOCAL” variable.  For individuals using Ubuntu Linux, you will find it at “/var/lib/texmf/tex/latex”.  For users of other LaTeX distributions or operating systems, you will need to consult the documentation files.  The “user” tree is located in your own user folder.  For users of Linux, this will be “/home/<em>username</em>/texmf/tex/latex”.  <em>Note: Be sure to replace “username” with your appropriate login information.</em></p>
<p>To install the package, unpack the archive and copy all of the contents to the appropriate location.  After, you will need to update the LaTeX database by running texhash.</p>
<blockquote><p>sudo texhash</p></blockquote>
<h3>Step 3: Create an appropriate style layout for LyX</h3>
<p>Now that the package has been installed, we need to create a layout file so that LyX can make use of it.  This is a two step process:</p>
<ol>
<li>Edit the document class and style so that it only contains general elements</li>
<li>Generate a new LyX layout file</li>
</ol>
<h4>Step 3.1: Edit the document class and style to only contain general elements</h4>
<p>Working with LaTeX classes in LyX is slightly different than how you would work with them in a tool like <a href="http://kile.sourceforge.net/">Kile</a> or <a href="http://www.xm1math.net/texmaker/">TeXMaker</a>.  As already mentioned, LyX abstracts a lot of the technical detail of LaTeX away.  However, when using a tool like Kile, you directly interact with the LaTeX code.  When working this way, it can be convenient to place commonly used elements into the document class or style.  The NIH files that we downloaded and installed in the steps above do this.  (The page headers and footers contain the name of the primary investigator and the reference number for the grant.)</p>
<p>As you might guess, however, this isn’t a good thing if you are trying to create a general template.  The document class and style files should only contain the elements that are going to applied to <em>all</em> of the documents.  This shouldn’t include dates specific to a given revision, the name of a principal investigator, or the title of the grant.  We want to install the LaTeX files and then forget about them, which is simply impossible if they contain such specific information.</p>
<p>As a result, before we go further, we need to redact this information from the nih.cls file.  But even though we are removing it, <strong>don’t throw it away! </strong>Stick it in a spare text file for the time being.  It is still needed so that the final document will match NIH style conventions.  We will add it back to the template created in Step 4.</p>
<p>In the original files from CTAN, open up nih.layout in your favorite text editor and cut out the following text:</p>
<blockquote><p>% preamble stuff<br />
\newcommand{\nih@PIname}{Oakes, Robert Stilman}<br />
\newcommand{\piname}[1]{\renewcommand{\nih@PIname}{#1}}<br />
\makeatletter</p>
<p>% constants<br />
\newcommand{\nih@sillysize}{\scriptsize}</p>
<p>…</p>
<p>\newtheorem{proposition}{Proposition}<br />
\newtheorem{lemma}{Lemma}</p></blockquote>
<p>In addition to redacting the information above, you will also want to add the following line close to the end of nih.cls.  It will ensures that alphabetic section labels will be used instead of numeric labels:</p>
<blockquote><p>\def\thesection{\Alph{section}}</p></blockquote>
<p><em>Note: In the files for this tutorial, I have already redacted the unnecessary text from the nih.cls file and added it to the NIH Grant Proposal template.  I have also added the section label code.</em></p>
<h4>Step 3.2: Generate a new LyX layout file</h4>
<p>The easiest way to create a new layout file is to modify one of the existing examples.  If you look closely at the NIH document class (nih.cls), you will notice that it is based on the LaTeX “article” class.  As we try and create an appropriate nih.layout, let’s start by modifying <a href="http://www.oak-tree.us/stuff/LyX/article.layout">article.layout</a>.</p>
<p>When you first open the file, you will see the following:</p>
<blockquote><p># Do not delete the line below; configure depends on this<br />
# \Declare LaTeXClass{article}<br />
…<br />
Format 11<br />
Input stdclass.inc</p>
<p>SecNumDepth             3<br />
TocDepth                3</p>
<p>NoStyle Chapter<br />
NoStyle Chapter*</p>
<p>Style Part<br />
    Align                 Left<br />
    AlignPossible         Left<br />
    TopSep                2<br />
    BottomSep             1.5<br />
    Font<br />
      Size                Larger<br />
    EndFont<br />
End<br />
…</p></blockquote>
<p>As you study the layout, you should start to see a few general sections.  For example, the second line tells LyX that it is using the LaTeX class “article”.  “Input stdclass.inc” tells LyX to import the standard list of document elements.  Whenever you see a line that begins “NoStyle”, that is telling LyX to remove those particular section types from the available list of options since they aren’t supported by the document class.</p>
<p>Pay close attention to the section block that begin with “Style”.  This tells LyX how to display that particular document element on screen.  It includes information about how the text should be aligned (“Align”, “AlignPossible”) and what font should be used (“Font”, “Size”, “EndFont”).</p>
<p>To make article.layout work with nih.cls, we need to make two modifications.  First, we need to change the \DeclareLaTeXClass and then we need to add a new “Style” block.</p>
<p>First, let’s change the \DeclareLaTeXClass.  Add the following:</p>
<blockquote><p>\DeclareLaTeXClass[nih]{proposal (NIH)}</p></blockquote>
<p>In this example, nih is the name of the LaTeX document class (nih.cls) and the information in curly brackets is a description which will make it easier to find in the LyX document settings pane.</p>
<p>Next, we need to add a “Style” block that describes the “Section” element of the nih document class.  By default NIH sections are labeled alphabetically: “A Specific Aims”, “B Background”, “C Methods”, etc.  In contrast, the article labels its sections numerically: “1 Specific Aims”, “2 Background”, “3 Methods”, etc.  If we don’t modify the standard labeling, it will be displayed incorrectly on screen</p>
<p>Luckily, it’s an easy fix.  Add the following to article.layout:</p>
<blockquote><p>Style Section<br />
    LabelType             Counter<br />
    LabelCounter          section<br />
    LabelString           "\Alph{section}"<br />
End</p></blockquote>
<p><img style="margin: 0px 0px 20px 20px; display: inline; border-width: 0px;" title="Before using your new document class, you will need to reconfigure LyX so that it can see them." src="http://www.oak-tree.us/blog/wp-content/uploads/2009/11/CustomizeLyXReconfigure.png" border="0" alt="Before using your new document class, you will need to reconfigure LyX so that it can see them." width="312" height="189" align="right" /> After you’ve made these changes, resave the file as “nih.layout”.  Then copy the file to either the main LyX directory layouts folder (typically LyXDir/layouts) or to your LyX user directory (typically found at .lyx/layouts/).  For LyX to see and use the new files, you will need to run <strong>Tools –&gt; Reconfigure</strong>.</p>
<p><em>Note: A full version of the nih.layout file is available as part of the <a href="http://www.oak-tree.us/stuff/LyX/nih.zip">archive package</a> for this tutorial.</em></p>
<h3>Step 4: Create a LyX template file</h3>
<p>With a fully functioning LyX layout (nih.layout), you can now create a template file that has all of the needed elements.  As mentioned above, a LyX template file is nothing more than a regular LyX file.  So, start by creating a new LyX document (<strong>File –&gt; New</strong>).</p>
<p>After the new document is open, the very first thing that you should do is change the document class.  Go to <strong>Document –&gt; Settings</strong> –&gt; <strong>Document Class</strong>.  Then from the drop down menu, select “proposal (NIH)”.</p>
<p><img style="display: inline; border-width: 0px;" title="Customize LyX - Document Settings" src="http://www.oak-tree.us/blog/wp-content/uploads/2009/11/CustomizeLyXDocumentSettings.png" border="0" alt="Customize LyX - Document Settings" width="620" height="443" /></p>
<p>Next, you need to add the information removed from nih.cls to the LaTeX Preamble.  Go to <strong>Document –&gt; Settings –&gt;</strong> <strong>LaTeX Preamble</strong>, and paste the text into the provided space.  While doing this, you may want to modify the name of the PI that will be shown in the document header.  You make this change by adding your name to the line that reads:</p>
<blockquote><p>\newcommand{\nih@PIname}{Last Name, First Name Middle}</p></blockquote>
<p>When done, press “Close”.  You now have a fully functional, NIH compliant grant proposal template.</p>
<p><img style="display: inline; border-width: 0px;" title="Customize LyX - Document Preamble" src="http://www.oak-tree.us/blog/wp-content/uploads/2009/11/CustomizeLyXDocumentPreamble.png" border="0" alt="Customize LyX - Document Preamble" width="620" height="444" /></p>
<p>But while that’s the end of the essential boilerplate, you may want to include a few additional goodies.  Wouldn’t it be nice, for example, if you had access to clickable hyperlinks?  Or if you were be able to use the bookmarks sidebar to navigate the document?  For these and other desirables, add the following to the preamble:</p>
<blockquote><p>% Hyperlink Options<br />
\usepackage{ifpdf} % part of the hyperref bundle<br />
\ifpdf % if pdflatex is used</p>
<p>% Use True Type Fonts Instead of Older LaTeX Fonts<br />
\IfFileExists{lmodern.sty}{\usepackage{lmodern}}{}</p>
<p>\fi % end if pdflatex is used</p>
<p>% for correct jump positions when clicking on a link to a float<br />
\usepackage[figure]{hypcap}</p></blockquote>
<p>This code enables the hyperref package.  Then, go to <strong>Document –&gt; Settings –&gt; PDF Properties </strong>and enable hyperref support in the options.  While changing the PDF properties, I personally like to customize the colors of the links.  I think that document links and cited references should be black; while urls and files should be blue.  To make this change, add the following to the “additional options” line:</p>
<blockquote><p>linkcolor=black, citecolor=black, urlcolor=blue, filecolor=blue</p></blockquote>
<p><img style="display: inline; border-width: 0px;" title="Customize LyX - PDF Properties" src="http://www.oak-tree.us/blog/wp-content/uploads/2009/11/CustomizeLyXPDFProperties.png" border="0" alt="Customize LyX - PDF Properties" width="620" height="443" /></p>
<h2>Using the Template</h2>
<p>If you’ve followed all of the steps in this tutorial, you will now have a fully functioning NIH grant template.  Now might be a good time to save it in the same location where you keep other templates.  (If you don’t have a templates folder, you might want to create one.)  I’ve saved mine as “NIH Grant Proposal.lyx”.  From here on out, whenever I want to create a new NIH document, I simply choose <strong>New from template</strong> from the <strong>File</strong> menu and load the appropriate version.</p>
<p>Now that my template is set up, I’m back to an automated wonderland.  LyX and LaTeX keep track of the references, labels, footnotes, formatting and the other minutiae that make complicated documents so painful.  I’m free to focus on the ideas,  voice, and message; which is exactly how it should be.<br />
<h3>Similar Posts:</h3>
<ul class="similar-posts">
<li><a href="http://www.oak-tree.us/blog/index.php/2009/11/30/latex-cv-part2" rel="bookmark" title="November 30, 2009">Typeset Your Curriculum Vitae &ndash; Part 2: Extending and Customizing an Existing Document Class</a></li>
<li><a href="http://www.oak-tree.us/blog/index.php/2009/11/14/customize-lyx-character-styles" rel="bookmark" title="November 14, 2009">Customizing LyX: Character Styles and the LyX Local Layout</a></li>
<li><a href="http://www.oak-tree.us/blog/index.php/2009/11/25/latex-cv-part1" rel="bookmark" title="November 25, 2009">Typeset Your Curriculum Vitae &ndash; Part 1: The xetexCV Document Class</a></li>
<li><a href="http://www.oak-tree.us/blog/index.php/2009/03/04/perfect-tool" rel="bookmark" title="March 4, 2009">Creating the Perfect Writing Tool: A Proposal</a></li>
<li><a href="http://www.oak-tree.us/blog/index.php/2009/05/13/lyx-outline" rel="bookmark" title="May 13, 2009">Introducing LyX-Outline 0.1</a></li>
</ul>
<p><!-- Similar Posts took 30.559 ms --></p>
<p>Copywrite 2009: Rob Oakes.  <a href="http://www.oak-tree.us/blog">Apolitically Incorrect</a><br/><br/><a href="http://www.oak-tree.us/blog/index.php/2009/11/02/custom-lyx-nih">Customizing LyX: Create an NIH Grant Proposal Template</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.oak-tree.us/blog/index.php/2009/11/02/custom-lyx-nih/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

