Theorems with arguments like amsthm
Hi, I have my environment of context that defines the theorems and lemmas like amsthm in latex. For example, for lemmas, I have: \defineenumeration [lemma] [text={Lemma},headstyle=bold,between=\blank,titledistance=0em,textdistance=1em, stopper={.\space},location=serried,left={\bgroup\bf},right={\egroup},width=fit,style=italic] The question is how can I get the typical argument of lemmas: "Lema 4.1 (superadditive lemma)"? How can I add the possibility that lemma _could_ have one argument (the phrase in parentesis)?. I'm not a TeX programmer, such a ConTeXt user. Any hint? Thanks, Xan.
On Fri, 29 May 2009, Xan wrote:
Hi,
I have my environment of context that defines the theorems and lemmas like amsthm in latex. For example, for lemmas, I have:
\defineenumeration [lemma] [text={Lemma},headstyle=bold,between=\blank,titledistance=0em,textdistance=1em, stopper={.\space},location=serried,left={\bgroup\bf},right={\egroup},width=fit,style=italic]
The question is how can I get the typical argument of lemmas: "Lema 4.1 (superadditive lemma)"? How can I add the possibility that lemma _could_ have one argument (the phrase in parentesis)?. I'm not a TeX programmer, such a ConTeXt user.
Any hint?
Use [title=yes] and then \startlemma[reference]{A brilliant result} ... \stoplemma For details, see my article in last year's MAPS. Theorems in ConTeXt (English), MAPS 36, 2008, 27-32 (http://www.ntg.nl/maps/36/index.html) Unfortunately, the issue is not available online yet. Aditya
En/na Xan ha escrit:
On Fri, 29 May 2009, Xan wrote:
/ Hi, />/ />/ I have my environment of context that defines the theorems and lemmas like />/ amsthm in latex. For example, for lemmas, I have: />/ />/ \defineenumeration />/ [lemma] />/ [text={Lemma},headstyle=bold,between=\blank,titledistance=0em,textdistance=1em, />/ stopper={.\space},location=serried,left={\bgroup\bf},right={\egroup},width=fit,style=italic] />/ />/ The question is how can I get the typical argument of lemmas: "Lema 4.1 />/ (superadditive lemma)"? How can I add the possibility that lemma _could_ have />/ one argument (the phrase in parentesis)?. />/ I'm not a TeX programmer, such a ConTeXt user. />/ />/ Any hint? / Use [title=yes] and then
\startlemma[reference]{A brilliant result} ... \stoplemma
But if I do that, there is no space between the parentesis and number (like "Theorem 4.1(My great result)" and the parentesis and the contents of the parentesis are in bold. How can I solve that?
For details, see my article in last year's MAPS.
Theorems in ConTeXt (English), MAPS 36, 2008, 27-32 (http://www.ntg.nl/maps/36/index.html)
Unfortunately, the issue is not available online yet.
Aditya
Yes, I tried to download it previosly (because I think it's missing documentation about something equivalent of amsthm in context) and I get that.... Can you give me it privately? Regards, a lot, Xan.
En/na Xan ha escrit:
En/na Xan ha escrit:
On Fri, 29 May 2009, Xan wrote:
/ Hi, />/ />/ I have my environment of context that defines the theorems and lemmas like />/ amsthm in latex. For example, for lemmas, I have: />/ />/ \defineenumeration />/ [lemma] />/ [text={Lemma},headstyle=bold,between=\blank,titledistance=0em,textdistance=1em,
/>/ stopper={.\space},location=serried,left={\bgroup\bf},right={\egroup},width=fit,style=italic]
/>/ />/ The question is how can I get the typical argument of lemmas: "Lema 4.1 />/ (superadditive lemma)"? How can I add the possibility that lemma _could_ have />/ one argument (the phrase in parentesis)?. />/ I'm not a TeX programmer, such a ConTeXt user. />/ />/ Any hint? / Use [title=yes] and then
\startlemma[reference]{A brilliant result} ... \stoplemma
But if I do that, there is no space between the parentesis and number (like "Theorem 4.1(My great result)" and the parentesis and the contents of the parentesis are in bold. How can I solve that?
Mmm... with \titledistance I have to put space between () and numbers. But what is the dimensions of one space? 1em? Now it remains only the bold topic. Thanks a lot, Xan.
For details, see my article in last year's MAPS.
Theorems in ConTeXt (English), MAPS 36, 2008, 27-32 (http://www.ntg.nl/maps/36/index.html)
Unfortunately, the issue is not available online yet.
Aditya
Yes, I tried to download it previosly (because I think it's missing documentation about something equivalent of amsthm in context) and I get that.... Can you give me it privately?
Regards, a lot, Xan.
Hi Xan, Thanks to your example and Aditya's explanantion I learned too… Here is how you can get what you want: %%% begin example \defineenumeration[lemma]% [text={Lemma}, headstyle=bold, between=\blank, titledistance=0em, textdistance=1em, stopper={.\space}, location=serried, left={\bgroup\bf}, right={\egroup}, width=fit, style=italic, title=yes, titledistance=.3em, titlestyle=sc] % or italic, or whatever you like \starttext \startlemma[reference]{ A brilliant result} If $a=2$ then the set $H(a)$ is not empty. \stoplemma \stoptext %%% end example Best regards: OK On 29 mai 09, at 21:52, Xan wrote:
En/na Xan ha escrit:
En/na Xan ha escrit:
On Fri, 29 May 2009, Xan wrote:
/ Hi, />/ />/ I have my environment of context that defines the theorems and lemmas like />/ amsthm in latex. For example, for lemmas, I have: />/ />/ \defineenumeration />/ [lemma] />/ [text={Lemma},headstyle=bold,between= \blank,titledistance=0em,textdistance=1em, />/ stopper={.\space},location=serried,left={\bgroup \bf},right={\egroup},width=fit,style=italic] />/ />/ The question is how can I get the typical argument of lemmas: "Lema 4.1 />/ (superadditive lemma)"? How can I add the possibility that lemma _could_ have />/ one argument (the phrase in parentesis)?. />/ I'm not a TeX programmer, such a ConTeXt user. />/ />/ Any hint? / Use [title=yes] and then
\startlemma[reference]{A brilliant result} ... \stoplemma
But if I do that, there is no space between the parentesis and number (like "Theorem 4.1(My great result)" and the parentesis and the contents of the parentesis are in bold. How can I solve that?
Mmm... with \titledistance I have to put space between () and numbers. But what is the dimensions of one space? 1em?
Now it remains only the bold topic. Thanks a lot, Xan.
For details, see my article in last year's MAPS.
Theorems in ConTeXt (English), MAPS 36, 2008, 27-32 (http://www.ntg.nl/maps/36/index.html)
Unfortunately, the issue is not available online yet.
Aditya
Yes, I tried to download it previosly (because I think it's missing documentation about something equivalent of amsthm in context) and I get that.... Can you give me it privately?
Regards, a lot, Xan.
___________________________________________________________________________________ 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 : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________________
%%%%%%%%%%%%%%%%%% Otared Kavian Département de Mathématiques Université de Versailles Saint-Quentin Bâtiment Fermat 45 aveue des Etats Unis 78035 Versailles cedex Téléphone: +33 1 39 25 46 42 Secrétariat: +33 1 39 25 46 44 Secrétariat: +33 1 39 25 46 46 e-mail: Otared.Kavian@math.uvsq.fr
Hi Xan,
Thanks to your example and Aditya's explanantion I learned too…
I'm glad for that :-)
Here is how you can get what you want:
%%% begin example
\defineenumeration[lemma]% [text={Lemma}, headstyle=bold, between=\blank, titledistance=0em, textdistance=1em, stopper={.\space}, location=serried, left={\bgroup\bf}, right={\egroup}, width=fit, style=italic, title=yes, titledistance=.3em, titlestyle=sc] % or italic, or whatever you like
I think titledistance=1ex is better spacing. I don' t know what is exactly the space between number and (). What width has space?
\starttext
\startlemma[reference]{ A brilliant result} If $a=2$ then the set $H(a)$ is not empty. \stoplemma
\stoptext
%%% end example
Best regards: OK
Thanks to you, Otared. Xan.
Thinking about spaces.... anyone knows how to put less space between text "Demostració" and the text itself in this environment?: \definedescription[demo][location=serried,text={Demostració.}, headstyle=bold,indentnext=yes,between=\blank,textdistance=0em, closesymbol=\mathematics{\Box}] \starttext \startdemo Hola \stopdemo \stoptext Thanks, Xan.
On Sat, 30 May 2009, Xan wrote:
Thinking about spaces.... anyone knows how to put less space between text "Demostració" and the text itself in this environment?:
width=fit, distance=0.5em (or whatever you want the distance to be)
\definedescription[demo][location=serried,text={Demostració.}, headstyle=bold,indentnext=yes,between=\blank,textdistance=0em, closesymbol=\mathematics{\Box}]
\starttext \startdemo Hola \stopdemo
\stoptext
Aditya
Sat, 30 May 2009, Xan wrote:
/ Thinking about spaces.... anyone knows how to put less space between />/ text "Demostració" and the text itself in this environment?: / width=fit, distance=0.5em (or whatever you want the distance to be)
Thanks, Aditya. For the other hand, I possibly discover a bug: I have that (sorry for the comments in catalan): \defineenumeration [lemma] [text={Lemma}, % Què es mostra before={\blank[big]}, % abans de lemma, un bigskip after={\blank[big]}, % després de lemma, un bigskip headstyle=bold, % Negreta per la capçaleras %between=\blank, % Entre Lemmes una línia en blanc titledistance=.5em, % espai entre número i parèntesis. textdistance=.5em, % espai entre ) i text stopper={.\space}, % Com acaba. Després de parèntesis un '.' location=serried, width=fit, % que ocupi tot l'espai style=italic, % estil del text title=yes, % si puc posar o no arguments opcionals titlestyle=sc, % estil del títol way=bytext, % enumerar en tot el document conversion=numbers] % enumera amb arabic \defineenumeration [definition] [lemma] [text={Definició},style=tf,titlestyle=sc] \defineenumeration [notation] [definition] [text={Notació},style=tf,titlestyle=sc] I have to specify the titlestyle in notation and in definition. If notation inherits style from definition and this inherits from lemma, so it should have the same style. So \defineenumeration [notation] [definition] [text={Notació}] should have all the same style as definition, but it isn't. Xan.
On Sat, 30 May 2009, Xan wrote:
Sat, 30 May 2009, Xan wrote:
/ Thinking about spaces.... anyone knows how to put less space between />/ text "Demostració" and the text itself in this environment?: / width=fit, distance=0.5em (or whatever you want the distance to be)
Thanks, Aditya.
For the other hand, I possibly discover a bug:
I have that (sorry for the comments in catalan):
\defineenumeration [lemma] [text={Lemma}, % Què es mostra before={\blank[big]}, % abans de lemma, un bigskip after={\blank[big]}, % després de lemma, un bigskip headstyle=bold, % Negreta per la capçaleras %between=\blank, % Entre Lemmes una línia en blanc titledistance=.5em, % espai entre número i parèntesis. textdistance=.5em, % espai entre ) i text stopper={.\space}, % Com acaba. Després de parèntesis un '.' location=serried, width=fit, % que ocupi tot l'espai style=italic, % estil del text title=yes, % si puc posar o no arguments opcionals titlestyle=sc, % estil del títol way=bytext, % enumerar en tot el document conversion=numbers] % enumera amb arabic
\defineenumeration [definition] [lemma] [text={Definició},style=tf,titlestyle=sc]
\defineenumeration [notation] [definition] [text={Notació},style=tf,titlestyle=sc]
I have to specify the titlestyle in notation and in definition. If notation inherits style from definition and this inherits from lemma, so it should have the same style. So
\defineenumeration [notation] [definition] [text={Notació}]
should have all the same style as definition, but it isn't.
That is right. titlestyle (and possibly others are missing in the two copyparameters in the definition of dododefineenumeration in core-des.tex. Hans, I can send you a patch in about 10 days (travelling until then), unless you end up correcting this sooner. Aditya
participants (3)
-
Aditya Mahajan
-
Otared Kavian
-
Xan