LaTeX for Pomona Linguistics and Cognitive Science

This page compiles resources that are intended to give Pomona LGCS majors an introduction to LaTeX in the event that they want to use it to compose papers and/or theses. These will grow/shrink over time, but the hope is that they will help students ease into using LaTeX.

I myself am a mostly-competent TeX user and should not be mistaken for an expert. What I have included here are resources that will hopefully make the learning curve slightly less steep for newcomers.

If you came here looking for ACAL LaTeX help (i.e. the Annual Conference on African Linguistics), everything you need is on the ACAL Proceedings page, though you can also contact acal.latex@gmail.com for help.

Overleaf templates

If you came here just looking for Overleaf templates for linguistics, the links are here. If you came here because you are confused about LaTeX and don’t know what to do, keep reading first.

What is LaTeX?

LaTeX (or, TeX) is a typesetting program that is widely used by mathemeticians and scientists for professional publishing. There are a wide variety of resources on the web for learning what LaTeX is, I’ve linked to a few below. In general, LaTeX is capable of a large number of very useful functions: for linguistics, this includes drawing complicated diagrams, auto-numbering of examples and cross-references, auto-aligning of language examples and glosses, and simplifying citations/references. That said, LaTeX has a significant learning curve. It makes it harder at first to do things you already know how to do in Word/Google Docs. It makes it easier, eventually, to do complicated type-setting tasks. So LaTeX is very useful in fields like linguistics or math. If you just want to type a pure-text paper, it’s less likely that LaTeX will be worth learning.

Why bother with LaTeX?

This is a really good question, and everyone should be asking it. The reality is, for a LOT of tasks, the answer is: you shouldn’t! LaTeX has a large learning curve up front: it can be difficult to do basic things (italics, footnotes) that you already knew how to do in Google Docs or Word. As stated repeatedly throughout the explanatory materials I’ve co-authored, there is no moral virtue to writing in LaTeX. Personally, I use LaTeX for writing some kinds of documents, but not others. For some tasks, Google Docs or Word is more appropriate. So, I advocate for only using LaTeX on projects that it adds significant value for.

So, what does LaTeX do well? For linguists, there are many upsides: it can automatically handle numbered examples and cross-references (no manual renumbering necessary), it can automatically generate and format bibliographies, it has packages that facilitate drawing complex diagrams (e.g. tree diagrams), and it has packages for automatically aligning glosses in language examples, among many other things.

Another more recent reason to use LaTeX is that some Open Access Publishers (notably, Language Science Press) require LaTeX submissions because it cuts down on typesetting costs for the publisher (by offloading the costs, in labor, onto authors: at least for authors who are new to LaTeX). For me, Open Access Publishing is a major ethical concern (both for the entangling of profit motives with science in for-profit publishing, but also the injustice linked with tying access to scientific knowledge with access to money, which is largely unnecessary with the advent of the internet). This of course depends on the publisher, but in at least some contexts, there are Open Access reasons to write in LaTeX as well.

Where to start

Where you start depends on what are you trying to accomplish.

If you are just drawing trees to put into syntax papers, I suggest you look at these handouts, in the order provided here: [ online previewer] [qtree Trees] [Arrows with tree-dvips]. This will allow you to draw trees and download images of them, without having to learn all of LaTeX. These materials use the package qtree for tree-drawing.

If you are deciding to write entire papers (or your thesis) in LaTeX. Pedro Martins’ LaTeX tutorial is the best introduction to LaTeX that I have encountered (AND it’s about linguistics specifically).

The easiest way to get started is to open the Pomona Linguistics LaTeX Paper template in Overleaf and start playing around with it to see how it works.

Franny Brogan and I have written a Quick Reference Guide for Pomona Linguistics, which is much more detailed than the basic template, but should provide Claremont Colleges students with everything they need to write linguistics papers in LaTeX. It uses the same template noted above, and the link above is also to an Overleaf template, which means you can open and edit the document to see how it works. I suspect this will also be useful to linguistics students elsewhere; it’s been tailored specifically to our context here at Pomona College, but most tasks are pretty broadly applicable.

LaTeX Resources Specific to Linguistics

Some broad introductions:

  • The best introduction I have ever found for LaTeX (and it happens to be written for linguists!) is Pedro Martins’ tutorial.

What are packages?

  • As outlined in the resources linked to above, LaTeX itself has a limited degree of functionality – it does many things, but not all the things.
  • As a result, many people have created packages–which are essentially plug-ins, or add-ons–which allow LaTeX to do some extra stuff.
  • Much of what follows are links to packages that allow linguists create formatting in their papers that matches their needs: numbered examples, trees, IPA symbols, charts, etc.

For example numbering and formatting (including aligning interlinear glosses):

  • gb4e is used by a broad range of linguists for autonumbered examples and specifically glossed/translated language examples. I recommend this for LGCS 105 students. (The documentation is available via the link, but the introductory handouts above provide the basic information you needed to get started.)  Sebastian Nordhoff (with Language Science Press) has an outstanding explanatory document for gb4e.
  • linguex. Also useful for formatting examples
  • expex has also been recommended to me by some people.

Tables:

  • There are a lot of places to look for instructions for making tables in LaTeX: try here, or here, or here. Our quick reference guide has some explanations as well, including examples you can edit.
  • This web app lets you choose a table size and it auto-generates the base code for the table. I usually do this to generate the first version of table I am building.
  • Booktabs is a handy package for making more visually appealing tables than what LaTeX generally manages on its own.

For drawing syntax trees:

  • forest is used by Language Science Press, among others. A quick start guide is here. The LGCS template uses forest, I recommend that LGCS students to use this if they are writing their papers in LaTeX.
  • Our Forest Arrows Explainer gives instructions and examples for formatting arrows in syntax diagrams using Forest.
  • The package qtree is great for drawing syntax trees , and tree-dvips allows you to draw arrows in those trees. If you are just using the LaTeX previewer to draw trees, qtree is probably the way to go. Unfortunately the requirements of qtree and the arrow-drawing package don’t always play nice with other components of our LGCS template. You can use qtree if you want, but drawing arrows will be tough. (which is fine, you can use traces or strikeout).
  • tikz-qtree is a slightly advanced version of qtree that has some additional functionality.
  • pst-jtree has been recommended to me by some people. It is more powerful but also more complicated, and also relies on pstricks for a variety of graphics, which itself is quite complex as well. I don’t recommend this for new syntax students.

For semantics symbols:

  • I am not a semanticist, so this is not expert advice, but I provide some guidance here for my Semantics/Pragmatics students that will potentially help with formatting their papers.
  • This is a .txt file which contains the unicode symbols commonly used in semantics/pragmatics formalisms. You can copy and paste these symbols into some LaTeX documents, but also into Google Docs or Word (I recommend Times New Roman font).
  • This link takes you to a collection of relevant sites with the Unicode designations for the symbols in the .txt file above.
  • This Overleaf template (forthcoming) provides LaTeX commands for all of these symbols as well.

Resources for inputting IPA into a computer:

  • There is a TeX engine (compiler) called XeLaTeX that allows you to enter IPA symbols directly into a LaTeX text editor, together with the package fontspec. The LGCS paper template uses fontspec and XeLaTeX.
  • If using fontspec for IPA fonts you have to be sure to use a font in your paper that has all the appropriate glyphs (symbols) that you need. The Linux Libertine fonts that are used by Language Science Press seem to be the best option I have found, and this is what is used in the LGCS template. Various SIL fonts also work fairly well (e.g. Doulos, Charis). If you don’t choose an appropriate font you may find that some of your symbols are simply not displayed when the document is typeset.
  • You can use tipa to enter commands that produce IPA symbols. This works in a pinch, but is not really recommended for a paper where you have to repeatedly use IPA symbols bc the code becomes quite difficult to read/write if you have to code too many symbols.
  • If you are either using XeLaTeX or working in Microsoft Word or another word processing app, you will find it very useful to have a means of inserting IPA directly into a document of some sort. Here are two resources you may find useful (I myself use the SIL IPA keyboard and with a small learning curve it really speeds up typing IPA symbols):
    • Recommended: SIL IPA keyboard is downloadable on Mac and PC and gives you keystrokes for inserting IPA characters.
    • IPA Palette
    • Online IPA keyboard where you can type symbols and then copy/paste them into your document
    • The web app detexify is a handy tool that allows you to draw the symbol you want and it shows you what packages you need for that symbol, and what commands create it in LaTeX.
    • The web app shapecatcher does something similar; you draw the symbol you want and it identifies possible matches and their unicode identifiers.

Other specialized symbols

  • NASA has put together a large set of descriptions of how to generate widely used typographic features (e.g. dashes, footnotes, etc).
  • The Great, Big List of LaTeX symbols
  • In general, you can always google “how do I do X in LaTeX,” because there are a relatively large number of online resources at this point created by the relatively large LaTeX-using community.

General LaTeX resources

  • When you are working to figure out a new package or new set of code for LaTeX, googling your current puzzle usually brings you to posts on these sites: CTAN, TUG, and stackexchange. You can check them out yourself to find more information, though they are overwhelming to tackle with no prior exposure to LaTeX.
  • This site provides a host of resources to people who are new to Tex, though the resources linked to above (both the Pomona ones, and Pedro Martins’ site) are more targeted to linguistics and to Pomona LGCS students specifically, so I suggest that you start with the those if you are a Claremont Colleges linguistics student.
  • A helpful explanation of some of the terminology that you read in various forms of TeX documentation.

Acknowledgments

  • I never learned LaTeX in grad school; I was thinking I’d slip through my career avoiding it. My commitment to publishing Open Access made that path untenable. But this also means I owe several colleagues and students a LOT, who deserve credit for generously teaching/showing me basically everything I know about this.
  • So, thanks to Claire Halpert, Nico Baier, Jason Zentz, Maddy Bossi and Michael Clausen. Thanks, y’all!