[OS X TeX] including a graphics file

Murray Eisenberg murrayeisenberg at gmail.com
Sat Jun 19 10:16:48 EDT 2021


On 19 Jun2021, at 9:35 AM, Nitecki, Zbigniew H. <Zbigniew.Nitecki at tufts.edu> wrote:
> 
> I’m trying to include some graphics generated by Mathematica, something I am not used to doing (I usually generate what I need via pspicture).
> Using the TeXShop editor’s menu, I selected Figurs>epsfile and got the template which I filled in as follows:
>> \begin{figure}[htbp]
>> \begin{center}
>> \epsfile{file=plot1.pdf,scale=0.8}
>> \caption{{\bf Weierstrass's Function}}
>> \label{fig:Weierstrass}
>> \end{center}
>> \end{figure}
> 
> I have \usepackage{graphics} in my preamble.
> 
> The log file says:
>> ./Monsters.tex:683: Undefined control sequence.
>> l.683 \epsfile
>>               {file=plot1.pdf,scale=0.8}
>> The control sequence at the end of the top line
>> of your error message was never \def'ed. If you have
>> misspelled it (e.g., `\hobx'), type `I' and the correct
>> spelling (e.g., `I\hbox'). Otherwise just continue,
>> and I'll forget about whatever was undefined.
>> 
> 
> What should I do to correct this?


In addition to the recommendations to use the graphicx package (not graphics) and \includegraphics[scale=0.8]{plot1.pdf}, you may want to make the following changes:

	- you do not need the “.pdf” extension for pdflatex, which will impute that;

	- use the LaTeX command "\textbf{Weierstrass’s Function}" rather than "\bf Weierstrass’s function”: use of \bf is deprecated;

	- you may also need to use the \centering command or the \begin{center}….\end{center} environment within the figure environment.
 
---
Murray Eisenberg			murrayeisenberg at gmail.com
503 King Farm Blvd #101	
Rockville, MD 20850-6667	Mobile (413)-427-5334


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://email.esm.psu.edu/pipermail/macosx-tex/attachments/20210619/27b74b27/attachment.htm>


More information about the MacOSX-TeX mailing list