I'm sure that this is something silly, but I've been beating my head against the statement \strip@pt\textwidth
giving "undefined control sequence". I'm trying to modify some drawings in TikZ widths dynamically, and there's a lot of math involved due to the fact I need to support 3 page widths. It also gives me the opportunity to learn tikz and the fp package, but I need to strip the "pt
" from the \textwidth
statement.
I'm using this document definition: \documentclass[journal,letterpaper]{IEEEtran}
If \strip@pt
is not defined, how do I define it?
edit
My minimal example:
\documentclass[journal,letterpaper]{IEEEtran}
\usepackage{fp}
\begin{document}
\newcommand\bitfieldwidth{32}
\newcommand\bitfielddivision{8}
\FPeval{\bitcolumnwidth}{(\strip@pt\textwidth) / \bitfieldwidth}
% the issue is here ^^^^^^^^^
\begin{tabular}{|c|c|}
\hline
variable & value \\
\hline
textwidth &\the\textwidth \\
\hline
columnwidth &\the\columnwidth \\
\hline
bitcolumnwidth &$\bitcolumnwidth$ \\
\hline
\end{tabular}
\end{document}
Best Answer
The macro
\strip@pt
has@
in its name, so it can only be used in a context where@
is a letter, see What do \makeatletter and \makeatother do?You can define a “user level” macro:
However, you don't need
fp
to do this, provided you just divide by an integer:will define
\bitcolumnwidth
as something that can be used in the context of a dimension: