get height on a block of latex output

后端 未结 2 2057
孤独总比滥情好
孤独总比滥情好 2021-02-04 09:07

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

2条回答
  •  野趣味
    野趣味 (楼主)
    2021-02-04 09:18

    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
    

提交回复
热议问题