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

<channel>
	<title>On music, computing and math &#187; LaTeX</title>
	<atom:link href="http://pbelmans.wordpress.com/category/latex/feed/" rel="self" type="application/rss+xml" />
	<link>http://pbelmans.wordpress.com</link>
	<description>math, computational composition but mostly (La)TeX</description>
	<lastBuildDate>Mon, 14 May 2012 19:36:33 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='pbelmans.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>On music, computing and math &#187; LaTeX</title>
		<link>http://pbelmans.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://pbelmans.wordpress.com/osd.xml" title="On music, computing and math" />
	<atom:link rel='hub' href='http://pbelmans.wordpress.com/?pushpress=hub'/>
		<item>
		<title>A Pygments lexer for GAP</title>
		<link>http://pbelmans.wordpress.com/2012/04/20/a-pygments-lexer-for-gap/</link>
		<comments>http://pbelmans.wordpress.com/2012/04/20/a-pygments-lexer-for-gap/#comments</comments>
		<pubDate>Fri, 20 Apr 2012 08:17:05 +0000</pubDate>
		<dc:creator>pbelmans</dc:creator>
				<category><![CDATA[computer-science]]></category>
		<category><![CDATA[LaTeX]]></category>
		<category><![CDATA[math]]></category>

		<guid isPermaLink="false">http://pbelmans.wordpress.com/?p=807</guid>
		<description><![CDATA[In case you haven&#8217;t heard of one of the most awesome LaTeX packages ever, let me introduce to you: minted. It&#8217;s a package to create listings (code snippets, preferably with highlighting, line numbering etc.), but it goes much further than the more well-known package listings. A small example: Its awesomeness comes at a cost though, [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=pbelmans.wordpress.com&#038;blog=15229912&#038;post=807&#038;subd=pbelmans&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>In case you haven&#8217;t heard of one of the most awesome LaTeX packages ever, let me introduce to you: <a href="http://ctan.org/pkg/minted">minted</a>. It&#8217;s a package to create listings (code snippets, preferably with highlighting, line numbering etc.), but it goes much further than the more well-known package <a href="http://ctan.org/pkg/listings">listings</a>. A small example:<br />
<img src="http://i.stack.imgur.com/7sGrC.png" alt="" /><br />
Its awesomeness comes at a cost though, it relies heavily on an external Python program called <a href="http://pygments.org">Pygments</a>. This is a generic tool for highlighting, regardless of output format. It can produce <a href="http://pygments.org/docs/formatters/">TeX, HTML, images, &#8230;</a>. And it comes equipped with a load of <a href="http://pygments.org/languages/">supported languages</a>. And if you&#8217;ve read the title you might guess what this post is about: a language that wasn&#8217;t supported yet.</p>
<p>For a course in computational group theory I have to write a report about an implementation in <a href="http://gap-system.org">GAP</a>, and this is absolutely impossible without the best possible syntax highlighting, right? So I have entertained myself with implementing a GAP lexer. Its implementation is available at <a href="https://github.com/pbelmans/gap-pygments-lexer">github.com/pbelmans/gap-pygments-lexer</a>.</p>
<p>I have supplied an automatic installer, as the <a href="https://github.com/pbelmans/gap-pygments-lexer/blob/master/README.markdown">README</a> suggests it boils down to</p>
<ol>
<li><code>git clone git://github.com/pbelmans/gap-pygments-lexer.git</code> or download and extract the archive GitHub automatically creates at the <a href="https://github.com/pbelmans/gap-pygments-lexer/downloads">project&#8217;s Downloads page</a></li>
<li><code>cd gap-pygments-lexer</code></li>
<li><code>sudo python setup.py install</code></li>
</ol>
<p>I would like to thank <a href="https://twitter.com/#!/wimthys">Wim Thys</a> for providing me with the names of all the built-in classes and functions, using a bit of <code>sed</code> magic. </p>
<p>If you feel inspired, there are several other languages that need an implementation:</p>
<ul>
<li><a href="http://maplesoft.com">Maple</a></li>
<li><a href="http://magma.maths.usyd.edu.au/magma/">Magma</a> (but they are be <a href="http://magma.maths.usyd.edu.au/magma/extra/highlight/README.txt">working on it themselves apparently</a>)</li>
<li><a href="http://pari.math.u-bordeaux.fr/">PARI/GP</a> (this one has the most intriguing syntax of all)</li>
</ul>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/pbelmans.wordpress.com/807/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/pbelmans.wordpress.com/807/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/pbelmans.wordpress.com/807/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/pbelmans.wordpress.com/807/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/pbelmans.wordpress.com/807/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/pbelmans.wordpress.com/807/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/pbelmans.wordpress.com/807/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/pbelmans.wordpress.com/807/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/pbelmans.wordpress.com/807/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/pbelmans.wordpress.com/807/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/pbelmans.wordpress.com/807/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/pbelmans.wordpress.com/807/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/pbelmans.wordpress.com/807/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/pbelmans.wordpress.com/807/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=pbelmans.wordpress.com&#038;blog=15229912&#038;post=807&#038;subd=pbelmans&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://pbelmans.wordpress.com/2012/04/20/a-pygments-lexer-for-gap/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/bf4c56431003682b725b72668e7de35f?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">pbelmans</media:title>
		</media:content>

		<media:content url="http://i.stack.imgur.com/7sGrC.png" medium="image" />
	</item>
		<item>
		<title>How to write Čech cohomology groups in LaTeX</title>
		<link>http://pbelmans.wordpress.com/2012/03/29/how-to-write-cech-cohomology-groups-in-latex/</link>
		<comments>http://pbelmans.wordpress.com/2012/03/29/how-to-write-cech-cohomology-groups-in-latex/#comments</comments>
		<pubDate>Thu, 29 Mar 2012 15:58:23 +0000</pubDate>
		<dc:creator>pbelmans</dc:creator>
				<category><![CDATA[LaTeX]]></category>

		<guid isPermaLink="false">http://pbelmans.wordpress.com/?p=791</guid>
		<description><![CDATA[Just like writing direct and inverse limits in TeX, the way to write Čech cohomology groups in TeX is something that doesn&#8217;t come up easily in Google unless you know what to look for (basically a list of math mode accents, but I am not the only person obstinately searching with the wrong keywords, right?). [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=pbelmans.wordpress.com&#038;blog=15229912&#038;post=791&#038;subd=pbelmans&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Just like <a href="http://pbelmans.wordpress.com/2010/10/02/direct-and-inverse-limit-in-latex/">writing direct and inverse limits in TeX</a>, the way to write <a href="http://en.wikipedia.org/wiki/%C4%8Cech_cohomology">Čech cohomology</a> groups in TeX is something that doesn&#8217;t come up easily in Google unless you know what to look for (basically a <a href="http://en.wikibooks.org/wiki/LaTeX/Accents#Math_mode">list of math mode accents</a>, but I am not the only person obstinately searching with the wrong keywords, right?).</p>
<p>So in text mode you write <code>\v{C}ech</code>, and in case you wish to write down the <img src='http://s0.wp.com/latex.php?latex=n&amp;bg=f9f7f5&amp;fg=444444&amp;s=0' alt='n' title='n' class='latex' />-th Čech cohomology group <img src='http://s0.wp.com/latex.php?latex=%5Ccheck%7B%5Cmathrm%7BH%7D%7D%5En%28X%2C%5Cmathcal%7BF%7D%29&amp;bg=f9f7f5&amp;fg=444444&amp;s=0' alt='&#92;check{&#92;mathrm{H}}^n(X,&#92;mathcal{F})' title='&#92;check{&#92;mathrm{H}}^n(X,&#92;mathcal{F})' class='latex' /> of a topological space <img src='http://s0.wp.com/latex.php?latex=X&amp;bg=f9f7f5&amp;fg=444444&amp;s=0' alt='X' title='X' class='latex' /> and the sheaf <img src='http://s0.wp.com/latex.php?latex=%5Cmathcal%7BF%7D&amp;bg=f9f7f5&amp;fg=444444&amp;s=0' alt='&#92;mathcal{F}' title='&#92;mathcal{F}' class='latex' /> you use <code>\check{\mathrm{H}}^n(X,\mathcal{F})</code>. Notice the use of <code>\mathrm{H}</code> for the actual (co)homology object, you could/should do this too! </p>
<p><small>Don&#8217;t shoot the nitpicky typesetting aficionado please. And consider using a macro like <code>\newcommand\HH{\mathrm{H}}</code> for easier typing. And of course <code>\newcommand\cHH{\check{\mathrm{H}}}</code>.</small></p>
<p>Let this fact be known too.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/pbelmans.wordpress.com/791/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/pbelmans.wordpress.com/791/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/pbelmans.wordpress.com/791/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/pbelmans.wordpress.com/791/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/pbelmans.wordpress.com/791/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/pbelmans.wordpress.com/791/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/pbelmans.wordpress.com/791/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/pbelmans.wordpress.com/791/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/pbelmans.wordpress.com/791/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/pbelmans.wordpress.com/791/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/pbelmans.wordpress.com/791/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/pbelmans.wordpress.com/791/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/pbelmans.wordpress.com/791/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/pbelmans.wordpress.com/791/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=pbelmans.wordpress.com&#038;blog=15229912&#038;post=791&#038;subd=pbelmans&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://pbelmans.wordpress.com/2012/03/29/how-to-write-cech-cohomology-groups-in-latex/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/bf4c56431003682b725b72668e7de35f?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">pbelmans</media:title>
		</media:content>
	</item>
		<item>
		<title>A beamer theme for the University of Ghent</title>
		<link>http://pbelmans.wordpress.com/2012/02/09/a-beamer-theme-for-the-university-of-ghent/</link>
		<comments>http://pbelmans.wordpress.com/2012/02/09/a-beamer-theme-for-the-university-of-ghent/#comments</comments>
		<pubDate>Thu, 09 Feb 2012 20:10:59 +0000</pubDate>
		<dc:creator>pbelmans</dc:creator>
				<category><![CDATA[LaTeX]]></category>

		<guid isPermaLink="false">http://pbelmans.wordpress.com/?p=754</guid>
		<description><![CDATA[I have created a beamer theme for the University of Ghent (as the title already suggests), inspired by the excellent beamer theme for the University of Antwerp created by Nico Schlömer. There is already an implementation, but it doesn&#8217;t meet the style guide and it is only available out-of-the-box for the Faculty of Engineering and [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=pbelmans.wordpress.com&#038;blog=15229912&#038;post=754&#038;subd=pbelmans&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I have created a <a href="https://github.com/pbelmans/ugent-beamer">beamer theme for the University of Ghent</a> (as the title already suggests), inspired by the excellent <a href="https://github.com/nschloe/ua-beamer">beamer theme for the University of Antwerp</a> created by <a href="http://win.ua.ac.be/~nschloe/">Nico Schlömer</a>. There is already <a href="http://latex.ugent.be/node/52">an implementation</a>, but it doesn&#8217;t meet the <a href="http://www.ugent.be/nl/werken/organisatie/huisstijl">style guide</a> and it is only available out-of-the-box for the Faculty of Engineering and Architecture.</p>
<p>So I have decided to implement a UGent beamer theme myself, adhering to the style guide and following the philosophy set out by Nico. The implementation is available at GitHub, by means of the <a href="https://github.com/pbelmans/ugent-beamer/downloads">ugent-beamer project</a>. I have rewritten Nico&#8217;s documentation to match my personal view on the subject of beamer themes, the result is available as a <a href="https://github.com/downloads/pbelmans/ugent-beamer/documentation.pdf">separate download</a>. In case you wish to use the theme and you&#8217;re not that git-savvy, you can download the <a href="https://github.com/downloads/pbelmans/ugent-beamer/ugent-beamer.tar">archive</a> at the <a href="https://github.com/pbelmans/ugent-beamer/downloads">Downloads page</a>. It contains all the necessary files, including the documentation.</p>
<p>The first two slides from the example I have supplied are</p>
<p><img src="http://pbelmans.files.wordpress.com/2012/02/title-slide.png?w=497" alt="An example slide from the UGent beamer theme" /></p>
<p><img src="http://pbelmans.files.wordpress.com/2012/02/slide.png?w=497" alt="A second example slide from the UGent beamer theme" /></p>
<p>Installing beamer themes can be quite a hassle if you&#8217;re not acquainted with the inner workings of MiKTeX or TeX Live, but it should be thoroughly explained in the documentation. If anything is not clear or something is wrong, please let me know. As for now, there are still several things I would like to do with the theme in the future, they are listed at the <a href="https://github.com/pbelmans/ugent-beamer/issues">Issues page</a>.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/pbelmans.wordpress.com/754/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/pbelmans.wordpress.com/754/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/pbelmans.wordpress.com/754/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/pbelmans.wordpress.com/754/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/pbelmans.wordpress.com/754/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/pbelmans.wordpress.com/754/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/pbelmans.wordpress.com/754/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/pbelmans.wordpress.com/754/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/pbelmans.wordpress.com/754/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/pbelmans.wordpress.com/754/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/pbelmans.wordpress.com/754/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/pbelmans.wordpress.com/754/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/pbelmans.wordpress.com/754/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/pbelmans.wordpress.com/754/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=pbelmans.wordpress.com&#038;blog=15229912&#038;post=754&#038;subd=pbelmans&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://pbelmans.wordpress.com/2012/02/09/a-beamer-theme-for-the-university-of-ghent/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/bf4c56431003682b725b72668e7de35f?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">pbelmans</media:title>
		</media:content>

		<media:content url="http://pbelmans.files.wordpress.com/2012/02/title-slide.png" medium="image">
			<media:title type="html">An example slide from the UGent beamer theme</media:title>
		</media:content>

		<media:content url="http://pbelmans.files.wordpress.com/2012/02/slide.png" medium="image">
			<media:title type="html">A second example slide from the UGent beamer theme</media:title>
		</media:content>
	</item>
		<item>
		<title>Changing \href{}{} to produce footnotes</title>
		<link>http://pbelmans.wordpress.com/2011/12/14/changing-href-to-produce-footnotes/</link>
		<comments>http://pbelmans.wordpress.com/2011/12/14/changing-href-to-produce-footnotes/#comments</comments>
		<pubDate>Wed, 14 Dec 2011 08:19:13 +0000</pubDate>
		<dc:creator>pbelmans</dc:creator>
				<category><![CDATA[LaTeX]]></category>

		<guid isPermaLink="false">http://pbelmans.wordpress.com/?p=719</guid>
		<description><![CDATA[While preparing a document with lots of links for both online and offline viewing, I wanted the offline (i.e. printable) version to contain fulltext hyperlinks in the footnote. So whenever LaTeX comes across a \href{http://example.org}{Example website} I want it converted to something like Example website\footnote{\url{http://example.org}}. Inspired by this answer to the related TeX.SX question I [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=pbelmans.wordpress.com&#038;blog=15229912&#038;post=719&#038;subd=pbelmans&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>While preparing a document with lots of links for both online and offline viewing, I wanted the offline (i.e. printable) version to contain fulltext hyperlinks in the footnote. So whenever LaTeX comes across a <code>\href{http://example.org}{Example website}</code> I want it converted to something like <code>Example website\footnote{\url{http://example.org}}</code>. Inspired by <a href="http://tex.stackexchange.com/a/13147/210">this answer</a> to the <a href="http://tex.stackexchange.com/questions/12774/changing-hrefs-to-footnotes">related TeX.SX question</a> I came up with<br />
<pre class="brush: latex; wrap-lines: false;">
\makeatletter
\newcommand\href@footnote[2]{#2\footnote{\url{#1}}}
\DeclareRobustCommand{\href}{\hyper@normalise\href@footnote}
\makeatother
</pre>This code properly handles active characters in url&#8217;s. Which is exactly what I want :).</p>
<p>I&#8217;m not claiming any originality here, but you might find it useful.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/pbelmans.wordpress.com/719/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/pbelmans.wordpress.com/719/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/pbelmans.wordpress.com/719/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/pbelmans.wordpress.com/719/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/pbelmans.wordpress.com/719/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/pbelmans.wordpress.com/719/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/pbelmans.wordpress.com/719/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/pbelmans.wordpress.com/719/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/pbelmans.wordpress.com/719/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/pbelmans.wordpress.com/719/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/pbelmans.wordpress.com/719/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/pbelmans.wordpress.com/719/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/pbelmans.wordpress.com/719/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/pbelmans.wordpress.com/719/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=pbelmans.wordpress.com&#038;blog=15229912&#038;post=719&#038;subd=pbelmans&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://pbelmans.wordpress.com/2011/12/14/changing-href-to-produce-footnotes/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/bf4c56431003682b725b72668e7de35f?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">pbelmans</media:title>
		</media:content>
	</item>
		<item>
		<title>Dutch LaTeX course</title>
		<link>http://pbelmans.wordpress.com/2011/12/05/latex-course/</link>
		<comments>http://pbelmans.wordpress.com/2011/12/05/latex-course/#comments</comments>
		<pubDate>Mon, 05 Dec 2011 20:52:02 +0000</pubDate>
		<dc:creator>pbelmans</dc:creator>
				<category><![CDATA[LaTeX]]></category>

		<guid isPermaLink="false">http://pbelmans.wordpress.com/?p=711</guid>
		<description><![CDATA[Just like last year I gave a LaTeX course in Dutch, for students at the University of Antwerp. Now it&#8217;s time to share my material with the world. Remark that it is explicitly tailored at the student population: I&#8217;ve used the (non-optimal) configuration of the computers there as the starting point of my classes. And [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=pbelmans.wordpress.com&#038;blog=15229912&#038;post=711&#038;subd=pbelmans&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Just like last year I gave a LaTeX course in Dutch, for students at the University of Antwerp. Now it&#8217;s time to share my material with the world. Remark that it is explicitly tailored at the student population: I&#8217;ve used the (non-optimal) configuration of the computers there as the starting point of my classes. And as the target population consists of students at the Faculty of Sciences (and by extension the Faculty of Economy), the main focus lies on their core activities: math, code, beamer, a little bit of chemistry. A course especially written for humanities students would be an interesting thing to make, but that&#8217;s out of the question now :). The slides aren&#8217;t perfect, but I&#8217;m quite satisfied with them.</p>
<p>Anyhow, in case you want to use my material (conceived as 4 weeks of 3 hours classes each), please contact me, but otherwise you&#8217;re free to use them for your own benefit. The actual material is available at <a href="http://acmantwerp.acm.org/?page_id=158">the ACM Antwerp LaTeX course page</a> (not complete yet), the code necessary to create it is available at <a href="https://github.com/pbelmans/Dutch-LaTeX-course">github.com/pbelmans/Dutch-LaTeX-course</a> (where else&#8230;), using <code>pdflatex --shell-escape slides</code> and building several times should do the trick if you&#8217;ve got <a href="http://pygments.org">Pygment</a>s with <a href="https://github.com/pbelmans/UAStyle">correct Pygments style</a> and the <a href="https://github.com/nschloe/ua-beamer">correct beamer theme</a> installed.</p>
<p><small>I realize this post has little or no value if you don&#8217;t speak Dutch, my apologies if this applies to you.</small></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/pbelmans.wordpress.com/711/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/pbelmans.wordpress.com/711/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/pbelmans.wordpress.com/711/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/pbelmans.wordpress.com/711/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/pbelmans.wordpress.com/711/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/pbelmans.wordpress.com/711/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/pbelmans.wordpress.com/711/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/pbelmans.wordpress.com/711/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/pbelmans.wordpress.com/711/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/pbelmans.wordpress.com/711/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/pbelmans.wordpress.com/711/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/pbelmans.wordpress.com/711/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/pbelmans.wordpress.com/711/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/pbelmans.wordpress.com/711/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=pbelmans.wordpress.com&#038;blog=15229912&#038;post=711&#038;subd=pbelmans&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://pbelmans.wordpress.com/2011/12/05/latex-course/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/bf4c56431003682b725b72668e7de35f?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">pbelmans</media:title>
		</media:content>
	</item>
		<item>
		<title>\uparrow and its variations are variable-sized delimiters</title>
		<link>http://pbelmans.wordpress.com/2011/11/04/uparrow-and-its-variations-are-variable-sized-delimiters/</link>
		<comments>http://pbelmans.wordpress.com/2011/11/04/uparrow-and-its-variations-are-variable-sized-delimiters/#comments</comments>
		<pubDate>Fri, 04 Nov 2011 19:36:39 +0000</pubDate>
		<dc:creator>pbelmans</dc:creator>
				<category><![CDATA[LaTeX]]></category>

		<guid isPermaLink="false">http://pbelmans.wordpress.com/?p=695</guid>
		<description><![CDATA[While preparing a commutative diagram to be used in a MathJax environment I discovered the little gem that is already given away in the title. Basically I needed to draw a relatively complex commutative diagram (see below) without using extra packages like xypic or (my favourite) PGF/TikZ. Only stuff from amsmath (and its extended family) [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=pbelmans.wordpress.com&#038;blog=15229912&#038;post=695&#038;subd=pbelmans&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>While preparing a commutative diagram to be used in a <a href="http://mathjax.org">MathJax</a> environment I discovered the little gem that is already given away in the title. Basically I needed to draw a relatively complex commutative diagram (see below) without using extra packages like <code><a href="http://ctan.org/pkg/xypic">xypic</a></code> or (my favourite) <a href="http://ctan.org/pkg/pgf">PGF/TikZ</a>. Only stuff from <code>amsmath</code> (and its extended family) is allowed. That means hacking something together using <code>array</code>.</p>
<p>You know variable-sized delimiters: they are either the <code>\left(</code>, <code>\right)</code> combo or variations on <code>\big)</code> making all your delimiters look good in LaTeX. But <code>\uparrow</code> and its related arrows <code>\downarrow</code>, <code>\Downarrow</code>, <code>\Uparrow</code>, <code>\updownarrow</code> and <code>\Updownarrow</code> are variable-sized delimiters too! Which means they can be used to spice up your commutative diagram a little.</p>
<p>Compare<br />
<img src='http://s0.wp.com/latex.php?latex=%5Cbegin%7Barray%7D%7Bccccc%7D++++++%26+%26+%5Cmathrm%7BNr%7D%28%5Cmathbb%7BZ%7D%29+%26+%26+%5C%5C++++++%26+%26+%5Cphantom%7B%5Ctextrm%7Bitp%7D%7D%5Cdownarrow%5Ctextrm%7Bitp%7D+%26+%26+%5C%5C++++++%5Cmathrm%7BW%7D%28%5Cmathbb%7BZ%7D%29+%26+%5Coverset%7B%5Ctau%7D%7B%5Clongrightarrow%7D+%26+%5Chat%7B%5COmega%7D%28%5Cmathrm%7BC%7D_%5Cinfty%29+%26+%5Coverset%7B%5Cmathrm%7Bs%7D_t%7D%7B%5Clongrightarrow%7D+%26+%5CLambda%28%5Cmathbb%7BZ%7D%29+%5C%5C++++++%5Cphantom%7B%5CPhi%7D%5Cdownarrow%5CPhi+%26+%26+%5Cphantom%7B%5Chat%7B%5Cvarphi%7D%7D%5Cdownarrow%5Chat%7B%5Cvarphi%7D+%26+%26+%5Cphantom%7B%5Cmathrm%7BL%7D_%7B%5Cmathbb%7BZ%7D%7D%7D%5Cdownarrow%5Cmathrm%7BL%7D_%7B%5Cmathbb%7BZ%7D%7D+%5C%5C++++++%5Cprod_%7Bn%3D1%7D%5E%7B%2B%5Cinfty%7D%5Cmathbb%7BZ%7D+%26+%5Clongleftrightarrow+%26+%5Cmathrm%7Bgh%7D%28%5Cmathrm%7BC%7D_%5Cinfty%29%3D%5Cmathbb%7BZ%7D%5E%7B%5Cmathbb%7BN%7D%5E%5Ctimes%7D+%26+%5Clongleftrightarrow+%26+t%5Cmathbb%7BZ%7D%5B%5C%21%5Bt%5D%5C%21%5D++%5Cend%7Barray%7D&amp;bg=f9f7f5&amp;fg=444444&amp;s=0' alt='&#92;begin{array}{ccccc}      &amp; &amp; &#92;mathrm{Nr}(&#92;mathbb{Z}) &amp; &amp; &#92;&#92;      &amp; &amp; &#92;phantom{&#92;textrm{itp}}&#92;downarrow&#92;textrm{itp} &amp; &amp; &#92;&#92;      &#92;mathrm{W}(&#92;mathbb{Z}) &amp; &#92;overset{&#92;tau}{&#92;longrightarrow} &amp; &#92;hat{&#92;Omega}(&#92;mathrm{C}_&#92;infty) &amp; &#92;overset{&#92;mathrm{s}_t}{&#92;longrightarrow} &amp; &#92;Lambda(&#92;mathbb{Z}) &#92;&#92;      &#92;phantom{&#92;Phi}&#92;downarrow&#92;Phi &amp; &amp; &#92;phantom{&#92;hat{&#92;varphi}}&#92;downarrow&#92;hat{&#92;varphi} &amp; &amp; &#92;phantom{&#92;mathrm{L}_{&#92;mathbb{Z}}}&#92;downarrow&#92;mathrm{L}_{&#92;mathbb{Z}} &#92;&#92;      &#92;prod_{n=1}^{+&#92;infty}&#92;mathbb{Z} &amp; &#92;longleftrightarrow &amp; &#92;mathrm{gh}(&#92;mathrm{C}_&#92;infty)=&#92;mathbb{Z}^{&#92;mathbb{N}^&#92;times} &amp; &#92;longleftrightarrow &amp; t&#92;mathbb{Z}[&#92;![t]&#92;!]  &#92;end{array}' title='&#92;begin{array}{ccccc}      &amp; &amp; &#92;mathrm{Nr}(&#92;mathbb{Z}) &amp; &amp; &#92;&#92;      &amp; &amp; &#92;phantom{&#92;textrm{itp}}&#92;downarrow&#92;textrm{itp} &amp; &amp; &#92;&#92;      &#92;mathrm{W}(&#92;mathbb{Z}) &amp; &#92;overset{&#92;tau}{&#92;longrightarrow} &amp; &#92;hat{&#92;Omega}(&#92;mathrm{C}_&#92;infty) &amp; &#92;overset{&#92;mathrm{s}_t}{&#92;longrightarrow} &amp; &#92;Lambda(&#92;mathbb{Z}) &#92;&#92;      &#92;phantom{&#92;Phi}&#92;downarrow&#92;Phi &amp; &amp; &#92;phantom{&#92;hat{&#92;varphi}}&#92;downarrow&#92;hat{&#92;varphi} &amp; &amp; &#92;phantom{&#92;mathrm{L}_{&#92;mathbb{Z}}}&#92;downarrow&#92;mathrm{L}_{&#92;mathbb{Z}} &#92;&#92;      &#92;prod_{n=1}^{+&#92;infty}&#92;mathbb{Z} &amp; &#92;longleftrightarrow &amp; &#92;mathrm{gh}(&#92;mathrm{C}_&#92;infty)=&#92;mathbb{Z}^{&#92;mathbb{N}^&#92;times} &amp; &#92;longleftrightarrow &amp; t&#92;mathbb{Z}[&#92;![t]&#92;!]  &#92;end{array}' class='latex' /><br />
to<br />
<img src='http://s0.wp.com/latex.php?latex=%5Cbegin%7Barray%7D%7Bccccc%7D++++++%26+%26+%5Cmathrm%7BNr%7D%28%5Cmathbb%7BZ%7D%29+%26+%26+%5C%5C++++++%26+%26+%5Cphantom%7B%5Ctextrm%7Bitp%7D%7D%5CBig%5Cdownarrow%5Ctextrm%7Bitp%7D+%26+%26+%5C%5C++++++%5Cmathrm%7BW%7D%28%5Cmathbb%7BZ%7D%29+%26+%5Coverset%7B%5Ctau%7D%7B%5Clongrightarrow%7D+%26+%5Chat%7B%5COmega%7D%28%5Cmathrm%7BC%7D_%5Cinfty%29+%26+%5Coverset%7B%5Cmathrm%7Bs%7D_t%7D%7B%5Clongrightarrow%7D+%26+%5CLambda%28%5Cmathbb%7BZ%7D%29+%5C%5C++++++%5Cphantom%7B%5CPhi%7D%5CBig%5Cdownarrow%5CPhi+%26+%26+%5Cphantom%7B%5Chat%7B%5Cvarphi%7D%7D%5CBig%5Cdownarrow%5Chat%7B%5Cvarphi%7D+%26+%26+%5Cphantom%7B%5Cmathrm%7BL%7D_%7B%5Cmathbb%7BZ%7D%7D%7D%5CBig%5Cdownarrow%5Cmathrm%7BL%7D_%7B%5Cmathbb%7BZ%7D%7D+%5C%5C++++++%5Cprod_%7Bn%3D1%7D%5E%7B%2B%5Cinfty%7D%5Cmathbb%7BZ%7D+%26+%5Clongleftrightarrow+%26+%5Cmathrm%7Bgh%7D%28%5Cmathrm%7BC%7D_%5Cinfty%29%3D%5Cmathbb%7BZ%7D%5E%7B%5Cmathbb%7BN%7D%5E%5Ctimes%7D+%26+%5Clongleftrightarrow+%26+t%5Cmathbb%7BZ%7D%5B%5C%21%5Bt%5D%5C%21%5D++++%5Cend%7Barray%7D&amp;bg=f9f7f5&amp;fg=444444&amp;s=0' alt='&#92;begin{array}{ccccc}      &amp; &amp; &#92;mathrm{Nr}(&#92;mathbb{Z}) &amp; &amp; &#92;&#92;      &amp; &amp; &#92;phantom{&#92;textrm{itp}}&#92;Big&#92;downarrow&#92;textrm{itp} &amp; &amp; &#92;&#92;      &#92;mathrm{W}(&#92;mathbb{Z}) &amp; &#92;overset{&#92;tau}{&#92;longrightarrow} &amp; &#92;hat{&#92;Omega}(&#92;mathrm{C}_&#92;infty) &amp; &#92;overset{&#92;mathrm{s}_t}{&#92;longrightarrow} &amp; &#92;Lambda(&#92;mathbb{Z}) &#92;&#92;      &#92;phantom{&#92;Phi}&#92;Big&#92;downarrow&#92;Phi &amp; &amp; &#92;phantom{&#92;hat{&#92;varphi}}&#92;Big&#92;downarrow&#92;hat{&#92;varphi} &amp; &amp; &#92;phantom{&#92;mathrm{L}_{&#92;mathbb{Z}}}&#92;Big&#92;downarrow&#92;mathrm{L}_{&#92;mathbb{Z}} &#92;&#92;      &#92;prod_{n=1}^{+&#92;infty}&#92;mathbb{Z} &amp; &#92;longleftrightarrow &amp; &#92;mathrm{gh}(&#92;mathrm{C}_&#92;infty)=&#92;mathbb{Z}^{&#92;mathbb{N}^&#92;times} &amp; &#92;longleftrightarrow &amp; t&#92;mathbb{Z}[&#92;![t]&#92;!]    &#92;end{array}' title='&#92;begin{array}{ccccc}      &amp; &amp; &#92;mathrm{Nr}(&#92;mathbb{Z}) &amp; &amp; &#92;&#92;      &amp; &amp; &#92;phantom{&#92;textrm{itp}}&#92;Big&#92;downarrow&#92;textrm{itp} &amp; &amp; &#92;&#92;      &#92;mathrm{W}(&#92;mathbb{Z}) &amp; &#92;overset{&#92;tau}{&#92;longrightarrow} &amp; &#92;hat{&#92;Omega}(&#92;mathrm{C}_&#92;infty) &amp; &#92;overset{&#92;mathrm{s}_t}{&#92;longrightarrow} &amp; &#92;Lambda(&#92;mathbb{Z}) &#92;&#92;      &#92;phantom{&#92;Phi}&#92;Big&#92;downarrow&#92;Phi &amp; &amp; &#92;phantom{&#92;hat{&#92;varphi}}&#92;Big&#92;downarrow&#92;hat{&#92;varphi} &amp; &amp; &#92;phantom{&#92;mathrm{L}_{&#92;mathbb{Z}}}&#92;Big&#92;downarrow&#92;mathrm{L}_{&#92;mathbb{Z}} &#92;&#92;      &#92;prod_{n=1}^{+&#92;infty}&#92;mathbb{Z} &amp; &#92;longleftrightarrow &amp; &#92;mathrm{gh}(&#92;mathrm{C}_&#92;infty)=&#92;mathbb{Z}^{&#92;mathbb{N}^&#92;times} &amp; &#92;longleftrightarrow &amp; t&#92;mathbb{Z}[&#92;![t]&#92;!]    &#92;end{array}' class='latex' />.</p>
<p>The difference isn&#8217;t <em>shocking</em> but it does like a little nicer. Another useful tricks when typesetting commutative diagrams in an <code>array</code> environment: use <code>\phantom</code> to center your labels next to a vertical arrow. In case you&#8217;re wondering what the complete code for this example looks like:<br />
<pre class="brush: latex; wrap-lines: false;">\begin{array}{ccccc}
  &amp; &amp; \mathrm{Nr}(\mathbb{Z}) &amp; &amp; \\
  &amp; &amp; \phantom{\textrm{itp}}\Big\downarrow\textrm{itp} &amp; &amp; \\
  \mathrm{W}(\mathbb{Z}) &amp; \overset{\tau}{\longrightarrow} &amp; \hat{\Omega}(\mathrm{C}_\infty) &amp; \overset{\mathrm{s}_t}{\longrightarrow} &amp; \Lambda(\mathbb{Z}) \\
  \phantom{\Phi}\Big\downarrow\Phi &amp; &amp; \phantom{\hat{\varphi}}\Big\downarrow\hat{\varphi} &amp; &amp; \phantom{\mathrm{L}_{\mathbb{Z}}}\Big\downarrow\mathrm{L}_{\mathbb{Z}} \\
  \prod_{n=1}^{+\infty}\mathbb{Z} &amp; \longleftrightarrow &amp; \mathrm{gh}(\mathrm{C}_\infty)=\mathbb{Z}^{\mathbb{N}^\times} &amp; \longleftrightarrow &amp; t\mathbb{Z}[\![t]\!]
\end{array}</pre></p>
<p>And in case you&#8217;re wondering about what the diagram actually <em>means</em>: it is the key diagram in explaining the relations between structures related to the ring of big Witt vectors and is taking from the paper <a href="http://www.mathematik.uni-bielefeld.de/~sieben/lothar/burnside_ring_of_cyclic_group.pdf">The Burnside ring of the infinite cyclic group and its relations to the necklace algebra, <img src='http://s0.wp.com/latex.php?latex=%5Clambda&amp;bg=f9f7f5&amp;fg=444444&amp;s=0' alt='&#92;lambda' title='&#92;lambda' class='latex' />-rings, and the universal ring of Witt vectors</a>.</p>
<p><small>I have found out about <a href="http://homepage.mac.com/oasis/xyjax.html">XyJax</a>, which allows you to use <code>xypic</code> code in MathJax, but I wasn&#8217;t aware at the time of writing the diagram and it&#8217;s still an alpha release. Yet, it looks promising and complete obsoletes the reason for this post!</small></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/pbelmans.wordpress.com/695/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/pbelmans.wordpress.com/695/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/pbelmans.wordpress.com/695/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/pbelmans.wordpress.com/695/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/pbelmans.wordpress.com/695/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/pbelmans.wordpress.com/695/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/pbelmans.wordpress.com/695/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/pbelmans.wordpress.com/695/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/pbelmans.wordpress.com/695/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/pbelmans.wordpress.com/695/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/pbelmans.wordpress.com/695/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/pbelmans.wordpress.com/695/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/pbelmans.wordpress.com/695/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/pbelmans.wordpress.com/695/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=pbelmans.wordpress.com&#038;blog=15229912&#038;post=695&#038;subd=pbelmans&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://pbelmans.wordpress.com/2011/11/04/uparrow-and-its-variations-are-variable-sized-delimiters/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/bf4c56431003682b725b72668e7de35f?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">pbelmans</media:title>
		</media:content>
	</item>
		<item>
		<title>An update to dutch.lbx in babelbib</title>
		<link>http://pbelmans.wordpress.com/2011/08/27/an-update-to-dutch-lbx-in-babelbib/</link>
		<comments>http://pbelmans.wordpress.com/2011/08/27/an-update-to-dutch-lbx-in-babelbib/#comments</comments>
		<pubDate>Sat, 27 Aug 2011 18:41:14 +0000</pubDate>
		<dc:creator>pbelmans</dc:creator>
				<category><![CDATA[LaTeX]]></category>

		<guid isPermaLink="false">http://pbelmans.wordpress.com/?p=616</guid>
		<description><![CDATA[This afternoon I decided to check out biber and babelbib, transforming some of my projects I&#8217;ve done to this combination. But as most of my writing is done in Dutch I quickly encountered some issues with the current version (i.e., version 1.6 of biblatex): spelling mistakes inconsistencies there are still English words in the translated [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=pbelmans.wordpress.com&#038;blog=15229912&#038;post=616&#038;subd=pbelmans&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>This afternoon I decided to check out <a href="http://ctan.org/pkg/biber"><code>biber</code></a> and <a href="http://ctan.org/pkg/biblatex"><code>babelbib</code></a>, transforming some of my projects I&#8217;ve done to this combination. But as most of my writing is done in Dutch I quickly encountered some issues with the current version (i.e., <a href="https://sourceforge.net/projects/biblatex/files/biblatex-1.6/">version 1.6 of <code>biblatex</code></a>):</p>
<ul>
<li>spelling mistakes</li>
<li>inconsistencies</li>
<li>there are still English words in the translated text</li>
<li>incomplete translations (although the parts that were missing won&#8217;t show up in your every day scenario, it&#8217;s rather nit-picky)</li>
<li>boring implementation of ordinal numbers (1e and 19e instead of 1ste and 19de)</li>
</ul>
<p>As I&#8217;ve done before in <a href="http://pbelmans.wordpress.com/2011/03/15/a-correct-implementation-of-the-dutch-language-in-babelbib/" title="A correct implementation of the Dutch language in babelbib">A correct implementation of the Dutch language in <code>babelbib</code></a>, I have updated the necessary files. And in my current GitHub mania, I have uploaded this little project to <a href="https://github.com/pbelmans/dutch.lbx">github.com/pbelmans/dutch.lbx</a>.</p>
<p>I have filed a contribution request at <a href="http://sourceforge.net/projects/biblatex"><code>biblatex</code>&#8216;s SourceForge project page</a> (GitHub is definitely superior SourceForge by the way) hoping it will be accepted in version 1.7 of <code>biblatex</code>, but in the meanwhile you can use this fix directly if you want. Just place <a href="https://github.com/pbelmans/dutch.lbx/blob/master/dutch.lbx"><code>dutch.lbx</code></a> in <code>$TEXMFHOME/tex/latex/biblatex/lbx/</code> creating the directories as you go (as discussed in <a href="http://pbelmans.wordpress.com/2011/07/23/adding-texmf-to-tex-live-2011s-directories-or-installing-beamer-themes/" title="Adding ~/.texmf to TeX Live 2011′s directories, or installing beamer themes">Adding <code>~/.texmf</code> to TeX Live 2011′s directories, or installing <code>beamer</code> themes</a>). It should automatically supersede the <code>dutch.lbx</code> that&#8217;s present in <code>$TEXMF/tex/latex/biblatex/lbx</code>.</p>
<p>Of course, any contributions or remarks are always welcome, but I suspect the majority of my readers don&#8217;t speak Dutch.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/pbelmans.wordpress.com/616/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/pbelmans.wordpress.com/616/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/pbelmans.wordpress.com/616/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/pbelmans.wordpress.com/616/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/pbelmans.wordpress.com/616/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/pbelmans.wordpress.com/616/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/pbelmans.wordpress.com/616/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/pbelmans.wordpress.com/616/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/pbelmans.wordpress.com/616/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/pbelmans.wordpress.com/616/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/pbelmans.wordpress.com/616/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/pbelmans.wordpress.com/616/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/pbelmans.wordpress.com/616/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/pbelmans.wordpress.com/616/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=pbelmans.wordpress.com&#038;blog=15229912&#038;post=616&#038;subd=pbelmans&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://pbelmans.wordpress.com/2011/08/27/an-update-to-dutch-lbx-in-babelbib/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/bf4c56431003682b725b72668e7de35f?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">pbelmans</media:title>
		</media:content>
	</item>
		<item>
		<title>How to use \thanks in memoir&#8216;s titlingpage</title>
		<link>http://pbelmans.wordpress.com/2011/08/24/how-to-use-thanks-in-memoirs-titlingpage/</link>
		<comments>http://pbelmans.wordpress.com/2011/08/24/how-to-use-thanks-in-memoirs-titlingpage/#comments</comments>
		<pubDate>Wed, 24 Aug 2011 14:16:20 +0000</pubDate>
		<dc:creator>pbelmans</dc:creator>
				<category><![CDATA[LaTeX]]></category>

		<guid isPermaLink="false">http://pbelmans.wordpress.com/?p=592</guid>
		<description><![CDATA[I was fiddling with memoir&#8216;s titlingpage and wanted functionality for the \thanks macro. This is normally handled by \maketitle, but we&#8217;re bypassing this construction. Section 4.2 of the (otherwise excellent) memoir manual doesn&#8217;t state anything on how to actually implement this behaviour yourself. After a bit of fiddling with memoir.dtx (any .dtx file is the [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=pbelmans.wordpress.com&#038;blog=15229912&#038;post=592&#038;subd=pbelmans&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I was fiddling with <code>memoir</code>&#8216;s <code>titlingpage</code> and wanted functionality for the <code>\thanks</code> macro. This is normally handled by <code>\maketitle</code>, but we&#8217;re bypassing this construction. Section 4.2 of the (otherwise excellent) <code>memoir</code> manual doesn&#8217;t state anything on how to actually implement this behaviour yourself.</p>
<p>After a bit of fiddling with <code>memoir.dtx</code> (any <code>.dtx</code> file is the <em>documented source</em> of a LaTeX package or class) I hacked together the desired result. A bit of <code>\makeatletter</code> magic and calling the correct macros did what I wanted.</p>
<p>For future reference, here it is.</p>
<p>If you want to change the marker using <code>\thanksmarkseries{...}</code>, start your <code>titlingpage</code> environment with the following:<br />
<pre class="brush: latex; wrap-lines: false;">\thanksmarkseries{alph}
\makeatletter
\@bsmarkseries
\makeatother</pre></p>
<p>The main part of the solution simply is to mention</p>
<p><pre class="brush: latex; wrap-lines: false;">\makeatletter
\usethanksrule
\@thanks
\makeatother</pre></p>
<p>at the end of the <code>titlingpage</code> environment. Note that <code>\usethanksrule</code> is not necessary but it feels better to have it.</p>
<p><small>There is the undocumented <code>\saythanks</code> macro though, but it is buggy: it always uses <code>fnsymbol</code> as its marker for the actual footnote. Behaviour that could be fixed I presume.</small></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/pbelmans.wordpress.com/592/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/pbelmans.wordpress.com/592/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/pbelmans.wordpress.com/592/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/pbelmans.wordpress.com/592/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/pbelmans.wordpress.com/592/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/pbelmans.wordpress.com/592/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/pbelmans.wordpress.com/592/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/pbelmans.wordpress.com/592/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/pbelmans.wordpress.com/592/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/pbelmans.wordpress.com/592/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/pbelmans.wordpress.com/592/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/pbelmans.wordpress.com/592/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/pbelmans.wordpress.com/592/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/pbelmans.wordpress.com/592/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=pbelmans.wordpress.com&#038;blog=15229912&#038;post=592&#038;subd=pbelmans&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://pbelmans.wordpress.com/2011/08/24/how-to-use-thanks-in-memoirs-titlingpage/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/bf4c56431003682b725b72668e7de35f?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">pbelmans</media:title>
		</media:content>
	</item>
		<item>
		<title>Adding ~/.texmf to TeX Live 2011&#8242;s directories, or installing beamer themes</title>
		<link>http://pbelmans.wordpress.com/2011/07/23/adding-texmf-to-tex-live-2011s-directories-or-installing-beamer-themes/</link>
		<comments>http://pbelmans.wordpress.com/2011/07/23/adding-texmf-to-tex-live-2011s-directories-or-installing-beamer-themes/#comments</comments>
		<pubDate>Sat, 23 Jul 2011 14:34:59 +0000</pubDate>
		<dc:creator>pbelmans</dc:creator>
				<category><![CDATA[LaTeX]]></category>

		<guid isPermaLink="false">http://pbelmans.wordpress.com/?p=505</guid>
		<description><![CDATA[While trying to install the UA beamer theme in the most appropriate way, I stumbled for the umpteenth time on this issue. Where and how to install a beamer theme, or by extension any non-TeX Live package, without resorting to sudo mv&#8216;ing it into /usr/local/texlive20xx/...? I don&#8217;t remember going through this process the last time [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=pbelmans.wordpress.com&#038;blog=15229912&#038;post=505&#038;subd=pbelmans&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>While trying to install the <a href="https://github.com/nschloe/ua-beamer">UA <code>beamer</code> theme</a> in the most appropriate way, I stumbled for the umpteenth time on this issue. Where and how to install a <code>beamer</code> theme, or by extension any non-TeX Live package, without resorting to <code>sudo mv</code>&#8216;ing it into <code>/usr/local/texlive20xx/...</code>? I don&#8217;t remember going through this process the last time I installed some packages myself, but as I recently installed TeX Live 2011 and decided to do things <em>the proper way</em> (at least in my opinion) I decided to write this post.</p>
<p>What is &#8220;installing a package&#8221; by the way? It boils down to letting programs like <code>pdflatex</code> know <em>where certain files are situated</em>. Installing is therefore nothing but dumping the necessary files somewhere and let TeX know where it can find them. But TeX doesn&#8217;t look everywhere, so we have to choose a place to dump the files and tell TeX they&#8217;re there.</p>
<p><ins datetime="2011-07-24T11:49:34+00:00">As <cite>Manuel Pégourié-Gonnard</cite> <a href="http://pbelmans.wordpress.com/2011/07/23/adding-texmf-to-tex-live-2011s-directories-or-installing-beamer-themes/#comment-73"><strong>pointed out in the comments</strong></a>, this extensive approach isn&#8217;t quite necessary. If you want to add your own files to <code>~/texmf</code>, <em>just perform Step 7</em> (after creating the folder as in Step 1, of course). This should do the trick, without further ado.</p>
<p>In case you want the &#8220;hidden folder approach&#8221; I wrote about, <em>performing Steps 1, 2, the first line of Step 4 and Step 7</em> should be fine.</ins></p>
<p>A quick yet extensively documented howto:</p>
<ol>
<li>Open a shell and create your (hidden) local <code>texmf</code> folder by invoking <code>mkdir ~/.texmf</code>.</li>
<li>Locate <code>texmf.cnf</code> by invoking <code>kpsewhich texmf.cnf</code>. You should end up with a path like <code>/usr/local/texlive/2011/texmf.cnf</code>.</li>
<li>Open this file <em>as root</em> in your favorite text editor (in case you don&#8217;t yet have a favorite text editor, I suggest <a href="http://vim.org/">vim</a>), i.e. <ins datetime="2011-07-23T16:12:10+00:00"><code>sudoedit /usr/local/texlive/2011/texmf.cnf</code> is a shortcut for this, although no-one says you cannot use <code>sudo gedit</code></ins> <del datetime="2011-07-23T16:12:10+00:00">e.g. <code>sudo vim /usr/local/texlive/2011/texmf.cnf</code> but you&#8217;ll probably want to replace <code>vim</code> by <code>gedit</code></del>.</li>
<li>Add the following two lines anywhere you like in this file (it&#8217;s probably rather empty, containing nothing but comments)
<pre>TEXMFHOME = ~/.texmf
<del datetime="2011-07-24T11:49:34+00:00">TEXMFDBS = {!!$TEXMFSYSCONFIG,!!$TEXMFSYSVAR,!!$TEXMFMAIN,!!$TEXMFLOCAL,!!$TEXMFHOME,!!$TEXMFDIST}</del></pre>
<p>	In case you&#8217;re interested in what&#8217;s so special about this <code>$TEXMFDBS</code> variable: unlike the standard configuration, we have added our non-standard hidden local <code>texmf</code> folder by adding <code>$TEXMFHOME</code>, a variable that&#8217;s not there by default <ins datetime="2011-07-24T11:49:34+00:00">but that is not necessary so skip this step</ins>.</li>
<li><del datetime="2011-07-24T11:49:34+00:00">Run <code>updmap</code>, this will update your configuration files. You&#8217;ll get a lot of output, hopefully no errors.</del></li>
<li><del datetime="2011-07-24T11:49:34+00:00">Run <code>texhash</code>. Its output will look like this
<pre>texhash: Updating /home/.../.texmf/ls-R... 
texhash: /usr/local/texlive/2011/texmf: directory not writable. Skipping...
texhash: /usr/local/texlive/2011/texmf-config: directory not writable. Skipping...
texhash: /usr/local/texlive/2011/texmf-dist: directory not writable. Skipping...
texhash: /usr/local/texlive/2011/../texmf-local: directory not writable. Skipping...
texhash: /usr/local/texlive/2011/texmf-var: directory not writable. Skipping...
texhash: Done.</pre>
<p>	As we didn&#8217;t run <code>texhash</code> with root privileges, most directories are skipped. Yet the first directory where the dots are replaced by your username looks promising.</del>
</li>
<li>Mimic the structure of <code>/usr/local/texlive/2011/texmf/</code>, i.e. in my case that means I have to add the <code>beamer</code> theme in the folder <code>~/.texmf/tex/latex/beamer/themes/theme/</code> (or possibly some variation on this, but I decided to do it the strict way).</li>
</ol>
<p>The benefits of this approach are immediately obvious: we can write in our <code>~/.texmf</code> folder as we like and run <code>texhash</code> without root privileges. And it&#8217;s hidden from our view if we don&#8217;t bother about hidden files! So we&#8217;ve fixed <del datetime="2011-07-24T11:49:34+00:00">two</del><ins datetime="2011-07-24T11:49:34+00:00">one</ins> issue<del datetime="2011-07-24T11:49:34+00:00">s</del>:</p>
<ul>
<li>TeX Live 2011 defines <code>$TEXMFHOME</code> as <code>~/texmf</code> but we want it to be invisible so we&#8217;ve overridden the value with <code>~/.texmf</code>.</li>
<li><del datetime="2011-07-24T11:49:34+00:00">TeX Live 2011 ignores <code>$TEXMFHOME</code> for its filename database. Hence your files would never have been found.</del></li>
</ul>
<p><ins datetime="2011-07-24T11:49:34+00:00">What remains is an explanation on how to configure TeX Live 2011 to look in a hidden folder, instead of its default visible folder. The rest can safely be ignored.</ins></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/pbelmans.wordpress.com/505/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/pbelmans.wordpress.com/505/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/pbelmans.wordpress.com/505/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/pbelmans.wordpress.com/505/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/pbelmans.wordpress.com/505/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/pbelmans.wordpress.com/505/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/pbelmans.wordpress.com/505/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/pbelmans.wordpress.com/505/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/pbelmans.wordpress.com/505/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/pbelmans.wordpress.com/505/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/pbelmans.wordpress.com/505/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/pbelmans.wordpress.com/505/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/pbelmans.wordpress.com/505/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/pbelmans.wordpress.com/505/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=pbelmans.wordpress.com&#038;blog=15229912&#038;post=505&#038;subd=pbelmans&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://pbelmans.wordpress.com/2011/07/23/adding-texmf-to-tex-live-2011s-directories-or-installing-beamer-themes/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/bf4c56431003682b725b72668e7de35f?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">pbelmans</media:title>
		</media:content>
	</item>
		<item>
		<title>Guest post: Inheritance in Pygments&#8217; LatexFormatter</title>
		<link>http://pbelmans.wordpress.com/2011/07/05/guest-blog-inheritance-in-pygments-latexformatter/</link>
		<comments>http://pbelmans.wordpress.com/2011/07/05/guest-blog-inheritance-in-pygments-latexformatter/#comments</comments>
		<pubDate>Tue, 05 Jul 2011 08:22:48 +0000</pubDate>
		<dc:creator>pbelmans</dc:creator>
				<category><![CDATA[LaTeX]]></category>

		<guid isPermaLink="false">http://pbelmans.wordpress.com/?p=489</guid>
		<description><![CDATA[This is a guest post by Pieter Goetschalckx. As a fellow classmate of mine we&#8217;ve been working together for most of our projects this year, resulting in some LaTeX-related results like the UAStyle and (unpublished) software for automated Enigma deciphering or numerical continuation of n-dimensional manifolds. Pygments in combination with the minted package is a [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=pbelmans.wordpress.com&#038;blog=15229912&#038;post=489&#038;subd=pbelmans&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>This is a guest post by <cite>Pieter Goetschalckx</cite>. As a fellow classmate of mine we&#8217;ve been working together for most of our projects this year, resulting in some LaTeX-related results like the <a href="http://pbelmans.wordpress.com/2011/03/06/how-to-change-pygments-styles-and-a-university-of-antwerp-style/" title="How to change Pygments styles and a University of Antwerp&nbsp;style">UAStyle</a> and (unpublished) software for automated Enigma deciphering or numerical continuation of n-dimensional manifolds.</p>
<blockquote><p><a href="http://pygments.org/">Pygments</a> in combination with the <a href="http://minted.googlecode.com/">minted package</a> is a very powerful syntax highlighter for LaTeX, with the possibility to use colored, bold and italic text. Unfortunately, the Computer Modern Typewriter font includes no bold shapes. Latin Modern does, but the difference is almost unnoticeable. Therefore I prefer <a href="http://www.tug.dk/FontCatalogue/beramono/">Beramono</a>, which in addition is a nice combination with <a href="http://www.tug.dk/FontCatalogue/charter/">Bitstream Charter</a>. So far my personal taste.</p>
<p>While using this font setup for highlighting <a href="http://cython.org/">Cython</a> code, I discovered a bug in the <code>LatexFormatter</code> of Pygments. When highlighting the following (rather useless) Cython function, the output (with the default Pygments style) is:</p>
<pre style="line-height:125%;letter-spacing:0;font-family:'Bitstream Vera Sans Mono','DejaVu Sans Mono',Consolas,'Andale Mono',monospace;"><span style="color:#008000;font-weight:bold;">cpdef</span> <span style="color:#B00040;">int</span> <span style="color:#0000FF;">add</span>(<span style="color:#B00040;">int</span> a, <span style="color:#B00040;">int</span> b):
    <span style="color:#008000;font-weight:bold;">return</span> a <span style="color:#666666;">+</span> b
</pre>
<p>Actually, this fragment was highlighted <em>with the <code>HTMLFormatter</code></em>. The <code>LatexFormatter</code> on the other hand outputs something like this:</p>
<pre style="line-height:125%;letter-spacing:0;font-family:'Bitstream Vera Sans Mono','DejaVu Sans Mono',Consolas,'Andale Mono',monospace;"><span style="color:#008000;font-weight:bold;">cpdef</span> <span style="color:#B00040;font-weight:bold;">int</span> <span style="color:#0000FF;">add</span>(<span style="color:#B00040;font-weight:bold;">int</span> a, <span style="color:#B00040;font-weight:bold;">int</span> b):
    <span style="color:#008000;font-weight:bold;">return</span> a <span style="color:#666666;">+</span> b
</pre>
<p>when converted to HTML, obviously. The actual LaTeX code would be</p>
<p><pre class="brush: latex; collapse: true; light: false; toolbar: true;">
\documentclass{minimal}
\usepackage{fancyvrb}
\usepackage{color}
\usepackage[T1]{fontenc}
\usepackage[scaled]{beramono}

\makeatletter
\def\PY@reset{\let\PY@it=\relax \let\PY@bf=\relax%
    \let\PY@ul=\relax \let\PY@tc=\relax%
    \let\PY@bc=\relax \let\PY@ff=\relax}
\def\PY@tok#1{\csname PY@tok@#1\endcsname}
\def\PY@toks#1+{\ifx\relax#1\empty\else%
    \PY@tok{#1}\expandafter\PY@toks\fi}
\def\PY@do#1{\PY@bc{\PY@tc{\PY@ul{%
    \PY@it{\PY@bf{\PY@ff{#1}}}}}}}
\def\PY#1#2{\PY@reset\PY@toks#1+\relax+\PY@do{#2}}

\def\PY@tok@nf{\def\PY@tc##1{\textcolor[rgb]{0.00,0.00,1.00}{##1}}}
\def\PY@tok@o{\def\PY@tc##1{\textcolor[rgb]{0.40,0.40,0.40}{##1}}}
\def\PY@tok@kt{\def\PY@tc##1{\textcolor[rgb]{0.69,0.00,0.25}{##1}}}
\def\PY@tok@k{\let\PY@bf=\textbf\def\PY@tc##1{\textcolor[rgb]{0.00,0.50,0.00}{##1}}}
\makeatother

\begin{document}

\begin{Verbatim}[commandchars=\\\{\}]
\PY{k}{cpdef} \PY{k+kt}{int} \PY{n+nf}{add}\PY{p}{(}\PY{k+kt}{int} \PY{n}{a}\PY{p}{,} \PY{k+kt}{int} \PY{n}{b}\PY{p}{)}\PY{p}{:}
    \PY{k}{return} \PY{n}{a} \PY{o}{+} \PY{n}{b}
\end{Verbatim}

\end{document}
</pre></p>
<p>resulting in <a href="http://pbelmans.files.wordpress.com/2011/06/pygments-bug.pdf">this <code>pdf</code> output</a>. As the output differs in the handling of the type keywords a question arises: which <code>Formatter</code> is correct?</p>
<p>Let&#8217;s take a look at the style definition in <code>pygments/styles/default.py</code>:</p>
<p><pre class="brush: python; light: true;">
Keyword:      &quot;bold #008000&quot;,
Keyword.Type: &quot;nobold #B00040&quot;,
</pre></p>
<p>Because <code>int</code> is a <code>Keyword.Type</code>, it should not be bold. Simplified, the macro <code>\PY{k+kt}{int}</code> executes <code>\PY@tok@k</code> and <code>\PY@tok@kt</code> before printing <code>\PY@bf{int}</code>. <code>\PY@tok@k</code> sets <code>\PY@bf=\textbf</code>, and <code>\PY@tok@kt</code> does nothing with <code>\PY@bf</code>, so the result is <code>\textbf{int}</code>.</p>
<p>It looks like the <code>LatexFormatter</code> tries to implement inheritance and fails. Funny thing is, inheritance doesn&#8217;t need to be implemented, because another part of Pygments already takes care of it. We can replace <code>\PY{k+kt}{int}</code> by <code>\PY{kt}{int}</code>. This can be done in <code>pygments/formatter/latex.py</code>, by replacing</p>
<p><pre class="brush: python;">
styles = []
while ttype is not Token:
    try:
        styles.append(t2n[ttype])
    except KeyError:
        # not in current style
        styles.append(_get_ttype_name(ttype))
    ttype = ttype.parent
styleval = '+'.join(reversed(styles))
</pre></p>
<p>with</p>
<p><pre class="brush: python;">
try:
    styleval = t2n[ttype]
except KeyError:
    # not in current style
    styleval = _get_ttype_name(ttype)
</pre></p>
<p>Additionally, some macro definitions in the preamble can be simplified. This will not change anything visually, but it removes unused features. This can be done by replacing</p>
<p><pre class="brush: python; highlight: [7,8,11];">
STYLE_TEMPLATE = r'''
\makeatletter
\def\%(cp)s@reset{\let\%(cp)s@it=\relax \let\%(cp)s@bf=\relax%%
    \let\%(cp)s@ul=\relax \let\%(cp)s@tc=\relax%%
    \let\%(cp)s@bc=\relax \let\%(cp)s@ff=\relax}
\def\%(cp)s@tok#1{\csname %(cp)s@tok@#1\endcsname}
\def\%(cp)s@toks#1+{\ifx\relax#1\empty\else%%
    \%(cp)s@tok{#1}\expandafter\%(cp)s@toks\fi}
\def\%(cp)s@do#1{\%(cp)s@bc{\%(cp)s@tc{\%(cp)s@ul{%%
    \%(cp)s@it{\%(cp)s@bf{\%(cp)s@ff{#1}}}}}}}
\def\%(cp)s#1#2{\%(cp)s@reset\%(cp)s@toks#1+\relax+\%(cp)s@do{#2}}
</pre></p>
<p>with</p>
<p><pre class="brush: python; highlight: [9];">
STYLE_TEMPLATE = r'''
\makeatletter
\def\%(cp)s@reset{\let\%(cp)s@it=\relax \let\%(cp)s@bf=\relax%%
    \let\%(cp)s@ul=\relax \let\%(cp)s@tc=\relax%%
    \let\%(cp)s@bc=\relax \let\%(cp)s@ff=\relax}
\def\%(cp)s@tok#1{\csname %(cp)s@tok@#1\endcsname}
\def\%(cp)s@do#1{\%(cp)s@bc{\%(cp)s@tc{\%(cp)s@ul{%%
    \%(cp)s@it{\%(cp)s@bf{\%(cp)s@ff{#1}}}}}}}
\def\%(cp)s#1#2{\%(cp)s@reset\%(cp)s@tok{#1}\%(cp)s@do{#2}}
</pre></p>
<p>Now we&#8217;ve arrived at the correct version of the backend, but there are still some issues with the <code>CythonLexer</code>. In most cases this will suffice (unless other lexers contain bugs as well), yet for completeness&#8217; sake, I give my version of the <code>CythonLexer</code>. It can be found at <a href="https://github.com/314eter/pygments-CythonLexer">314eter / pygments-CythonLexer</a>.</p>
<p><strong>The result:</strong> after all the described modifications, we should arrive at <a href="http://pbelmans.files.wordpress.com/2011/07/pygments-good.pdf">this highlighted piece of code</a>.</p>
<p>As a matter of fact, this issue with the <code>LaTeXFormatter</code> is known to Pygments (by means of this <a href="https://bitbucket.org/birkenfeld/pygments-main/issue/614/inherance-of-bold-italic-etc-not-working">bug report</a>), but they&#8217;ve put the issue on hold. If you encounter it, this workaround could be the solution.</p>
</blockquote>
<p>And this kids is why you should never dig into TeX, it&#8217;s addictive :).</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/pbelmans.wordpress.com/489/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/pbelmans.wordpress.com/489/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/pbelmans.wordpress.com/489/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/pbelmans.wordpress.com/489/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/pbelmans.wordpress.com/489/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/pbelmans.wordpress.com/489/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/pbelmans.wordpress.com/489/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/pbelmans.wordpress.com/489/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/pbelmans.wordpress.com/489/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/pbelmans.wordpress.com/489/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/pbelmans.wordpress.com/489/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/pbelmans.wordpress.com/489/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/pbelmans.wordpress.com/489/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/pbelmans.wordpress.com/489/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=pbelmans.wordpress.com&#038;blog=15229912&#038;post=489&#038;subd=pbelmans&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://pbelmans.wordpress.com/2011/07/05/guest-blog-inheritance-in-pygments-latexformatter/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/bf4c56431003682b725b72668e7de35f?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">pbelmans</media:title>
		</media:content>
	</item>
	</channel>
</rss>
