OK, I admit I haven't tried my MWE without Beamer.
My goal is to use e.g \textwidth with the picture environment, and my overall goal is to include several rectangular portions of an .eps file within a picture environment.
I was trying to follow @Qrrbrbirlbel's example here: How to use \textwidth (or any variable) in a picture environment
But I can't use his geometry package options with Beamer (not sure if that is the problem, but I guess not).
Here's the MWE:
\documentclass[compress,red,notes]{beamer}
\begin{document}
\frame{\frametitle{An overview to constraint-based modeling}
\makeatletter
\def\strippt{\strip@pt}
\makeatother
\newsavebox{\toynet}
\savebox{\toynet}{
\includegraphics*[width=\textwidth, viewport=0 418 708 718, clip=true]
{SmatExample} }
\newsavebox{\toySmat}
\savebox{\toySmat}{
\includegraphics*[width=\textwidth, viewport=0 0 708 418, clip=true]
{SmatExample} }
\newsavebox{\FBAgeom}
\begin{picture}(\strippt\textwidth, \strippt\textheight)
\put(0,\strippt\textheight){\usebox{\toynet}}
\end{picture}
} % end of \frame
\end{document}
When I try to compile this, I get the following error:
No file test.nav.
<SmatExample.eps> <SmatExample.eps>
! Undefined control sequence.
\strippt ->\strip
@pt
l.27 }
% end of \frame
And here is another question I had using the same image (if you want to download the image to work with the MWE):
How to correctly clip with viewports with includegraphics and beamer columns?
Note that in my current example I haven't attempted to use the correct coefficients for \textwidth or \textheight.
