2

I have a collection of files like the following:

\documentclass[border=9pt]{standalone}
\usepackage{pgfplots}

\pgfplotsset{compat=1.3}%%
\pgfplotsset{every axis/.append style={
                    axis x line=middle,    % put the x axis in the middle
                    axis y line=middle,    % put the y axis in the middle
                    axis line style={->,color=blue}, % arrows on the axis
                    every x tick label/.append style={font=\scriptsize,yshift=0.75ex},
                    every y tick label/.append style={font=\scriptsize,xshift=0.75ex},
                   },
            /pgfplots/xlabel near ticks/.style={%%
              /pgfplots/every axis x label/.style={at={(ticklabel cs:0.5)},anchor=near ticklabel},
              },
            /pgfplots/ylabel near ticks/.style={%%
              /pgfplots/every axis y label/.style={at={(ticklabel cs:0.5)},anchor=near ticklabel,rotate=90},
              },
            x=2pt,
            y=5pt,
            }

\begin{document}

\newcommand\aemass{(50 / 2 ^ ( x/28) )}

\begin{tikzpicture}[x=1in]
    \begin{axis}[
            xlabel near ticks,
            ylabel near ticks,
            xlabel={$t$ time (in days)},
            ylabel={$m$ mass (in milligrams)},
            xmin=0,xmax=160,
            ymin=0,ymax=59,
            grid=both,
            xtick={0,10,...,160},
            ytick={0,2,4,...,60},
            ]
            \addplot [domain=0:160,samples=100]({x},{\aemass});
    \end{axis}
\end{tikzpicture}

\end{document}

which have names like

graph.strontium.90.tex

I run them through pdflatex to get a pdf file:

graph.strontium.90.pdf

Then in a separate file I call them as

\documentclass{article}
\usepackage{graphicx}
\pagestyle{empty}
\begin{document}

\includegraphics{graph.strontium.90}

\end{document}

But when I try to run this through LaTeX, I get the following error:

! LaTeX Error: Unknown graphics extension: .strontium.90.

See the LaTeX manual or LaTeX Companion for explanation.
Type  H <return>  for immediate help.
 ...                                              

l.9 \includegraphics{graph.strontium.90}

I've got quite a lot of files that follow this naming convention. Please tell me there's a better work around than having to rename these files.

A.Ellett
  • 50,533

0 Answers0