2007/7/10, Norbert Zeh <[EMAIL PROTECTED]>:
> Hi folks,
>
> I've recently started to consider ConTeXt as an alternative to my
> long-time friend LaTeX.  I like ConTeXt very much but noticed a few
> things that are either less than ideal or maybe I simply haven't
> figured out yet how to do them right.  Here are the first two:
>
> 1)  Enumerations
>
> I've read in a few places that this is what is to be used whenever I
> would use theorem-style environments in latex.  There are two things
> I seem to be unable to do:  Creating Theorems that look like this.
>
> ---------------------
> THEOREM 1  It would be nice if Context could produce a theorem where
> the title is not separated from the text and the next line has no
> hanging indent.
> ---------------------

\defineenumeration[theorem][text=THEOREM,location=left,hang=1]

\starttext

\theorem \input knuth

\stoptext

> I was able to produce only
>
> ----------------------
> THEOREM 1
>
> It would be nice ...
> ----------------------
>
> or
>
> ----------------------
> THEOREM 1  It would
>          be nice ...
> ----------------------
>
> using location=top or location=hanging.  What I want is no hanging
> indent at all.  (I also tried location=serried, which produced an
> overly large gap between THEOREM 1 and the theorem text.  The second
> thing I am used to in latex is the option to place things in
> parentheses by providing an optional argument to the environment.
> E.g., in assignments I typeset, I often have either
>
> \begin{question}
> ...
> \end{question}
>
> which simply produces
>
> --------------------
> Question 1  ...
> --------------------
>
> or
>
> \begin{question}[20 marks]
> ...
> \end{question}
>
> which produces
>
> --------------------
> Question 1  (20 marks)  ...
> --------------------
>
> This second option is easy to simulate if I can produce something
> that has no hanging indents.  As it is, I can't.
>
> 2)  Numbered labels
>
> I tried to use numbered labels plus a little bit of tex-code to
> simulate the above environment.  The gist is that I used
>
> \definelabel[question][location=intext,text=Question]
>
> to define the label and, wherever I needed a new question, \question
> [ref].
>
> The result of writing \question[ref], however, was "Question Question
> 1".  The label always seemed to be duplicated for some reason.  Is
> this a known bug?

http://www.tug.org/pracjourn/2006-4/mahajan/

> Thanks for your help with this.
>
> Cheers,
> Norbert

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  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

Reply via email to