My LaTeX Workflow to avoid spelling mistakes

I use several tools and techniques to ensure that my Latex is as good as possible.

LaTeX tools

Nag

Nag is a tool to help you detect old commands and deprecated LaTeX code.

Simply put the following lines in your code:

\RequirePackage[l2tabu, orthodox]{nag}

latexmk

Latexmk is a very good tool to never have to worry anymore about how many time you have to compile to get your bibliography right. A latemkrc is the file you will put inside the project that will help bootstrap latexmk. Here’s mine:

$pdf_mode = "1";
$pdflatex = "pdflatex";
$makeindex = "splitindex";
$makeindex = "makeindex;splitindex;";

Spelling help

Language tool

Language tool is Java grammar checker. It helps detect grammar mistakes such as He play tennis and many others. I usually launch the checker against all my tex folder. If you use TeXstudio you can have Language tool directly integrated inside your editor:

Checking (La)TeX With LanguageTool - LanguageTool Wiki

Pandoc + Microsoft Office

Pandoc is like a swiss-army knife for converting text back and forth in different format.

Suppose that you have a large body of text in LaTeX and you want to convert it to a docx format to spell check it on Microsoft Office. By using pandoc you could have it quickly:

pandoc main.tex -o main.docx

That’s it! Now, you have a main.docx that you can pass along to other grammar checker such as the one embedded in Microsoft Word.

Project layout

I like to have a modular project. Therefore, I use the following layout:

├── myproject.sublime-project
├── myproject.sublime-workspace
├── IEEEtran.cls
├── latexmkrc
├── main.pdf
├── main.tex
├── Makefile
├── readme.md
├── main.bib
└── tex
    ├── abstract.tex
    ├── conclusion.tex
    ├── experiment.tex
    ├── intro.tex
    └── related.tex

A main.tex document that import all other using similar snippets:

\begin{document}

\maketitle

\input{tex/abstract}
\input{tex/intro}
\input{tex/related}
\input{tex/experiment}
\input{tex/conclusion}

\end{document}

Organizing code this way is handy because I only have small files that I can easily get on one screen, share in an email or simply read in one sight. If my code was a monolithic file with thoushands of lines, it would be much harder to see where I am in the structure.

Plus if you use an editor such as Vim (plus the Ctrl-p plugin) or Sublime Text you can open any file you want by simply typing Ctrl-p and going in very few key strokes anywhere in your document.

Makefile

Of course, you don’t want to type commands all the time. Therefore you put them in a makefile like this one:

all:
latexmk

clean:
latexmk -C