Adding contributions to the LaTeX project - ESTS-Variants/varianTeX GitHub Wiki

Adding compatible .tex files to VariantX

It is recommended that authors use the "VariantX For Authors" template (available on GitHub and as an Overleaf Template), to submit fully compatible .tex files for the VariantX template. In this case, just upload the submitted .tex files in the relevant directory of your LaTeX project (essays/, reviews/, or any subcategory of your own design), and add them to the compiled document writing the \include{path/to/file} command where you want the contribution to appear (i.e. somewhere between \thispagestyle{empty} and \end{document}).

[!NOTE] The filename in the \include{} command does not record the .tex extension.

[!TIP] Feel free to comment out any template-files you do not want to visualise by writing a % sign at the start of the relevant \include{} command.

If you allow authors to submit .docx files instead, you can transform then into .tex files with pandoc:

Using pandoc to add incompatible .docx files to VariantX

Install pandoc

To transform .docx submissions into .tex files, we use the command line tool pandoc. This tool provides a first round of automated, simple transformations (such as transforming text formatting into the right LaTeX commands, such as \emph{} for italics). Download this open source tool from the official pandoc website, and follow the installation instructions.

Transformation commands

In the terminal, cd to the directory that contains the revised paper, and enter:

pandoc -o [OUTPUT].tex [INPUT].docx

For example:

pandoc -o martinez.tex V14_Martinez_final.docx

[!IMPORTANT] Pandoc can't deal with Microsoft's proprietary document format. If the contribution is saved as .doc, open it and save it as .docx first.

Add the contribution to the LaTeX project

  1. In Overleaf, duplicate the relevant template (essays/my-essay.tex for essays, or reviews/my-review.tex for reviews), and rename the file (e.g. using the surname of the first author).
  2. Fill out the metadata (lines 1 to 30) following the commented instructions
  3. Copy the text from your pandoc-converted .tex, and paste it in between \section*{} and \begin{flushleft} [...] \end{flushleft}.
  4. Reference the file in the main.tex document, as detailed above.
  5. Click on the 'Recompile' button.

When the LaTeX project is recompiled, check if there are any errors. The bibliography will throw an error at this point, but we can ignore that for now. For other errors, some packages may need to be added to preamble/packages.tex (although most of them will hopefully already be included).

Unrecognized character errors

Another common error is that some characters are not recognised in the referenced encoding scheme. To declare new, unrecognized characters, add their unicode code in a \DeclareUnicodeCharacter{45E}{} line in the preamble/encoding.tex file.