-
Some common anti-patterns in LaTeX such as
-
Avoid using the pair of dollar signs for the centered equations (there is no directionality in the dollar signs)):
$$ E = m c^2 $$
Instead, use\begin{align*}....\end{align*}
or similar environment. -
Use
\textit{...}
instead of{\it ...}
.
-
Avoid using the pair of dollar signs for the centered equations (there is no directionality in the dollar signs)):
-
Add a tilde when making a reference, such as
-
As proved in~\cite{.....}, ....
-
By~\eqref{E:...}, ....
-
Thanks to Theorem~\ref{T:...}, ....
-
-
Making your label more readable with prefix:
-
For equations, you may start with
E:
, such as\label{E:SHE}
-
For Theorems, you may start with
T:
, such as\label{T:Main}
-
For Lemmas, you may start with
L:
, such as\label{L:Ito}
-
For Propositions, you may start with
P:
, such as\label{P:Naive}
-
For Corollaries, you may start with
C:
, such as\label{C:Lyapunov}
-
For Sections, you may start with
S:
, such as\label{S:Introduction}
-
For Subsections, you may start with
SS:
, such as\label{SS:Notation}
-
For Figures, you may start with
F:
, such as\label{F:Notation}
-
For Tables, you may start with
Tb:
, such as\label{Tb:Notation}
-
For equations, you may start with
- Avoid white space in the labels and file names.
-
Depending on if your text editor supports, if so, you may set up the textwidth to 80 characters
per line, so that it is easy to read. For vim or neovim user, put the following line in your
init.vim
:-
set textwidth=80
-
-
Use the modern engine such as
lualatex
orpdflatex
to compile your tex file, which
produces the pdf file without going through dvi.
It is preferable to use Biber
to as the backbone to handle .bib
file.
- Check bibliographies - bibtex vs. biber and biblatex vs. natbib - TeX - LaTeX Stack Exchange for some explanations.
- I have been developing an open reference bank: SPDEs-Bib, which are free to use.
-
The following lines are sample lines that I use in the preamble:
% ------------------------------------------------- % Biber for bibliography % ------------------------------------------------- \usepackage[backend=biber, style=alphabetic, natbib=true, abbreviate=true, maxbibnames=99, ]{biblatex} % Options for sorting: % nty—sorts entries by name, title, year; % nyt—sorts entries by name, year, title; % nyvt—sorts entries by name, year, volume, title; % anyt—sorts entries by alphabetic label, name, year, title; % anyvt—sorts entries by alphabetic label, name, year, volume, title; % ynt—sorts entries by year, name, title; % ydnt—sorts entries by year (descending order), name, title; % none—no sorting. Entries appear in the order they appear in the text. \AtEveryBibitem{% Clean up the bibtex rather than editing it \clearfield{doi} \clearfield{url} \clearfield{issn} \clearlist{location} \clearfield{month} \clearfield{series} \ifentrytype{book}{}{% Remove publisher and editor except for books \clearlist{publisher} \clearname{editor} } } \addbibresource{All.bib} % \addbibresource{./05-13-revised_biber.bib} \def\polhk#1{\setbox0=\hbox{#1}{\ooalign{\hidewidth \lower1.5ex\hbox{`}\hidewidth\crcr\unhbox0}}} \def\cprime{$'$}
-
Work flow using
biber
(Image is from stackexchange)pdflatex Paper.tex biber --output_format=bibtex --output_resolve paper.bcf biber Paper pdflatex Paper.tex pdflatex Paper.tex
You need to compile latex file for three times in total. -
When submit paper to arXiv, you do not need to include
.bib
file, instead, you need to include.bbl
file and add the following line before\end{document}
:\printbibliography[title={References}] \end{document}
- Cheatsheet on Bibtex (from CTAN)