[texworks] How do I add figures in Texworks?

Jean-Claude Raoult JC.Raoult at free.fr
Fri May 9 19:22:20 CEST 2014

Le 08/05/2014 23:06, Joseph Wright a écrit :
> On 08/05/2014 15:42, McKinstrie, Colin wrote:
>> For several years, I have been using Miktex and Winedt. I added figures (in eps) using the following command.
>> \begin{figure}[h!]
>> \centerline{\includegraphics[width=3.0in]{fig4.eps}}
>> \caption{\small Fidelity plotted as a function of link loss.} \label{f1}
>> \end{figure}
>> When I tried the same command using Texworks, space was left for the figures, but the figures did not display. Using pdf figures did not help. (I got a no bounding box error.)
>> What should I do?
> (Not really a TeXworks issue)
> TeXworks uses a PDF-based workflow: in any case, you should never use an
> extension with \includegraphics:
>    \includegraphics[width=3.0in]{fig4}
> Assuming a recent MiKTeX or TeX Live, auto-magic conversion will then
> take place.
> Note also that in LaTeX you really shouldn't use \centerline, which is a
> plain TeX command: use
>    \begin{figure}
>      \centering
>      \includgraphics
> instead.

I plead here for Plain TeX. Instead of

\do several things

in PLain TeX, you just write

\centerline{XeTeXPDFfile "toto.pdf" [options]}

assuming your figure has name toto.pdf.

             Jean-Claude Raoult

More information about the texworks mailing list