Commath

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:

\renewcommand{\dfrac}{\displaystyle\frac},


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:

\newcommand*\patchAmsMathEnvironmentForLineno[1]{%
\expandafter\let\csname old#1\expandafter\endcsname\csname #1\endcsname
\expandafter\let\csname oldend#1\expandafter\endcsname\csname end#1\endcsname
\renewenvironment{#1}%
{\linenomath\csname old#1\endcsname}%
{\csname oldend#1\endcsname\endlinenomath}}%
\newcommand*\patchBothAmsMathEnvironmentsForLineno[1]{%
\patchAmsMathEnvironmentForLineno{#1}%
\patchAmsMathEnvironmentForLineno{#1*}}%
\AtBeginDocument{%
\patchBothAmsMathEnvironmentsForLineno{equation}%
\patchBothAmsMathEnvironmentsForLineno{align}%
\patchBothAmsMathEnvironmentsForLineno{flalign}%
\patchBothAmsMathEnvironmentsForLineno{alignat}%
\patchBothAmsMathEnvironmentsForLineno{gather}%
\patchBothAmsMathEnvironmentsForLineno{multline}%
}


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 (http://trackchanges.sourceforge.net/)

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 .