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

<channel>
	<title>Deep Thoughts by Robert Felty &#187; latex</title>
	<atom:link href="http://blog.robfelty.com/category/latex/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.robfelty.com</link>
	<description>thoughts on wordpress, latex, cooking et alia</description>
	<lastBuildDate>Wed, 04 Aug 2010 21:56:13 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Vim regex-fu for LaTeX</title>
		<link>http://blog.robfelty.com/2009/09/24/vim-regexp-latex/</link>
		<comments>http://blog.robfelty.com/2009/09/24/vim-regexp-latex/#comments</comments>
		<pubDate>Thu, 24 Sep 2009 16:34:50 +0000</pubDate>
		<dc:creator>robfelty</dc:creator>
				<category><![CDATA[latex]]></category>
		<category><![CDATA[linguistics]]></category>
		<category><![CDATA[regex]]></category>
		<category><![CDATA[regular expressions]]></category>
		<category><![CDATA[vim]]></category>

		<guid isPermaLink="false">http://blog.robfelty.com/?p=479</guid>
		<description><![CDATA[When writing a beamer presentation with LaTeX, I organize my presentation into sections and subsections. Frequently, the title of the first frame (slide) in a subsection has the same name as the subsection. Let&#8217;s say I start off with the following structure: \section[corpora]{Accessing text corpora} \subsection[gutenberg]{The Gutenberg Corpus} \subsection[chat]{The web and chat Corpus} \subsection[brown]{The Brown [...]]]></description>
			<content:encoded><![CDATA[<p>When writing a beamer presentation with LaTeX, I organize my presentation into sections and subsections. Frequently, the title of the first frame (slide) in a subsection has the same name as the subsection. Let&#8217;s say I start off with the following structure:</p>
<div class="codecolorer-container tex dawn" style="overflow:auto;white-space:nowrap;width:100"><div class="tex codecolorer" style="font-family:Monaco,Lucida Console,monospace"><span class="re6">\section</span><span class="sy0">[</span><span class="re2">corpora</span><span class="sy0">]{</span><span class="re9">Accessing text corpora</span><span class="sy0">}</span><br />
<span class="re6">\subsection</span><span class="sy0">[</span><span class="re2">gutenberg</span><span class="sy0">]{</span><span class="re9">The Gutenberg Corpus</span><span class="sy0">}</span><br />
<span class="re6">\subsection</span><span class="sy0">[</span><span class="re2">chat</span><span class="sy0">]{</span><span class="re9">The web and chat Corpus</span><span class="sy0">}</span><br />
<span class="re6">\subsection</span><span class="sy0">[</span><span class="re2">brown</span><span class="sy0">]{</span><span class="re9">The Brown Corpus</span><span class="sy0">}</span><br />
<span class="re6">\subsection</span><span class="sy0">[</span><span class="re2">reuters</span><span class="sy0">]{</span><span class="re9">The Reuters Corpus</span><span class="sy0">}</span><br />
<span class="re6">\subsection</span><span class="sy0">[</span><span class="re2">inaugural</span><span class="sy0">]{</span><span class="re9">The Inaugural address Corpus</span><span class="sy0">}</span><br />
<span class="re6">\subsection</span><span class="sy0">[</span><span class="re2">annotated</span><span class="sy0">]{</span><span class="re9">Annotated corpora</span><span class="sy0">}</span><br />
<span class="re6">\subsection</span><span class="sy0">[</span><span class="re2">foreign</span><span class="sy0">]{</span><span class="re9">Corpora in other languages</span><span class="sy0">}</span><br />
<span class="re6">\subsection</span><span class="sy0">[</span><span class="re2">DIY</span><span class="sy0">]{</span><span class="re9">Loading your own corpora</span><span class="sy0">}</span></div></div>
<p>For each subsection, I want to put in one frame, with the name of the subsection being the name of the frame. Regular expressions to the rescue! In vim, all I have to is use <em>V</em> to select each line with <tt>subsection</tt>, then I hit <em>:</em>, which allows me to operate on those lines only.</p>
<div class="codecolorer-container text dawn" style="overflow:auto;white-space:nowrap;width:100"><div class="text codecolorer" style="font-family:Monaco,Lucida Console,monospace">'&lt;,'&gt;</div></div>
<p>is automatically inserted after the colon, which stands for &#8220;from the beginning of the highlighted section to the end of it&#8221;. Then I use <em>s</em> to perform my substitution. <tt>\r</tt> inserts a new line.</p>
<div class="codecolorer-container vim dawn" style="overflow:auto;white-space:nowrap;width:100"><div class="vim codecolorer" style="font-family:Monaco,Lucida Console,monospace"><span class="sy0">:</span><span class="st0">'&lt;,'</span><span class="sy0">&gt;</span>s<span class="sy0">/</span><span class="br0">&#123;</span>\<span class="br0">&#40;</span><span class="sy0">.*</span>\<span class="br0">&#41;</span><span class="br0">&#125;</span><span class="sy0">/</span><span class="br0">&#123;</span>\<span class="nu0">1</span><span class="br0">&#125;</span>\r\\begin<span class="br0">&#123;</span>frame<span class="br0">&#125;</span>\r\\frametitle<span class="sy0">&lt;</span>presentation<span class="sy0">&gt;</span><span class="br0">&#123;</span>\<span class="nu0">1</span><span class="br0">&#125;</span>\r\\<span class="kw1">end</span><span class="br0">&#123;</span>frame<span class="br0">&#125;</span><span class="sy0">/</span></div></div>
<p>The result is:</p>
<div class="codecolorer-container tex dawn" style="overflow:auto;white-space:nowrap;width:100;height:300px"><div class="tex codecolorer" style="font-family:Monaco,Lucida Console,monospace"><span class="re6">\section</span><span class="sy0">[</span><span class="re2">corpora</span><span class="sy0">]{</span><span class="re9">Accessing text corpora</span><span class="sy0">}</span><br />
<span class="re8">\begin</span><span class="sy0">{</span><span class="re9"><span class="re7">frame</span></span><span class="sy0">}</span><br />
<span class="re12">\frametitle</span>&lt;presentation&gt;<span class="sy0">{</span><span class="re9">Accessing text corpora</span><span class="sy0">}</span><br />
<span class="re8">\end</span><span class="sy0">{</span><span class="re9"><span class="re7">frame</span></span><span class="sy0">}</span><br />
<span class="re6">\subsection</span><span class="sy0">[</span><span class="re2">gutenberg</span><span class="sy0">]{</span><span class="re9">The Gutenberg Corpus</span><span class="sy0">}</span><br />
<span class="re8">\begin</span><span class="sy0">{</span><span class="re9"><span class="re7">frame</span></span><span class="sy0">}</span><br />
<span class="re12">\frametitle</span>&lt;presentation&gt;<span class="sy0">{</span><span class="re9">The Gutenberg Corpus</span><span class="sy0">}</span><br />
<span class="re8">\end</span><span class="sy0">{</span><span class="re9"><span class="re7">frame</span></span><span class="sy0">}</span><br />
<span class="re6">\subsection</span><span class="sy0">[</span><span class="re2">chat</span><span class="sy0">]{</span><span class="re9">The web and chat Corpus</span><span class="sy0">}</span><br />
<span class="re8">\begin</span><span class="sy0">{</span><span class="re9"><span class="re7">frame</span></span><span class="sy0">}</span><br />
<span class="re12">\frametitle</span>&lt;presentation&gt;<span class="sy0">{</span><span class="re9">The web and chat Corpus</span><span class="sy0">}</span><br />
<span class="re8">\end</span><span class="sy0">{</span><span class="re9"><span class="re7">frame</span></span><span class="sy0">}</span><br />
<span class="re6">\subsection</span><span class="sy0">[</span><span class="re2">brown</span><span class="sy0">]{</span><span class="re9">The Brown Corpus</span><span class="sy0">}</span><br />
<span class="re8">\begin</span><span class="sy0">{</span><span class="re9"><span class="re7">frame</span></span><span class="sy0">}</span><br />
<span class="re12">\frametitle</span>&lt;presentation&gt;<span class="sy0">{</span><span class="re9">The Brown Corpus</span><span class="sy0">}</span><br />
<span class="re8">\end</span><span class="sy0">{</span><span class="re9"><span class="re7">frame</span></span><span class="sy0">}</span><br />
<span class="re6">\subsection</span><span class="sy0">[</span><span class="re2">reuters</span><span class="sy0">]{</span><span class="re9">The Reuters Corpus</span><span class="sy0">}</span><br />
<span class="re8">\begin</span><span class="sy0">{</span><span class="re9"><span class="re7">frame</span></span><span class="sy0">}</span><br />
<span class="re12">\frametitle</span>&lt;presentation&gt;<span class="sy0">{</span><span class="re9">The Reuters Corpus</span><span class="sy0">}</span><br />
<span class="re8">\end</span><span class="sy0">{</span><span class="re9"><span class="re7">frame</span></span><span class="sy0">}</span><br />
<span class="re6">\subsection</span><span class="sy0">[</span><span class="re2">inaugural</span><span class="sy0">]{</span><span class="re9">The Inaugural address Corpus</span><span class="sy0">}</span><br />
<span class="re8">\begin</span><span class="sy0">{</span><span class="re9"><span class="re7">frame</span></span><span class="sy0">}</span><br />
<span class="re12">\frametitle</span>&lt;presentation&gt;<span class="sy0">{</span><span class="re9">The Inaugural address Corpus</span><span class="sy0">}</span><br />
<span class="re8">\end</span><span class="sy0">{</span><span class="re9"><span class="re7">frame</span></span><span class="sy0">}</span><br />
<span class="re6">\subsection</span><span class="sy0">[</span><span class="re2">annotated</span><span class="sy0">]{</span><span class="re9">Annotated corpora</span><span class="sy0">}</span><br />
<span class="re8">\begin</span><span class="sy0">{</span><span class="re9"><span class="re7">frame</span></span><span class="sy0">}</span><br />
<span class="re12">\frametitle</span>&lt;presentation&gt;<span class="sy0">{</span><span class="re9">Annotated corpora</span><span class="sy0">}</span><br />
<span class="re8">\end</span><span class="sy0">{</span><span class="re9"><span class="re7">frame</span></span><span class="sy0">}</span><br />
<span class="re6">\subsection</span><span class="sy0">[</span><span class="re2">foreign</span><span class="sy0">]{</span><span class="re9">Corpora in other languages</span><span class="sy0">}</span><br />
<span class="re8">\begin</span><span class="sy0">{</span><span class="re9"><span class="re7">frame</span></span><span class="sy0">}</span><br />
<span class="re12">\frametitle</span>&lt;presentation&gt;<span class="sy0">{</span><span class="re9">Corpora in other languages</span><span class="sy0">}</span><br />
<span class="re8">\end</span><span class="sy0">{</span><span class="re9"><span class="re7">frame</span></span><span class="sy0">}</span><br />
<span class="re6">\subsection</span><span class="sy0">[</span><span class="re2">DIY</span><span class="sy0">]{</span><span class="re9">Loading your own corpora</span><span class="sy0">}</span><br />
<span class="re8">\begin</span><span class="sy0">{</span><span class="re9"><span class="re7">frame</span></span><span class="sy0">}</span><br />
<span class="re12">\frametitle</span>&lt;presentation&gt;<span class="sy0">{</span><span class="re9">Loading your own corpora</span><span class="sy0">}</span><br />
<span class="re8">\end</span><span class="sy0">{</span><span class="re9"><span class="re7">frame</span></span><span class="sy0">}</span></div></div>
]]></content:encoded>
			<wfw:commentRss>http://blog.robfelty.com/2009/09/24/vim-regexp-latex/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Blogging with LaTeX</title>
		<link>http://blog.robfelty.com/2009/08/18/blogging-with-latex/</link>
		<comments>http://blog.robfelty.com/2009/08/18/blogging-with-latex/#comments</comments>
		<pubDate>Tue, 18 Aug 2009 15:22:17 +0000</pubDate>
		<dc:creator>robfelty</dc:creator>
				<category><![CDATA[(x)html]]></category>
		<category><![CDATA[latex]]></category>
		<category><![CDATA[wiki/cms]]></category>
		<category><![CDATA[wordpress]]></category>
		<category><![CDATA[blog]]></category>
		<category><![CDATA[plastex]]></category>
		<category><![CDATA[xmlrpc]]></category>

		<guid isPermaLink="false">http://blog.robfelty.com/?p=455</guid>
		<description><![CDATA[The first question on reader&#8217;s mind must be &#8212; why use LaTeX to blog? Well, I have a pretty specific instance in mind, but I can imagine that others might be interested as well. This fall I am teaching a course on computational corpus linguistics at CU Boulder. I like to have some materials online [...]]]></description>
			<content:encoded><![CDATA[<p>The first question on reader&#8217;s mind must be &mdash; why use LaTeX to blog?</p>
<p>Well, I have a pretty specific instance in mind, but I can imagine that others might be interested as well. This fall I am teaching a course on computational corpus linguistics at CU Boulder. I like to have some materials online for the students, such as the syllabus, course notes, etc. I thought about setting up a simple webpage, but then I decided instead to use wordpress, because it would give me extra functionality, such as auto-generating rss feeds, and with some plugins, would allow me to notify students via e-mail when I post lecture notes or slides, or homework tips. The one drawback I could see is that it would be hard to update the syllabus throughout the semester, as I tend to change the calendar some throughout the semester. Then I thought that maybe I could hack up a quick xml-rpc solution to the problem, and about an hour later, I had it done. All I needed was the WordPress::API perl module from CPAN. </p>
<p>Now I have a handy little publish script which first compiles my syllabus as pdf, then compiles it as html using plasTeX. Then I run it through tidy for formatting and hack in a few more things. Then I update the syllabus page on the course blog via xml-rpc. Finally, I rsync the pdf to the server. And with the post-notification plugin for wordpress, students will get an e-mail when the syllabus is updated. </p>
<p>Here are the scripts:</p>
<h3>publish</h3>
<div class="codecolorer-container bash dawn" style="overflow:auto;white-space:nowrap;width:100"><div class="bash codecolorer" style="font-family:Monaco,Lucida Console,monospace"><span class="co0">#!/bin/bash</span><br />
<span class="co0"># this script compiles a pdf version, an html version, and then copies it to my</span><br />
<span class="co0"># webserver</span><br />
<br />
<span class="co0"># compile as pdf</span><br />
pdflatex syllabus <span class="sy0">&amp;&amp;</span> pdflatex syllabus<br />
<br />
<span class="co0"># compile as html</span><br />
plastex &nbsp;<span class="re5">-c</span> syllabus.cfg syllabus<br />
<span class="co0"># clean up code a bit</span><br />
tidy <span class="re5">--show-body-only</span> <span class="kw2">true</span> <span class="re5">--ascii-chars</span> <span class="kw2">true</span> &nbsp;<span class="re5">-asxhtml</span> <span class="re5">--input-encoding</span> utf8 <span class="re5">--output-encoding</span> ascii <span class="re5">-wrap</span> <span class="nu0">0</span> <span class="re5">-indent</span> <span class="re5">--tab-size</span> <span class="nu0">4</span> syllabus<span class="sy0">/</span>index.html <span class="sy0">&gt;</span> syllabus<span class="sy0">/</span>syllabus.tmp<br />
<br />
<span class="co0"># add in link to pdf version in the html version</span><br />
<span class="kw2">cat</span> pdflink syllabus<span class="sy0">/</span>syllabus.tmp <span class="sy0">&gt;</span> syllabus<span class="sy0">/</span>syllabus.html<br />
<br />
<span class="co0"># update the syllabus page via xml-rpc</span><br />
.<span class="sy0">/</span>updateSyllabusPage.pl<br />
<br />
<span class="co0"># upload the newest version of the pdf</span><br />
rsync <span class="re5">-avzu</span> syllabus.pdf robfelty:<span class="sy0">/</span>var<span class="sy0">/</span>www<span class="sy0">/</span>html<span class="sy0">/</span>robfelty<span class="sy0">/</span>teaching<span class="sy0">/</span>ling5200Fall2009<span class="sy0">/</span>ling5200Fall2009-syllabus.pdf</div></div>
<h3>updateSyllabusPage.pl</h3>
<div class="codecolorer-container perl dawn" style="overflow:auto;white-space:nowrap;width:100"><div class="perl codecolorer" style="font-family:Monaco,Lucida Console,monospace"><span class="co1">#!/usr/bin/perl -w</span><br />
<span class="kw2">use</span> WordPress<span class="sy0">::</span><span class="me2">API</span><span class="sy0">;</span><br />
<br />
<span class="co1"># get new syllabus content</span><br />
<span class="kw1">my</span> <span class="re0">$contentFile</span> <span class="sy0">=</span> <span class="st_h">'syllabus/syllabus.html'</span><span class="sy0">;</span><br />
<span class="kw3">open</span><span class="br0">&#40;</span>CONTENT<span class="sy0">,</span> <span class="re0">$contentFile</span><span class="br0">&#41;</span><span class="sy0">;</span><br />
<br />
<span class="co1"># slurp in content</span><br />
<span class="re0">$content</span> <span class="sy0">=</span> <span class="kw1">do</span> <span class="br0">&#123;</span><span class="kw3">local</span> <span class="br0">&#40;</span> <span class="co5">$/</span> <span class="br0">&#41;</span><span class="sy0">;</span> <span class="re4">&lt;CONTENT&gt;</span> <span class="br0">&#125;</span><span class="sy0">;</span><br />
<br />
<span class="kw1">my</span> <span class="re0">$w</span> <span class="sy0">=</span> WordPress<span class="sy0">::</span><span class="me2">API</span><span class="sy0">-&gt;</span><span class="me1">new</span><span class="br0">&#40;</span><span class="br0">&#123;</span><br />
&nbsp; &nbsp;proxy <span class="sy0">=&gt;</span> <span class="st_h">'http://robfelty/teaching/ling5200Fall2009/xmlrpc.php'</span><span class="sy0">,</span><br />
&nbsp; &nbsp;username <span class="sy0">=&gt;</span> <span class="st_h">'myusername'</span><span class="sy0">,</span><br />
&nbsp; &nbsp;password <span class="sy0">=&gt;</span> <span class="st_h">'mypassword'</span><span class="sy0">,</span><br />
<span class="br0">&#125;</span><span class="br0">&#41;</span><span class="sy0">;</span><br />
<br />
<span class="kw1">my</span> <span class="re0">$page</span> <span class="sy0">=</span> <span class="re0">$w</span><span class="sy0">-&gt;</span><span class="me1">page</span><span class="br0">&#40;</span><span class="nu0">3</span><span class="br0">&#41;</span><span class="sy0">;</span><br />
<br />
<span class="re0">$page</span><span class="sy0">-&gt;</span><span class="me1">description</span><span class="br0">&#40;</span><span class="re0">$content</span><span class="br0">&#41;</span><span class="sy0">;</span><br />
<span class="re0">$page</span><span class="sy0">-&gt;</span><span class="me1">save</span><span class="sy0">;</span></div></div>
<p>Finally, if you want to see how I customize content for pdf and html separately, you can check out <a href='http://robfelty/subversion/ling5200/syllabus/syllabus.tex'>the LaTeX source file</a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.robfelty.com/2009/08/18/blogging-with-latex/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Converting LaTeX to Microsoft Word with plasTeX and Open Office</title>
		<link>http://blog.robfelty.com/2009/03/29/converting-latex-to-microsoft-word-with-plastex-and-open-office/</link>
		<comments>http://blog.robfelty.com/2009/03/29/converting-latex-to-microsoft-word-with-plastex-and-open-office/#comments</comments>
		<pubDate>Sun, 29 Mar 2009 05:27:44 +0000</pubDate>
		<dc:creator>robfelty</dc:creator>
				<category><![CDATA[(x)html]]></category>
		<category><![CDATA[latex]]></category>
		<category><![CDATA[plastex]]></category>
		<category><![CDATA[word processing]]></category>

		<guid isPermaLink="false">http://blog.robfelty.com/?p=282</guid>
		<description><![CDATA[Sample of LaTeX document converted to Word First of all, any LaTeX user might ask &#8212; why would I want to convert beautiful LaTeX into ugly Microsoft Word? The main reason is collaborators who want to use track changes. I recently sent a draft of a paper to some colleagues it two formats &#8211; .pdf [...]]]></description>
			<content:encoded><![CDATA[<div class="imageframe alignleft" style="width:250px;"><a href="http://blog.robfelty.com/wp-content/uploads/2009/03/screenshot1.png" title="Sample of LaTeX document converted to Word"><img src="http://blog.robfelty.com/wp-content/uploads/2009/03/screenshot1.thumbnail.png" alt="Sample of LaTeX document converted to Word" width="250" height="244" class="attachment wp-att-284" /></a>
<div class="imagecaption">Sample of LaTeX document converted to Word</div>
</div>
<p>First of all, any LaTeX user might ask &#8212; why would I want to convert beautiful LaTeX into ugly Microsoft Word? The main reason is collaborators who want to use track changes. I recently sent a draft of a paper to some colleagues it two formats &#8211; .pdf and .doc. The pdf was formatted beautifully with LaTeX, but if your collaborators are not comfortable with editing a LaTeX file, it is difficult to make comments in pdf files, though there are some options for it (I like Mac OSX&#8217;s Preview application). </p>
<p>So when I sent out this latest paper for comments, I decided to send two versions. Converting to Word via copy and paste is very laborious, and not worth the effort. Recently though, I have been using <a href='http://plastex.sourceforge.net'>plasTeX</a> to convert LaTeX into html. I know that programs like Open Office can import html, so I decided to try that route to convert into .doc. First I used plasTeX to convert html, and specified a few options to get the output I wanted:</p>
<div class="codecolorer-container bash dawn" style="overflow:auto;white-space:nowrap;width:100"><div class="bash codecolorer" style="font-family:Monaco,Lucida Console,monospace">plastex <span class="re5">--theme</span> minimal <span class="re5">--sec-num-depth</span> <span class="nu0">0</span> <span class="re5">--split-level</span> <span class="nu0">0</span> <span class="sy0">&lt;</span>filename<span class="sy0">&gt;</span>.tex</div></div>
<p>By default, this creates a subdirectory called <filename>, with an index.html file inside it.</p>
<p>Next I opened a new text document in Open Office, then selected Insert > File, and selected this index.html file. Presto! I had the document, complete with figures, tables, footnotes, and references. It wasn&#8217;t formatted as nicely as the pdf, but now my authors could insert their own comments and send it back to me electronically.  One last step though. By default Open Office links to external figures instead of embedding them. To override this, select Edit > Links. Then highlight all the links, and click on the button to &#8220;break links&#8221;. Finally, save the document as a .doc file, and e-mail it to the collaborators as an attachment.</p>
<p>I have to incorporate their comments back into my original LaTeX file, but this is much less painful to me than having to write the whole thing in Word to begin with. </p>
]]></content:encoded>
			<wfw:commentRss>http://blog.robfelty.com/2009/03/29/converting-latex-to-microsoft-word-with-plastex-and-open-office/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
	
		<media:thumbnail url="http://blog.robfelty.com/wp-content/uploads/2009/03/screenshot1.thumbnail.png" />
		<media:content url="http://blog.robfelty.com/wp-content/uploads/2009/03/screenshot1.thumbnail.png" medium="image">
			<media:title type="html">Sample of LaTeX document converted to Word</media:title>
		</media:content>
	</item>
		<item>
		<title>LaTeX utility scripts</title>
		<link>http://blog.robfelty.com/2008/12/04/latex-utility-scripts/</link>
		<comments>http://blog.robfelty.com/2008/12/04/latex-utility-scripts/#comments</comments>
		<pubDate>Fri, 05 Dec 2008 00:00:29 +0000</pubDate>
		<dc:creator>robfelty</dc:creator>
				<category><![CDATA[latex]]></category>
		<category><![CDATA[bash]]></category>
		<category><![CDATA[make]]></category>
		<category><![CDATA[pdflatex]]></category>

		<guid isPermaLink="false">http://blog.robfelty.com/?p=170</guid>
		<description><![CDATA[Processing a LaTeX file usually takes several steps. At a bare minimum, it usually requires 2 runs through latex (or pdflatex). Two runs are necessary in order to get cross-references and the table of contents right. Since LaTeX processes a page at a time, it can&#8217;t generate a table of contents on page 1 until [...]]]></description>
			<content:encoded><![CDATA[<p>Processing a LaTeX file usually takes several steps. At a bare minimum, it usually requires 2 runs through <tt>latex</tt> (or <tt>pdflatex</tt>). Two runs are necessary in order to get cross-references and the table of contents right. Since LaTeX processes a page at a time, it can&#8217;t generate a table of contents on page 1 until it knows what sections, subsections etc. are in the rest of the file. That is what the .aux file is. Then on the second run, LaTeX reads that info from the .aux file. If you are running bibtex, or making an index, there are additional programs to run. Typing this from the command line (or even hitting the compile button from a GUI like TeXshop) can be tedious. I know that many people use Makefiles to achieve this task. However, as far as I know, Makefiles are specific to a particular project. That is, for every new LaTeX project, you have to create a new Makefile. Instead, I use bash scripts. This allows me to specify a filename on the command line, and I also get some more flexibility from the power of bash. I choose bash for this task, since it is mostly just stringing together commands I would perform on the command line anyways. It is also installed on most any linux machine, and on Mac OSX. (Sorry windows users, (unless you use cygwin)).</p>
<p>I have several different scripts, depending on what I am doing.  </p>
<h4>Traditional LaTeX</h4>
<div class="codecolorer-container bash dawn" style="overflow:auto;white-space:nowrap;width:100;height:300px"><div class="bash codecolorer" style="font-family:Monaco,Lucida Console,monospace"><span class="co0">#!/bin/bash</span><br />
<span class="co0"># this script processes a latex file. </span><br />
<span class="re2">DVIPS</span>=dvips<br />
<span class="re2">PDF</span>=<span class="kw2">ps2pdf</span><br />
<span class="re2">PROG</span>=latex<br />
<span class="re2">SEED</span>=<span class="sy0">`</span><span class="kw3">echo</span> $<span class="nu0">1</span> <span class="sy0">|</span> <span class="kw2">cut</span> <span class="re5">-f1</span> <span class="re5">-d</span><span class="st0">&quot;.&quot;</span><span class="sy0">`</span><br />
<span class="re1">$PROG</span> <span class="re5">--shell-escape</span> <span class="re5">-interaction</span>=batchmode <span class="re1">$SEED</span> <span class="sy0">&amp;&amp;</span><br />
<span class="br0">&#40;</span><span class="kw1">if</span> <span class="br0">&#91;</span> <span class="re5">-e</span> <span class="co1">${SEED}</span>.idx <span class="br0">&#93;</span>; <span class="kw1">then</span><br />
&nbsp; makeindex <span class="re1">$SEED</span> <br />
<span class="kw1">fi</span><span class="br0">&#41;</span> <span class="sy0">&amp;&amp;</span> <br />
<span class="br0">&#40;</span><span class="kw1">if</span> <span class="br0">&#91;</span> $<span class="br0">&#40;</span><span class="kw2">grep</span> bibdata <span class="co1">${SEED}</span>.aux<span class="br0">&#41;</span> <span class="br0">&#93;</span>; <span class="kw1">then</span><br />
&nbsp; bibtex <span class="re1">$SEED</span> <span class="sy0">&amp;&amp;</span> <br />
&nbsp; <span class="re1">$PROG</span> <span class="re5">--shell-escape</span> <span class="re5">-interaction</span>=batchmode <span class="re1">$SEED</span> <span class="sy0">&amp;&amp;</span> <br />
&nbsp; <span class="re1">$PROG</span> <span class="re5">--shell-escape</span> <span class="re5">-interaction</span>=batchmode <span class="re1">$SEED</span> <br />
<span class="kw1">fi</span><span class="br0">&#41;</span> <span class="sy0">&amp;&amp;</span><br />
<span class="re1">$PROG</span> <span class="re5">--shell-escape</span> <span class="re5">-interaction</span>=batchmode <span class="re1">$SEED</span> <span class="sy0">&amp;&amp;</span><br />
<span class="re1">$DVIPS</span> <span class="re1">$SEED</span>.dvi <span class="re5">-t</span> letter <span class="re5">-Ppdf</span> <span class="re5">-o</span> <span class="re1">$SEED</span>.ps <span class="sy0">&amp;&amp;</span><br />
<span class="re1">$PDF</span> <span class="re1">$SEED</span>.ps <span class="sy0">&amp;&amp;</span><br />
<span class="kw3">echo</span> <span class="st0">&quot;*****************************<br />
&nbsp; SUCCESSFULLY PROCESSED <span class="es2">$SEED</span><br />
*****************************&quot;</span> <span class="sy0">||</span><br />
<span class="kw3">echo</span> <span class="st0">&quot;*****************************<br />
&nbsp; PARSING PROBLEM with <span class="es2">$SEED</span>. run <span class="es2">$PROG</span> manually to see errors<br />
*****************************&quot;</span></div></div>
<h4>For pdflatex</h4>
<div class="codecolorer-container bash dawn" style="overflow:auto;white-space:nowrap;width:100"><div class="bash codecolorer" style="font-family:Monaco,Lucida Console,monospace"><span class="co0">#!/bin/bash</span><br />
<span class="re2">PROG</span>=pdflatex<br />
<span class="re2">SEED</span>=<span class="sy0">`</span><span class="kw3">echo</span> $<span class="nu0">1</span> <span class="sy0">|</span> <span class="kw2">cut</span> <span class="re5">-f1</span> <span class="re5">-d</span><span class="st0">&quot;.&quot;</span><span class="sy0">`</span><br />
<span class="re1">$PROG</span> <span class="re5">--shell-escape</span> <span class="re5">-interaction</span>=batchmode <span class="re1">$SEED</span> <span class="sy0">&amp;&amp;</span><br />
<span class="br0">&#40;</span><span class="kw1">if</span> <span class="br0">&#91;</span> <span class="re5">-e</span> <span class="co1">${SEED}</span>.idx <span class="br0">&#93;</span>; <span class="kw1">then</span><br />
&nbsp; makeindex <span class="re1">$SEED</span> <br />
<span class="kw1">fi</span><span class="br0">&#41;</span> <span class="sy0">&amp;&amp;</span> <br />
<span class="br0">&#40;</span><span class="kw1">if</span> <span class="br0">&#91;</span> $<span class="br0">&#40;</span><span class="kw2">grep</span> bibdata <span class="co1">${SEED}</span>.aux<span class="br0">&#41;</span> <span class="br0">&#93;</span>; <span class="kw1">then</span><br />
&nbsp; bibtex <span class="re1">$SEED</span> <span class="sy0">&amp;&amp;</span> <br />
&nbsp; <span class="re1">$PROG</span> <span class="re5">--shell-escape</span> <span class="re5">-interaction</span>=batchmode <span class="re1">$SEED</span> <span class="sy0">&amp;&amp;</span> <br />
&nbsp; <span class="re1">$PROG</span> <span class="re5">--shell-escape</span> <span class="re5">-interaction</span>=batchmode <span class="re1">$SEED</span> <br />
<span class="kw1">fi</span><span class="br0">&#41;</span> <span class="sy0">&amp;&amp;</span><br />
<span class="re1">$PROG</span> <span class="re5">--shell-escape</span> <span class="re5">-interaction</span>=batchmode <span class="re1">$SEED</span> <span class="sy0">&amp;&amp;</span><br />
<span class="kw3">echo</span> <span class="st0">&quot;*****************************<br />
&nbsp; SUCCESSFULLY PROCESSED <span class="es2">$SEED</span><br />
*****************************&quot;</span> <span class="sy0">||</span><br />
<span class="kw3">echo</span> <span class="st0">&quot;*****************************<br />
&nbsp; PARSING PROBLEM with <span class="es2">$SEED</span>. run <span class="es2">$PROG</span> manually to see errors<br />
*****************************&quot;</span></div></div>
<p>You can run the scripts like so:</p>
<div class="codecolorer-container bash dawn" style="overflow:auto;white-space:nowrap;width:100"><div class="bash codecolorer" style="font-family:Monaco,Lucida Console,monospace">pdftexit myfile.tex</div></div>
<p>The .tex is optional. In fact you could use .pdf, or nothing. The extension gets stripped off. Note that as it is currently written, if you have a file like 2008.04.11.tex, it will break, since it splits by period, and only takes the first part. A way around this would be to use basename instead, but that would not work for files named anything other than .tex.</p>
<p>Also note that I suppress most of latex&#8217;s output by using the -interaction=batchmode option. By default LaTeX prints out quite a bit of information, and printing to the screen can really slow things down. If something goes wrong, then you can always run it once manually. The script will detect if something goes wrong and tell you.</p>
<p>I hope you find the scripts useful. For convenience, here is <a href='http://robfelty/texit.zip'>zip file with both bash scripts</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.robfelty.com/2008/12/04/latex-utility-scripts/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
		<item>
		<title>TeX Live 2008 &#8212; reasons to upgrade</title>
		<link>http://blog.robfelty.com/2008/11/06/149/</link>
		<comments>http://blog.robfelty.com/2008/11/06/149/#comments</comments>
		<pubDate>Thu, 06 Nov 2008 18:35:18 +0000</pubDate>
		<dc:creator>robfelty</dc:creator>
				<category><![CDATA[latex]]></category>

		<guid isPermaLink="false">http://blog.robfelty.com/?p=149</guid>
		<description><![CDATA[New features in pgf/tikz TeX Live 2008 was finally released about a month ago. I am a member of TUG, so I should be getting a DVD of it sometime soon, but today I finally decided I couldn&#8217;t wait, and I would just download it. The main impetus came after reading a discussion in comp.text.tex, [...]]]></description>
			<content:encoded><![CDATA[<div class='imageframe alignleft'><img src='http://media.texample.net/tikz/examples/extra/pgf-version-2/mpgf2002.png' alt='new features in pgf tikz' />
<div class='caption'>New features in pgf/tikz</div>
</div>
<p>TeX Live 2008 was finally released about a month ago. I am a member of TUG, so I should be getting a DVD of it sometime soon, but today I finally decided I couldn&#8217;t wait, and I would just download it. The main impetus came after reading a discussion in comp.text.tex, in which someone was trying to reduce his compile time. He had a bunch of pgf/tikz graphics, and they can take a long time to compile. Pgf/Tikz version 2.0, which was released in February, now includes the ability to save pgf graphics as external files, and then automatically include them using a standard \includegraphics command. So you only have to compile your graphics once, which can reduce compile time a lot. I think most LaTeX users probably compile often, especially if writing equations, since it is easy to mess those up and have your document not compile. So I can definitely appreciate the desire to speed up compile time. My most unproductive are days when I am running programs that take on the order of 30 seconds to 5 minutes to run, because I end up checking my e-mail or surfing the web while the program is running, and I usually end up spending more time doing that than the time it took for the program to run. </p>
<p>Anyways, so I wanted to try out this new functionality in pgf/tikz, so I downloaded the latest version from CTAN and installed it. (There is a nice tutorial on externalization in the manual (which is now 560 pages long) &#8212; search for &#8220;externalization&#8221;). Then I tried to compile a beamer presentation, and it failed. I was sort of expecting this, since I know beamer relies heavily on pgf. So I decided to just upgrade my whole texlive. By default, texlive gets installed into /usr/local/texlive/year, so I actually now have 2007 and 2008. I will keep both for awhile just to make sure I don&#8217;t have any problems. My non texlive packages are in /usr/local/texlive/texmf-local, so those did not get modified at all. </p>
<p>The first thing I did after installing the new texlive was to test a beamer presentation, and there were no problems, as I had expected. Then I used <tt>texdoc</tt> to check the manual for pgf and beamer to make sure that they were the newest versions, which they are. When I did so, the manuals got opened in evince. I prefer kpdf, and I had changed this in texdoc in my old version. I thought about just copying the old version over, but I decided to run a diff first, expecting to see just a few lines of output. I was quite surprised when lots and lots of changes started showing up, so then I did a word count on each. texdoc from 2007 was 206 lines long. texdoc from 2008 is 890 lines long. The old version was just a bourne shell script. The new version uses <tt>texlua</tt>. And the new version is much, much improved!! With the old version, to read the beamer manual, or the pgf manual I had to type:</p>
<div class="codecolorer-container bash dawn" style="overflow:auto;white-space:nowrap;width:100"><div class="bash codecolorer" style="font-family:Monaco,Lucida Console,monospace">texdoc beameruserguide<br />
texdoc pgfmanual</div></div>
<p>There were quite a few other packages that had similar problems. But now in the new version, it works as one would hope.</p>
<div class="codecolorer-container bash dawn" style="overflow:auto;white-space:nowrap;width:100"><div class="bash codecolorer" style="font-family:Monaco,Lucida Console,monospace">texdoc beamer</div></div>
<p>So, I stuck with the new version of texdoc, but I did modify it give preference to kpdf over evince for viewing pdf documents. I just searched for evince, then changed the order of the two lines. Even though I don&#8217;t know lua at all, the code was very nicely formatted and easy to read. </p>
<p>Another nice thing about the new version of pgf is that it has a bunch more features, including easy ways to create drop shadows, and some new default shapes, like callouts. A few more of the new features are explained at <a href='http://www.texample.net/tikz/examples/pgf-version-2/'> this texample post</a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.robfelty.com/2008/11/06/149/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
	
		<media:thumbnail url="http://media.texample.net/tikz/examples/extra/pgf-version-2/mpgf2002.png" />
		<media:content url="http://media.texample.net/tikz/examples/extra/pgf-version-2/mpgf2002.png" medium="image">
			<media:title type="html">new features in pgf tikz</media:title>
		</media:content>
	</item>
		<item>
		<title>Beamer fragile frames</title>
		<link>http://blog.robfelty.com/2008/09/22/beamer-fragile-frames/</link>
		<comments>http://blog.robfelty.com/2008/09/22/beamer-fragile-frames/#comments</comments>
		<pubDate>Mon, 22 Sep 2008 18:33:05 +0000</pubDate>
		<dc:creator>robfelty</dc:creator>
				<category><![CDATA[latex]]></category>
		<category><![CDATA[beamer]]></category>
		<category><![CDATA[fragile]]></category>

		<guid isPermaLink="false">http://blog.robfelty.com/?p=133</guid>
		<description><![CDATA[If you want to include verbatim text, say for some program code, in a frame in beamer, you have to pass the fragile option to the frame, like so: \begin{frame}[fragile] \frametitle{a fragile frame} \begin{verbatim} some verbatim text here \end{verbatim} \end{frame} Though latex usually doesn&#8217;t really care about whitespace at the beginning of a line, in [...]]]></description>
			<content:encoded><![CDATA[<p>If you want to include verbatim text, say for some program code, in a frame in beamer, you have to pass the fragile option to the frame, like so:</p>
<div class="codecolorer-container tex dawn" style="overflow:auto;white-space:nowrap;width:100"><div class="tex codecolorer" style="font-family:Monaco,Lucida Console,monospace"><span class="re8">\begin</span><span class="sy0">{</span><span class="re9"><span class="re7">frame</span></span><span class="sy0">}[</span><span class="re2">fragile</span><span class="sy0">]</span><br />
<span class="re12">\frametitle</span><span class="sy0">{</span><span class="re9">a fragile frame</span><span class="sy0">}</span><br />
<span class="re8">\begin</span><span class="sy0">{</span><span class="re9"><span class="re7">verbatim</span></span><span class="sy0">}</span><br />
some verbatim text here<br />
<span class="re8">\end</span><span class="sy0">{</span><span class="re9"><span class="re7">verbatim</span></span><span class="sy0">}</span><br />
<span class="re8">\end</span><span class="sy0">{</span><span class="re9"><span class="re7">frame</span></span><span class="sy0">}</span></div></div>
<p>Though latex usually doesn&#8217;t really care about whitespace at the beginning of a line, in this case it does. If you don&#8217;t have your begin and end frame statements at the beginning of a line when you are trying to use the fragile option, your document will not compile. It&#8217;s frustrating.</p>
<p>p.s. also note that you can&#8217;t use verbatim text with overlays in beamer.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.robfelty.com/2008/09/22/beamer-fragile-frames/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Finally a better LaTeX to html converter</title>
		<link>http://blog.robfelty.com/2008/03/19/finally-a-better-latex-to-html-converter/</link>
		<comments>http://blog.robfelty.com/2008/03/19/finally-a-better-latex-to-html-converter/#comments</comments>
		<pubDate>Wed, 19 Mar 2008 22:42:32 +0000</pubDate>
		<dc:creator>robfelty</dc:creator>
				<category><![CDATA[(x)html]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[latex]]></category>
		<category><![CDATA[html]]></category>
		<category><![CDATA[pdf]]></category>
		<category><![CDATA[plastex]]></category>

		<guid isPermaLink="false">http://blog.robfelty.com/2008/03/19/finally-a-better-latex-to-html-converter/</guid>
		<description><![CDATA[About a year ago I wrote a post about my frustration with the lack of a good LaTeX to html converter. Recently I found one. It is called plasTeX, so named because it is written in python. Finally a converter which works well with most any LaTeX package or macro you write, and produces sane, [...]]]></description>
			<content:encoded><![CDATA[<p>About a year ago I wrote a <a href=''>post</a> about my frustration with the lack of a good LaTeX to html converter. Recently I found one. It is called <a href='http://plastex.sourceforge.net'>plasTeX</a>, so named because it is written in python. Finally a converter which works well with most any LaTeX package or macro you write, and produces sane, relatively standards-compliant html. Best of all, it comes with a built-in if <tt>\ifplastex</tt>, so you can specify that some things should be in the pdf version, while others should be in the html version. It also support some other formats like docbook, but I am not too interested in that, so I haven&#8217;t tested it all. </p>
<p>Though I discovered plasTeX a few months ago, I finally decided to play around with it some more this week, when I wasn&#8217;t feeling like working too much. So I decided to convert my CV from html to latex, so I can have both pretty pdf and html versions. So now I will update my CV only in latex, which is much nicer to write than html anyways. </p>
<p>To get both a pdf and an html version, this is what I do:</p>
<div class="codecolorer-container bash dawn" style="overflow:auto;white-space:nowrap;width:100"><div class="bash codecolorer" style="font-family:Monaco,Lucida Console,monospace">pdflatex cv<br />
plastex <span class="re5">-c</span> cv.cfg cv<br />
tidy <span class="re5">--show-body-only</span> <span class="kw2">true</span> <span class="re5">-asxhtml</span> <span class="re5">-utf8</span> <span class="re5">-wrap</span> <span class="nu0">78</span> <span class="re5">-indent</span> cv<span class="sy0">/</span>index.html <span class="sy0">&gt;</span> cv<span class="sy0">/</span>index2.html</div></div>
<p>It took me awhile to figure out the syntax of the plasTeX config file. It is possible to specify these things on the command line, but I got tired of having too many things on the command line. The trick is that the plasTeX options are divided up into different sections. The sec-num-depth option, which tells plasTeX how many section levels deep to number, is in the document option section, while the split-level option is in the files section. The split-level option tells plasTeX how many different html pages to make. For my CV, I only wanted one. My plastex config file looks like:</p>
<div class="codecolorer-container ini dawn" style="overflow:auto;white-space:nowrap;width:100"><div class="ini codecolorer" style="font-family:Monaco,Lucida Console,monospace"><span class="re0"><span class="br0">&#91;</span>document<span class="br0">&#93;</span></span><br />
<span class="re1">sec-num-depth</span> <span class="sy0">=</span><span class="re2"> 0</span><br />
<span class="re0"><span class="br0">&#91;</span>files<span class="br0">&#93;</span></span><br />
<span class="re1">split-level</span> <span class="sy0">=</span><span class="re2"> 0</span></div></div>
<p>Though plasTeX is pretty nice, there are 3 complaints I still have. One is that it uses &lt;h1&gt; tags for \section, which I can understand, but there is a long tradition in the web of having only one &lt;h1&gt; tag per page, which usually holds the title of the page. PlasTeX does have the ability to use different themes, so there might be a way to change this with a theme, but I haven&#8217;t figured that out yet. For the time being, I simply used \subsection tags instead. </p>
<p>My second complaint about plasTeX is that it doesn&#8217;t do any nice formatting of the html like indenting or line-wrapping. That is only a minor complaint though, since I can simply run it through htmltidy (as in the code above). </p>
<p>My third complaint is that plasTeX puts everything inside a &lt;td&gt; or &lt;li&gt; inside a &lt;p&gt;, which seems very strange to me, and creates some ugly formatting, so I used some CSS tricks to basically take away the standard effects of &lt;p&gt; tags inside these:</p>
<div class="codecolorer-container css dawn" style="overflow:auto;white-space:nowrap;width:100"><div class="css codecolorer" style="font-family:Monaco,Lucida Console,monospace">td <span class="sy0">&gt;</span> p <span class="br0">&#123;</span><span class="kw1">margin</span><span class="sy0">:</span><span class="nu0">0</span><span class="sy0">;</span>padding<span class="sy0">:</span><span class="nu0">0</span><span class="sy0">;</span><span class="br0">&#125;</span><br />
li <span class="sy0">&gt;</span> p <span class="br0">&#123;</span><span class="kw1">margin</span><span class="sy0">:</span><span class="nu0">0</span><span class="sy0">;</span>padding<span class="sy0">:</span><span class="nu0">0</span><span class="sy0">;</span><span class="br0">&#125;</span></div></div>
<p>I am not completely finished yet, but you can check out the html and pdf results in: <a href='http://robfelty/academic/newcv.html'>my new CV</a>. </p>
]]></content:encoded>
			<wfw:commentRss>http://blog.robfelty.com/2008/03/19/finally-a-better-latex-to-html-converter/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Fun with fonts in LaTeX</title>
		<link>http://blog.robfelty.com/2008/02/28/fun-with-fonts-in-latex/</link>
		<comments>http://blog.robfelty.com/2008/02/28/fun-with-fonts-in-latex/#comments</comments>
		<pubDate>Thu, 28 Feb 2008 23:44:51 +0000</pubDate>
		<dc:creator>robfelty</dc:creator>
				<category><![CDATA[latex]]></category>

		<guid isPermaLink="false">http://blog.robfelty.com/2008/02/28/fun-with-fonts-in-latex/</guid>
		<description><![CDATA[Today I stumbled across the LaTeX font catalogue, which lists all available fonts for LaTeX. I am really surprised that I had not been aware of it earlier. I was also surprised at the number of fonts there. While some new projects such as XeTeX are making all open-type and true-type fonts available to the [...]]]></description>
			<content:encoded><![CDATA[<p>Today I stumbled across the <a href='http://www.tug.dk/FontCatalogue'>LaTeX font catalogue</a>, which lists all available fonts for LaTeX. I am really surprised that I had not been aware of it earlier. I was also surprised at the number of fonts there. While some new projects such as <a href='http://scripts.sil.org/xetex'>XeTeX</a> are making all open-type and true-type fonts available to the TeX typesetting system, I still use regular (pdf)LaTeX most of the time, and every once in awhile I like to play around with fonts. And, I think I have finally figured out the correct way to install new fonts using texlive.</p>
<ol>
<li>Copy files to the appropriate place under texmf
</li>
<li>
<div class="codecolorer-container bash dawn" style="overflow:auto;white-space:nowrap;width:100"><div class="bash codecolorer" style="font-family:Monaco,Lucida Console,monospace"><span class="kw2">sudo</span> texhash</div></div>
<p>This will tell TeX that there are new files in its path
</li>
<li>
<div class="codecolorer-container bash dawn" style="overflow:auto;white-space:nowrap;width:100"><div class="bash codecolorer" style="font-family:Monaco,Lucida Console,monospace"><span class="kw2">sudo</span> updmap-sys <span class="re5">--enable</span> <span class="sy0">&lt;</span>newfont<span class="sy0">&gt;</span></div></div>
<p>This will update the font handling parts of LaTeX
</li>
</ol>
<p>Here is a sample of one font I found pretty cool, and the LaTeX source:</p>
<div style="text-align: center;">
<div class="imageframe imgaligncenter" style="width:400px;"><a href="http://blog.robfelty.com/wp-content/uploads/2008/02/movieolascreenshot.png" title="movieola screenshot"><img src="http://blog.robfelty.com/wp-content/uploads/2008/02/movieolascreenshot.thumbnail.png" width="400" height="71" alt="movieola screenshot" /></a>
<div class="imagecaption">screenshot of the movieola font</div>
</div>
</div>
<div class="codecolorer-container tex dawn" style="overflow:auto;white-space:nowrap;width:100"><div class="tex codecolorer" style="font-family:Monaco,Lucida Console,monospace"><span class="re12">\documentclass</span><span class="sy0">[</span><span class="re2">11pt,letterpaper</span><span class="sy0">]{</span><span class="re9">article</span><span class="sy0">}</span><br />
<span class="re12">\usepackage</span><span class="sy0">{</span><span class="re9">emerald</span><span class="sy0">}</span><br />
<span class="re8">\begin</span><span class="sy0">{</span><span class="re9"><span class="re7">document</span></span><span class="sy0">}</span><br />
<span class="sy0">{</span><span class="re9"><br />
<span class="re12">\ECFMovieola</span><br />
<span class="re12">\Large</span><br />
SoMe PrEtTy TeXt HeRe<br />
</span><span class="sy0">}</span><br />
<span class="re8">\end</span><span class="sy0">{</span><span class="re9"><span class="re7">document</span></span><span class="sy0">}</span></div></div>
]]></content:encoded>
			<wfw:commentRss>http://blog.robfelty.com/2008/02/28/fun-with-fonts-in-latex/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:thumbnail url="http://blog.robfelty.com/wp-content/uploads/2008/02/movieolascreenshot.thumbnail.png" />
		<media:content url="http://blog.robfelty.com/wp-content/uploads/2008/02/movieolascreenshot.thumbnail.png" medium="image">
			<media:title type="html">movieola screenshot</media:title>
		</media:content>
	</item>
		<item>
		<title>numbered footnotes on titlepage</title>
		<link>http://blog.robfelty.com/2007/11/10/numbered-footnotes-on-titlepage/</link>
		<comments>http://blog.robfelty.com/2007/11/10/numbered-footnotes-on-titlepage/#comments</comments>
		<pubDate>Sat, 10 Nov 2007 23:18:29 +0000</pubDate>
		<dc:creator>robfelty</dc:creator>
				<category><![CDATA[latex]]></category>

		<guid isPermaLink="false">http://blog.robfelty.com/2007/11/10/numbered-footnotes-on-titlepage/</guid>
		<description><![CDATA[The new lab I work in at Indiana University has an annual progress report, with its own stylesheet. There is a template available for Microsoft Word, but I much prefer LaTeX, so I am trying to write my own class file for that. One of the quirks of the stylesheet is that footnotes from the [...]]]></description>
			<content:encoded><![CDATA[<p>The new lab I work in at Indiana University has an annual progress report, with its own stylesheet. There is a template available for Microsoft Word, but I much prefer LaTeX, so I am trying to write my own class file for that. One of the quirks of the stylesheet is that footnotes from the title are numbered. To clarify what I mean, consider the fact that many journal articles include a footnote or two in the title or author listing which may be an acknowledgment or a clarification of what institutions the authors are working at. These footnotes are usually not numbered, but instead are marked with a symbol such as an asterisk or a dagger, and this is what LaTeX does by default, when one uses the <tt>thanks</tt> command. Since the reports I will be writing are very similar to articles, I decided to try to just hack the article.cls file into srl.cls. After some experimenting, I found the line in the <tt>maketitle</tt> declaration which gives the symbols instead of numbers.</p>
<div class="codecolorer-container text dawn" style="overflow:auto;white-space:nowrap;width:100"><div class="text codecolorer" style="font-family:Monaco,Lucida Console,monospace">\renewcommand\thefootnote{\@fnsymbol\c@footnote}%</div></div>
<p>I simply commented this line out.</p>
<p>I also commented out the line which sets the footnote numbers to 0 after <tt>maketitle</tt> is finished typesetting the title</p>
<div class="codecolorer-container text dawn" style="overflow:auto;white-space:nowrap;width:100"><div class="text codecolorer" style="font-family:Monaco,Lucida Console,monospace">\setcounter{footnote}{0}%</div></div>
<p>Presto! One part of the stylesheet is done.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.robfelty.com/2007/11/10/numbered-footnotes-on-titlepage/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>advanced typography with pdfLaTeX</title>
		<link>http://blog.robfelty.com/2007/10/24/advanced-typography-with-pdflatex/</link>
		<comments>http://blog.robfelty.com/2007/10/24/advanced-typography-with-pdflatex/#comments</comments>
		<pubDate>Wed, 24 Oct 2007 14:45:40 +0000</pubDate>
		<dc:creator>robfelty</dc:creator>
				<category><![CDATA[latex]]></category>

		<guid isPermaLink="false">http://blog.robfelty.com/2007/10/24/advanced-typography-with-pdflatex/</guid>
		<description><![CDATA[I have been using LaTeX for several years now, but only a couple months ago did I start experimenting with pdflatex. Actually, most current LaTeX distributions use pdflatex as the default LaTeX engine, but if you use the latex command, then it will produce a .dvi file, which most people then convert to .ps and [...]]]></description>
			<content:encoded><![CDATA[<p>I have been using LaTeX for several years now, but only a couple months ago did I start experimenting with pdflatex. Actually, most current LaTeX distributions use pdflatex as the default LaTeX engine, but if you use the <tt>latex</tt> command, then it will produce a .dvi file, which most people then convert to .ps and probably to .pdf. Using the <tt>pdflatex</tt> command produces pdf directly, thus skipping two steps. This is always a plus. However, there are many other benefits of using pdflatex, which I would like to talk about here.</p>
<h3>Including images</h3>
<p>Including images with LaTeX has been possible (and easy) for quite some time, but it has been restricted to .eps files. While .eps is a vectorized (and thus high-quality and scalable) format, fewer and fewer programs will produce .eps (perhaps most notably Microsoft excel, which many unenlightened people use to make plots). In contrast, pdflatex allows inclusion of .png, .pdf, and .tiff files (and maybe a few others I am missing). It does not allow inclusion of .eps files, which at first was a major obstacle for me to switch, since I already had a bunch of .eps files laying around. It turns out that there is a very easy workaround to this though. Simply use the epstopdf package, and when you compile use the shell-escape option like so: <tt>pdflatex --shell-escape</tt>. Also, make sure that you do not include the file extensions for your graphics. What this does is it allows pdflatex to temporarily stop processing the document if no pdf version of the document is found and convert the eps file to a pdf using ghostscript. Most LaTeX distributions also include ghostscript by default.</p>
<div class="codecolorer-container tex dawn" style="overflow:auto;white-space:nowrap;width:100"><div class="tex codecolorer" style="font-family:Monaco,Lucida Console,monospace"><span class="re12">\documentclass</span><span class="sy0">{</span><span class="re9">minimal</span><span class="sy0">}</span><br />
<span class="re12">\usepackage</span><span class="sy0">{</span><span class="re9">graphicx</span><span class="sy0">}</span><br />
<span class="re12">\usepackage</span><span class="sy0">{</span><span class="re9">ifpdf</span><span class="sy0">}</span> <span class="co1">%check if we are using pdflatex</span><br />
<span class="re12">\ifpdf</span><br />
&nbsp; <span class="re12">\usepackage</span><span class="sy0">{</span><span class="re9">epstopdf</span><span class="sy0">}</span> <span class="co1">%convert eps to pdf on the fly</span><br />
<span class="re12">\fi</span><br />
<span class="re8">\begin</span><span class="sy0">{</span><span class="re9"><span class="re7">document</span></span><span class="sy0">}</span><br />
<span class="re12">\includegraphics</span><span class="sy0">{</span><span class="re9">foo</span><span class="sy0">}</span><br />
<span class="re8">\end</span><span class="sy0">{</span><span class="re9"><span class="re7">document</span></span><span class="sy0">}</span></div></div>
<p>One potential downside of using pdflatex regarding graphics is that pstricks does not work with pdflatex. This makes sense, since pstricks using postscript specials to make graphics, and pdflatex produces pdf directly. There are some supposed work arounds, but they all seem fairly complicated to me, and I have not tried them. I have chosen to use a different graphics package instead &#8212; <em>tikz/pgf</em>. This is a a newer package which can produce both .ps and .pdf files, and it has some very nice features. It is not quite as full-featured as pstricks yet, but it is in active development, and is constantly improving. The <em>beamer</em> package for making slides uses pgf for its graphics, which produces incredibly beautiful slides. I have written about pgf elsewhere on the blog, and will be writing about beamer in the near future. </p>
<h3>Micro-typesetting features</h3>
<p>Another feature of pdflatex is the availability of so-called micro typesetting features. In fact, this is one of the major motivations of writing pdflatex (written by Hàn Thê Thành for his thesis). Accessing these features directly is quite complicated, but fortunately there is the <em>microtype</em> package. There are two main features of the microtype package:</p>
<dl>
<dt>margin kerning</dt>
<dd>This involves allowing the text to protrude into the margin slightly. You&#8217;re probably thinking: &#8220;What?! That doesn&#8217;t make any sense! LaTeX gives me nicely justified text. Why would I want to ruin that?&#8221; Of course you are correct, but it turns out that even though LaTeX lines up text perfectly, it can appear slightly off, because of our human perception. Where this really comes about is in punctuation. Periods, commas, dashes and the like are generally much smaller characters than normal letters, so when such punctuation ends a line, it can seem that the line is slightly indented in the right margin. Microtypes margin kerning feature puts punctuation slightly in the margin, which gives the perception of a straighter line. The microtype package automatically has most standard punctuation defined for this purpose, but it is also possible to customize its behavior.</dd>
<dt>font expansion</dt>
<dd>This involves actually making the glyphs slightly wider than normal in order to avoid having to make the interword spacing too large. This is also done on the fly </dd>
</dl>
<p>As always, happy TeXing!</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.robfelty.com/2007/10/24/advanced-typography-with-pdflatex/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
