The Institute of Transportation Engineers – Georgia Tech Student Chapter

TRB LaTeX template update


As some older ITE@GT folks may know, Greg shared a LaTeX template for TRB here three years ago.  His template enabled you to dynamically generate your TRB paper using documentation software such as R, LaTeX, and Sweave.  It is a very useful tool for people who like to use R for data analysis and graphics.  It is also very useful for people like to create a “dynamic document”.  As I was playing with it, I realized that a minor feature was not included in the template, which is the total word count.  By total word count, I mean the sum of the count of words and the equivalent counts of words from tables and figures (each table/figure accounts for 250 words).

To my surprise, in LaTeX, it is not a very straight-forward task.  There is no default command or package in LaTeX that you can directly use.  After trying a couple of days with no luck, I posted my question on Tex.SX and got a solution.  So I implemented the solution on Greg’s previous template, added some other minor tweaks, and thought I should share it with y’all in case anyone is interested.

So here is an updated version of the TRB LaTeX template, developed based on the impressive work by David Pritchard as well as Greg, with some additional features such as the automatic total word count and some minor formatting.

Similar to Greg’s template, to make this document, you will need to have LaTeX and R installed on your system. Here is an example of the final document trb_template, although there is still work to be done, personally, I think it is good enough (and I think we spent too much effort on it already :P).  Essential files, including the .rnw file, the BibTex definition file, and the .bib file, can be downloaded as a .zip file here.

Author: Ross Wang

Ross Wang is a PhD student in Transportation Systems Engineering at Georgia Tech. He was the ITE Vice President of Finance in 2013-2014.


  1. Awesome!

    We should put this class on github. Then other people can help us out.

    • Good point Greg, I actually made some more changes while I was preparing my paper this year. I may generate a newer version template then we can put it on github. Have you done it before? Sharing codes on github?

  2. Thanks for the great work! I have a question regarding how you count the words. How do you handle inline math symbols and displayed math equations?

    • Thanks for your feedback Longsheng. To answer your question, you may refer to this document:

      It says “Mathematical formulae are not counted as words: it would be difficult to define a sensible rule for this. Instead, TeXcount counts the number of inline formulae and displayed formulae separately. You may then decide on how to combine these counts with the word counts, e.g. using the -sum option.”

  3. So how about it? Can you or Greg put it up on GitHub so we can contribute?

  4. Folks, I’ve uploaded the template to Github, see here:

Leave a Reply

Required fields are marked *.