ConTeXt's equivalent of raisebox
How can I make vertical microadjustments to individual characters in ConTeXt? In LaTeX I would do it with ``` \documentclass{article} \begin{document} \raisebox{-1pt}{f}oo \end{document} ``` however the following doesn't work ``` \starttext \raisebox{-1pt}{f}oo \stoptext ```
noib3 via ntg-context schrieb am 11.10.2021 um 00:16:
How can I make vertical microadjustments to individual characters in ConTeXt?
In LaTeX I would do it with
``` \documentclass{article} \begin{document} \raisebox{-1pt}{f}oo \end{document} ```
however the following doesn't work
``` \starttext \raisebox{-1pt}{f}oo \stoptext ```
The \raisebox command expects a box for the second argument. A better solution is to use the \offset command but in both cases you need \dontleavehmode at the start of a paragraph. %%%% begin example \starttext \dontleavehmode\raisebox{1pt}\hbox{f}oo \dontleavehmode\offset[y=-1pt]{f}oo \stoptext %%%% end example Wolfgang
On 10/11/2021 12:16 AM, noib3 via ntg-context wrote:
How can I make vertical microadjustments to individual characters in ConTeXt?
In LaTeX I would do it with
``` \documentclass{article} \begin{document} \raisebox{-1pt}{f}oo \end{document} ```
however the following doesn't work
``` \starttext \raisebox{-1pt}{f}oo \stoptext depends on if you want to keep kerning and ligature building etc
\starttext xx\glyph yoffset 1pt `f\relax oo xx\glyph yoffset 1pt `f\relax \glyph yoffset -1pt `o\relax \glyph yoffset 2pt `o\relax xx\glyph yoffset 1pt `f\relax fi \dontleavehmode\offset[y=-1pt]{f}oo \stoptext ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl -----------------------------------------------------------------
participants (3)
-
Hans Hagen
-
noib3
-
Wolfgang Schuster