LaTeX

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 semi-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.

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.
  • 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 the other packages we use in 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). qtree also struggles with keeping big big trees on a single page, fwiw.
  • 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.

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.
  • 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).
  • 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 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

  • As 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!