[NTG-context] Which commands to use to show setups?

Wolfgang Schuster wolfgang.schuster.lists at gmail.com
Sat Nov 24 12:29:47 CET 2018



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


More information about the ntg-context mailing list