为何我的尺寸计算偏差这么大?

为何我的尺寸计算偏差这么大?

我有一些宏来存储有关各种维度的信息。但是,当我开始按维度进行除法时,我得到的答案毫无意义。

\documentclass{article}
\usepackage[landscape]{geometry}
\makeatletter
\def\aetopmargin{0.85in}%%
\def\aebotmargin{0.5in}%%
\def\aeworkspacetopsep{4ex}
\def\aeworkspacerulesep{0.65cm}
\edef\aeworkspaceheight{\dimexpr\paperheight-\aeworkspacetopsep-\aetopmargin-\aebotmargin}
\typeout{==>Work space height===>\strip@pt\dimexpr\aeworkspaceheight}
\typeout{==>Work space rule: ===>\strip@pt\dimexpr\aeworkspacerulesep}
\typeout{==>Their quotient is===>\strip@pt\dimexpr \dimexpr\aeworkspaceheight\relax / \dimexpr\aeworkspacerulesep\relax \relax}
\makeatother
\pagestyle{empty}
\begin{document}
empty
\end{document}

当我运行这个程序时,我在终端上得到以下输出:

==>Work space height===>499.5079
==>Work space rule: ===>18.49411
==>Their quotient is===>0.00041

我是不是应该得到类似

==>Their quotient is===>27.00902...

答案1

你只能除以长度 数字,使用 etex 返回长度时,/您不能将两个长度相除以得到一个数字。因此,如果您除以一个长度,它会被转换为一个数字,因为长度是一个整数,而sp这个数字比您预期的要大得多,所以商相当小。

相关内容