LaTeX Resources

LaTeX is a system for document-preparation and typesetting. In my corner of academia (physics, mathematics, computer science) it is also the method de rigueur for the preparation of manuscripts. Many academics in my field reach out for LaTeX by default when writing anything on the computer. I am no exception.

NSF Grant Template

Download

This is a basic template for filing NSF grant applications; the formatting and required sections should be current as of the 2018 Grant Proposal Guide. A nice feature is that it uses the childdoc package to enable the easy compilation of the various "sections" of the grant proposal into standalone PDF files ready for upload to Fastlane/research.gov. The file MASTER.tex should only be edited to include more preamble stuff that you need; compiling it will produce one big PDF file including all parts of the proposal (convenient for sending to your chairperson to review). Each of the individual numbered TeX files can be edited and compiled separately, cross references and citations are automatically handled.

Starting January 2020, NSF will require special formatting requirements for the Biographical Sketch section. In particular, the NSF highly suggests using SciENcv, a service provided by the NIH, for generating the biographical sketches. Going forward one should use this service instead of the Biographical Sketch template included in the tarball here.

MSU Letterhead Template

Download

Michigan State University has published letterhead for use by faculty and staff in Microsoft Word format. I reproduced the formatting in LaTeX, including the use of Arial (Helvetica in fact) for the information in the scholar's margin. The PDF version of the MSU wordmark and seal are converted from the Postscript ones available for download on the MSU brand website.

If you ever find yourself needing to add postscripts after the signature (for example, using the letter as a cover letter with further attachments, or having additional appendix pages on your letter), please note that the class is based on the LaTeX letter class, which means that the \closing command disables subsequent page breaks. To work around that, you would need to manually issue \startbreaks as described in this TeX StackExchange answer.

Changelog

  • November 29, 2023:
    • Removed tar ball, link now to git repository
    • Made font selection configurable, but requires also downloading the wwwfontselect.sty file from the same repository.
    • Made a version with thinner margins, for those days when you need to cram more info into fewer pages.
  • July 18, 2020:
    • Redid the fontsize specification so the text in the scholar's margin has consistent sizing even if fontsizes are changed for the main document.
    • Instead of relative positioning of the margin/header text, now using absolute positioning via the textpos package. Margins defined using the geometry document. The positioning of the marginalia should now be stable across changes of paper sizes (but it would not look good with legal paper; you would need to fix that yourself if you use paper sizes much different from letter or A4).

Other LaTeX Goodies

I have some other LaTeX resources on my MSU GitLab Repository. This includes some heavily customized LaTeX class files for preparation of my lecture notes, as well as for preparing documents for printing with the Espresso Book Machine. One of the things I am somewhat proud of is some code for producing annotated cross references. Also included are some miscellaneous packages that I wrote at one time or another.

Command-line Search of BibTeX Database

Download

For the longest time I used JabRef as my reference manager of choice. However, I've grown accustomed to doing as much as I can on the command-line, and so recently I switched to Papis. Occasionally, however, I need to handle BibTeX databases from standalone projects. It would be convenient to have a easy way of searching them.

Neugebauer's BibTool is a powerful utility to manipulate BibTeX files. The search syntax, however, is a bit annoying, especially with the need to handle shell escapes. So here's a shell script to make typing easier.

Searches a BibTeX file using bibtool.

Syntax:   dbsearch.sh  [search parameters]
  -h       Displays this help
  -i FILE  Specify the input file; else runs as a filter
  -a RG    List those entries with RG in author list
  -t RG    List those entries with RG in title
  -k RG    List those entries with RG in keywords
  -T TP    List those entries with TP as type
  -n RG    List those entries with RG in bib key
  -E RG    Search for RG everywhere

Note: RG type arguments can be regexp expressions

What the script does is to:

  • Transform the search parameters into the select{...} syntax used by bibtool.
  • Support the specification of multiple requirements that must be all satisfied, which is not possible with a single call to the bibtool command. (For example, it is not possible to use a single call to bibtool to find all entries of type @book that is authored by Steinhaus that has Rat somewhere in the bibliographic data.) I did not implement OR-type search conditions since I don't find that particularly useful.

Some usage notes:

  • It supports stream processing: so if another tool generates BibTeX formatted output to STDOUT, you can pipe that output into the script and omit the -i option.
  • Users are highly encouraged to read the bibtool documentation and configure it to their own liking (for example, for use with BibLaTeX, or to support custom entry types). All of these can be done by placing a resource file in the standard bibtool search path.
    • However, user should ensure no resource file loaded specifies a default BibTeX file (via the input {...} command); otherwise items from that database will show up in all search results.

My editing set-up

If you are curious: I do most of my editing on Linux-based systems. In my office my desktop computer runs arch linux. I use the i3 tiling window manager, and most of the time my screen is covered with terminal windows. When out of my office my computer is a Google Pixelbook running ChromeOS. I make heavy use of Project Crostini and have a container running arch, and instead of the built-in ChromeOS terminal, I use Tilix.

For editing, I use NeoVim, with the VimTeX plug-in.