* Which commands to use to show setups?
@ 2018-11-24 10:45 Tommaso Gordini
2018-11-24 11:29 ` Wolfgang Schuster
0 siblings, 1 reply; 4+ messages in thread
From: Tommaso Gordini @ 2018-11-24 10:45 UTC (permalink / raw)
To: ntg-context
[-- Attachment #1.1: Type: text/plain, Size: 978 bytes --]
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?
Thank you in advance
Tommy
\usemodule[x-setups-basics]
\loadsetups[context-en]
\starttext
\showsetup[centerline]
\showsetup[starttyping:instance]
\showsetup[starttyping:instance:typing]
\cmdfullsetup{section:instance}
\cmdfullsetup{section:instance:chapter}
\cmdfullsetup{section:instance:ownnumber:chapter}
\cmdfullsetup{section:instance}
\cmdfullsetup{section:instance:chapter}
\cmdfullsetup{section:instance:ownnumber:chapter}
\showrootvalues[head]
\showinstancevalues[head][chapter]
\stoptext
[-- Attachment #1.2: Type: text/html, Size: 4954 bytes --]
[-- Attachment #2: Type: text/plain, Size: 492 bytes --]
___________________________________________________________________________________
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
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Which commands to use to show setups?
2018-11-24 10:45 Which commands to use to show setups? Tommaso Gordini
@ 2018-11-24 11:29 ` Wolfgang Schuster
2018-11-25 8:03 ` Tommaso Gordini
0 siblings, 1 reply; 4+ messages in thread
From: Wolfgang Schuster @ 2018-11-24 11:29 UTC (permalink / raw)
To: mailing list for ConTeXt users, Tommaso Gordini
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
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Which commands to use to show setups?
2018-11-24 11:29 ` Wolfgang Schuster
@ 2018-11-25 8:03 ` Tommaso Gordini
2018-11-25 10:01 ` Wolfgang Schuster
0 siblings, 1 reply; 4+ messages in thread
From: Tommaso Gordini @ 2018-11-25 8:03 UTC (permalink / raw)
To: wolfgang.schuster.lists; +Cc: ntg-context
[-- Attachment #1.1: Type: text/plain, Size: 2948 bytes --]
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
>
[-- Attachment #1.2: Type: text/html, Size: 4095 bytes --]
[-- Attachment #2: setups-1.tex --]
[-- Type: application/x-tex, Size: 421 bytes --]
[-- Attachment #3: setups-1.pdf --]
[-- Type: application/pdf, Size: 21587 bytes --]
[-- Attachment #4: Type: text/plain, Size: 492 bytes --]
___________________________________________________________________________________
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
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Which commands to use to show setups?
2018-11-25 8:03 ` Tommaso Gordini
@ 2018-11-25 10:01 ` Wolfgang Schuster
0 siblings, 0 replies; 4+ messages in thread
From: Wolfgang Schuster @ 2018-11-25 10:01 UTC (permalink / raw)
To: Tommaso Gordini; +Cc: ntg-context
[-- Attachment #1.1: Type: text/plain, Size: 4035 bytes --]
Hi Tommaso,
\startttyping is a generated command (\definetyping[typing]) and to show
the command with \showdefinition you have to use
\showdefinition [starttyping:instance:typing]
or
\showdefinition [starttyping:instance:argument:typing]
A complete list with all arguments can be found in setup-mapping-en.pdf.
The output of \definition is wrong because there is a wrong check for
the number
of arguments for the command (because you can pass a list of commands).
The \showdefinition command needs also a small change because when you
use a instance (e.g. \showdefinition [starttyping:instance:typing]) the
caption
shows the passed argument (e.g. Definition 1 \starttyping:instance:typing)
and not the correct command (e.g. Definition 1 \starttyping).
Wolfgang
Tommaso Gordini schrieb am 25.11.18 um 09:03:
> 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
> <mailto: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
>
[-- Attachment #1.2: Type: text/html, Size: 5419 bytes --]
[-- Attachment #2: Type: text/plain, Size: 492 bytes --]
___________________________________________________________________________________
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
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2018-11-25 10:01 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-11-24 10:45 Which commands to use to show setups? Tommaso Gordini
2018-11-24 11:29 ` Wolfgang Schuster
2018-11-25 8:03 ` Tommaso Gordini
2018-11-25 10:01 ` Wolfgang Schuster
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).