Question
What techniques and packages are there to keep up with good practices?
What I already know
I already know of the following packages for this kind of purpose:
\RequirePackage[l2tabu,orthodox]{nag}% Old habits die hard. All the same, there are
% commands, classes and packages which are
% outdated and superseded. nag provides routines
% to warn the user about the use of those.
\usepackage{fixltx2e}
\usepackage[all,error]{onlyamsmath} % Error on deprecated math commands like $$ $$.
I also know to use \( \)
instead of $ $
and \[ \]
instead of $$ $$
(as discussed in Are \(
and \)
preferable to $
?). And that csquotes
has a strict mode to turn warnings into errors:
\usepackage[strict=true]{csquotes}
And I am aware of the fact that mostly the content is more important than appearance and technicalities. Thus it is mostly a good practice to use packages and tools that lets you focus on content and to automate as much as possible, e.g. to automate compilation with latexmk
.
Best Answer
General tips
General tips somewhat explained
This means using
\include{}
and/or\input{}
commands to compose all the small pieces (chapters, sections, etc.) into one continuous document. (See When should I use \input vs. \include?). [The rationale in this point is to keep the code clean and short (rule 5) in your master document. Then you can focus on content of each piece of the document (rule 6).] A benefit of this point is that you can get to set shortcut commands to use in all documents in a .tex file in your path, and then\input
it in the preamble of any/all documents. This can make for a very large document to keep short at the eye at an initial stage of reading the master document pretty much like a shortmwe
.If one forgets what particular block of code does, reading the comments will help by the fastest possible way.
\newcommand
to define (mnemonic) commands for repetitive math expressions, etc.And probably other things ...