Some useful tips on writing papers in LaTeX.
Use package cleveref
for easier reference.#
If you use the LaTeX built-in command \ref{}
to refer to a table or image, it
will only give you the index of referred object. You have to manually type ref
type, i.e., Fig.
or Table
. The package
cleveref
will help you to insert the
reference type automatically. It provides the \cref
(used inside a sentence)
and \Cref
(used at the beginning of sentence) command to refer to an object
easily. \cref
can also be used to refer to multiple labels like this:
% no space allowed between different labels
\cref{label1,label2,label3}
Add the following setting to your header in order to use cleveref
:
\usepackage[capitalise]{cleveref}
% for cleveref
\newcommand{\crefrangeconjunction}{--}
In the above command, we modify the \crefrangeconjunction
to --
, since the
default is to use to
between a range of references.
Use punctuations after equations.#
Usually we will show some equations in the paper to show the formal formulation. Equations are like text and should be given proper punctuation. If it is in the middle of an sentence, use a comma. If it is in the end of a sentence, use a period. For example,
Einstein propose the famous matter-energy equation:
\begin{equation}
E = mc^{2}.
\end{equation}
How to reduce lines#
You should use the
microtype
package. It can help to adjust the word spacing to reduce the lines taken. You will often see less underfull or overfull hbox warning after using this package.You shouldn’t add blank lines before and after the display style equations if the text before and after the equation belong to the same paragraph. This will also help to reduce space.