Jeroen via ntg-context schrieb am 19.05.2023 um 14:22:
In order to get some inline framed verbatim text, I have in the past always used the following:
\starttext
This is an \inframed [frame=on, corner=00, radius=2mm,offset=-1.5pt] {\ttx \bf example}
\stoptext
Since this has come-up more and more often, I created the following:
\define[1]\infr{ \inframed [frame=on, corner=00, radius=2mm,offset=-1.5pt]{#1}}
\starttext
This is an \infr{example}
\stoptext
This works fine except that I cannot get the text in verbatim/teletype. I have tried style=mono and style={\ttx \bf} but nothing seems to work.
\framed has no style key, you have to use the foregroundstyle to change font style, size etc. To create your own \framed (or \inframed when you add location=low) you can use the \defineframed command: \defineframed [infr] [location=low, frame=on, corner=00, radius=2mm, %offset=-1.5pt, foregroundstyle=\tt\bfx] \starttext This is an \infr{example} \stoptext Wolfgang