Suppose I have created a plot with pgfplots
for a scientific paper.
However, for usual reasons the targeted journal is not certain. Possibly the plot has to be adjusted to match different journals (consider here revtex4-1
and elsarticle
). This includes font type, font sizes, columnwidths/textwidths.
For instance, the values of the \columnwidth
differ:
% \documentclass[preprint,5p,twocolumn,12pt]{elsarticle}
\the\columnwidth=252.0pt
% \documentclass[aps,final,pre,twocolumn,10pt]{revtex4-1}
\the\columnwidth=246.0pt
I have considered the package standalone
:
plot.tex:
\documentclass[class=elsarticle,5p,twocolumn,12pt]{standalone}
\usepackage{pgfplots}
\pgfplotsset{compat=1.5}
\begin{document}
\begin{tikzpicture}
\begin{axis}[
width=\columnwidth,
title=Inv. cum. normal,
xlabel={$x$},
ylabel={$y$},
]
\addplot[blue] table {invcum.dat};
\end{axis}
\end{tikzpicture}
\end{document}
paper.tex:
\documentclass[preprint,5p,twocolumn,12pt]{elsarticle}
\usepackage{lipsum}
\usepackage{graphicx}
\begin{document}
\setlength{\parindent}{0ex}
\lipsum[1]\vspace*{2ex}
\begin{figure}
\centering
\includegraphics{plot}
\caption{interesting results}
\end{figure}
\vspace*{2ex}\lipsum[2]
\end{document}
After the paper got rejected :(, the documentclass gets changed.
paper.tex
\documentclass[final,aps,pre,twocolumn,10pt]{revtex4-1}
plot.tex
\documentclass[class=revtex4-1,final,aps,pre,twocolumn,10pt]{standalone}
For some reason standalone
fails to accept as class option revtex4-1
.
What would be a good workflow to minimize the workload using pdflatex
without using dvi-eps path. Quantities, which should be available to plotting, are font size, \columnwidth
and \textwidth
.
An answer with a gnuplot+standalone solution would be a good addition.
Related questions:
- The answer
'same fontsize in plot in revtex document as text' gives a suggestion to adjust the font size in pstricks manually.
Best Answer
You can use
\includestandalone
fromstandalone
package (requires-shell-escape
).plot.tex
:Then in
elsarticle
:And in
revtex4-1
Now, for curiosity, try with a big font size and different font.