{"id":11,"date":"2013-09-03T01:11:14","date_gmt":"2013-09-03T01:11:14","guid":{"rendered":"http:\/\/sonny..ogi.edu\/~kgorman\/blog\/?p=11"},"modified":"2020-06-15T20:46:22","modified_gmt":"2020-06-15T20:46:22","slug":"tex-tips-for-linguists","status":"publish","type":"post","link":"https:\/\/www.wellformedness.com\/blog\/tex-tips-for-linguists\/","title":{"rendered":"TeX tips for linguists"},"content":{"rendered":"<p>I&#8217;ve been using TeX to write linguistics papers for nearly a decade now. I still think it&#8217;s the best option. Since TeX is a big, complex ecosystem and not at all designed with linguists in mind, I thought it might be helpful to describe the tools and workflow I use to produce my papers, handouts, and abstracts.<\/p>\n<p><a href=\"http:\/\/www.phonologist.org\">Michael Becker<\/a>&#8216;s <a href=\"http:\/\/www.phonologist.org\/papers\/becker_IPAandLaTeX.pdf\">notes<\/a> are recommended as well.<\/p>\n<h2>Software<\/h2>\n<p>I use <code>xetex<\/code> (this is the same as <code>xelatex<\/code>) from XeTeX. It has two advantages over the traditional <code>pdflatex<\/code> and related tools. First, you can use system fonts via <code>fontspec<\/code> and <code>mathspec<\/code>. If you are using Computer Modern or packages like <code>txfonts<\/code> or <code>times<\/code>, etc., it&#8217;s time to join the modern world.<\/p>\n<p>Secondly, it expects UTF-8. If you are using <code>tipa<\/code>, or multi-character sequences to enter non-ASCII characters, then you probably have ugly transcriptions. (Don&#8217;t want to name names&#8230;)<\/p>\n<h2>Fonts<\/h2>\n<p>Linguists generally demand the following types of characters:<\/p>\n<ul>\n<li>Alphabetic small caps<\/li>\n<li>The complete IPA, especially IPA [g] (which is not English &#8220;g&#8221;)<\/li>\n<li>&#8220;European&#8221; extensions to ASCII: enye (a\u00f1o), diaresis (co\u00f6peration, \u00fcber), acute (r\u00e9sum\u00e9), grave (\u00e0), macron (m\u0101l), circumflex (\u00eatre), ha\u010dek (o\u010dudit), ogonek (Paj\u0105k), eth (fraco\u00f0), thorn (\u00fe\u00e6t), eszet (Stra\u00dfe), cedilla (a\u00e7ai), dotted g (ealne\u0121), and so on, for Roman-like writing systems<\/li>\n<\/ul>\n<p>The only font I&#8217;ve found that has all this is <a href=\"http:\/\/sourceforge.net\/projects\/linuxlibertine\/files\/linuxlibertine\/5.3.0\/\">Linux Libertine<\/a>. It has nothing to do with Linux, per se. In general, it&#8217;s pretty handsome, especially when printed small (though the <em>Q<\/em> is ridiculously large). If you can deal without small caps (and arguably, linguists use them too much), then a recent version of Times New Roman (IPA characters were added recently) also fits the bill. Unfortunately, if you&#8217;re on Linux and using the &#8220;MS Core Fonts&#8221;, that version of Times New Roman doesn&#8217;t have the IPA characters.<\/p>\n<p>This is real important: do not allow your mathematical characters to be in Computer Modern if your paper is not in Computer Modern. It sticks out like a sore thumb. What you do is put something like this in the preamble:<\/p>\n<pre><code>&#92;usepackage{mathspec}\r\n&#92;setmainfont[Mapping=tex-text]{Times New Roman}\r\n&#92;setmathfont(Digits,Greek,Latin){Times New Roman}\r\n<\/code><\/pre>\n<h2>Examples<\/h2>\n<p>The <code>gb4e<\/code> package seems to be the best one for syntax-style examples, with morph-by-morph glossing and the like. I myself deal mostly in phonology, so I use the <code>tabular<\/code> environment wrapped with an example environment of my own creation called <code>simplex.sty<\/code> and packaged in my own <a href=\"https:\/\/github.com\/kylebgorman\/LingTeX\">LingTeX<\/a> (which is a work-in-progress).<\/p>\n<h2>Bibliographies<\/h2>\n<p>I use <code>natbib<\/code>. When I have a choice, I usually reach for <a href=\"http:\/\/www.ling.upenn.edu\/papers\/pwpl\/pwpl.bst\"><code>pwpl.bst<\/code><\/a>, the bibliography style that we use for the <a title=\"PWPL\" href=\"http:\/\/www.ling.upenn.edu\/pwpl\/\">Penn Working Papers in Linguistics<\/a>. It&#8217;s loosely based on the Linguistic Inquiry style.<\/p>\n<h2>Compiling<\/h2>\n<p>I use <code>make<\/code> for compiling. This will be installed on most Linux computers. On Macintoshes, you can get it as part of the Developer Tools package, or with Xcode.<\/p>\n<p>I type <code>make<\/code> to compile, <code>make bib<\/code> to refresh the bibliography, and <code>make clean<\/code> to remove all the temporary files. Here&#8217;s what a standard Makefile for <code>paper.tex<\/code> would look like for me.<\/p>\n<pre><code> # commands\r\n PDFTEX=xelatex -halt-on-error\r\n BIBTEX=bibtex\r\n\r\n # files\r\n NAME=paper\r\n\r\n all: $(NAME).pdf\r\n\r\n $(NAME).pdf: $(NAME).tex $(NAME).bib *.pdf\r\n      $(PDFTEX) $(NAME).tex\r\n      $(BIBTEX) $(NAME).tex\r\n      $(PDFTEX) -interaction=batchmode -no-pdf $(NAME).tex\r\n      $(PDFTEX) -interaction=batchmode $(NAME).tex\r\n\r\n clean:\r\n      latexmk -c\r\n<\/code><\/pre>\n<p>There are a couple interesting things here. <code>-halt-on-error<\/code> kills a compile the second it goes bad: why wouldn&#8217;t you want to fix the problem right when it&#8217;s detected, since it won&#8217;t produce a full PDF anyways? Both <code>-interaction=batchmode<\/code> and <code>-no-pdf<\/code> shave off a considerable amount of compile time, but aren&#8217;t practical when debugging, and when producing a final PDF, respectively. I use <code>latexmk -c<\/code>, which reads the log files and removes temporary files but preserves the target PDF. For some reason, though, it doesn&#8217;t remove <code>.bbl<\/code> files.<\/p>\n<h2>Draft mode<\/h2>\n<p>Up until you&#8217;re done, start your file like so:<\/p>\n<pre><code>&#92;documentclass[draft,12pt]{article}\r\n<\/code><\/pre>\n<p>This will do two things: &#8220;overfull\u00a0hboxes&#8221; will be marked with a black line, so you can rewrite and fix them. Secondly, images won&#8217;t be rendered into the PDF, which saves time. It&#8217;s very easy to tell who does this and who doesn&#8217;t.<\/p>\n<h2>On slides and posters<\/h2>\n<p>There are several TeX-based tools for making slides and posters. Beamer seems to be very popular for slides, but I find the default settings very ugly\u00a0(gradients!) and cluttered (navigation buttons on every slide!). I use a <a href=\"http:\/\/ling.upenn.edu\/~kgorman\/papers\/gormanetal2012a.pdf\">very minimal<\/a> Keynote style (Helvetica Neue, black on white). I&#8217;m becoming a bigger fan of handouts, since unlike slides or posters, the lengthy process of making a handout gets me so much closer to publication.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I&#8217;ve been using TeX to write linguistics papers for nearly a decade now. I still think it&#8217;s the best option. Since TeX is a big, complex ecosystem and not at all designed with linguists in mind, I thought it might be helpful to describe the tools and workflow I use to produce my papers, handouts, &hellip; <a href=\"https:\/\/www.wellformedness.com\/blog\/tex-tips-for-linguists\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;TeX tips for linguists&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_crdt_document":"","footnotes":""},"categories":[4,7],"tags":[13],"class_list":["post-11","post","type-post","status-publish","format-standard","hentry","category-language","category-presentation-of-self","tag-13"],"_links":{"self":[{"href":"https:\/\/www.wellformedness.com\/blog\/wp-json\/wp\/v2\/posts\/11","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.wellformedness.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.wellformedness.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.wellformedness.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.wellformedness.com\/blog\/wp-json\/wp\/v2\/comments?post=11"}],"version-history":[{"count":2,"href":"https:\/\/www.wellformedness.com\/blog\/wp-json\/wp\/v2\/posts\/11\/revisions"}],"predecessor-version":[{"id":942,"href":"https:\/\/www.wellformedness.com\/blog\/wp-json\/wp\/v2\/posts\/11\/revisions\/942"}],"wp:attachment":[{"href":"https:\/\/www.wellformedness.com\/blog\/wp-json\/wp\/v2\/media?parent=11"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.wellformedness.com\/blog\/wp-json\/wp\/v2\/categories?post=11"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.wellformedness.com\/blog\/wp-json\/wp\/v2\/tags?post=11"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}