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

<channel>
	<title>doink.ch &#187; diss</title>
	<atom:link href="http://www.doink.ch/category/diss/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.doink.ch</link>
	<description>luzi&#039;s brain, public sector</description>
	<lastBuildDate>Tue, 17 Jan 2012 18:17:29 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2</generator>
		<item>
		<title>luzi&#8217;s latex q&amp;a</title>
		<link>http://www.doink.ch/luzis-latex-q-and-a/</link>
		<comments>http://www.doink.ch/luzis-latex-q-and-a/#comments</comments>
		<pubDate>Sat, 13 Mar 2010 19:18:10 +0000</pubDate>
		<dc:creator>luzi</dc:creator>
				<category><![CDATA[diss]]></category>
		<category><![CDATA[how-to]]></category>
		<category><![CDATA[latex]]></category>
		<category><![CDATA[linguistik]]></category>
		<category><![CDATA[uni]]></category>

		<guid isPermaLink="false">http://www.doink.ch/?p=690</guid>
		<description><![CDATA[this is a series of “questions &#038; answers” about using the latex typesetting system. the intended audience is people with a humanities-background, with a special focus on the needs of linguists. please note that many of the solutions presented here are not my own; i simply collected them over the years from various places around [...]]]></description>
			<content:encoded><![CDATA[<p>this is a series of “questions &#038; answers” about using the <a href="http://en.wikipedia.org/wiki/LaTeX">latex typesetting system</a>. the intended audience is people with a humanities-background, with a special focus on the needs of linguists. please note that many of the solutions presented here are not my own; i simply collected them over the years from various places around the net (forums, tutorials, manuals etc.), so credit goes to the original authors. i&#8217;m very interested to improve this q&#038;a, so please let me know if you notice something important missing, if you are having troubles with any of the things recommended here (this is work in progress), or if you know of any better solutions!</p>
<p><strong>what is latex?</strong></p>
<blockquote style="margin-bottom:3em"><p>latex (pronounce [la:tex], not [leiteks]!) is an alternative to traditional word processors like MS Word or OpenOffice. it can produce nicely typeset documents of any kind (articles, books, letters, presentations etc.). the biggest difference to traditional office suites is that there is no &#8216;page view&#8217; where you actually see the page (or rather: a preview of the page) that you are editing; instead, you type the text (including structuring/formatting commands) into a simple text file, which is then compiled into a document (usually a PDF) in a second step. to visualize this, compare <a href="http://www.doink.ch/writer.jpg">this traditional setup</a> with <a href="http://www.doink.ch/latex.jpg">this alternative setup</a>. this two-step procedure may seem cumbersome at first, but has in fact numerous advantages.</p>
<p>latex is well known and liked by many users world-wide and it has been used for innumerable professional looking publications. it has a  large user base in academia, especially in the fields of math, physics etc., due to its superb handling of mathematical formulas, but it can also be used in any other academic or non-academic context.</p>
<p>due to its openness (free and open source), it has been extended by many people in many ways, so that it has become suitable for a wide variety of typesetting purposes.
</p></blockquote>
<p><strong>why would I choose latex over MS Word or OpenOffice?</strong></p>
<blockquote style="margin-bottom:3em"><p>it would take many words to answer this fully. but to make it short, here&#8217;s a summary of latex&#8217;s main advantages and disadvantages:</p>
<p><strong>plus</strong></p>
<ul type="disc">
<li><strong>full control</strong> &#8211; since you are required to write all formatting/structuring commands explicity in your source file, there are no &#8216;bad surprises&#8217; or unexplainable things happening to your documents overnight, and there is much less frustration when you need to fix something. office suites use such commands, too, but they won&#8217;t let you see them, because they think that they are smarter than you!</li>
<li><strong>excellent, professional typsetting out-of-the-box</strong> &#8211; trust me, you will see the difference!</li>
<li><strong>text based file format</strong> &#8211; this means, among other things, that your files can&#8217;t suddenly become corrupted/unreadable, that you may use any standard text processing tools (like &#8216;grep&#8217; for searching) on them, that it&#8217;s easier/faster to backup, and that it allows you to use a version control system (useful to go back to any previous state of the document at any time)</li>
<li><strong>stable, proven</strong> &#8211; latex has been around for many years and it has been used for all sorts of things. it works, it&#8217;s reliable, and it has been so for many years.</li>
<li><strong>free and open source</strong> &#8211; you can start downloading it right now, without paying a penny, and you are free to study the code and mess with it as you wish.</li>
</ul>
<p><strong>minus</strong></p>
<ul type="circle">
<li><strong>some learning curve</strong> &#8211; you certainly need to invest some time to learn latex&#8217;s commands. but it&#8217;s not so hard to get familiar with the basics, and there is some excellent learning material available on the internet (and of course in print, too).</li>
<li><strong>less intuitive</strong> &#8211; the two-step procedure is certainly less intuitive. after all, it won&#8217;t let you edit things right there in the document where you see them. and the source file can get rather complex and hard to read, especially if you are using large, fancy tables.</li>
<li><strong>debugging can be difficult</strong> &#8211; sometimes you mess something up, and latex is usually nice enough to give you a useful error message that helps you to fix the problem, but it can still be tedious sometimes. however, it&#8217;s still much better than fixing problems in a MS Word/OpenOffice document! (which is pretty much impossible)</li>
<li><strong>exchanging documents can be hard</strong> &#8211; chances are that your buddies and co-workers are sticking to traditional word processors, and if you know that you will be collaboratively working on the same documents, it may be hard or even impossible to do with latex.</li>
<li><strong>non-monolithic, non-centralized design</strong> &#8211; there is no single authority overseeing the development of latex. rather, the system has grown &#8216;organically&#8217; over the years. various people have contributed code with differing purposes in mind. as a result, there is a confusing amount of extensions (&#8216;packages&#8217;) available today, and many of those do similar things, but they are sometimes not compatible, or at least not designed to operate smoothly with each other. so choosing the right ones, and avoiding any incompatibilities, can be a challenge.</li>
</ul>
</blockquote>
<p><strong>where do i get it?</strong></p>
<blockquote style="margin-bottom:3em"><p>since latex consists of a large amount of different components, it&#8217;s hard to select all the right parts and make a working system out of it. luckily, other people have already done that work for you: they have created latex <em>distributions</em> that include everything you need to get started. you are free to choose any one you like. i recommend to use <a href="http://www.tug.org/texlive/">texlive</a>. follow the installation instructions for your platform.</p></blockquote>
<p><strong>alright, i installed it &#8211; so how do i start this thing?</strong></p>
<blockquote style="margin-bottom:3em"><p>latex isn&#8217;t an application like MS Word or OpenOffice &#8211; it doesn&#8217;t have a graphical application that you can start from your system menu, or by clicking on an icon. basically, you are supposed to use a text editor to produce a latex source document (usually a file ending in .tex), and then use latex from the command line to translate (&#8216;compile&#8217;) this source file into a finished document (usually a PDF-document). </p>
<p>however, many people have designed special editors for use with latex, and these usually offer an easy way (simple click of a button) to run latex behind the scenes and show the resulting output on your screen. most people prefer to use such a latex editor, so that they don&#8217;t have to go through the hassle with the command line everytime. note, though, that these editors are not part of latex itself &#8211; they simply make using latex easier. if you want to use one of these editors, i recommend <a href="http://www.tug.org/texworks/">texworks</a>, which is still under development, but is shaping up to be a nice, easy, cross-platform editor with a simple, clutter-free design. on mac, you may want to give <a href="http://www.uoregon.edu/~koch/texshop/">texshop</a> a try, since that is what texworks was inspired by.</p></blockquote>
<p><strong>can you recommend a latex tutorial for newbies?</strong></p>
<blockquote style="margin-bottom:3em"><p>yes, read <a href="http://tobi.oetiker.ch/lshort/lshort.pdf">the not so short introduction to latex</a> for a start. it&#8217;s swiss quality!</p></blockquote>
<p><strong>what is xetex, and why should I use it?</strong></p>
<blockquote style="margin-bottom:3em"><p>you can think of xetex as a kind of extension to regular latex that has much improved support for handling special characters. it has unicode support built in from the ground up. besides, it works very well together with fontspec, which will allow very easy handling of any TTF fonts that are installed on your computer. if you are using texworks, simply choose xelatex instead of latex from the drop-down list, and you&#8217;re all set. xetex is included in texlive and other modern latex distributions, so there&#8217;s no need for a separate installation. i highly recommend to use xetex &#8211; especially (but not only) for linguists!</p></blockquote>
<p><strong>could you show me some simple sample documents to get started with?</strong></p>
<blockquote style="margin-bottom:3em"><p>
<strong>a minimal example</strong><br />
<a href="http://www.doink.ch/demo.tex">demo.tex</a><br />
after compilation, this gives <a href="http://www.doink.ch/demo.pdf">demo.pdf</a></p>
<p><strong>an extended example</strong><br />
with a table of contents and a footnote: <a href="http://www.doink.ch/demo2.tex">demo2.tex</a><br />
gives: <a href="http://www.doink.ch/demo2.pdf">demo2.pdf</a></p>
<p><strong>a sophisticated example</strong><br />
with subchapters, a &#8216;tabbing&#8217; area, and the use of an external bibliography file: <a href="http://www.doink.ch/demo3.tex">demo3.tex</a> and <a href="http://www.doink.ch/demo3.bib">demo3.bib</a><br />
gives: <a href="http://www.doink.ch/demo3.pdf">demo3.pdf</a></p>
<p>here&#8217;s what you need to compile these samples on your own machine:</p>
<ol>
<li> a recent latex installation including xetex</li>
<li> packages fontspec, geometry, Tabbing, babel, biblatex, parskip must be installed (this is most likely already the case)</li>
<li> the font &#8216;Junicode&#8217; must be installed (feel free to change the samples to use any other Truetype font instead)</li>
</ol>
</blockquote>
<p><strong>i don&#8217;t like the default font. how do i change it?</strong></p>
<blockquote style="margin-bottom:3em"><p>the quickest fix is</p>
<pre class="code"><code>\usepackage{times}</code></pre>
<p>however, if you intend to use a different font besides “times new roman”, you should make use of the fontspec package, like so:</p>
<pre class="code"><code>\usepackage{fontspec}
\setmainfont{Junicode} % any TTF font installed on your pc</code></pre>
</blockquote>
<p><strong>how do i input special characters?</strong></p>
<blockquote style="margin-bottom:3em"><p>inputting special characters is a fairly complex topic. there are many ways to do it, and you may prefer one or the other according to your needs. originally, the proper way to do it was to use latex commands to specify special characters. the package <a href="http://mirror.ctan.org/fonts/tipa/tipaman.pdf">tipa</a> by rei fukui was (and is still today) very helpful for this. it lets you input things like <span class="tt">\={o}</span> in order to get <span class="tt">ō</span>, <span class="tt">\textsubring{n}</span> in order to get <span class="tt">̥n</span> or <span class="tt">\textglotstop</span> in order to get <span class="tt">ʔ</span>. </p>
<p>however, since the introduction of xetex, it has become possible to enter these special characters directly into your input file &#8211; no commands needed! provided the font supports it, the character will be showing up in the PDF output without any further ado. of course, your input file needs to be encoded in unicode (utf-8) for this to work. </p>
<p>but now you are probably wondering how to even produce these special characters, since your keyboard most likely doesn&#8217;t have buttons for them ;) the answer is that there are in fact a number of methods available for that, but they are mostly platform dependent. one way is of course to find the character somewhere on the internet, and then copy/paste it. that&#8217;s much too troublesome, though, if you use these characters often. a better idea is then to use special key combinations to input unicode characters directly. on linux, this usually works with the key combination &lt;Shift&gt;+&lt;Ctrl&gt;+&lt;u&gt;+<em>keycode</em>, and there are similar ways on other operating systems (check <a href="http://www.fileformat.info/tip/microsoft/enter_unicode.htm">this</a> for windows). to find out which keycode a specific character has, you can check <a href="http://en.wikipedia.org/wiki/List_of_Unicode_characters">wikipedia&#8217;s list of unicode characters</a>. if you want to make the inputting even more convenient, you can simply redefine the keyboard layout system wide (check <a href="http://www.doink.ch/an-x11-keyboard-layout-for-scholars-of-old-germanic/">my previous post on how to do achieve just that on a linux machine</a>).  </p></blockquote>
<p><strong>the default layout looks bad on A4 paper. there&#8217;s too much whitespace! how do i improve it?</strong></p>
<blockquote style="margin-bottom:3em"><p>
first, make sure you have the option &#8216;a4&#8242; in the document class:</p>
<pre class="code"><code>\documentclass[a4paper, titlepage]{article}</code></pre>
<p>next, use the geometry package to fiddle with the page layout. you&#8217;ll need to figure out yourself which values suit your needs, but here are some numbers to start with: </p>
<pre class="code"><code>\usepackage[a4paper,height=250mm,width=175mm,vcentering]{geometry}</code></pre>
<p>for a5, you might try this:</p>
<pre class="code"><code>\usepackage[a5paper,height=160mm,width=110mm,vcentering]{geometry}</code></pre>
</blockquote>
<p><strong>i&#8217;m having troubles making footnotes in tables &#8211; what&#8217;s up with that?</strong></p>
<blockquote style="margin-bottom:3em"><p>according to common typographic practice, ordinary footnotes in tables are not good practice. you are supposed to have a separate list of footnotes located at the bottom of the table. however, there are still ways to have regular footnotes. in fact, if you are using <span class="tt">longtable</span> instead of the regular table commands (which i recommend to do anyway), this will most likely &#8220;just work&#8221;.<br />
otherwise, you may want to use <span class="tt">\footnotemark</span> and <span class="tt">\footnotetext{}</span> instead. this, however, has some problems. first of all, you can&#8217;t stack the footnotes (<span class="tt">\footnotemark \footnotemark &#8230; \footnotetext{} \footnotetext{}</span> will mess up the numbering). second, the text of the footnote will be placed at the position of the <span class="tt">\footnotetext{}</span> command, which may not be the same page as the <span class="tt">\footnotemark</span>. see the next question on help with this.</p></blockquote>
<p><strong>footnotes make my source file hard to read! isn&#8217;t there a way to define footnotes <em>after</em> a paragraph instead of in the middle of a sentence?</strong></p>
<blockquote style="margin-bottom:3em"><p>sort of. your first attempt might be to use <span class="tt">\footnotemark</span> and <span class="tt">\footnotetext{}</span>, and that will in fact work, even outside of tables (which is what it is originally meant for). however, it has the two drawbacks mentioned previously: no stacking allowed and occasional bad placement of the footnote text.</p>
<p>so far, i have not discovered any &#8216;sane&#8217; way to improve this situation, so i came up with a quick &#8216;hack&#8217; instead. i use the <span class="tt">\footnotemark \footnotetext{}</span> notation and then use a preprocessor (an external script) to transform this into the regular <span class="tt">\footnote{}</span> notation.</p>
<p>so instead of this&#8230;:</p>
<pre class="code"><code>This is an important\footnote{A lenghty footnote.} sentence\footnote{Another not so short note.} in my paper.</code></pre>
<p>&#8230;you will write this&#8230;:</p>
<pre class="code"><code>This is an important\footnotemark sentence\footnotemark in my paper.
\footnotetext{A lenghty footnote.}
\footnotetext{Another not so short note.}</code></pre>
<p>&#8230;and the preprocessor will automatically convert it to the former notation, to avoid the problems of the latter.</p>
<p>the code for the preprocessor (written in the python programming language) is this:</p>
<pre class="code"><code>footnotetexts = re.findall('(?&lt;=\\\\fnt\\{).*?(?=\\}\\\\*\n)', doc) 

# delete old fnts
doc = re.sub('\\\\fnt\\{.*\\}\n', '', doc,) # \footnotetext{} must end with a newline

#  replace fnm by fnt
for m in footnotetexts:
	m = re.sub('\\\\','\\\\\\\\', m) # replace all backslashes by double backslashes so that e.g. \textbf{} in a footnote will not get destroyed
	fnt = '\\\\footnote{' + m + '}'
	doc = re.sub('\\\\fnm(?!\})', fnt, doc, 1) # replace only the first instance

print doc</code></pre>
<p>so assuming that the document has been read into the variable <em>doc</em>, we search for all <span class="tt">\footnotetext</span>s and save them in a list. then we delete all the <span class="tt">\footnotetext</span>s in the document. then we search the document again and replace all the <span class="tt">\footnotemark</span>s by the entries in our list of <span class="tt">\footnotetext</span>s, wrapping them with the standard <span class="tt">\footnote{}</span> command.</p>
<p>the advantage of this solution is that it&#8217;s a very simple implementation (only a few lines of code). disadvantages are that it will increase the complexity of the build process and that it is not a “latex-native” solution. and please note that there&#8217;s a limitation that you must end every <span class="tt">\footnotetext{}</span> with a newline.</p>
<p>for details about the use of a preprocessor and a link to my own preprocessor script, check the question on italicizing text further down on this page.</p>
</blockquote>
<p><strong>how can i reference a footnote twice?</strong></p>
<blockquote style="margin-bottom:3em">
<pre class="code"><code>\footnote{Bla.\label{fn:repeated_fn}}
...
\footref{fn:repeated_fn}</code></pre>
</blockquote>
<p><strong>i don&#8217;t want the first line of a footnote to be indented. how do i do this?</strong></p>
<blockquote style="margin-bottom:3em">
<pre class="code"><code>\usepackage[hang]{footmisc}
\setlength{\footnotemargin}{2mm} </code></pre>
</blockquote>
<p><strong>how do i adjust the spacing between footnotes?</strong></p>
<blockquote style="margin-bottom:3em">
<pre class="code"><code>% adjust space between footnotes
\addtolength{\skip\footins}{1ex}%% push 1st ftn further from text
\settoheight{\footnotesep}{\footnotesize !}%% space between footnotes
\addtolength{\footnotesep}{1.5ex}%% 10.25pt for 11pt size</code></pre>
</blockquote>
<p><strong>latex indents a line that i don&#8217;t want indented. how do i fix that?</strong></p>
<blockquote style="margin-bottom:3em"><p><span class="tt">\noindent This line won&#8217;t be indented.</span></p></blockquote>
<p><strong>i generally don&#8217;t want indented lines at the beginning of paragraphs. how do i do it?</strong></p>
<blockquote style="margin-bottom:3em"><p>the following will use an empty line instead of indenting to separate paragraphs:</p>
<pre class="code"><code>\usepackage[parfill]{parskip}</code></pre>
</blockquote>
<p><strong>how do i change the spacing between lines?</strong></p>
<blockquote style="margin-bottom:3em">
<pre class="code"><code>\usepackage{setspace}
\setstretch{1.15}</code></pre>
</blockquote>
<p><strong>how do i make subscript text (parallel to <span class="tt">\superscript</span>)?</strong></p>
<blockquote style="margin-bottom:3em">
<pre class="code"><code>% subscript
\makeatletter
  \DeclareRobustCommand*\sub[1]{%
    \@sub{\selectfont#1}}
  \newcommand{\@sub}[1]{%
    {\m@th\ensuremath{_{\mbox{\fontsize\sf@size\z@#1}}}}}
\makeatother</code></pre>
<p>then use it with <span class="tt">\sub{}</span>.
</p></blockquote>
<p><strong>i want to use &#8220;small caps&#8221;, but my font doesn&#8217;t provide it. how do i set a font specifically for &#8220;small caps&#8221;?</strong></p>
<blockquote style="margin-bottom:3em"><p>
provided you are using fontspec, this will do the trick:</p>
<pre class="code"><code>\setromanfont[SmallCapsFont={Linux Libertine O C}]{Junicode}</code></pre>
<p>note that this is for the &#8216;roman&#8217; font only &#8211; you may want to use <span class="tt">\setsansfont</span> or <span class="tt">\setmonofont</span> instead.
</p></blockquote>
<p><strong>how do i make a &#8220;text fraction&#8221;?</strong></p>
<blockquote style="margin-bottom:3em"><p>
to make a &#8220;text fraction&#8221; like this:<br />
<img src="http://www.doink.ch/text-fraction.jpg" alt="text fraction" title="text fraction" /></p>
<p>try this code:</p>
<pre class="code"><code>% text fraction (e/o)
\newcommand{\ffrac}[2]{
	\kern0.1em\sup{#1}\kern-.20em\emph{⁄}\kern-.25em\sub{#2}\kern0.1em
}</code></pre>
<p>then use it with <span class="tt">\ffrac{e}{o}</span>.
</p></blockquote>
<p><strong>there are so many different packages for tables&#8230; which one should i use?</strong></p>
<blockquote style="margin-bottom:3em"><p>basically, i recommend to use <span class="tt">longtable</span>. it has a couple of advantages, most notably that it wraps nicely across pages.</p></blockquote>
<p><strong>which package should i use to handle my bibliography?</strong></p>
<blockquote style="margin-bottom:3em"><p>use <span class="tt">biblatex</span>. since this is a pretty new package, most latex tutorials and books don&#8217;t mention it, but it&#8217;s really great!<br />
here&#8217;s one way to use it:</p>
<pre class="code"><code>\usepackage[style=authoryear,sorting=nyt]{biblatex}
\bibliography{mybibliography} % name of your bib file
...
\cite{dekeyser1980}
...
\printbibliography</code></pre>
<p>the option <em>&#8220;style=authoryear&#8221;</em> will produce an author/year style citation, which is common in the humanities, looking similar to this:</p>
<div id="attachment_975" class="wp-caption alignnone" style="width: 510px"><a href="http://www.doink.ch/biblatex_full.jpg"><img src="http://www.doink.ch/biblatex.jpg" alt="bibliography produced by biblatex with style author-year" title="biblatex" /></a><p class="wp-caption-text">bibliography produced by biblatex with style author-year</p></div>
<p>the option <em>&#8220;sorting=nyt&#8221;</em>, by the way, will make sure that multiple items by the same author are sorted according to date of publication.
</p></blockquote>
<p><strong>is there a way to set all authors&#8217; last names in small caps?</strong></p>
<blockquote style="margin-bottom:3em"><p>if your are using <span class="tt">biblatex</span>, use this:</p>
<pre class="code"><code>\renewcommand{\mkbibnamelast}[1]{{\hyphenrules{nohyphenation}\textsc{#1}}}%
renewcommand{\mkbibnameprefix}[1]{{\hyphenrules{nohyphenation}\textsc{#1}}}%</code></pre>
<p>the second lines makes sure that prefixes (as in <em>van Loon</em>, <em>de Vries</em>) will appear in small caps as well.
</p></blockquote>
<p><strong>how do i get biblatex to print <em>van</em> and <em>de</em> in names like <em>van Loon</em>, <em>de Vries</em>?</strong></p>
<blockquote style="margin-bottom:3em"><p>if your are using <span class="tt">biblatex</span>, use the option <span class="tt">useprefix=true</span> when loading the package.
</p></blockquote>
<p><strong>can you recommend a bibliography management application that works well with latex?</strong></p>
<blockquote style="margin-bottom:3em"><p>yes, <a href="http://jabref.sourceforge.net/">jabref</a> is quite good. it&#8217;s open source, cross-platform and fairly full featured. if only it weren&#8217;t so slow&#8230;</p></blockquote>
<p><strong>i&#8217;m working on a large document. how do i speed up the compilation?</strong></p>
<blockquote style="margin-bottom:3em"><p>divide the document into sections and save each one of them in a separate .tex-file. use <span class="tt">\include</span> to include the sections in the main document. then use <span class="tt">\includeonly{section1}</span> in the preamble to compile only section 1 while preserving the page numbers, references etc.</p></blockquote>
<p><strong>what&#8217;s the easiest way to make frequent backups?</strong></p>
<blockquote style="margin-bottom:3em"><p>what has proved to work best for me is to use a version control system like <a href="http://de.wikipedia.org/wiki/Subversion_%28Software%29">subversion</a>. this is usually used by software engineers to keep track of the source code they write, but it works just as well for (text based) documents. since latex files are simple text documents, they are well suited for version tracking. the benefits are obvious: keep an authoritative version of your work in a central archive (somewhere on a server), and sync your changes with that version on a daily basis. that way, you always have the latest version on at least one other machine than your working machine, and you can only lose one day&#8217;s work at maximum in the case that your machine suddenly dies. note that this also makes syncing your documents between two computers (home and office, for example) extremely simple. </p>
<p>note: installing and setting up a subversion repository requires some technical skill, so be warned that it may take a while to figure out the details if you are not already familiar with the process. if you don&#8217;t feel comfortable using the command line, this is probably not for you.</p>
<p>an easy alternative is to use a cloud-storage system like <a href="http://www.dropbox.com">dropbox</a> or <a href="https://one.ubuntu.com/">ubuntu one</a>. those services will let you store some data on a server by simply copying it to a specific folder on your pc.
</p></blockquote>
<p><strong>what&#8217;s a good way to synchronize my latex files between two places (e.g. home and office)?</strong></p>
<blockquote style="margin-bottom:3em"><p>see previous question.</p></blockquote>
<p><strong>i&#8217;m a linguist and i need to put lots and lots of words into italics. using <span class="tt">\emph{}</span> everytime is cumbersome and makes the document hard to read. isn&#8217;t there a better way to do that?</strong></p>
<blockquote style="margin-bottom:3em"><p>
indeed, you might find something like this ugly:</p>
<pre class="code"><code>Got. \emph{kniu}* und \emph{triu}* und die n. \emph{wa}- bzw. \emph{a}-Stämme</code></pre>
<p>latex allows you to redefine commands, so what you could do is to redefine <span class="tt">\emph{}</span> to something shorter, like this:</p>
<pre class="code"><code>\newcommand{\e}[1]{\emph{#1}}
Got. \e{kniu}* und \e{triu}* und die n. \e{wa}- bzw. \e{a}-Stämme</code></pre>
<p>but this is admittedly not much of an improvement. wouldn&#8217;t it be much nicer to use the following markup? </p>
<pre class="code"><code>Got. /kniu/* und /triu/* und die n. /wa/- bzw. /a/-Stämme</code></pre>
<p>and indeed, there is a way to do this. however, it can&#8217;t be handled inside latex, because it isn&#8217;t sufficient to redefine a simple command (note that <span class="tt">/</span> needs to be replaced by <span class="tt">\emph{</span> sometimes and <span class="tt">}</span> at other times), so it&#8217;s a little bit more work to get this going. what we need is a small script that does these substitutions in an intelligent way, a so-called pre-processor. the good news is that i&#8217;ve already written one such pre-processor, using the python programming language, and you are welcome to use it. our source document will then need to be run through this preprocessor before it&#8217;s being sent to latex. this requires a somewhat more sophisticated workflow, because we don&#8217;t want to type the command manually to run the preprocessor every single time we want to compile our document. the solution to this is to use a <a href="http://de.wikipedia.org/wiki/Makefile">makefile</a>.  makefiles are a unix/linux tool, so for the following, i&#8217;m assuming that you are on such a system rather than on windows (there might be some way to get this to work on windows, too &#8211; i just don&#8217;t know). so to try this, download the file <a href="http://www.doink.ch/demo.tex">demo.tex</a> and save it somewhere, along with <a href="http://www.doink.ch/preprocess.py">preprocess.py</a> and <a href="http://www.doink.ch/Makefile">Makefile</a>. then open a shell, go to that folder and use <span class="tt">make</span> to compile your document. note that you need a couple of things installed on your computer for this to work (support for the python programming language, and support for Makefile).</p>
<p>note that there are some disadvantages: first of all, using Makefile may not be desirable in your work setup. second, there is now a conflict when you want to use a regular forward slash <span class="tt">/</span>, because this is now always interpreted as the beginning/end of an emphasized area. for that reason, you need to use <span class="tt">\/</span> (a backward and a forward slash) to get a <span class="tt">/</span> in your document.
 </p></blockquote>
<p><strong>i prefer to use a simple text editor for writing latex documents. is there a way to compile and display the output with a simple key press anyway?</strong></p>
<blockquote style="margin-bottom:3em"><p>probably yes, but it depends on your editor. most editors (at least the programming oriented ones) will let you execute a build command by a single keypress. so use a Makefile (see last question), and then configure your text editor to run <span class="tt">make</span> in the current directory on a specific keypress (often F9 is used for this). if you then set up the Makefile in a way that it will automatically load a PDF-viewer on the default make target (check the commented section in my Makefile), you will see your document pop up immediatly after pressing F9 &#8211; very convenient!</p></blockquote>
<p><strong>can i make a powerpoint-style presentation with this?</strong></p>
<blockquote style="margin-bottom:3em"><p>yes, you can. use the package <span class="tt">beamer</span> for this. please note that the resulting document will still be a PDF, so you cannot do any fancy animations (who needs those, anyway?!). uncovering a slide bullet-by-bullet is of course possible, though. this works by simply adding a new page for every “step”, and then using the page-down key to give the “illusion” of an animation. as a consequence, a 10-slide presentation may easily turn out as a PDF of ca. 50-80 pages.</p></blockquote>
<p><strong>do you have any templates for common document types typically needed by students?</strong></p>
<blockquote style="margin-bottom:3em">
<p><strong>handout</strong><br />
<a href="http://www.doink.ch/muster/template-handout/template-handout.tex">template-handout.tex</a> and <a href="http://www.doink.ch/muster/template-handout/template-handout.bib">template-handout.bib</a>.<br />
output: <a href="http://www.doink.ch/muster/template-handout/template-handout.pdf">template-handout.pdf</a></p>
<p><strong>paper</strong><br />
<a href="http://www.doink.ch/muster/template-paper/template-paper.tex">template-paper.tex</a> and <a href="http://www.doink.ch/muster/template-paper/template-paper.bib">template-paper.bib</a>.<br />
output: <a href="http://www.doink.ch/muster/template-paper/template-paper.pdf">template-paper.pdf</a></p>
<p><strong>presentation</strong><br />
<a href="http://www.doink.ch/muster/template-presentation/template-presentation.tex">template-presentation.tex</a> and <a href="http://www.doink.ch/muster/template-presentation/template-presentation.bib">template-presentation.bib</a>.<br />
output: <a href="http://www.doink.ch/muster/template-presentation/template-presentation.pdf">template-presentation.pdf</a><br />
feel free to use these and to adapt them to your needs.</p></blockquote>
<p>comments are welcome :)</p>
]]></content:encoded>
			<wfw:commentRss>http://www.doink.ch/luzis-latex-q-and-a/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>an X11 keyboard layout for scholars of old germanic</title>
		<link>http://www.doink.ch/an-x11-keyboard-layout-for-scholars-of-old-germanic/</link>
		<comments>http://www.doink.ch/an-x11-keyboard-layout-for-scholars-of-old-germanic/#comments</comments>
		<pubDate>Sat, 21 Nov 2009 19:05:31 +0000</pubDate>
		<dc:creator>luzi</dc:creator>
				<category><![CDATA[diss]]></category>
		<category><![CDATA[how-to]]></category>
		<category><![CDATA[linguistik]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[uni]]></category>
		<category><![CDATA[vgs]]></category>

		<guid isPermaLink="false">http://www.doink.ch/?p=626</guid>
		<description><![CDATA[as an historical linguist dealing with old germanic languages, i need a convenient way to input special characters on my computer. since I want to be able to use these characters across all my applications (text editor, office suite, email-client, browser), a per-application solution is not a good idea. a better approach is to change [...]]]></description>
			<content:encoded><![CDATA[<p>as an historical linguist dealing with old germanic languages, i need a convenient way to input special characters on my computer. since I want to be able to use these characters across all my applications (text editor, office suite, email-client, browser), a per-application solution is not a good idea. a better approach is to change the keyboard layout <em>system wide</em>. luckily, this can be achieved easily on a linux system by customizing one of the predefined X11 keyboard layouts. in my case, i came to the conclusion that it was best to modify the existing keyboard layout definition for us-english (called “us”) by adding a new “layout variant“, which i decided to call “altgr-gmc”. as you can see, every key is bound to four different characters. the characters on the right side of every key can be accessed by using AltGr (bottom right) and AltGr+SHIFT (top right) as modifiers.</p>
<p>here&#8217;s what i came up with (click for a larger image):<br />
<a href="http://www.doink.ch/altgr-gmc.png"><img title="altgr-gmc" src="http://www.doink.ch/altgr-gmc.png" alt="altgr-gmc keyboard layout" width="500" height="166" /></a></p>
<p>the distribution of characters across the keyboard is somewhat arbitrary, though i tried to keep compatibility to “altgr-intl” if possible, and i strived to make the rest as intuitive as possible (<em>r</em>-sounds on the <em>r</em>-button, combining diacritical mark for a stroke below on the hyphen-button, since it sort of looks like a little rotated hyphen etc.).</p>
<p>if you want to give it a try, follow these instructions (root permissions required for all steps):</p>
<ol>
<li><strong>adding the new layout variant</strong><br />
open the file <span class="tt">/usr/share/X11/xkb/symbols/us</span> and append <a href="http://www.doink.ch/altgr-gmc.html">these lines</a> at the end of it.</li>
<li><strong>enabling it in X11</strong><br />
edit <span class="tt">/usr/share/X11/xkb/rules/evdev.xml</span> and add the following lines at a suitable position (e.g. after the entry for “altgr-intl”):</p>
<pre class="code"><code>        &lt;variant&gt;
          &lt;configItem&gt;
            &lt;name&gt;altgr-gmc&lt;/name&gt;
            &lt;description&gt;for Old Germanic&lt;/description&gt;
            &lt;languageList&gt;&lt;iso639Id&gt;eng&lt;/iso639Id&gt;
                          &lt;iso639Id&gt;fra&lt;/iso639Id&gt;
                          &lt;iso639Id&gt;ger&lt;/iso639Id&gt;&lt;/languageList&gt;
          &lt;/configItem&gt;
        &lt;/variant&gt;</code></pre>
<p>you may also want to make a corresponding change in <span class="tt">/usr/share/X11/xkb/rules/evdev.lst</span> for consistency&#8217;s sake (it doesn&#8217;t seem to be required).</li>
<li><strong>setting it as system default</strong><br />
open <span class="tt"><del datetime="2011-10-14T09:14:31+00:00">/etc/default/console-setup</del></span> <strong>update</strong>: <span class="tt">/etc/default/keyboard</span> and set <span class="tt">XKBVARIANT</span> to <span class="tt">&#8220;altgr-gmc&#8221;</span>. make sure that the variable <span class="tt">XKBLAYOUT</span> points to the file that you modified in step 1 (<span class="tt">&#8220;us&#8221;</span>)</li>
<li><strong>restart your computer</strong></li>
</ol>
<p>(this was all done on a xubuntu 9.10 system. should also work on any other recent ubuntu installation.)</p>
<p>if you want this to take effect immediately, load it up like this: <span class="tt">setxkbmap us -variant altgr-gmc</span>.</p>
<p>a few problems remain, mostly related to the handling of combining diacritical marks. contrary to my initial plans, i ended up refraining from the use of “dead keys” in favour of using combining diacritical marks throughout. this happened for consistency&#8217;s sake. in general, i prefer to use precomposed characters (which is what the “dead keys” give you), but since precomposed characters are not available for all the desired combinations, it&#8217;s unavoidable to use combining diacritical marks in some cases, and because of that it seemed better to me to use the latter throughout. of course it would be best to have a “fall back strategy”, so that precomposed characters will be used whenever possible, and combining diacritical marks elsewhere. such a solution doesn&#8217;t seem possible currently, however, since you can only use a key <em>either</em> as a “dead key” (which will give you no character at all in the case that you choose an unavailable combination) <em>or</em> to have it produce a combining diacritical mark.</p>
<p>a second thing that&#8217;s been irritating me is that the handling of combining diacritical marks seems to be very inconsistent across applications and fonts. strangely, changing the <em>font</em> of my text editor does not only change the way the marks are displayed in the editor window (sometimes combined, sometimes simply next to each other), but it can also (in some cases) change the order in which i need to input the base letter and the modifier: depending on the current font, i sometimes have to type the diacritical mark <em>before</em> and sometimes <em>after</em> the letter i want to modify&#8230; isn&#8217;t that odd? </p>
<p>another issue is that stacking diacritical marks is messy. often, the marks will end up being superimposed on each other instead of being stacked. it&#8217;s basically a matter of trial and error to see what will work and what won&#8217;t :(</p>
<p>so here&#8217;s a sample of what you can do with “altgr-gmc”, including some fancy (but not always neatly typeset) stacked diacritical marks: </p>
<p><a href="http://www.doink.ch/altgr-gmc-sample.png"><img title="altgr-gmc-sample" src="http://www.doink.ch/altgr-gmc-sample.png" alt="altgr-gmc-sample" width="359" height="96" /></a></p>
<p><strong>links:</strong><br />
<a href="http://people.uleth.ca/~daniel.odonnell/Blog/custom-keyboard-in-linuxx11">http://people.uleth.ca/~daniel.odonnell/Blog/custom-keyboard-in-linuxx11</a><br />
<a href="http://www.mufi.info/">http://www.mufi.info/ Medieval Unicode Font Initiative</a><br />
<a href="http://unicode.org/charts/">http://unicode.org/charts/</a><br />
<a href="http://unicode-search.net">http://unicode-search.net</a><br />
<a href="http://en.wikipedia.org/wiki/Unicode">http://en.wikipedia.org/wiki/Unicode</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.doink.ch/an-x11-keyboard-layout-for-scholars-of-old-germanic/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>gegen fussnoten</title>
		<link>http://www.doink.ch/gegen-fussnoten/</link>
		<comments>http://www.doink.ch/gegen-fussnoten/#comments</comments>
		<pubDate>Sat, 21 Mar 2009 22:26:50 +0000</pubDate>
		<dc:creator>luzi</dc:creator>
				<category><![CDATA[diss]]></category>
		<category><![CDATA[opinion]]></category>
		<category><![CDATA[uni]]></category>

		<guid isPermaLink="false">http://www.doink.ch/?p=328</guid>
		<description><![CDATA[man scheint in der wissenschaft allgemein sehr begeistert zu sein vom konzept der fussnote. viele publikationen sind geradezu gespickt mit anmerkungen in fuss- oder endnoten. nach meinem eindruck nimmt die popularität von fussnoten in jüngerer zeit sogar noch zu, so dass man bei neueren monographien nicht selten eintausend oder mehr fussnoten findet. eine von mir [...]]]></description>
			<content:encoded><![CDATA[<p>man scheint in der wissenschaft allgemein sehr begeistert zu sein vom konzept der fussnote. viele publikationen sind geradezu gespickt mit anmerkungen in fuss- oder endnoten. nach meinem eindruck nimmt die popularität von fussnoten in jüngerer zeit sogar noch zu, so dass man bei neueren monographien nicht selten eintausend oder mehr fussnoten findet. eine von mir kürzlich erworbene arbeit zu einigen skaldengedichten bringt es z.b. mit 331 seiten lauftext auf imposante 933 fussnoten, eine andere sprachwissenschaftliche untersuchung, die mir vorliegt, mit 352 seiten sogar auf 1257 fussnoten.</p>
<p><a href="http://www.doink.ch/wp-content/uploads/2009/03/fussnoten2.jpg"><img src="http://www.doink.ch/wp-content/uploads/2009/03/fussnoten2.jpg" alt="" title="fussnoten2" width="500" height="368" class="alignnone size-full wp-image-314" /></a><br />
<em>leichtes missverhältnis zwischen text und fussnoten?</em></p>
<p>bei so viel fussnotenbegeisterung halte ich die zeit für gekommen, auch einmal auf die <em>nachteile</em> von fussnoten hinzuweisen. </p>
<p>als problem nehme ich insbesondere den gestörten lesefluss wahr. ein fussnotenreicher text zwingt nämlich den leser, fortlaufend mit den augen hin- und herzuspringen, und verunmöglicht so eine geradlinige lektüre. da man beim antreffen der fussnote nicht <em>a priori</em> wissen kann, was sich dahinter verbirgt (nur eine literaturangabe? oder eine wichtige anmerkung?), hat man gar keine wahl, als alle fussnoten anzuschauen. will man den text gründlich lesen, kommt man faktisch nicht darum herum, jeder fussnote nachzugehen. dies führt u.u. zu einem sehr komplizierten, unintuitiven lesefluss. man vergleiche etwa die folgende seite, auf der ich alle nötigen sprünge markiert habe (sprünge vom text in die fussnote rot, sprünge zurück in den text blau):</p>
<p><a href="http://www.doink.ch/wp-content/uploads/2009/03/fussnoten1-_jumps.jpg"><img src="http://www.doink.ch/wp-content/uploads/2009/03/fussnoten1-_jumps.jpg" alt="" title="fussnoten1-_jumps" width="500" height="763" class="alignnone size-full wp-image-343" /></a><br />
<em>das lesen dieser aufsatzseite zwingt das auge des lesers zu zahlreichen sprüngen &#8211; ob die leicht hypnotisierende nebenwirkung beabsichtigt ist?</em></p>
<p>man beachte ferner, dass die letzte fussnote nicht auf der gleichen seite endet, sondern auf der nächsten weitergeht, so dass man zusätzlich noch zweimal umblättern muss.</p>
<p>als besondere schwierigkeit erweist sich bei einem solchen lesefluss das zurückspringen in den text, weil man &#8211; im gegensatz zum sprung zur fussnote, wo man sich an die numerische sortierung der fussnotenindizes halten kann &#8211; keine hilfe hat, um vom fussnotenende wieder an die richtige stelle im text zurückzufinden. oft kommt es sogar so heraus:</p>
<p><a href="http://www.doink.ch/wp-content/uploads/2009/03/fussnoten1_irrwege.jpg"><img src="http://www.doink.ch/wp-content/uploads/2009/03/fussnoten1_irrwege.jpg" alt="" title="fussnoten1_irrwege" width="500" height="763" class="alignnone size-full wp-image-312" /></a><br />
<em>irrwege eines fussnotenlesers</em></p>
<p>die chance ist wohl ziemlich gross, dass man beim zurückkehren an die richtige stelle nicht mehr weiss, wie der satz ursprünglich angefangen hat.</p>
<p>neben den &#8220;navigationsproblemen&#8221; gibt es auch noch eine weitere problematik rund um das thema fussnoten. es scheint mir nämlich oft der fall zu sein, dass übermässige fussnoten auf eine mangelhafte gliederung des textes hinweisen. oft passiert es einem ja, dass man zu einem früher verfassten abschnitt neue einfälle hat. diese machen in der regel eine umarbeitung des gesamten abschnittes nötig, und man ist daher schnell dazu verleitet, etwas &#8220;faul&#8221; zu sein und den neuen gedanken lediglich in einer fussnote hinzuzufügen. dies führt notwendigerweise zu einer schlechten textstruktur.</p>
<p>aufgrund der genannten probleme stellt sich die frage, ob man nicht besser fahren würde, fussnoten nach möglichkeit zu vermeiden. könnte man die anmerkungen nicht auch in den text integrieren? platziert man die literaturverweise nicht besser in klammern an die stellen im satz, wo sie auch hingehören? ist dem leser nicht viel geholfen, wenn er die seite einigermassen intuitiv von links oben nach rechts unten lesen kann?</p>
<p>in diese richtung zielt auch die empfehlung des bekannten <a href="http://tobi.oetiker.ch/lshort/lshort.pdf">The Not So Short Introduction to LaTeX2e</a> (s. 35, notabene in der fussnote!):</p>
<blockquote><p>&#8220;Note that footnotes distract the reader from the main body of your document. After all, everybody reads the footnotes — we are a curious species, so why not just integrate everything you want to say into the body of the document?&#8221;</p></blockquote>
<p>dem kann ich nur beipflichten. m.e. ist es richtig und wichtig, fussnoten sparsam einzusetzen. nach meiner erfahrung kann man dem leser nämlich eine menge anmerkungen und verweise <em>inline</em> (d.h. im lauftext, mit oder ohne klammern) zumuten, ohne dass der text dadurch unlesbar wird. was nämlich <em>inline</em> notiert wird, lässt sich trotzdem leicht überspringen, und der normale lesefluss bleibt intakt.</p>
<p>dass es sogar ganz ohne fussnoten geht, kann folgendes beispiel zeigen. es handelt sich um eine doppelseite aus einer dissertationsschrift, die auf 232 seiten nicht eine einzige fussnote enthält:</p>
<p><a href="http://www.doink.ch/wp-content/uploads/2009/03/ohne-fussnoten.jpg"><img src="http://www.doink.ch/wp-content/uploads/2009/03/ohne-fussnoten.jpg" alt="" title="ohne-fussnoten" width="500" height="384" class="alignnone size-full wp-image-313" /></a></p>
<p>wie man sieht, sind die literaturverweise, quellenangaben etc. in den lauftext aufgenommen worden. anmerkungen fehlen fast ganz und sind, wo doch vorhanden, durch einrückung gekennzeichnet und ebenfalls in den normalen lesefluss eingegliedert. der text büsst  dadurch nicht an qualität ein und ist leicht zu lesen.</p>
<p>p.s.: im meisten hier gesagten folge ich einem blogpost (?), den ich vor längerer zeit irgendwo im internet gelesen habe, und nun leider nicht mehr finde. falls jemand weiss, wovon ich spreche, bitte ich um eine benachrichtigung, so dass ich den beitrag ordentlich zitieren kann.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.doink.ch/gegen-fussnoten/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>das thema meiner diss</title>
		<link>http://www.doink.ch/das-thema-meiner-diss/</link>
		<comments>http://www.doink.ch/das-thema-meiner-diss/#comments</comments>
		<pubDate>Sun, 21 Sep 2008 18:49:14 +0000</pubDate>
		<dc:creator>luzi</dc:creator>
				<category><![CDATA[diss]]></category>
		<category><![CDATA[linguistik]]></category>
		<category><![CDATA[uni]]></category>
		<category><![CDATA[vgs]]></category>

		<guid isPermaLink="false">http://www.doink.ch/?p=76</guid>
		<description><![CDATA[letzte woche war ich odense an der von h.f. nielsen organisierten tagung &#8216;the gothic language &#8211; origins, structure, developments&#8217;, wo ich freundlicherweise mein dissertationsprojekt vorstellen durfte. falls sich jemand dafür interessieren sollte, kann er oder sie das manuskript hier beziehen (die letzten zwei seiten stellen das handout dar).]]></description>
			<content:encoded><![CDATA[<p>letzte woche war ich <a href="http://maps.google.ch/maps?q=odense+dk&#038;ie=UTF-8&#038;oe=utf-8&#038;rls=com.ubuntu:en-US:unofficial&#038;client=firefox-a&#038;um=1&#038;sa=X&#038;oi=geocode_result&#038;resnum=1&#038;ct=image">odense</a> an der von <a href="http://www1.sdu.dk/Hum/english/people/h_f_nielsen.shtml">h.f. nielsen</a> organisierten tagung &#8216;the gothic language &#8211; origins, structure, developments&#8217;, wo ich freundlicherweise mein dissertationsprojekt vorstellen durfte. falls sich jemand dafür interessieren sollte, kann er oder sie das manuskript <a href="http://www.doink.ch/downloads/referat_flexionsklassenschwankungen.pdf">hier</a> beziehen (die letzten zwei seiten stellen das handout dar).</p>
]]></content:encoded>
			<wfw:commentRss>http://www.doink.ch/das-thema-meiner-diss/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

