Dear List, After a few changes i have here an example: It works, but what I wanted to know is why are there round brackets after writing \starttheroem if i compile it. Should be without round brackets. I have the following example, the text was in a PDF from 2008, called: Theorems in ConTeXt, and also my text with the margin: \definemargindata [MyInMargin][inright] \definemarginframed[MyInMargin][topframe=on,bottomframe=on,rulethickness=1pt,width=1cm] \margintext{\blackrule[color=black, height=0.25ex, width=1cm]\\}\blackrule[color=black, height=0.25ex, width=7cm] \setupenumerations [ before={\blank[big]}, after={\blank[big]}, location=serried, width=broad, distance=0.5em, headstyle=bold, titlestyle=normal, way=bytext, conversion=numbers] \defineenumeration [theorem] [ text=Theorem, title=yes, style=italic, list=all, listtext={Theorem }] \starttext \margintext{2.1.1}{\starttheorem {The square on the hypotenuse is equal to the sum of the squares on the other two sides. Ach is das schön, dass du da bist} \stoptheorem \stoptext Maybe someone can help me.
On Fri, 17 Nov 2023, Ursula Hermann wrote:
Dear List, After a few changes i have here an example: It works, but what I wanted to know is why are there
round brackets after writing \starttheroem if i compile it. Should be without round brackets.
Are you looking for something like this? \defineenumeration [theorem] [ text=Theorem, title=yes, width=fit, distance=0.5em, alternative=serried, ] \starttext \starttheorem The square on the hypotenuse is equal to the sum of the squares on the other two sides. Ach is das schön, dass du da bist \stoptheorem \stoptext Aditya
Dear Aditya,
yes, thank you so much, this works.
Uschi
________________________________
Von: Aditya Mahajan
Dear List, After a few changes i have here an example: It works, but what I wanted to know is why are there
round brackets after writing \starttheroem if i compile it. Should be without round brackets.
Are you looking for something like this? \defineenumeration [theorem] [ text=Theorem, title=yes, width=fit, distance=0.5em, alternative=serried, ] \starttext \starttheorem The square on the hypotenuse is equal to the sum of the squares on the other two sides. Ach is das schön, dass du da bist \stoptheorem \stoptext Aditya
On 17 Nov 2023, at 14:06, Ursula Hermann
wrote: \margintext{2.1.1}{\starttheorem {The square on the hypotenuse is equal to the sum of the squares on the other two sides. Ach is das schön, dass du da bist} \stoptheorem
The spurious parentheses seem to be a side-effect of having unmatched curly brackets in the bit that I have quoted. The following eliminates them: \definemargindata [MyInMargin][inright] \definemarginframed[MyInMargin][topframe=on,bottomframe=on,rulethickness=1pt,width=1cm] \margintext{\blackrule[color=black, height=0.25ex, width=1cm]\\}\blackrule[color=black, height=0.25ex, width=7cm] \setupenumerations [ before={\blank[big]}, after={\blank[big]}, location=serried, width=broad, distance=0.5em, headstyle=bold, titlestyle=normal, way=bytext, conversion=numbers] \defineenumeration [theorem] [ text=Theorem, title=yes, style=italic, list=all, listtext={Theorem }] \starttext \margintext{2.1.1}{\starttheorem The square on the hypotenuse is equal to the sum of the squares on the other two sides. Ach is das schön, dass du da bist \stoptheorem } \stoptext I see also in this thread that you have sad "yes" to Aditya's suggestion. But that doesn't have the margintext. Do you still want/need margintext? — Bruce Horrocks Hampshire, UK — Bruce Horrocks Hampshire, UK
Dear Bruce,
Yes, I need also margintext.
Many thanks
Uschi
-----Ursprüngliche Nachricht-----
Von: Bruce Horrocks
On 17 Nov 2023, at 14:06, Ursula Hermann
wrote: \margintext{2.1.1}{\starttheorem {The square on the hypotenuse is equal to the sum of the squares on the other two sides. Ach is das schön, dass du da bist} \stoptheorem
The spurious parentheses seem to be a side-effect of having unmatched curly brackets in the bit that I have quoted. The following eliminates them: \definemargindata [MyInMargin][inright] \definemarginframed[MyInMargin][topframe=on,bottomframe=on,rulethickness=1pt,width=1cm] \margintext{\blackrule[color=black, height=0.25ex, width=1cm]\\}\blackrule[color=black, height=0.25ex, width=7cm] \setupenumerations [ before={\blank[big]}, after={\blank[big]}, location=serried, width=broad, distance=0.5em, headstyle=bold, titlestyle=normal, way=bytext, conversion=numbers] \defineenumeration [theorem] [ text=Theorem, title=yes, style=italic, list=all, listtext={Theorem }] \starttext \margintext{2.1.1}{\starttheorem The square on the hypotenuse is equal to the sum of the squares on the other two sides. Ach is das schön, dass du da bist \stoptheorem } \stoptext I see also in this thread that you have sad "yes" to Aditya's suggestion. But that doesn't have the margintext. Do you still want/need margintext? — Bruce Horrocks Hampshire, UK — Bruce Horrocks Hampshire, UK ___________________________________________________________________________________ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror) archive : https://github.com/contextgarden/context wiki : https://wiki.contextgarden.net ___________________________________________________________________________________
On 20 Nov 2023, at 08:54, Ursula Hermann
wrote: Dear Bruce,
Yes, I need also margintext.
What do you want to appear in the margin: the theorem number or the section number of the current section? In other words, what should replace the "hard coded" 2.1.1 that you have in your example?
On 17 Nov 2023, at 14:06, Ursula Hermann
wrote: \margintext{2.1.1}{\starttheorem {The square on the hypotenuse is equal to the sum of the squares on the other two sides. Ach is das schön, dass du da bist} \stoptheorem
The spurious parentheses seem to be a side-effect of having unmatched curly brackets in the bit that I have quoted.
The following eliminates them:
\definemargindata [MyInMargin][inright] \definemarginframed[MyInMargin][topframe=on,bottomframe=on,rulethickness=1pt,width=1cm] \margintext{\blackrule[color=black, height=0.25ex, width=1cm]\\}\blackrule[color=black, height=0.25ex, width=7cm] \setupenumerations [ before={\blank[big]}, after={\blank[big]}, location=serried, width=broad, distance=0.5em, headstyle=bold, titlestyle=normal, way=bytext, conversion=numbers] \defineenumeration [theorem] [ text=Theorem, title=yes, style=italic, list=all, listtext={Theorem }] \starttext \margintext{2.1.1}{\starttheorem The square on the hypotenuse is equal to the sum of the squares on the other two sides. Ach is das schön, dass du da bist \stoptheorem } \stoptext
I see also in this thread that you have sad "yes" to Aditya's suggestion. But that doesn't have the margintext. Do you still want/need margintext?
— Bruce Horrocks Hampshire, UK
Dear List,
After once more a little changes this is the example I wanted, and it is perfekt:
\definemargindata [MyInMargin][inright]
\definemarginframed[MyInMargin][topframe=on,bottomframe=on,rulethickness=1pt,width=1cm]
\defineenumeration
[theorem]
[
text=Theorem,
title=yes,
width=fit,
distance=0.5em,
alternative=serried,
]
\margintext{\blackrule[color=black, height=0.25ex, width=1cm]\\}\blackrule[color=black, height=0.25ex, width=15cm]
\starttext
\margintext {1.1.1}
\starttheorem
The square on the hypotenuse is equal to the sum of the squares on the
other two sides.
\stoptheorem
\stoptext
Many thanks to Bruce and Aditya for your help.
Regards
Uschi
________________________________
Von: Ursula Hermann
On 17 Nov 2023, at 14:06, Ursula Hermann
wrote: \margintext{2.1.1}{\starttheorem {The square on the hypotenuse is equal to the sum of the squares on the other two sides. Ach is das schön, dass du da bist} \stoptheorem
The spurious parentheses seem to be a side-effect of having unmatched curly brackets in the bit that I have quoted. The following eliminates them: \definemargindata [MyInMargin][inright] \definemarginframed[MyInMargin][topframe=on,bottomframe=on,rulethickness=1pt,width=1cm] \margintext{\blackrule[color=black, height=0.25ex, width=1cm]\\}\blackrule[color=black, height=0.25ex, width=7cm] \setupenumerations [ before={\blank[big]}, after={\blank[big]}, location=serried, width=broad, distance=0.5em, headstyle=bold, titlestyle=normal, way=bytext, conversion=numbers] \defineenumeration [theorem] [ text=Theorem, title=yes, style=italic, list=all, listtext={Theorem }] \starttext \margintext{2.1.1}{\starttheorem The square on the hypotenuse is equal to the sum of the squares on the other two sides. Ach is das schön, dass du da bist \stoptheorem } \stoptext I see also in this thread that you have sad "yes" to Aditya's suggestion. But that doesn't have the margintext. Do you still want/need margintext? — Bruce Horrocks Hampshire, UK — Bruce Horrocks Hampshire, UK ___________________________________________________________________________________ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror) archive : https://github.com/contextgarden/context wiki : https://wiki.contextgarden.net ___________________________________________________________________________________ ___________________________________________________________________________________ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror) archive : https://github.com/contextgarden/context wiki : https://wiki.contextgarden.net ___________________________________________________________________________________
participants (3)
-
Aditya Mahajan
-
Bruce Horrocks
-
Ursula Hermann