4

I wonder how could I modify the nature.cls file to include figures. I comment the last two lines in the nature.cls file, but the compilation returns errors. I submit my .tex, .bib and figures separately to Nature. Now I just want to include figures in my draft and then I can upload my draft in Arxiv. Thank you very much.

1
  • 4
    Do not change class files. Have you thougt about using package graphicx?
    – Johannes_B
    Commented Apr 5, 2017 at 5:26

1 Answer 1

11

The class nature.cls contains at the end:

%% Redefine the figure and table environments.
%% The new figure environment defers printing of all figure captions
%% until the end of the document and prints them in sans serif font.
%% The \includegraphics command is ignored since Nature wants figures
%% as separate files.
%% The table environment was just changed to print on a separate page in
%% sans serif font.  Tables should all be moved to the end of the document
%% manually.

\renewenvironment{figure}{\let\caption\NAT@figcaption}{}

\newcommand{\NAT@figcaption}[2][]{\AtEndDocument{%
    \refstepcounter{figure}
    \ifthenelse{\value{figure}=1}{
        \newpage\noindent%
%        \rule{\textwidth}{1pt}
    }{
        \par\vfill
    }
    \sffamily\noindent\textbf{Figure \arabic{figure}}\hspace{1em}#2}
    }

\renewenvironment{table}{\@float{table}[p]\sffamily}{\end@float}

%% ignore all \includegraphics commands in the document
\AtBeginDocument{\let\includegraphics\NAT@ignore}

\newcommand{\NAT@ignore}[2][]{}

The meaning of \includegraphics can be saved before \begin{document} and restored afterwards. The environment figure can also be restored:

\documentclass{nature}
\usepackage{graphicx}
\makeatletter
\let\saved@includegraphics\includegraphics
\AtBeginDocument{\let\includegraphics\saved@includegraphics}
\renewenvironment*{figure}{\@float{figure}}{\end@float}
\makeatother
\begin{document}
...
\end{document}
2
  • 2
    Some of the information given above is incorrect. Nature encourages the inclusion of figures into the main body of text for initial submissions (which most submissions tend to be). Separate upload of figures is allowed, but the formatting for initial submissions is very open, and the inclusion of figures is recommended for ease of review. It would probably be a good idea for the formatting of the cls to reflect this, or modify the cls as shown above. Commented Jan 12, 2018 at 17:44
  • How do we include the figures inside the text, as @PeterRoopnarine is saying. Perhaps this question deserves a separate question on its own so I have posted it as a new question. Commented Sep 16, 2020 at 13:30

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .