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}[2]{\displaystyle\frac{#1}{#2}},
2019Jan13:
\dod is “displaystyle-\od”. \dpd is “dislaystyle-\pd”.
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:
- Use texdiff (perl-based?)
- Use changes.sty (included in TeXLive)
- 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 \begin{equation}.
Goodbye, wrapfig!
I quite often used to use wrapfig.sty, which I think is one of the major packages for wrapping texts above and/or beneath figures; however, the behavior of wrapfig is quite random, stochastic, and unpredictable. Therefore I switched to use picins.sty and minipage.sty. I found the behavior of the combination of minipage and picins is much simpler, highly flexible, and use-friendly.
picins.sty was not available in my system, so I get it from CTAN and placed in my local texlive system.
\documentclass {article} \usepackage{picins}% http://ctan.org/pkg/picins \usepackage{pxfonts} \usepackage {mwe} % or load ’graphicx’ and ’blindtext’ manually \begin {document} %Main \blindtext %%%%%%vertically aligned figure starts \pichskip{8pt}% Horizontal gap between picture and text \parpic[r][t]{% \begin{minipage}{.4\linewidth} \includegraphics[width=\linewidth]{example-image-a}\caption{figure} \vspace{10pt} \includegraphics[width=\linewidth]{example-image-b}\caption{figure} \end{minipage} } %%main \blindtext \blindtext \end{document}
Output: