在乳胶输出块上获取高度 [英] get height on a block of latex output

查看:85
本文介绍了在乳胶输出块上获取高度的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试确定如何获取乳胶块上的高度输出( not 整个文档,以及 not 代码..而是 output block ).作为我要完成的工作的一个示例:我要使用乳胶代码

I am trying to determine how to get the height on a block of latex output (not the whole document, and not the code..but rather a block of output). As an example of what I am trying to accomplish: i were to have the latex code

$\sum_{i=0}^\infty \frac{1}{n}>\infty$ \newline hello world \newline hello universe

上面的文本块的高度取决于许多因素,包括字体,页边距大小以及文本的内容,因为更改任何这些参数都会更改输出的英寸数,但是默认情况下格式化其输出将约为2英寸高.

The height of the above block of text is dependent on a number of things-font, margin size, and of course what the text is, as changing any of these parameters changes how many inches that output would be, but with default formatting its output would be something like 2 inches high.

我希望有一个可以做到这一点的软件包!我很感激任何朝着正确方向提出的建议!

I am hoping there is a package that does this! I am appreciative of any pointers in the right direction!

提前谢谢!

乔治

推荐答案

通常,诀窍是将要测量的内容放入盒子中,然后简单地不对盒子进行排版,而是对其进行测量:

Usually, the trick is to put whatever you want to measure into a box and then simply not typeset the box, but measure it:

\newdimen\height
\setbox0=\hbox{\Huge Hello, World!}
\height=\ht0 \advance\height by \dp0
The height is: \the\height

这篇关于在乳胶输出块上获取高度的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆