ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Rob Ermers <r.ermers@hccnet.nl>
Subject: Re: Suitable mechanism for Theorems and Definitions
Date: Wed, 24 Aug 2005 22:01:44 +0200	[thread overview]
Message-ID: <430CD228.9050105@hccnet.nl> (raw)
In-Reply-To: <20050821162208.GA16657@erik.fi.muni.cz>

Hi friends,
In David's mail I found one of the problem I had been thinking of too, 
and I tried his code. Unfortionately, it does not work.

I don't need it for math, but for case descriptions.

A case consists of the following elements:

Case 1    Eating fruit is healthy
Text text text - case description --

Questions:
1. abcd
2. efgh
....

Answers:
1. aaa bb
2. dderere
...

Case 2   Everything about vitamins
...

The elements themselves I can put in blocks in order to be able to 
separate the q's and a's.

What I am wondering about is how to include the title in the macro.
It does not seem very difficult, but I can't figure out how.

The theorem environment seemed promising, but David's suggestion does 
not process. Has anyone an idea?

Kind regards,

Robert







fonts          : using map file: 8r-base.map
fonts          : using map file: ec-public-lm.map
fonts          : using map file: original-base.map
systems        : begin file tst4 at line 31
! Undefined control sequence.
\dostartLemma ...irstargument \startMathParagraph
                                                   [#1] \else 
\startMathParag...
l.34 ...Lemma[reference]{Algorithm xyz terminates}

?
! Undefined control sequence.
l.36 \stopLemma


David Antos wrote:
> Hello Taco,
> 
> On Sun, Aug 21, 2005 at 05:43:02PM +0200, Taco Hoekwater wrote:
> 
>>The "a while" turned out to be around 1999, and the code (hack) I
>>used back then is no longer even remotely usable (for one because
>>context was still in dutch, then), but I'll see if I can update my
>>patch.
> 
> 
> :-), that's great :-).
> 
> In the meantime, I solved the second part, i.e., adding the additional
> describing text. It goes somehow like this (well, it's a hack, but it
> works):
> 
> % MathParagraph is the enumeration (it ensures references and numbering,
> % and typesetting all the texts). In command, it calls a macro that refers
> % to \MathParagraphType etc.
> 
> \def\startLemma{\dosingleempty\dostartLemma}
> \def\dostartLemma[#1]#2 {%
> \def\MathParagraphType{Lemma}
> \def\MathParagraphName{#2}
> \def\MathParagraphList{MathParagraphs}
> \iffirstargument
>   \startMathParagraph[#1]
> \else
>   \startMathParagraph
> \fi
> }
> \let\stopLemma\stopMathParagraph
> 
> So I can use
> \startLemma[reference]{Algorithm xyz terminates}
> ...
> \stopLemma
> 
> I came to the idea to misuse command= to typeset the header and write to
> the list, it is given an argument containing the number of the enumeration.
> Anyway, it is not easy to feed it into \expanded{\writetolist...} as the
> argument is something with \edef and a pile of pretty ugly macros :-), so I
> still use \precedingsectionnumber\numberMathParagraph :-(
> 
> To sum up, a good way to obtain current enumeration number (in a form that
> goes into lists, etc.)  would be completely enough, provided that one
> writes hacks to solve the rest (and does end up finding the real macro
> names with \tracingmacros=1 :-)). Creating something like
> enumerateddescription (a description with names and possibility to write
> lists) would be much nicer, of course :-))
> 
> Thank you very much,
> D.A.
> 
> P.S.: Hans said once that a Dutch mathematical journal is typeset with
> ConTeXt. Do you have an idea how they typeset theorems?
> 

  reply	other threads:[~2005-08-24 20:01 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-08-19  9:48 David Antos
2005-08-21 12:27 ` David Antos
2005-08-21 15:43   ` Taco Hoekwater
2005-08-21 16:22     ` David Antos
2005-08-24 20:01       ` Rob Ermers [this message]
2005-08-24 20:40         ` David Antos
2005-08-25 10:07           ` Taco Hoekwater
2005-08-25 20:38             ` David Antos
2005-08-29 21:26             ` Hans Hagen Outside

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=430CD228.9050105@hccnet.nl \
    --to=r.ermers@hccnet.nl \
    --cc=ntg-context@ntg.nl \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).