Hi Wolfgang, thank you very much for your code, which works very well. I still have a few doubts about one thing: is it possible that the commands you suggested to me do not work with all ConTeXt commands? For example, if I write \usemodule [setups] \starttext \showdefinition [starttyping] \stoptext I get in the PDF missing: starttyping It's correct? The second question concerns the \definition command. As you can see in the attached PDF, a «and 1» appears below the definition. It's correct? Thank you in advance Il giorno sab 24 nov 2018 alle ore 12:29 Wolfgang Schuster < wolfgang.schuster.lists@gmail.com> ha scritto:
Tommaso Gordini schrieb am 24.11.18 um 11:45:
Hello, list.
In my ConTeXt guide, I need to show the syntax of ConTeXt commands.
Below I paste a MWE showing the different possible commands, but I do not know if there are others. I see, however, that the result is different depending on the command used.
Do you have any advice to give to me? Which of the commands in the code should I use in a guide? Or better: do they have to be used according to needs?
Are there other commands of this kind?
\usemodule[setups]
\starttext
When you describe a command, e.g. \type{\startdescription{\cmdbasicsetup[...]} ... \stopdescription}:
\startbuffer [basicsetup] \cmdbasicsetup [startxtable] \stopbuffer
\typebuffer [basicsetup] \getbuffer [basicsetup]
When you show the syntax of a command without the options:
\startbuffer [shortsetup] \cmdshortsetup [startxtable] \stopbuffer
\typebuffer [shortsetup] \getbuffer [shortsetup]
When you show the syntax of a command with the options:
\startbuffer [fullsetup] \cmdfullsetup [startxtable] \stopbuffer
\typebuffer [fullsetup] \getbuffer [fullsetup]
When you want to show the name of a command (similar to \tex{type}):
\startbuffer [internal] \cmdinternal {startxtable} \stopbuffer
\typebuffer [internal] \getbuffer [internal]
When you want to show the syntax of a command as a float:
\startbuffer [showdefinition] \showdefinition [startxtable] \stopbuffer
\typebuffer [showdefinition] \getbuffer [showdefinition]
When you want to refer to the definition:
\startbuffer [definition] \definition [startxtable] %\definition [startxtable,startembeddedxtable] \stopbuffer
\typebuffer [definition] \getbuffer [definition]
\page
When you have a generated command (e.g. \tex {placefigure}):
\startbuffer [instance] \cmdbasicsetupinstance {placefloat} {figure} \cmdshortsetupinstance {placefloat} {figure} \cmdfullsetupinstance {placefloat} {figure} \stopbuffer
\typebuffer [instance] \getbuffer [instance]
\stoptext
Wolfgang