On 4/17/07, Vyatcheslav Yatskovsky wrote:
Hello,
I want to insert "hotkeys", surrounded by a round frame, into a paragraph text. I almost have achieve it, except of proper vertical alignment.
Now it is the frame that is aligned with the text bottom line. But, I want the text inside a frame to be aligned with the rest of line.
(I found that \vcenter solves the problem but I don't know how to merge it with \defineframed. Or, maybe there is better solution?)
\defineframed [hotkey][height=\lineheight,offset=4pt,corner=00]
\starttext Another way to start or stop the device is to use hotkey. If the application is active (that is, sits on the foreground of your desktop), the hotkey is {\hotkey{Space}}. If it is not active, then use global hotkey -- \hotkey{Alt}+\hotkey{Space}. \stoptext
Perhaps \inframed could solve your problem? It takes case for proper baseline placement. There is no \defineinframed equivalent (perhaps there should be some?), but you can still define it in the old TeX-ish way: \def\hotkey#1{\inframed[corner=00]{\ #1\ }} Offset is a bit tricky: \framed only supports a single set of offset parameters (you cannot set left/right/top/bottom offset separately). Wolfgang (Schuster) has written a patch for leftoffset/rightoffset, but if it's not (until it's not) part of the core, you can still add fake space before or after the text if you're using framed with a \def-ined command. \inframed[height=\lineheight] doesn't work properly. (It might be a bug, an oversight or simply something that you're not supposed to use anyway ;) Mojca