[NTG-context] hotkey and strut again
Peter Münster
pmlists at free.fr
Fri May 4 21:01:00 CEST 2007
Hello,
I'm using the following command for typesetting "hotkeys":
\def\hotkey#1{\inframed[background=screen,offset=overlay,
height=\lineheight,corner=00]{~#1~}}
Now I realize, that with an argument without depth (\hotkey{Alt} for
example), the text is not aligned.
Same result with strut=no,yes,global.
With strut=local the text without depth is well aligned, but no more the
text *with* depth ("Space" for example). Here my test-file:
\setupcolors[state=start]
\def\Test#1{
\def\hotkey##1{\inframed[background=screen,offset=overlay,
height=\lineheight,corner=00,strut=#1]{~##1~}}
strut=#1: bla \hotkey{Alt} bla \hotkey{Space} bla\blank}
\starttext
\Test{no}
\Test{yes}
\Test{global}
\Test{local}
\stoptext
Any hint is appreciated!
Cheers, Peter
P.S.: My workaround:
\def\hotkey#1{\inframed[background=screen,offset=overlay,
height=\lineheight,corner=00]{~\vphantom{Sp}#1~}}
--
http://pmrb.free.fr/contact/
More information about the ntg-context
mailing list