ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* Macro to write a letter with \ mathscript{}
@ 2021-04-17 14:30 Fabrice Couvreur
  2021-04-17 15:14 ` Hans Hagen
  2021-04-17 17:04 ` Wolfgang Schuster
  0 siblings, 2 replies; 4+ messages in thread
From: Fabrice Couvreur @ 2021-04-17 14:30 UTC (permalink / raw)
  To: mailing list for ConTeXt users


[-- Attachment #1.1: Type: text/plain, Size: 1609 bytes --]

Hi,
This is going to be difficult to explain because the code below works but
in a project with many components does not. Actually the macro does not
work in the definition environment in my project but in the same
environment of this simple code yes. Thank you for your possible help.
Fabrice

\setupbodyfont[modern]

\setupenumerations
  [before={},
   after={\blank},
   alternative=serried,
   number=no,
   title=yes,
   titleleft={(},
   titleright={)},
   prefix=yes,
   prefixsegments=chapter,
   way=bychapter,
   titlestyle=bold,
   width=broad]

\defineenumeration
   [definition]
   [text=Définition,
    number=no,
    headcommand=\groupedcommand{}{},
    style=slanted]

\setupmathematics[stylealternative=calligraphic]

 \unexpanded\def\CScript#1#2{\start\switchtobodyfont[stixtwo]\m{{\mathscript{#1}}_{#2}}\stop}

 \unexpanded\def\cscript#1{\start\switchtobodyfont[stixtwo]\m{{\mathscript{#1}}}\stop}

\starttext

\startdefinition
  \placefigure[right]{}{
  \startMPcode
    path rectangle;
    rectangle=unitsquare xscaled 6cm yscaled 4cm;

    draw rectangle withcolor green;
    label.bot("\cscript{C}", center rectangle);
  \stopMPcode}
  Soit \m{f} une fonction continue et positive sur un intervalle
\m{[a\,;b]} et \cscript{C}  sa courbe représentative dans un repère
orthogonal. L'aire du domaine délimité par la courbe \cscript{C}, l'axe des
abscisses et les droites d'équations \m{x=a} et \m{x=b}, exprimée en unité
d'aire, est appelée {\bi intégrale de \m{a} à \m{b} de la fonction \m{f}}.
\stopdefinition

\stoptext

[-- Attachment #1.2: Type: text/html, Size: 3085 bytes --]

[-- Attachment #2: ntg-1.png --]
[-- Type: image/png, Size: 60005 bytes --]

[-- Attachment #3: 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 to write a letter with \ mathscript{}
  2021-04-17 14:30 Macro to write a letter with \ mathscript{} Fabrice Couvreur
@ 2021-04-17 15:14 ` Hans Hagen
  2021-04-17 17:04 ` Wolfgang Schuster
  1 sibling, 0 replies; 4+ messages in thread
From: Hans Hagen @ 2021-04-17 15:14 UTC (permalink / raw)
  To: mailing list for ConTeXt users, Fabrice Couvreur

On 4/17/2021 4:30 PM, Fabrice Couvreur wrote:
> Hi,
> This is going to be difficult to explain because the code below works 
> but in a project with many components does not.Actually the macro does 
> not work in the definition environment in my project but in the same 
> environment of this simple code yes.Thank you for your possible help.
Can you define "work", your expectations.

Hans


-----------------------------------------------------------------
                                           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 to write a letter with \ mathscript{}
  2021-04-17 14:30 Macro to write a letter with \ mathscript{} Fabrice Couvreur
  2021-04-17 15:14 ` Hans Hagen
@ 2021-04-17 17:04 ` Wolfgang Schuster
  2021-04-18 10:03   ` Fabrice Couvreur
  1 sibling, 1 reply; 4+ messages in thread
From: Wolfgang Schuster @ 2021-04-17 17:04 UTC (permalink / raw)
  To: mailing list for ConTeXt users


[-- Attachment #1.1: Type: text/plain, Size: 656 bytes --]

Fabrice Couvreur schrieb am 17.04.2021 um 16:30:
> Hi,
> This is going to be difficult to explain because the code below works 
> but in a project with many components does not.Actually the macro does 
> not work in the definition environment in my project but in the same 
> environment of this simple code yes.Thank you for your possible help.

Without more information or a better example there is nothing which can 
be done.

It's possible you have multiple definitions for the command in your 
style file,
you can also try if adding \usebodyfont[stixtwo] (or 
\definebodyfont[...pt] when
you use a unconventional font size) to your setups.

Wolfgang


[-- Attachment #1.2: Type: text/html, Size: 1810 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 to write a letter with \ mathscript{}
  2021-04-17 17:04 ` Wolfgang Schuster
@ 2021-04-18 10:03   ` Fabrice Couvreur
  0 siblings, 0 replies; 4+ messages in thread
From: Fabrice Couvreur @ 2021-04-18 10:03 UTC (permalink / raw)
  To: mailing list for ConTeXt users


[-- Attachment #1.1: Type: text/plain, Size: 1437 bytes --]

Hi Hans and Wolfgang,
I have tried your suggestions and it seems to work.
Thank you so much.
Fabrice

Le sam. 17 avr. 2021 à 19:04, Wolfgang Schuster <
wolfgang.schuster.lists@gmail.com> a écrit :

> Fabrice Couvreur schrieb am 17.04.2021 um 16:30:
>
> Hi,
> This is going to be difficult to explain because the code below works but
> in a project with many components does not. Actually the macro does not
> work in the definition environment in my project but in the same
> environment of this simple code yes. Thank you for your possible help.
>
>
> Without more information or a better example there is nothing which can be
> done.
>
> It's possible you have multiple definitions for the command in your style
> file,
> you can also try if adding \usebodyfont[stixtwo] (or
> \definebodyfont[...pt] when
> you use a unconventional font size) to your setups.
>
> 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
>
> ___________________________________________________________________________________
>

[-- Attachment #1.2: Type: text/html, Size: 3659 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

end of thread, other threads:[~2021-04-18 10:03 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-17 14:30 Macro to write a letter with \ mathscript{} Fabrice Couvreur
2021-04-17 15:14 ` Hans Hagen
2021-04-17 17:04 ` Wolfgang Schuster
2021-04-18 10:03   ` Fabrice Couvreur

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).