Sunday, September 16, 2012

Manuscript Submission to a Journal? Some Useful LaTeX Code.

I'm about to submit a manuscript to an academic journal. People that write their papers in LaTeX often do so in a format of which they like the .pdf output: e.g. single-spaced, footnotes at the bottom of the page, et cetera. Now unfortunately journals often want to receive their manuscripts in a very different format. The one I am about to send a manuscript to wants:
  • The manuscript double-spaced throughout;
  • Footnotes, references, tables, and graphs on separate pages at the end of the document;
  • To follow The Chicago Manual of Style;
  • And because the journal sends out the manuscript anonymously for review, the author names and affiliations should be taken out, and anything else that makes the manuscript not-anonymous.
Needless to say with some cutting, pasting and tweaking of code this is possible. However, by doing so one ends up with multiple LaTeX documents: one for "normal use", and one for submission to the journal. Bah! As a result, this morning I wrote some code that avoids this. That is, by changing one thing at the start of the document (i.e. indicating whether you want a normal version or a version for journal submission) you obtain either one of two .pdf outputs: a normal working version, and a manuscript for submission that complies with the conditions the journal wants. All from the same LaTeX document. It's quite straightforward, but useful:

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

% Create your condition:

\newif\ifissubmission

% The below is the only thing to be changed. Indicate whether you want the normal work version (deselect "\issubmissiontrue"), or whether it's for submission (deselect "\issubmissionfalse"):

\issubmissiontrue
\issubmissionfalse


% The next bit of code makes the document doublespaced, makes the footnotes endnotes, and places the tables and figures at the end of the document on separate pages, but only if the document is for submission:

\ifissubmission
    \doublespacing
    \usepackage{endnotes}
    \let\footnote=\endnote
    \usepackage[nolists,tablesfirst,heads]{endfloat}
\else
\fi


% The next bit of code makes the document anonymous (i.e. takes out the authors' name and acknowledgements), but only if the document is for submission:

\ifissubmission
\else
    \author{AUTHOR1\footnote{
ACKNOWLEDGEMENT TEXT.} \and AUTHOR2} \fi

% Any other text or code in the document can be made conditional, and be kept out or changed depending whether it is for normal use, or for submission. Here, for example, a website link in a footnote is given "normally" if we want the normal working document, but it will become anonymized as "{link}" when the document is for submission:

NORMAL TEXT.\footnote{All documents can be found on the project's website: \ifissubmission \{link\}. \else {REAL WEBSITE LINK} \fi NORMAL TEXT

% Finally, the code below, which should be placed at the end of the document, gives the references in Chicago style, and indicates where the endnotes should appear, but again only if the manuscript is to be for submission:

\ifissubmission
    \newpage
    \theendnotes
    \newpage
    \bibliographystyle{chicago}
    \bibliography{PATH TO .BIB FILE}
\else
    \newpage
    \bibliographystyle{YOUR NORMAL STYLE}
    \bibliography{PATH TO .BIB FILE}
\fi


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

No comments:

Post a Comment