* Re: One-off theorem titles & numberstyle
[not found] <mailman.1212.1299141828.4223.ntg-context@ntg.nl>
@ 2011-03-03 9:56 ` S Barmeier
2011-03-03 13:48 ` Otared Kavian
0 siblings, 1 reply; 2+ messages in thread
From: S Barmeier @ 2011-03-03 9:56 UTC (permalink / raw)
To: ntg-context
Thank you for the quick reply, it is getting quite close. I guess the
trick is to define an enumeration for one-off use and use "title=" to
fake "text=". The only problem is that the number sits between text and
title. So to still be able to use \starttheorem alongside
\startproclaim{Theorem}, I would need to know how to either place the
number after the "title" or how to place it before the "text".
I'd be interested in knowing how to do both.
Also, I have problem with the numbering mechanism and the
numberstyle/textstyle/etc.
\defineenumeration[theorem]
[text=Theorem,
numberstyle=normal,
headstyle=bold,
textstyle=caps,
number=yes]
\defineenumeration[proclaim]
[text=,
number=theorem,
headstyle=bold,
title=yes,
titleleft=,
titleright=]
\starttext
\starttheorem
Abc
\stoptheorem
\startproclaim{Special Theorem}
Def
\stopproclaim
\stoptext
This gives as is no number for \startproclaim{Special Theorem}, although
I asked for number=theorem. Also, the numberstyle of \starttheorem is
not normal, but bold, and adding textstyle=normal/caps/etc. seems to
have no effect either.
Best,
Severin
On 03/03/2011 05:43 PM, ntg-context-request@ntg.nl wrote:
> Maybe this is what you want:
> %%%%% begin
> %% defining \proclaim which is built in Plain-teX
> %% but has disappeared from ConTeXt
> \defineenumeration[proclaim]
> [text=,
> style=slanted,
> title=yes,
> titleleft=,
> titleright=,
> location=serried,
> width=fit,
> right={.~}]
> \setupnumber[proclaim][way=bysection,numbersection=yes]
> %% end definition \proclaim
>
> %% defining \remark
> \defineenumeration[remark]
> [text=,
> style=rm,
> title=yes,
> titleleft=,
> titleright=,
> location=serried,
> width=fit,
> right={.~}]
> \setupnumber[remark][number=proclaim]
> %% end definition \remark
>
> \starttext
> \input knuth.tex
>
> \startproclaim[lem:Yoneda]{Yanada Theorem}
> This is a theorem in set category theory.
> \stopproclaim
>
> \startremark{Remark}
> The above theorem and this remark are numbered sequentially.
> \stopremark
>
> \section{A new section}
>
> \input knuth.tex
>
> \startproclaim[lem:Yoneda2]{Yanada Theorem}
> As said above, this is a theorem in set category theory.
> \stopproclaim
>
> \startremark{Remark}
> The above theorem and this remark are numbered sequentially.
> \stopremark
>
> \stoptext
> %%%%% end
>
> Best regards: OK
___________________________________________________________________________________
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] 2+ messages in thread
* Re: One-off theorem titles & numberstyle
2011-03-03 9:56 ` One-off theorem titles & numberstyle S Barmeier
@ 2011-03-03 13:48 ` Otared Kavian
0 siblings, 0 replies; 2+ messages in thread
From: Otared Kavian @ 2011-03-03 13:48 UTC (permalink / raw)
To: mailing list for ConTeXt users
Hi Severin,
Actually if you are using mkiv, the definitions I sent this morning should be slightly changed: perhaps the following suits your needs (however I don't know how to change the style of the numbers…).
%%%%%%%%% begin
%!TEX TS-program = mkiv
%% defining \proclaim which is built in Plain-teX
%% but has disappeared from ConTeXt
%% the following is adapted for mkiv
\defineenumeration[theorem]
\setupenumerations[theorem]
[text=Theorem,
style=sc, % or slanted
title=yes,
titleleft=,
titleright={.},
location=serried,
width=fit,
right={.},
prefix=yes,
way=bysection,
]
%% defining \remark numbered with the same counter as \proclaim
\defineenumeration[proclaim][theorem] % clone proclaim
\setupenumerations[proclaim]
[text=,
style=slanted,
title=yes,
titleright={.},
location=serried,
width=fit,
right={.}]
%% end definition \remark
\starttext
\input knuth.tex
\startproclaim[lem:Yoneda]{Yoneda Theorem}
This is a theorem in set category theory.
\stopproclaim
\starttheorem
The above theorem and this one are numbered sequentially.
\stoptheorem
\section{A new section}
\input knuth.tex
\startproclaim[lem:Yoneda]{Yoneda Theorem}
As said above, this is a theorem in set category theory.
\stopproclaim
\starttheorem
The above theorem and this one are numbered sequentially.
\stoptheorem
\stoptext
%%%%%%%%%%% end
Best regards: OK
On 3 mars 2011, at 10:56, S Barmeier wrote:
> Thank you for the quick reply, it is getting quite close. I guess the
> trick is to define an enumeration for one-off use and use "title=" to
> fake "text=". The only problem is that the number sits between text and
> title. So to still be able to use \starttheorem alongside
> \startproclaim{Theorem}, I would need to know how to either place the
> number after the "title" or how to place it before the "text".
> I'd be interested in knowing how to do both.
>
> Also, I have problem with the numbering mechanism and the
> numberstyle/textstyle/etc.
>
> \defineenumeration[theorem]
> [text=Theorem,
> numberstyle=normal,
> headstyle=bold,
> textstyle=caps,
> number=yes]
> \defineenumeration[proclaim]
> [text=,
> number=theorem,
> headstyle=bold,
> title=yes,
> titleleft=,
> titleright=]
> \starttext
>
> \starttheorem
> Abc
> \stoptheorem
>
> \startproclaim{Special Theorem}
> Def
> \stopproclaim
>
> \stoptext
>
> This gives as is no number for \startproclaim{Special Theorem}, although
> I asked for number=theorem. Also, the numberstyle of \starttheorem is
> not normal, but bold, and adding textstyle=normal/caps/etc. seems to
> have no effect either.
>
> Best,
> Severin
>
>
>
>
> On 03/03/2011 05:43 PM, ntg-context-request@ntg.nl wrote:
>> Maybe this is what you want:
>> %%%%% begin
>> %% defining \proclaim which is built in Plain-teX
>> %% but has disappeared from ConTeXt
>> \defineenumeration[proclaim]
>> [text=,
>> style=slanted,
>> title=yes,
>> titleleft=,
>> titleright=,
>> location=serried,
>> width=fit,
>> right={.~}]
>> \setupnumber[proclaim][way=bysection,numbersection=yes]
>> %% end definition \proclaim
>>
>> %% defining \remark
>> \defineenumeration[remark]
>> [text=,
>> style=rm,
>> title=yes,
>> titleleft=,
>> titleright=,
>> location=serried,
>> width=fit,
>> right={.~}]
>> \setupnumber[remark][number=proclaim]
>> %% end definition \remark
>>
>> \starttext
>> \input knuth.tex
>>
>> \startproclaim[lem:Yoneda]{Yanada Theorem}
>> This is a theorem in set category theory.
>> \stopproclaim
>>
>> \startremark{Remark}
>> The above theorem and this remark are numbered sequentially.
>> \stopremark
>>
>> \section{A new section}
>>
>> \input knuth.tex
>>
>> \startproclaim[lem:Yoneda2]{Yanada Theorem}
>> As said above, this is a theorem in set category theory.
>> \stopproclaim
>>
>> \startremark{Remark}
>> The above theorem and this remark are numbered sequentially.
>> \stopremark
>>
>> \stoptext
>> %%%%% end
>>
>> Best regards: OK
>
> ___________________________________________________________________________________
> 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
> ___________________________________________________________________________________
___________________________________________________________________________________
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] 2+ messages in thread
end of thread, other threads:[~2011-03-03 13:48 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <mailman.1212.1299141828.4223.ntg-context@ntg.nl>
2011-03-03 9:56 ` One-off theorem titles & numberstyle S Barmeier
2011-03-03 13:48 ` Otared Kavian
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).