ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* bug with headcommand=type in definedescription?
@ 2012-01-29 11:39 Pablo Rodríguez
  2012-01-29 12:05 ` Wolfgang Schuster
  0 siblings, 1 reply; 11+ messages in thread
From: Pablo Rodríguez @ 2012-01-29 11:39 UTC (permalink / raw)
  To: mailing list for ConTeXt users

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
___________________________________________________________________________________
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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: bug with headcommand=type in definedescription?
  2012-01-29 11:39 bug with headcommand=type in definedescription? Pablo Rodríguez
@ 2012-01-29 12:05 ` Wolfgang Schuster
  2012-01-29 15:17   ` Pablo Rodríguez
  0 siblings, 1 reply; 11+ messages in thread
From: Wolfgang Schuster @ 2012-01-29 12:05 UTC (permalink / raw)
  To: mailing list for ConTeXt users


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
___________________________________________________________________________________
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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: bug with headcommand=type in definedescription?
  2012-01-29 12:05 ` Wolfgang Schuster
@ 2012-01-29 15:17   ` Pablo Rodríguez
  2012-01-29 16:49     ` Aditya Mahajan
  2012-01-29 17:24     ` Wolfgang Schuster
  0 siblings, 2 replies; 11+ messages in thread
From: Pablo Rodríguez @ 2012-01-29 15:17 UTC (permalink / raw)
  To: mailing list for ConTeXt users

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
___________________________________________________________________________________
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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: bug with headcommand=type in definedescription?
  2012-01-29 15:17   ` Pablo Rodríguez
@ 2012-01-29 16:49     ` Aditya Mahajan
  2012-01-29 17:08       ` Pablo Rodríguez
  2012-01-29 17:24     ` Wolfgang Schuster
  1 sibling, 1 reply; 11+ messages in thread
From: Aditya Mahajan @ 2012-01-29 16:49 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On Jan 29, 2012, at 10:17 AM, Pablo Rodríguez <oinos@web.de> wrote:

> 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
___________________________________________________________________________________
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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: bug with headcommand=type in definedescription?
  2012-01-29 16:49     ` Aditya Mahajan
@ 2012-01-29 17:08       ` Pablo Rodríguez
  0 siblings, 0 replies; 11+ messages in thread
From: Pablo Rodríguez @ 2012-01-29 17:08 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On 01/29/2012 05:49 PM, Aditya Mahajan wrote:
> On Jan 29, 2012, at 10:17 AM, Pablo Rodríguez <oinos@web.de> 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
___________________________________________________________________________________
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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: bug with headcommand=type in definedescription?
  2012-01-29 15:17   ` Pablo Rodríguez
  2012-01-29 16:49     ` Aditya Mahajan
@ 2012-01-29 17:24     ` Wolfgang Schuster
  2012-01-29 17:42       ` Pablo Rodríguez
  1 sibling, 1 reply; 11+ messages in thread
From: Wolfgang Schuster @ 2012-01-29 17:24 UTC (permalink / raw)
  To: mailing list for ConTeXt users


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
___________________________________________________________________________________
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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: bug with headcommand=type in definedescription?
  2012-01-29 17:24     ` Wolfgang Schuster
@ 2012-01-29 17:42       ` Pablo Rodríguez
  2012-01-29 18:09         ` Wolfgang Schuster
  0 siblings, 1 reply; 11+ messages in thread
From: Pablo Rodríguez @ 2012-01-29 17:42 UTC (permalink / raw)
  To: mailing list for ConTeXt users

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
___________________________________________________________________________________
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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: bug with headcommand=type in definedescription?
  2012-01-29 17:42       ` Pablo Rodríguez
@ 2012-01-29 18:09         ` Wolfgang Schuster
  2012-01-29 18:19           ` Pablo Rodríguez
  2012-01-29 18:38           ` Aditya Mahajan
  0 siblings, 2 replies; 11+ messages in thread
From: Wolfgang Schuster @ 2012-01-29 18:09 UTC (permalink / raw)
  To: mailing list for ConTeXt users


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
___________________________________________________________________________________
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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: bug with headcommand=type in definedescription?
  2012-01-29 18:09         ` Wolfgang Schuster
@ 2012-01-29 18:19           ` Pablo Rodríguez
  2012-01-29 18:38           ` Aditya Mahajan
  1 sibling, 0 replies; 11+ messages in thread
From: Pablo Rodríguez @ 2012-01-29 18:19 UTC (permalink / raw)
  To: mailing list for ConTeXt users

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
___________________________________________________________________________________
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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: bug with headcommand=type in definedescription?
  2012-01-29 18:09         ` Wolfgang Schuster
  2012-01-29 18:19           ` Pablo Rodríguez
@ 2012-01-29 18:38           ` Aditya Mahajan
  2012-01-29 18:53             ` Wolfgang Schuster
  1 sibling, 1 reply; 11+ messages in thread
From: Aditya Mahajan @ 2012-01-29 18:38 UTC (permalink / raw)
  To: mailing list for ConTeXt users

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
___________________________________________________________________________________
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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: bug with headcommand=type in definedescription?
  2012-01-29 18:38           ` Aditya Mahajan
@ 2012-01-29 18:53             ` Wolfgang Schuster
  0 siblings, 0 replies; 11+ messages in thread
From: Wolfgang Schuster @ 2012-01-29 18:53 UTC (permalink / raw)
  To: mailing list for ConTeXt users


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
___________________________________________________________________________________
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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2012-01-29 18:53 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-01-29 11:39 bug with headcommand=type in definedescription? Pablo Rodríguez
2012-01-29 12:05 ` Wolfgang Schuster
2012-01-29 15:17   ` Pablo Rodríguez
2012-01-29 16:49     ` Aditya Mahajan
2012-01-29 17:08       ` Pablo Rodríguez
2012-01-29 17:24     ` Wolfgang Schuster
2012-01-29 17:42       ` Pablo Rodríguez
2012-01-29 18:09         ` Wolfgang Schuster
2012-01-29 18:19           ` Pablo Rodríguez
2012-01-29 18:38           ` Aditya Mahajan
2012-01-29 18:53             ` 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).