ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* Numbers in appendix roman, but want arabic
@ 2015-02-13  8:45 Mikael P. Sundqvist
  2015-02-13 17:20 ` Rik Kabel
  2015-02-14 17:32 ` Wolfgang Schuster
  0 siblings, 2 replies; 5+ messages in thread
From: Mikael P. Sundqvist @ 2015-02-13  8:45 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Hi,

with the example below, I have two problems (that are probably
related). In the appendix, the Theorem is numbered "Theorem II"
instead of "Theorem 2", i.e. roman numbers are used instead of arabic
ones.

Also, when I refer to Theorem 1 from the appendix , it says "Theorem
I". Again with roman number instead of arabic. I would prefer "Theorem
1".

So, the question reads: How can I get arabic numbers also in the appendix?

(The appendix itself has the letter A as I want it to)

/Mikael

\starttext

\defineenumeration[Theorem]


\defineconversionset [bodypart:sectioncounter] [n,n,n] [n]
\defineconversionset [appendix:sectioncounter] [n,n,A] [n]
\setuphead[chapter,section][sectionconversionset=sectioncounter]

\chapter{Foo}
\startTheorem[thm:main]
This is a theorem.
\stopTheorem


\startappendices
\title{Appendix}

\section{This is the first appendix}

\startTheorem
This is another theorem.
\stopTheorem

What if we refer to the first theorem, Theorem~\in[thm:main]?

\stopappendices
\stoptext
___________________________________________________________________________________
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: Numbers in appendix roman, but want arabic
  2015-02-13  8:45 Numbers in appendix roman, but want arabic Mikael P. Sundqvist
@ 2015-02-13 17:20 ` Rik Kabel
  2015-02-13 20:30   ` Mikael P. Sundqvist
  2015-02-14 17:32 ` Wolfgang Schuster
  1 sibling, 1 reply; 5+ messages in thread
From: Rik Kabel @ 2015-02-13 17:20 UTC (permalink / raw)
  To: ntg-context


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

On 2015-02-13 03:45, Mikael P. Sundqvist wrote:
> Hi,
>
> with the example below, I have two problems (that are probably
> related). In the appendix, the Theorem is numbered "Theorem II"
> instead of "Theorem 2", i.e. roman numbers are used instead of arabic
> ones.
>
> Also, when I refer to Theorem 1 from the appendix , it says "Theorem
> I". Again with roman number instead of arabic. I would prefer "Theorem
> 1".
>
> So, the question reads: How can I get arabic numbers also in the appendix?
>
> (The appendix itself has the letter A as I want it to)
>
> /Mikael
>
> \starttext
>
> \defineenumeration[Theorem]
>
>
> \defineconversionset [bodypart:sectioncounter] [n,n,n] [n]
> \defineconversionset [appendix:sectioncounter] [n,n,A] [n]
> \setuphead[chapter,section][sectionconversionset=sectioncounter]
>
> \chapter{Foo}
> \startTheorem[thm:main]
> This is a theorem.
> \stopTheorem
>
>
> \startappendices
> \title{Appendix}
>
> \section{This is the first appendix}
>
> \startTheorem
> This is another theorem.
> \stopTheorem
>
> What if we refer to the first theorem, Theorem~\in[thm:main]?
>
> \stopappendices
> \stoptext
> ___________________________________________________________________________________
>
In a document that has figures numbered by chapter, I use the following 
so that I get
Figure J.5 instead of J.V -- perhaps this will provide a starting point:

    %%---------------------------------------------------------------------%%
    %% This ensures that appendix figures have numeric, not Roman,
    numbers %%
    %%---------------------------------------------------------------------%%

    \defineconversionset [appendix:floatconversionset] [] [n]
    \setupcaption[numberconversionset=floatconversionset]


-- 
rik

[-- Attachment #1.2: Type: text/html, Size: 2203 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: Numbers in appendix roman, but want arabic
  2015-02-13 17:20 ` Rik Kabel
@ 2015-02-13 20:30   ` Mikael P. Sundqvist
  0 siblings, 0 replies; 5+ messages in thread
From: Mikael P. Sundqvist @ 2015-02-13 20:30 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On Fri, Feb 13, 2015 at 6:20 PM, Rik Kabel <context@rik.users.panix.com> wrote:
> \defineconversionset [appendix:floatconversionset] [] [n]
> \setupcaption[numberconversionset=floatconversionset]


Thank you very much!

\defineconversionset [appendix:enumconversionset] [] [n]
\setupenumeration[numberconversionset=enumconversionset]

did it for me.

Just out of curiosity, is there some way to do this to automatically
change Roman capitals to numbers in appendix (for enumerations,
captions, ...)?

/Mikel
___________________________________________________________________________________
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: Numbers in appendix roman, but want arabic
  2015-02-13  8:45 Numbers in appendix roman, but want arabic Mikael P. Sundqvist
  2015-02-13 17:20 ` Rik Kabel
@ 2015-02-14 17:32 ` Wolfgang Schuster
  2015-02-14 18:09   ` Mikael P. Sundqvist
  1 sibling, 1 reply; 5+ messages in thread
From: Wolfgang Schuster @ 2015-02-14 17:32 UTC (permalink / raw)
  To: mailing list for ConTeXt users


> Am 13.02.2015 um 09:45 schrieb Mikael P. Sundqvist <mickep@gmail.com>:
> 
> Hi,
> 
> with the example below, I have two problems (that are probably
> related). In the appendix, the Theorem is numbered "Theorem II"
> instead of "Theorem 2", i.e. roman numbers are used instead of arabic
> ones.
> 
> Also, when I refer to Theorem 1 from the appendix , it says "Theorem
> I". Again with roman number instead of arabic. I would prefer "Theorem
> 1".
> 
> So, the question reads: How can I get arabic numbers also in the appendix?
> 
> (The appendix itself has the letter A as I want it to)
> 
> /Mikael
> 
> \starttext
> 
> \defineenumeration[Theorem]
> 
> 
> \defineconversionset [bodypart:sectioncounter] [n,n,n] [n]
> \defineconversionset [appendix:sectioncounter] [n,n,A] [n]
> \setuphead[chapter,section][sectionconversionset=sectioncounter]
> 
> \chapter{Foo}
> \startTheorem[thm:main]
> This is a theorem.
> \stopTheorem
> 
> 
> \startappendices
> \title{Appendix}
> 
> \section{This is the first appendix}
> 
> \startTheorem
> This is another theorem.
> \stopTheorem
> 
> What if we refer to the first theorem, Theorem~\in[thm:main]?
> 
> \stopappendices
> \stoptext

There was a similar problem a few days ago with a solution by Hans [1].

[1] http://www.ntg.nl/pipermail/ntg-context/2015/080866.html

PS: You have to change \setupcounters to \setupcounter to fix the error message
from Hans solution because there is only a singular version of the counter command.

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

* Re: Numbers in appendix roman, but want arabic
  2015-02-14 17:32 ` Wolfgang Schuster
@ 2015-02-14 18:09   ` Mikael P. Sundqvist
  0 siblings, 0 replies; 5+ messages in thread
From: Mikael P. Sundqvist @ 2015-02-14 18:09 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On Sat, Feb 14, 2015 at 6:32 PM, Wolfgang Schuster
<schuster.wolfgang@gmail.com> wrote:
>
>> Am 13.02.2015 um 09:45 schrieb Mikael P. Sundqvist <mickep@gmail.com>:
>>
>> Hi,
>>
>> with the example below, I have two problems (that are probably
>> related). In the appendix, the Theorem is numbered "Theorem II"
>> instead of "Theorem 2", i.e. roman numbers are used instead of arabic
>> ones.
>>
>> Also, when I refer to Theorem 1 from the appendix , it says "Theorem
>> I". Again with roman number instead of arabic. I would prefer "Theorem
>> 1".
>>
>> So, the question reads: How can I get arabic numbers also in the appendix?
>>
>> (The appendix itself has the letter A as I want it to)
>>
>> /Mikael
>>
>> \starttext
>>
>> \defineenumeration[Theorem]
>>
>>
>> \defineconversionset [bodypart:sectioncounter] [n,n,n] [n]
>> \defineconversionset [appendix:sectioncounter] [n,n,A] [n]
>> \setuphead[chapter,section][sectionconversionset=sectioncounter]
>>
>> \chapter{Foo}
>> \startTheorem[thm:main]
>> This is a theorem.
>> \stopTheorem
>>
>>
>> \startappendices
>> \title{Appendix}
>>
>> \section{This is the first appendix}
>>
>> \startTheorem
>> This is another theorem.
>> \stopTheorem
>>
>> What if we refer to the first theorem, Theorem~\in[thm:main]?
>>
>> \stopappendices
>> \stoptext
>
> There was a similar problem a few days ago with a solution by Hans [1].
>
> [1] http://www.ntg.nl/pipermail/ntg-context/2015/080866.html
>
> PS: You have to change \setupcounters to \setupcounter to fix the error message
> from Hans solution because there is only a singular version of the counter command.
>
> 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
> ___________________________________________________________________________________

Thank you very much, that works very fine.

Also, sorry all for asking the same question. I searched the list for
this but missed it somehow.

/Mikael
___________________________________________________________________________________
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:[~2015-02-14 18:09 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-02-13  8:45 Numbers in appendix roman, but want arabic Mikael P. Sundqvist
2015-02-13 17:20 ` Rik Kabel
2015-02-13 20:30   ` Mikael P. Sundqvist
2015-02-14 17:32 ` Wolfgang Schuster
2015-02-14 18:09   ` Mikael P. Sundqvist

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