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
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

Reply via email to