From: Wolfgang Schuster <schuster.wolfgang@gmail.com>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Cc: Xan <dxpublica@telefonica.net>
Subject: Re: [***SPAM***] \defineenumeration options?
Date: Tue, 21 May 2013 18:41:09 +0200 [thread overview]
Message-ID: <E97319AF-FFCE-4536-A854-F80A7BD10DE8@gmail.com> (raw)
In-Reply-To: <519B95BF.6000802@telefonica.net>
[-- Attachment #1.1: Type: text/plain, Size: 1371 bytes --]
Am 21.05.2013 um 17:41 schrieb Xan <dxpublica@telefonica.net>:
> Hi,
>
> I have two enumerations:
>
> \defineenumeration
> [exercici]
You need a different name for the normal enumeration environment, e.g. exercicidefault
> [alternative=serried,text={\startcolor[middlecyan]Exercici\stopcolor},stopper={.\space},left={\bgroup},right={\egroup},width=fit,headstyle=\ss]
>
> \defineenumeration
> [exercicivora]
> [alternative=serried,text={\startcolor[middlecyan]Exercici\stopcolor},stopper={.\space},left={\bgroup\startframedtext[background=screen,frame=off,width=broad]},right={\stopframedtext\egroup},width=fit,headstyle=\ss]
>
>
> I just want to join into one: when I do \startexercici ... \stopexercici ConTeXt do the first, and when I pass \startexercici[vora] ... \stopexercici then do the second. That is, 'vora' as optional argument.
>
> How can I achieve that?
You have to write you own version of the exercise environment which chooses one the two enumerations dependent on the argument.
\def\startexercici
{\dosingleempty\dostartexercici}
\def\dostartexercici[#1]%
{\edef\currentexercici{#1}%
\doifelse{\currentexercici}{vora}
\startexercicivora
\startexercicidefault}
\def\stopexercici
{\doifelse{\currentexercici}{vora}
\stopexercicivora
\stopexercicidefault}
Wolfgang
[-- Attachment #1.2: Type: text/html, Size: 3961 bytes --]
[-- Attachment #2: Type: text/plain, Size: 485 bytes --]
___________________________________________________________________________________
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 : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___________________________________________________________________________________
next prev parent reply other threads:[~2013-05-21 16:41 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-05-21 15:41 Xan
2013-05-21 16:41 ` Wolfgang Schuster [this message]
2013-05-21 17:59 ` Xan
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=E97319AF-FFCE-4536-A854-F80A7BD10DE8@gmail.com \
--to=schuster.wolfgang@gmail.com \
--cc=dxpublica@telefonica.net \
--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).