figures with TpX

88 views
Skip to first unread message

tge...@gmail.com

unread,
Apr 13, 2011, 7:13:55 AM4/13/11
to LaTeX Users Group
Hello,

I am using TpX to generate figures for my Beamer presentations and
Thesis. Last night I had a momento lucida and discovered how to stick
the TpX code directly into my TeX file and avoid certain problems but
now I have new problems...

This (indented text) is what I pasted into my Figure environment along
with an appropriate Caption:

\begin{figure}
\centering
%\ifpdf
\setlength{\unitlength}{1bp}%
\begin{picture}(56.12, 56.12)(0,0)
\put(0,0){\includegraphics{shorteg.pdf}}
\put(28.06,24.04){\fontsize{14.23}{17.07}\selectfont
\makebox[0pt]{circle}}
\end{picture}
\caption{Some or other descriptive text.}\label{apicture}
\end{figure}

I commented out the \ifpdf as TpX gives the option to call the pdf
picture (i.e. shorteg.pdf) or the eps file. The complete code is at
the bottom of the message.

I want to do two things:

1. Set the font for the image as I want to use utopia or palatino for
the text of the document but a sans font for the images, lcmss in
particular as I get "I" with serif ends. Tahoma would be better as all
my microgaphs are numbered and labeled using a Tahoma.

2. I would like to be able to scale the picture and the text as a unit
to fit the textwidth. Simply putting [scale=1] after \begin{picture}
or after \begin[figure] doesn't seem to work (but I am not the
sharpest knife in the TeX tool shed).

This is the complete TpX code.

%<TpX v="5" ArrowsSize="0.7" StarsSize="1" DefaultFontHeight="5"
DefaultSymbolSize="30" ApproximationPrecision="0.01" PicScale="1"
Border="0" BitmapRes="20000" HatchingStep="2" DottedSize="0.5"
DashSize="1" LineWidth="0.3">
% <circle x="30" y="50" d="19.799"/>
% <text x="30" y="48.58" t="circle" h="5" halign="c"/>
%</TpX>
\begin{figure}
\centering
\ifpdf
\setlength{\unitlength}{1bp}%
\begin{picture}(56.12, 56.12)(0,0)
\put(0,0){\includegraphics{shorteg.pdf}}
\put(28.06,24.04){\fontsize{14.23}{17.07}\selectfont \makebox[0pt]
{circle}}
\end{picture}%
\else
\setlength{\unitlength}{1bp}%
\begin{picture}(56.12, 56.12)(0,0)
\put(0,0){\includegraphics{shorteg}}
\put(28.06,24.04){\fontsize{14.23}{17.07}\selectfont \makebox[0pt]
{circle}}
\end{picture}%
\fi
\end{figure}

Can I, paste it as is with the commented out bits commented in (so the
includegraphics is commented out) as a Tikzpicture. This would solve
the scaling problem I have and probably make a lot of things simpler.

Sadly, I don't have the time to learn the entire PDF manual by heart
and get away from TpX entirely. I also have LaTeXDraw but TpX seems to
have better usability and features. LaTeXDraw does give the entire
body of code to paste into TeX.

FYI, I'm using MikTeX with an old WinEdt distribution as editor.

Thanks for any useful suggestions.

Tyrone
Reply all
Reply to author
Forward
0 new messages