Style files


Commath.sty contains a variety of useful environments/commands, including \eval (“evaluate at”), \dfrac (\displaystyle\frac), \od (ordinary differential equations), etc. I do not personally use \dfrac or \od though: these commands display the fraction very small; I would renewcommand \dfrac as:


You could also redefine \od but is more tricky because it has two arguments.

Line numbers disappear when using lineno.sty and align env.

lineno.sty provides line numbers on PDF. However, on paragraphs with equation(s), line numbers may disappear. To prevent this, issue:

  \expandafter\let\csname old#1\expandafter\endcsname\csname #1\endcsname
  \expandafter\let\csname oldend#1\expandafter\endcsname\csname end#1\endcsname
     {\linenomath\csname old#1\endcsname}%
     {\csname oldend#1\endcsname\endlinenomath}}% 

according to

It might be more useful to create your own .sty file to automatically solve this problem.

How to track changes

One possible difficulty in writing a co-authored paper is how to highlight changes. There are basically three ways:

  1. Use texdiff (perl-based?)
  2. Use changes.sty (included in TeXLive)
  3. Use trackchanges.sty (

I mainly use trackchanges.sty (by locating its symbolic link in TeXLive). I found some pros and cons for each; texdiff is the easiest but readability is low, I thought (no waving underline needed to me!!). Changes.sty was not comfortable to me (I forgot the reason but I tried at one point). TrackChanges.sty was useful, with a potential incompatibility with \cite command or {equation} environment. It does not go without adding\protect command before \cite (or any other commands of .bib citation) and \begin{equation}.