* Macro that does not work in an environment
@ 2021-07-27 14:32 Fabrice Couvreur via ntg-context
2021-07-27 15:14 ` Hans Hagen via ntg-context
2021-07-27 15:56 ` Wolfgang Schuster via ntg-context
0 siblings, 2 replies; 4+ messages in thread
From: Fabrice Couvreur via ntg-context @ 2021-07-27 14:32 UTC (permalink / raw)
To: mailing list for ConTeXt users; +Cc: Fabrice Couvreur
[-- Attachment #1.1: Type: text/plain, Size: 505 bytes --]
Hello,
How to make the macro work in the environment definition ?
Thank you
Fabrice
\unexpanded\def\card#1{\math{\text{Card}\thinspace#1}}
\defineenumeration
[definition]
[text=Définition,
number=no,
headcommand=\groupedcommand{}{.},
style=italic]
\starttext
\startdefinition
Soit E un ensemble fini. Le cardinal de E, noté \card{E}, est le nombre
d'éléments de E.
En particulier, nous avons \m{\card{\emptyset}=0}.
\stopdefinition
\stoptext
[-- Attachment #1.2: Type: text/html, Size: 2021 bytes --]
[-- Attachment #2: Type: text/plain, Size: 493 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://context.aanhet.net
archive : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Macro that does not work in an environment
2021-07-27 14:32 Macro that does not work in an environment Fabrice Couvreur via ntg-context
@ 2021-07-27 15:14 ` Hans Hagen via ntg-context
2021-07-27 15:56 ` Wolfgang Schuster via ntg-context
1 sibling, 0 replies; 4+ messages in thread
From: Hans Hagen via ntg-context @ 2021-07-27 15:14 UTC (permalink / raw)
To: mailing list for ConTeXt users; +Cc: Hans Hagen
On 7/27/2021 4:32 PM, Fabrice Couvreur via ntg-context wrote:
> Hello,
> How to make the macro work in the environment definition ?
not sure what you want to achieve, maybe this?
\protected\def\card#1{\m{\mfunction{Card}\thinspace#1}}
\defineenumeration
[définition]
[text=Définition,
number=no,
headcommand=\groupedcommand{}{.},
style=italic]
\starttext
\startdéfinition
Soit E un ensemble fini. Le cardinal de E, noté \card{E}, est le
nombre d'éléments de E.
En particulier, nous avons \m{\card{\emptyset}=0}.
\stopdéfinition
\stoptext
> Thank you
> Fabrice
>
>
> \unexpanded\def\card#1{\math{\text{Card}\thinspace#1}}
>
> \defineenumeration
> [definition]
> [text=Définition,
> number=no,
> headcommand=\groupedcommand{}{.},
> style=italic]
>
> \starttext
>
> \startdefinition
> Soit E un ensemble fini. Le cardinal de E, noté \card{E}, est le
> nombre d'éléments de E.
>
> En particulier, nous avons \m{\card{\emptyset}=0}.
> \stopdefinition
>
> \stoptext
>
> ___________________________________________________________________________________
> 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://context.aanhet.net
> archive : https://bitbucket.org/phg/context-mirror/commits/
> wiki : http://contextgarden.net
> ___________________________________________________________________________________
>
--
-----------------------------------------------------------------
Hans Hagen | PRAGMA ADE
Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
-----------------------------------------------------------------
___________________________________________________________________________________
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://context.aanhet.net
archive : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Macro that does not work in an environment
2021-07-27 14:32 Macro that does not work in an environment Fabrice Couvreur via ntg-context
2021-07-27 15:14 ` Hans Hagen via ntg-context
@ 2021-07-27 15:56 ` Wolfgang Schuster via ntg-context
[not found] ` <CACyK-eqm18D74PpMXPgAiSGWDB2ihsudQwWN4+OiyuNtWEyUXw@mail.gmail.com>
1 sibling, 1 reply; 4+ messages in thread
From: Wolfgang Schuster via ntg-context @ 2021-07-27 15:56 UTC (permalink / raw)
To: mailing list for ConTeXt users; +Cc: Wolfgang Schuster
[-- Attachment #1.1: Type: text/plain, Size: 192 bytes --]
Fabrice Couvreur via ntg-context schrieb am 27.07.2021 um 16:32:
> Hello,
> How to make the macro work in the environment definition ?
Can you explain your problem with the \card.
Wolfgang
[-- Attachment #1.2: Type: text/html, Size: 1166 bytes --]
[-- Attachment #2: Type: text/plain, Size: 493 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://context.aanhet.net
archive : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Macro that does not work in an environment
[not found] ` <CACyK-eqm18D74PpMXPgAiSGWDB2ihsudQwWN4+OiyuNtWEyUXw@mail.gmail.com>
@ 2021-07-27 16:29 ` Wolfgang Schuster via ntg-context
0 siblings, 0 replies; 4+ messages in thread
From: Wolfgang Schuster via ntg-context @ 2021-07-27 16:29 UTC (permalink / raw)
To: Fabrice Couvreur; +Cc: Wolfgang Schuster, mailing list for ConTeXt users
Fabrice Couvreur schrieb am 27.07.2021 um 18:24:
> Hi,
> The macro \card must allow the word Card to be written in the normal style.
> Hans' solution works well.
To use \text with a certain style use a \mathtext.. command, e.g.
\define[1]\card
{\m{\mathtexttf{Card}\thinspace#1}}
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://context.aanhet.net
archive : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2021-07-27 16:29 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-27 14:32 Macro that does not work in an environment Fabrice Couvreur via ntg-context
2021-07-27 15:14 ` Hans Hagen via ntg-context
2021-07-27 15:56 ` Wolfgang Schuster via ntg-context
[not found] ` <CACyK-eqm18D74PpMXPgAiSGWDB2ihsudQwWN4+OiyuNtWEyUXw@mail.gmail.com>
2021-07-27 16:29 ` Wolfgang Schuster via ntg-context
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).