ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* Setting the style and conversion of the reference numbers for the \in command
@ 2014-05-22 23:09 Maggyero
  2014-05-23  2:57 ` Wolfgang Schuster
  0 siblings, 1 reply; 5+ messages in thread
From: Maggyero @ 2014-05-22 23:09 UTC (permalink / raw)
  To: ntg-context


[-- Attachment #1.1: Type: text/plain, Size: 467 bytes --]

Thank you Wolfgang, your hack is perfect. Hans, what do you think about
adding a style and color key in \setupreferencestructureprefix to avoid
having to use this defineprocessor hack?

And by the way, the name \setupreferencestructureprefix does not sound
really natural to me because we are talking about a reference NUMBER and
there is not always a prefix. What about changing it to something like
\setupreference or \setupreferencenumber (like \setuppagenumber)?

[-- Attachment #1.2: Type: text/html, Size: 605 bytes --]

[-- Attachment #2: Type: text/plain, Size: 485 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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

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

* Re: Setting the style and conversion of the reference numbers for the \in command
  2014-05-22 23:09 Setting the style and conversion of the reference numbers for the \in command Maggyero
@ 2014-05-23  2:57 ` Wolfgang Schuster
  0 siblings, 0 replies; 5+ messages in thread
From: Wolfgang Schuster @ 2014-05-23  2:57 UTC (permalink / raw)
  To: mailing list for ConTeXt users


[-- Attachment #1.1: Type: text/plain, Size: 850 bytes --]


Am 23.05.2014 um 01:09 schrieb Maggyero <maggyero@gmail.com>:

> Thank you Wolfgang, your hack is perfect. Hans, what do you think about adding a style and color key in \setupreferencestructureprefix to avoid having to use this defineprocessor hack?

The processor command is meant for this purpose to apply to a apply a different format for certain counters etc.

> And by the way, the name \setupreferencestructureprefix does not sound really natural to me because we are talking about a reference NUMBER and there is not always a prefix. What about changing it to something like \setupreference or \setupreferencenumber (like \setuppagenumber)?

I agree that the name itself isn’t very good but you have to know that section numbers are considered as prefixes when they appear in front of the figure, table etc. counters.

Wolfgang


[-- Attachment #1.2: Type: text/html, Size: 1395 bytes --]

[-- Attachment #2: Type: text/plain, Size: 485 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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

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

* Re: Setting the style and conversion of the reference numbers for the \in command
  2014-05-22 16:51 Maggyero
@ 2014-05-22 17:09 ` Wolfgang Schuster
  0 siblings, 0 replies; 5+ messages in thread
From: Wolfgang Schuster @ 2014-05-22 17:09 UTC (permalink / raw)
  To: mailing list for ConTeXt users


Am 22.05.2014 um 18:51 schrieb Maggyero <maggyero@gmail.com>:

> I have found how to get the conversion of numbers in references (the 'prefixconversion' key in '\setupreferencestructureprefix' command), but I still do not know how to change their style. I have tried the 'style' key and 'prefixstyle' key but without success.
> 
> After checking in ConTeXt source, I have realised that there is no such 'style' key for the '\setupreferencestructureprefix' command. Is there another command to change the style? If not, it would be great if Hans could add that feature.
> 
> Minimal example:
> 
> \setupreferencestructureprefix[section][default][%
>     prefixconversion=Romannumerals,
>     prefixstyle=\bf]

\defineprocessor[sectionstyle][style=italic,color=red]
\defineconversionset[sectionconversion][][sectionstyle->Romannumerals]
\setupreferencestructureprefix[section][default][prefixconversionset=sectionconversion]

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] 5+ messages in thread

* Setting the style and conversion of the reference numbers for the \in command
@ 2014-05-22 16:51 Maggyero
  2014-05-22 17:09 ` Wolfgang Schuster
  0 siblings, 1 reply; 5+ messages in thread
From: Maggyero @ 2014-05-22 16:51 UTC (permalink / raw)
  To: ntg-context


[-- Attachment #1.1: Type: text/plain, Size: 725 bytes --]

I have found how to get the conversion of numbers in references (the
'prefixconversion' key in '\setupreferencestructureprefix' command), but I
still do not know how to change their style. I have tried the 'style' key
and 'prefixstyle' key but without success.

After checking in ConTeXt source, I have realised that there is no such
'style' key for the '\setupreferencestructureprefix' command. Is there
another command to change the style? If not, it would be great if Hans
could add that feature.

Minimal example:

\setupreferencestructureprefix[section][default][%
    prefixconversion=Romannumerals,
    prefixstyle=\bf]

\starttext
\input knuth (Cf. \in{section}[mysection].)
\section[mysection]{My section}
\stoptext

[-- Attachment #1.2: Type: text/html, Size: 975 bytes --]

[-- Attachment #2: Type: text/plain, Size: 485 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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

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

* Setting the style and conversion of the reference numbers for the \in command
@ 2014-05-21 12:37 Maggyero
  0 siblings, 0 replies; 5+ messages in thread
From: Maggyero @ 2014-05-21 12:37 UTC (permalink / raw)
  To: ntg-context


[-- Attachment #1.1: Type: text/plain, Size: 199 bytes --]

I would like to change the style and conversion of reference numbers for
the \in{myprefix}{mysuffix}[mylabel] command. Is there a
\setupreference[numberstyle=, numberconversion=] command to do that?

[-- Attachment #1.2: Type: text/html, Size: 221 bytes --]

[-- Attachment #2: Type: text/plain, Size: 485 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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

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

end of thread, other threads:[~2014-05-23  2:57 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-05-22 23:09 Setting the style and conversion of the reference numbers for the \in command Maggyero
2014-05-23  2:57 ` Wolfgang Schuster
  -- strict thread matches above, loose matches on Subject: below --
2014-05-22 16:51 Maggyero
2014-05-22 17:09 ` Wolfgang Schuster
2014-05-21 12:37 Maggyero

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).