, , , ,

Latex

From Camilo's web
Jump to: navigation, search
Mountain View
  1. This is a template for an abstract

Installing packages

To make the packages available throughout the entire system (so that you can access it from any directory), you have to put the folder in the global directory:

/opt/local/share/texmf-texlive/tex/latex/

Afterwards, you need to let the system know that you have made some changes to the files. This can be done with the texhash command:

sudo texhash

If everything went right, you will see in the terminal the list with the updated files. If, however, the terminal doesn't know how to handle the command, you can try to find the file (in my case, it was in /opt/local/bin/), and make the path to the file accessible

export PATH=$PATH:/opt/local/bin

and then use the texhash command.

Changing the numeration of the equations and figures

When writing a document, you may want to have a given numeration for the equations and figures (E&F) of the main text and different one for the E&F of a Supplemental Information (SI), while keeping both sections in the same file.

This can be done by adding the SI as an appendix of the main text, by doing:

\pagebreak
\onecolumngrid
\appendix
\setcounter{equation}{0}
\setcounter{figure}{0}

The last two lines are there to restart the counter for the E&F. If, however, you want the numeration of the E&F to have a letter before the numbers, e.g., labeling them as Eq. (S1), we need to add the following lines:

\renewcommand{\theequation}{S.\arabic{equation}}
\renewcommand{\thefigure}{S.\arabic{figure}}