Skip to content

Instantly share code, notes, and snippets.

@SHDShim
Last active May 26, 2023 20:21
Show Gist options
  • Save SHDShim/11cdfb5ecb06d3867fbf0d5dc71844fe to your computer and use it in GitHub Desktop.
Save SHDShim/11cdfb5ecb06d3867fbf0d5dc71844fe to your computer and use it in GitHub Desktop.
latex, supplementary materials,

Latex template for supplementary information

We need bibunits package.

\usepackage{bibunits}

Locate the following before abstract

\begin{bibunit}[bst_name_here]

Locate the following after acknowledgements but before supplementary materials

\putbib[bib_filename]
\end{bibunit}

Then it is better to do the following at the end of the manuscript and write supplementary materials in a separate latex file.

\inpu{supplementary.tex}

You can even do this way for separate method section and rebuttal letter as well as supplementary information. Then you will have all parts of the paper in one PDF.

For the files to be included, such as method, supplementary materials, and rebuttal letter, you would not need any latex preambles. Just go directly to the text.

In order to have separate bibliography for these three materials, you need to again include the following in those separate input files.

\begin{bibunit}[bst_name_here]
\putbib[bib_filename]
\end{bibunit}

Also, for separate counting of page numbers, table numbers, and figure numbers with different numbering scheme, such as "S" before the numbers.

Locate the following in the beginning of the input files.

\setcounter{equation}{0}
\setcounter{figure}{0}
\setcounter{table}{0}
\setcounter{page}{1}
\makeatletter
\renewcommand{\theequation}{S\arabic{equation}}
\renewcommand{\thefigure}{S\arabic{figure}}
\renewcommand{\thetable}{S\arabic{table}}
\renewcommand{\thesection}{S\arabic{section}}
\renewcommand{\thepage}{S\arabic{page}}
\renewcommand{\bibnumfmt}[1]{[S#1]} % This line requires natbib
\renewcommand{\citenumfont}[1]{S#1} % This line requires natbib
@masih-hub
Copy link

Thank you for your hard work. It really helped me in creating my supplementary file.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment