bug with headcommand=type in definedescription?
Hi there, I have the following sample that works with \type: \definedescription[abc][headcommand=\tfa] \starttext \abc{\type{\startext}} not working \stoptext But if I use the headcommand=type option: \definedescription[abc][headcommand=\type] \starttext \abc{\startext} not working \stoptext it gives an error. Am I doing something wrong or have I hit a bug? Thanks for your help, Pablo -- http://www.oudeis.tk
Am 29.01.2012 um 12:39 schrieb Pablo Rodríguez:
Hi there,
I have the following sample that works with \type:
\definedescription[abc][headcommand=\tfa] \starttext \abc{\type{\startext}} not working \stoptext
But if I use the headcommand=type option:
\definedescription[abc][headcommand=\type] \starttext \abc{\startext} not working \stoptext
it gives an error.
Am I doing something wrong or have I hit a bug?
The \type has to change the meaning of "\” to make it a normal symbol but when you use it with headcommand it is to late. A better command to show command is \tex{…} which appends a save version of "\” in front of the argument. \definedescription[abc][headcommand=\tex] \starttext \abc{startext} not working \stoptext Wolfgang
On 01/29/2012 01:05 PM, Wolfgang Schuster wrote:
[...]
The \type has to change the meaning of "\” to make it a normal symbol but when you use it with headcommand it is to late. A better command to show command is \tex{…} which appends a save version of "\” in front of the argument.
\definedescription[abc][headcommand=\tex] \starttext \abc{startext} not working \stoptext
Thanks for your reply, Wolfgang. I'm afraid it doesn't work: \definedescription[abc][headcommand=\tex] \starttext \abc{startext} not working \tex{stoptext} \stoptext \tex{…} command works, but not if invoked from headcommand. Thanks for your help, Pablo -- http://www.oudeis.tk
On Jan 29, 2012, at 10:17 AM, Pablo Rodríguez
On 01/29/2012 01:05 PM, Wolfgang Schuster wrote:
[...]
The \type has to change the meaning of "\” to make it a normal symbol but when you use it with headcommand it is to late. A better command to show command is \tex{…} which appends a save version of "\” in front of the argument.
\definedescription[abc][headcommand=\tex] \starttext \abc{startext} not working \stoptext
Thanks for your reply, Wolfgang.
I'm afraid it doesn't work:
\definedescription[abc][headcommand=\tex] \starttext \abc{startext} not working \tex{stoptext} \stoptext
\tex{…} command works, but not if invoked from headcommand.
(untested) descriptions use titlecommand rather than headcommand. Aditya
On 01/29/2012 05:49 PM, Aditya Mahajan wrote:
On Jan 29, 2012, at 10:17 AM, Pablo Rodríguez
wrote: [...] I'm afraid it doesn't work:
\definedescription[abc][headcommand=\tex] \starttext \abc{startext} not working \tex{stoptext} \stoptext
\tex{…} command works, but not if invoked from headcommand.
(untested) descriptions use titlecommand rather than headcommand.
Thanks, Aditya, for your reply. I'm afraid it doesn't work. According to https://bitbucket.org/wolfs/commands, \setupdescriptions uses headcommand and \setupenumerations uses titlecommand. Thanks anyway, Pablo -- http://www.oudeis.tk
Am 29.01.2012 um 16:17 schrieb Pablo Rodríguez:
On 01/29/2012 01:05 PM, Wolfgang Schuster wrote:
[...]
The \type has to change the meaning of "\” to make it a normal symbol but when you use it with headcommand it is to late. A better command to show command is \tex{…} which appends a save version of "\” in front of the argument.
\definedescription[abc][headcommand=\tex] \starttext \abc{startext} not working \stoptext
Thanks for your reply, Wolfgang.
I'm afraid it doesn't work:
\definedescription[abc][headcommand=\tex] \starttext \abc{startext} not working \tex{stoptext} \stoptext
\tex{…} command works, but not if invoked from headcommand.
Thanks for your help,
I tested it now myself and what you want doesn’t work in this way. As you can see in the example below “headcommand=\tex” does work when you also use “location=command” but only with some limitations, e.g. the font is wrong and you loose also the option the change the location of the title. %\definedescription[abc][location=command,headcommand=\quotation] \definedescription[abc][location=command,headcommand=\tex] \starttext \abc{startext} not working \tex{stoptext} \stoptext Wolfgang
On 01/29/2012 06:24 PM, Wolfgang Schuster wrote:
[...]
I tested it now myself and what you want doesn’t work in this way. As you can see in the example below “headcommand=\tex” does work when you also use “location=command” but only with some limitations, e.g. the font is wrong and you loose also the option the change the location of the title.
Thanks for your reply, Wolfgang. The font can be fixed using headstyle, but the location of the title is important for the document. Thanks for your help, Pablo -- http://www.oudeis.tk
Am 29.01.2012 um 18:42 schrieb Pablo Rodríguez:
On 01/29/2012 06:24 PM, Wolfgang Schuster wrote:
[...]
I tested it now myself and what you want doesn’t work in this way. As you can see in the example below “headcommand=\tex” does work when you also use “location=command” but only with some limitations, e.g. the font is wrong and you loose also the option the change the location of the title.
Thanks for your reply, Wolfgang.
The font can be fixed using headstyle, but the location of the title is important for the document.
You can use a two step mechanism where the commands you use in the document pass the content to a internal description environment. \usemodule[annotation] \definedescription[abcdescription] \define[2]\AbcCommand {\startabcdescription{\tex{\placeannotationtitle}}% \placeannotationcontent \stopabcdescription} \defineannotation[abc][alternative=command,command=\AbcCommand] \starttext %\abc{starttext}{This is a description for \tex{starttext}} \abc[title=starttext]{This is a description for \tex{starttext}} \startabc[title=starttext]This is a description for \tex{starttext}\stopabc \stoptext Wolfgang
On 01/29/2012 07:09 PM, Wolfgang Schuster wrote:
The font can be fixed using headstyle, but the location of the title is important for the document.
You can use a two step mechanism where the commands you use in the document pass the content to a internal description environment.
\usemodule[annotation]
\definedescription[abcdescription]
\define[2]\AbcCommand {\startabcdescription{\tex{\placeannotationtitle}}% \placeannotationcontent \stopabcdescription}
\defineannotation[abc][alternative=command,command=\AbcCommand]
\starttext
%\abc{starttext}{This is a description for \tex{starttext}}
\abc[title=starttext]{This is a description for \tex{starttext}}
\startabc[title=starttext]This is a description for \tex{starttext}\stopabc
\stoptext
Thanks for the fix, Wolfgang. Pablo -- http://www.oudeis.tk
On Sun, 29 Jan 2012, Wolfgang Schuster wrote:
You can use a two step mechanism where the commands you use in the document pass the content to a internal description environment.
\usemodule[annotation]
\definedescription[abcdescription]
\defineannotation[abc][alternative=command,command=\AbcCommand]
If you are using the annotation module, why use descriptions at all? Is there some feature that is offered by descriptions that is not possible using annotation module (it has been some time since I looked into the annotation module). Aditya
Am 29.01.2012 um 19:38 schrieb Aditya Mahajan:
On Sun, 29 Jan 2012, Wolfgang Schuster wrote:
You can use a two step mechanism where the commands you use in the document pass the content to a internal description environment.
\usemodule[annotation]
\definedescription[abcdescription]
\defineannotation[abc][alternative=command,command=\AbcCommand]
If you are using the annotation module, why use descriptions at all? Is there some feature that is offered by descriptions that is not possible using annotation module (it has been some time since I looked into the annotation module).
The annotation module doesn’t provide as many options to place the title as the description environment and there is also no option for a closing symbol. What the module can do use to store the content of the environment and pass it either to one of the predefined layouts or you create your own layout and pass the content and title to it. Wolfgang
participants (3)
-
Aditya Mahajan
-
Pablo Rodríguez
-
Wolfgang Schuster