On Tue, 6 Mar 2007, Xan wrote:
En/na Aditya Mahajan ha escrit:
On Mon, 5 Mar 2007, Xan wrote:
Another question: how get the equivalent of ams theorem package? Sorry for no ask this before and another time, thanks
enumerations. This is what I ususally do
\defineenumeration[theorem][style=italic,text=Theorem,location=hanging]
\starttheorem This is an important theorem \stoptheorem
They do almost everything on what is needed for theorems. I am working on providing missing features, so if you find something is missing, feel free to ask.
Thank you very much for give me this opportunity. Enumerations work but I need more customization:
1) How can you change the style of the text (Theorem in our example)?
\defineenumeration[theorem][headstyle=normal|bold|italic|(any font commnad)]
2) How can you change the position of the counter: "1 Theorem" rather than "Theorem 1"
No simple way right now. It is possible to do that using left and right keys. So, something like \defineenumeration[theorem][text=,right={ Theorem}] If you do not want the dot after the number, say stopper=, above.
3) Is it possible to change the counter? In LaTeX, with much effort and help, I could write some code for displaying something like:
Theorem [number of theorem].[numberofpageitappears]. ....
If you want to see the code, I could give you
In ConTeXt this is much easier. \defineenumeration[theorem][conversion=myconversion] so, you can do something like \def\withpagenumbercommand#1{\numbers{#1}.blah\currentpage} \defineconversion [withpagenumber] [\withpagenumbercommand] \defineenumeration[test][conversion=withpagenumber] (I tested this, and this is not working. In fact conversion is not working with enumerations). This will be fixed soon. If you need it immediately, there is just a one line change as a workaround.
4) What about the indentation of the "body" of the theorem?. If you put:
\starttheorem This is an important theorem skjdskad sda sdas dsad asdas das dsafs f dsfsdfsdf dfsdf sdf dsfsd fsdfsd fds fdsf ds fsd fds fsdfsdfs fdsfsd f \stoptheorem
the text is indented a little bit after the begginning of the line. We could have a normal indentation (like AMS theorem do)?
Did I say, that is the way I like it ;) It you do not, do not say location=hanging.
5) Is there an equivalent to \newenvironment in latex? I think about the demostration:
\newenvironment{demo}{\medskip Demostració.}{\hfill $\Box$}
Wolfgang answered the equivalent way to do it in ConteXt.
And another question (in other topic): how we can do lines at header and footer like fancyheaders in latex?
\setupbackgrounds[header][text][topframe=on,rulethickness=1pt] etc. Aditya