Writing in LaTeX
For beginning LaTeX users, here is a LaTeX template.
For more advanced LaTeX users, here are Henry's default conventions for writing in LaTeX. I tend to use these more when writing with students than when writing with other collaborators. I am always looking to improve my LaTeX style, or simply to try new LaTeX styles, so I do not strictly adhere to these guidelines on any particular project!
- A general principal is that you don't want to add to much of your own formatting (such as \\ or \noindent or \indent) to the tex file. The main reason is that this saves time and effort; standard LaTeX formatting is quite good. A secondary reason is that you don't want to hard-code in formatting that will be incompatible with whatever journal may end up publishing your project.
- If you are starting a new project with me, then you may be interested in beginning with this LaTeX template with a bib file.
- Make macros for commonly used math symbols, such as "$\R$" instead of "$\mathbb{R}$", for example as defined in the template file above.
- When referring to a section, lemma, theorem, definition, etc from your same project, never write "Section~5". Instead write "Section~\ref{sec:notation}" so that the reference numbers get automatically updated.
- Don't start a sentence (or even a clause) with a math symbol. One reason is that it is much easier to read "We define f(x)=x^2. The function f has a zero ..." than it is to read "We define f(x)=x^2. f has a zero...", especially since periods are sometimes used in math equations.
- Except in rare situations, essentially every figure should be cited in the text. Indeed, some journals require this.
- Put the items in your bibliography (your bib file) in alphabetical order by the first author's last name; this makes it easier to find and edit items.
- I often write LaTeX in Overleaf, which interfaces nicely with git (a version control software). See this read-only link to a LaTeX file in Overleaf, and email Henry if you'd like a link allowing you to try cloning and playing with this practice repository.
- Put each sentence on a new line. This makes it easier for me to see what has changed in a file since the last time I opened it (using the "git diff" command).
- The following are more minor comments.
- Write "by~\cite{}" instead of "by cite{}". The ~ prevents a line break.
- Write "by~\cite{ref1,ref2}" instead of "by~\cite{ref1} and~\cite{ref2}", typically.
- In order to get the spacing correct, write "resp.\ " instead of resp. " and write "i.e.\ " instead of "i.e. ".
- Write $f\colon X\to Y$ instead of $f:X\to Y$ to get the spacing right.
- Write "\[ f(x)=x^2 \]" instead of "$$ f(x)=x^2 $$" as the latter is outdated; see this post.
- In a bibliography item, write "... the {E}uclidean algorithm ..." in order to enforce the correct capitalization, say in a title.
- Use an m-dash "Vietoris--Rips" between names.
- I typically have 3 blank lines in my LaTeX document before a new section, and 2 blank lines before a new subsection, because I struggle with perfectionism.