Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

New answers tagged


The two distances marked with blue lines depend on the items in both lines, except the blue line next to “f”, which obviously only depends on the letter. So you can't “know” them in general. TeX tries to achieve constant distance b between consecutive lines (the value is stored in the parameter \baselineskip). In order to achieve this goal, TeX measures a ...


e-tex allows you to get the font dimens of each charcter without needing to box it, this shows x and y of the current font \documentclass{article} \begin{document} \typeout{x} \showthe\fontcharht\font`x \showthe\fontchardp\font`x \showthe\fontcharwd\font`x \typeout{y} \showthe\fontcharht\font`y \showthe\fontchardp\font`y \showthe\fontcharwd\font`y \end{...


There is no way for TeX to know the exact size of the glyph, TeX only knows the box around them, so the small blue line at the f in the second row can't be determined by TeX alone. The other lengths are determinable, you can measure the size of any box you can typeset (the following is in plain TeX syntax): \setbox0\hbox{x} height: \the\ht0\par depth: \the\...


If you want to rescale all coordinates in a tikzpicture, you can just use scale. Since you seem to be loading tikz you can use its commands to convert lengths, i.e. there is no need to load extra packages, but you really do not have to do that by hand. \documentclass{beamer} \usepackage{tikz} \begin{document} \begin{frame}[t] \frametitle{Convert coordinates ...


You can use xfp: \documentclass{article} \usepackage{xfp} \NewExpandableDocumentCommand{\pptsize}{m}{\fpeval{#1*128/254}pt} \begin{document} \pptsize{10cm} \end{document} This prints 143.3839667679335pt


There is nothing equivalent (that I know of), but you can implement your own (and by implement I mean copy from latex.ltx and change the syntax). I defined \SetToHeight, \SetToWidth, and \SetToDepth, that do the same as the LaTeX2e's variants. However, for the specific case of a space, you can use \fontdimen2\font, which will get the width of a space in the ...


\coffin_new:N\spaceCoffin \hcoffin_set:Nn\spaceCoffin{\ } % space width \dim_eval:n{\coffin_wd:N\spaceCoffin} \box_new:N\spaceBox \hbox_set:Nn\spaceBox{\ } % space width \dim_eval:n{\box_wd:N\spaceBox}


The last coordinate in your code is not what you think it is. To see this, I added \path (b); just before \pgfgetlastxy{\xb}{\yb}. The reason for the discrepancy is coordinate [label=above right:b,inner sep=0pt] in your code, which adds the label after the coordinate. So you compare the coordinate of the label to your analytic computation. If you use the ...

Top 50 recent answers are included