[NTG-context] Prevent repeated caption for split table

2018-04-15 Thread Magnus J
I have a long natural table split vertically over several pages. How
can I prevent the caption from being repeated on the second page? Or
even better, how can I have a different caption?

/MJO
___
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
___

Re: [NTG-context] Font fallback scaling

2018-04-13 Thread Magnus J
That solved it. For reference, I previously used the Texlive versions
bundled with Cygwin and Arch Linux.

/MJO

On Fri, Apr 13, 2018 at 3:44 PM, Hans Hagen <j.ha...@xs4all.nl> wrote:
> On 4/13/2018 3:38 PM, Magnus J wrote:
>>
>> This is even more weird (same setup as before)
>
> i uploaded a beta .. maybe that one works better (at least we run the same
> then)
>
> -
>   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
> ___
___
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
___

Re: [NTG-context] Font fallback scaling

2018-04-13 Thread Magnus J
This is even more weird (same setup as before)

\starttext

wedge\wedge\footnote{wedge} prime\prime\footnote{prime}   % <-- no
\wedge (question mark) in footnote, but \prime

\page
wedge\wedge\footnote{wedge} prime\prime\footnote{prime}   % <--
\wedge and \prime

\page
wedge\wedge\footnote{wedge} prime\prime\footnote{prime}   % <--
wedge and \prime

\stoptext

On Fri, Apr 13, 2018 at 2:23 PM, Magnus J <mjo.li...@gmail.com> wrote:
> Well that's even more odd. Is it visible in the attachment? Tested
> with updated Acrobat Reader and Sumatra pdf viewer without any visible
> \prime or \doubleprime, except in the footnote (where there is no
> \wedge on the other hand)... Note that \prime is visible as a footnote
> symbol, which is also in math mode. If I comment *all* of the
> \definefallbackfamily rows, it shows in the math example (but then
> it's Termes of course). With any of the \definefallbackfamily
> uncommented, it won't show.
>
> Should I disable the fallback for a specific character, i.e., remove
> the characters from one of the fallback ranges? And how is that done?
> I don't care if Termes is used for most of the symbols, but I want to
> keep as much Garamond as possible in math mode, especially for letters
> and number.
>
> /MJO
>
>> On 4/13/2018 12:34 PM, Magnus J wrote:
>>
>> >  $D\prime = 0.98$  % <-- no \prime in output
>> >
>> >  $D\doubleprime = 0.98$% <-- no \doubleprime in output
>> hm, i see primes here
>>
>>
>> -
>>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
___

Re: [NTG-context] Font fallback scaling

2018-04-13 Thread Magnus J
Well that's even more odd. Is it visible in the attachment? Tested
with updated Acrobat Reader and Sumatra pdf viewer without any visible
\prime or \doubleprime, except in the footnote (where there is no
\wedge on the other hand)... Note that \prime is visible as a footnote
symbol, which is also in math mode. If I comment *all* of the
\definefallbackfamily rows, it shows in the math example (but then
it's Termes of course). With any of the \definefallbackfamily
uncommented, it won't show.

Should I disable the fallback for a specific character, i.e., remove
the characters from one of the fallback ranges? And how is that done?
I don't care if Termes is used for most of the symbols, but I want to
keep as much Garamond as possible in math mode, especially for letters
and number.

/MJO

> On 4/13/2018 12:34 PM, Magnus J wrote:
>
> >  $D\prime = 0.98$  % <-- no \prime in output
> >
> >  $D\doubleprime = 0.98$% <-- no \doubleprime in output
> hm, i see primes here
>
>
> -
>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
___

Re: [NTG-context] Font fallback scaling

2018-04-13 Thread Magnus J
Thanks, I could have sworn I had tested that. With my new setup, I
still have trouble with some characters in math mode. Specifically, I
don't see the \prime and \doubleprime characters in math mode, and I
can't use \wedge as a footnote symbol.

Consider this commented example, pdf result attached.

/MJO


% define the characters to use for Garamond in math mode
\definefontfamilypreset
[math:somesymbols]

[range={0x0002A-0x0002E,0x000A7,0x000B6,0x000D7,0x000F7,0x02020-0x02021,0x02212,0x02219-0x02226,0x02228-0x02265,0x02012,0x0003C-0x0003E,0x0007C},
tf=style:regular,
offset=lowercasenormal,
]

\definefallbackfamily[mainface][math][Adobe Garamond
Pro][rscale=1.05,range=digitsnormal]
\definefallbackfamily[mainface][math][Adobe Garamond
Pro][rscale=1.05,range=lowercasenormal]
\definefallbackfamily[mainface][math][Adobe Garamond
Pro][rscale=1.05,range=lowercaseitalic]
\definefallbackfamily[mainface][math][Adobe Garamond
Pro][rscale=1.05,range=uppercasenormal]
\definefallbackfamily[mainface][math][Adobe Garamond
Pro][rscale=1.05,range=uppercaseitalic]
\definefallbackfamily[mainface][math][Adobe Garamond
Pro][rscale=1.05,range=math:somesymbols]

\definefontfamily[mainface][serif][Adobe Garamond Pro]
\definefontfamily[mainface][math][TeX Gyre Termes Math][scale=0.9]

\setupbodyfont[mainface,11pt]

% footnotes
\defineconversion[avhset][\m{\wedge},\m{\prime}]
\setupnotation[footnote][way=bypage,numberconversion=avhset]

\enabletrackers[fonts.missing]

\starttext

$D\prime = 0.98$  % <-- no \prime in output

$D\doubleprime = 0.98$% <-- no \doubleprime in output

wedge\wedge\footnote{wedge}   % <-- lua stats  > unknown math
characters: ∧ (U+02227) (n=2)

prime\prime\footnote{prime}   % <--

\stoptext

> On 4/12/2018 6:17 PM, Magnus J wrote:
> > I use Adobe Garamond Pro in combination with Termes Math for math (the
> > latter for missing glyphs, Garamond is not very complete). How can I
> > scale size of Termes Math without decreasing the size of the Garamond
> > glyphs in math mode?
> >
> > /MJO
> >
> >
> >  % define the characters to use for Garamond in math mode
> >  \definefontfamilypreset
> >  [math:somesymbols]
> >
> >
[range={0x0002A-0x0002E,0x000A7,0x000B6,0x000D7,0x000F7,0x02020-0x02021,0=
x02212,0x02219-0x02226,0x02228-0x02265,0x02012,0x0003C-0x0003E,0x0007C},
> >   tf=style:regular,
> >   offset=lowercasenormal,
> >  ]
> >
> >  \definefallbackfamily[mainface][mm][Adobe Garamond
> > Pro][math:digitsnormal]
> >  \definefallbackfamily[mainface][mm][Adobe Garamond
> > Pro][math:lowercasenormal]
> >  \definefallbackfamily[mainface][mm][Adobe Garamond
> > Pro][math:lowercaseitalic]
> >  \definefallbackfamily[mainface][mm][Adobe Garamond
> > Pro][math:uppercasenormal]
> >  \definefallbackfamily[mainface][mm][Adobe Garamond
> > Pro][math:uppercaseitalic]
> >  \definefallbackfamily[mainface][mm][Adobe Garamond
> > Pro][math:somesymbols]
> >
> >  \definefontfamily[mainface][rm][Adobe Garamond Pro]
> >  \definefontfamily[mainface][mm][TeX Gyre Termes Math][scale=0.9]
%
> > <-- scaling here...
> >
> >  \setupbodyfont[mainface,11pt]
> >
> >  \starttext
> >  100
> >
> >  $100$ % <-- leads to math mode that is smaller than text, even for
> > Garamond glyphs
> >  \stoptext
>  \definefallbackfamily[mainface][math][Adobe Garamond
> Pro][rscale=1.05,range=digitsnormal]
>  \definefallbackfamily[mainface][math][Adobe Garamond
> Pro][rscale=1.05,range=lowercasenormal]
>  \definefallbackfamily[mainface][math][Adobe Garamond
> Pro][rscale=1.05,range=lowercaseitalic]
>  \definefallbackfamily[mainface][math][Adobe Garamond
> Pro][rscale=1.05,range=uppercasenormal]
>  \definefallbackfamily[mainface][math][Adobe Garamond
> Pro][rscale=1.05,range=uppercaseitalic]
>  \definefallbackfamily[mainface][math][Adobe Garamond
> Pro][rscale=1.05,range=math:somesymbols]
>
>  \definefontfamily [mainface] [serif] [Adobe Garamond Pro]
>  \definefontfamily [mainface] [math]  [TeX Gyre Termes Math]
>
>  \setupbodyfont[mainface]
>
>
> -
>Hans Hagen | PRAGMA ADE
>Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
> tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
> -


bla.pdf
Description: Adobe PDF document

[NTG-context] Font fallback scaling

2018-04-12 Thread Magnus J
I use Adobe Garamond Pro in combination with Termes Math for math (the
latter for missing glyphs, Garamond is not very complete). How can I scale
size of Termes Math without decreasing the size of the Garamond glyphs in
math mode?

/MJO


% define the characters to use for Garamond in math mode
\definefontfamilypreset
[math:somesymbols]

[range={0x0002A-0x0002E,0x000A7,0x000B6,0x000D7,0x000F7,0x02020-0x02021,0x02212,0x02219-0x02226,0x02228-0x02265,0x02012,0x0003C-0x0003E,0x0007C},
 tf=style:regular,
 offset=lowercasenormal,
]

\definefallbackfamily[mainface][mm][Adobe Garamond
Pro][math:digitsnormal]
\definefallbackfamily[mainface][mm][Adobe Garamond
Pro][math:lowercasenormal]
\definefallbackfamily[mainface][mm][Adobe Garamond
Pro][math:lowercaseitalic]
\definefallbackfamily[mainface][mm][Adobe Garamond
Pro][math:uppercasenormal]
\definefallbackfamily[mainface][mm][Adobe Garamond
Pro][math:uppercaseitalic]
\definefallbackfamily[mainface][mm][Adobe Garamond
Pro][math:somesymbols]

\definefontfamily[mainface][rm][Adobe Garamond Pro]
\definefontfamily[mainface][mm][TeX Gyre Termes Math][scale=0.9]  % <--
scaling here...

\setupbodyfont[mainface,11pt]

\starttext
100

$100$ % <-- leads to math mode that is smaller than text, even for
Garamond glyphs
\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
___

[NTG-context] Check

2013-10-23 Thread Magnus J
Hello list,

I'm using the bib module for a project and have some references where the
article title ends with a question mark. How can I suppress the period that
is added with the insertarttitle command for these references?

\insertarttitle{\bgroup }{\egroup. }{}%
 ^- (suppress this period)

Regards,

Magnus
___
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
___

Re: [NTG-context] Check

2013-10-23 Thread Magnus J
Sorry for my slippery fingers, a proper subject would be something like
Suppress period after question mark in bib module (and elsewhere)

Regards,

Magnus


On Wed, Oct 23, 2013 at 12:25 PM, Magnus J mjo.li...@gmail.com wrote:

 Hello list,

 I'm using the bib module for a project and have some references where the
 article title ends with a question mark. How can I suppress the period that
 is added with the insertarttitle command for these references?

 \insertarttitle{\bgroup }{\egroup. }{}%
  ^- (suppress this period)

 Regards,

 Magnus

___
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
___

Re: [NTG-context] Calling \followtokens from with in metapost

2013-10-14 Thread Magnus J
Thanks for the code, the stretching is ok (can be hand-tuned) but I find
the positioning a bit odd. Look at the additions to your example:

--
\starttext

\useMPlibrary[txt]

\startsetups text-a
 \startuseMPgraphic{followtokens}
 path RotPath ; RotPath := reverse halfcircle xyscaled 5cm ;
 draw RotPath ;
 \stopuseMPgraphic
 \followtokens{some text but not that long{\hskip1em}}
\stopsetups

\startsetups text-b
 \startuseMPgraphic{followtokens}
 path RotPath ; RotPath := reverse halfcircle xyscaled 3cm  ;
 draw RotPath ;
 \stopuseMPgraphic
 \followtokens{{\hskip1em}some text{\hskip1em}}
\stopsetups

\startMPpage
 draw textext(\setups{text-a}) ;
 draw textext(\setups{text-b}) shifted (0,-.5cm);

 % equal to RotPath in text-b
 path RotPath ; RotPath := reverse halfcircle xyscaled 3cm  ;
 draw RotPath shifted (0,-.5cm) withcolor red ;

 % vertically aligned (by trial and error), but not horizontally)
 draw RotPath shifted (0,-1.5cm) withcolor blue ;
\stopMPpage
--

I guess the red arc needs to be shifted further down since is has no text,
but what about the horizontal alignment (as shown in blue)? If you look
closely, the two spacing is different even between the black arcs on left
and right sides.

Regards,

Magnus

On 2013-10-13 Hans Hagen wrote:

 inbetween the arcs, that should als? be drawn). The text should not be
 stretched but center on the top, flowing evenly distributed on each
 side. This link will give you an idea:
 
 
http://www.heilsuefling.is/heilsuefling/upload/images/whp_in_general/determinants_of_health/determinants_of_health.jpg
 
 How can this achieved?

 a bit clumsy but workable

 \starttext

 \useMPlibrary[txt]

 \startsetups text-a
 \startuseMPgraphic{
followtokens}
 path RotPath ; RotPath := reverse halfcircle xyscaled 5cm ;
 draw RotPath ;
 \stopuseMPgraphic
 \followtokens{some text but not that long{\hskip1em}}
 \stopsetups

 \startsetups text-b
 \startuseMPgraphic{followtokens}
 path RotPath ; RotPath := reverse halfcircle xyscaled 3cm  ;
 draw RotPath ;
 \stopuseMPgraphic
 \followtokens{{\hskip1em}some text{\hskip1em}}
 \stopsetups

 \startMPpage
 draw textext(\setups{text-a}) ;
 draw textext(\setups{text-b}) shifted (0,-.5cm);
 \stopMPpage

 \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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

[NTG-context] Calling \followtokens from with in metapost

2013-10-13 Thread Magnus J
Hello list,

How can I call the \followtokens macro (or a similar solution) from within
metapost?  Specifically, I want to integrate text between the semi-circle
arcs in a rainbow-like structure (with the text placed inbetween the arcs,
that should alsó be drawn). The text should not be stretched but center on
the top, flowing evenly distributed on each side. This link will give you
an idea:

http://www.heilsuefling.is/heilsuefling/upload/images/whp_in_general/determinants_of_health/determinants_of_health.jpg

How can this achieved?

Regards,

Magnus
___
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
___

Re: [NTG-context] Mathdesign GD with simplefonts

2013-10-08 Thread Magnus J
I have the fonts and they are reported as mathdesigngd by the mtxrun fonts
script -- sorry if this was unclear. How do I proceed from here?

Regards,

Magnus


On Tue, Oct 8, 2013 at 5:30 PM, Wolfgang Schuster 
schuster.wolfg...@gmail.com wrote:


 Am 07.10.2013 um 09:06 schrieb Magnus J mjo.li...@gmail.com:

  Hello list,
 
  Long term (silent) on-and-off user with two issues that require some
 support:
 
  1. How can I use the Mathdesign GD math font in ConTeXt? I use
 simplefonts to load Adobe Garamond Pro, but mathdesigngd (name as reported
 by mtxrun fonts script) is somehow not found. At this time I fallback to
 ugly solutions with \text in math mode. And yes, I know about
 type-imp-mathdesign.mkiv, but obviously I'm not qualified enough to get it
 right.
 
  Minimal (not) working example:
 
\usemodule[simplefonts]
 
\setmainfont[Adobe Garamond Pro]
\setmathfont[mathdesigngd]
 
\starttext
  I want \m{x^2+y^2=z^2} in my text, and $\alpha\beta\gamma$ too.
\stoptext

 The Mathdesign fonts aren’t part of the normal installation and you have
 to add “--fonts=mathdesign” or “--fonts=all” when you call
 first-setup.sh|bat.

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

Re: [NTG-context] Mathdesign GD with simplefonts

2013-10-08 Thread Magnus J
With mathdesigngd (which is intended to complement Adobe Garamond Pro, and
the one that I want), I get
  fontstypescripts  unknown library 'mathdesigngd'
in the output. With mathdesigngm, I get (cropped output)

system   tex  error on line 8 in file /tmp/test.tex: LuaTeX
error  ...

 1
 2 \usetypescriptfile[mathdesign]
 3
 4 \usemodule[simplefonts]
 5
 6 \setmainfont[Adobe Garamond Pro]
 7 \setmathfont[mathdesigngm]
 8 
 9 \starttext
10 I want \m{x^2+y^2=z^2} in my text, and $\alpha\beta\gamma$ too.
11 \stoptext


\ctxcommand #1^^@-\directlua {commands.#1}

\font_helpers_low_level_define ...caledfontmode )}
  \edef \somefontspec {at
\n...
\font_helpers_trigger_define ..._identifier_class
  \csname
\v_font_identifier...
\font_helpers_set_math_family_a ...ily \endcsname
  \else
\font_helpers_set_ma...
\font_helpers_set_math_family_indeed ..._family_a
  \scriptscriptfont #1\font
...
\font_helpers_set_math_family ...amily_indeed #1#2
  \fi \else
\font_helpers_se...
...
l.8


What now?

Regards,

Magnus


On Tue, Oct 8, 2013 at 6:08 PM, Wolfgang Schuster 
schuster.wolfg...@gmail.com wrote:


 Am 08.10.2013 um 17:42 schrieb Magnus J mjo.li...@gmail.com:

  I have the fonts and they are reported as mathdesigngd by the mtxrun
 fonts script -- sorry if this was unclear. How do I proceed from here?


 This should work (can’t test it myself):

 \usetypescriptfile[mathdesign]

 \usemodule[simplefonts]

 \setmainfont[Adobe Garamond Pro]
 \setmathfont[mathdesigngm]

 \starttext
 I want \m{x^2+y^2=z^2} in my text, and $\alpha\beta\gamma$ too.
 \stoptext

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

Re: [NTG-context] Mathdesign GD with simplefonts

2013-10-08 Thread Magnus J
Wonderful, this is really appreciated.

Regards,

Magnus


On Tue, Oct 8, 2013 at 7:38 PM, Wolfgang Schuster 
schuster.wolfg...@gmail.com wrote:


 Am 08.10.2013 um 18:26 schrieb Magnus J mjo.li...@gmail.com:

  With mathdesigngd (which is intended to complement Adobe Garamond Pro,
 and the one that I want), I get
fontstypescripts  unknown library 'mathdesigngd'
  in the output. With mathdesigngm, I get (cropped output)

 1. It’s possible the math design fonts uses different file name than the
 ones context expects and this is the cause for the error message.

 2. Math for Adobe Garamond isn’t supported yet by context.

 I can take a look why math design fails and fix but not today because it
 takes a while to check all files.

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

[NTG-context] Mathdesign GD with simplefonts

2013-10-07 Thread Magnus J
Hello list,

Long term (silent) on-and-off user with two issues that require some
support:

1. How can I use the Mathdesign GD math font in ConTeXt? I use simplefonts
to load Adobe Garamond Pro, but mathdesigngd (name as reported by mtxrun
fonts script) is somehow not found. At this time I fallback to ugly
solutions with \text in math mode. And yes, I know about
type-imp-mathdesign.mkiv, but obviously I'm not qualified enough to get it
right.

Minimal (not) working example:

  \usemodule[simplefonts]

  \setmainfont[Adobe Garamond Pro]
  \setmathfont[mathdesigngd]

  \starttext
I want \m{x^2+y^2=z^2} in my text, and $\alpha\beta\gamma$ too.
  \stoptext

2. I would like to use the \followtokens macro from within metapost. How
can this be achieved? Specifically, I trying to draw a rainbow-like figure
with text between the colors.

Regards,

Magnus
___
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
___

Re: [NTG-context] Mathdesign GD with simplefonts

2013-10-07 Thread Magnus J
Thanks, nice scale. How about the arcs and the text between them?

Regards,

Magnus


On Mon, Oct 7, 2013 at 11:57 AM, Alan BRASLAU alan.bras...@cea.fr wrote:

 On Mon, 7 Oct 2013 09:06:37 +0200
 Magnus J mjo.li...@gmail.com wrote:

  2. I would like to use the \followtokens macro from within metapost. How
  can this be achieved? Specifically, I trying to draw a rainbow-like
 figure
  with text between the colors.

 I am not sure what you mean by a rainbow-like figure. However, for
 rainbow-like colors, I use the following MP code, based on the standard
 resistance color code scheme. The function rainbow(f) returns a rainbow
 spectrum color based on the fraction f running from 0 to 1.

 % standard resistance color code: rainbow sequence
 color resistance_color[] ;  string resistance_name[] ;
 resistance_color0 = (0,0,0) ;   resistance_name0 = black
 ;
 resistance_color1 = (165/255,42/255,42/255) ;   resistance_name1 = brown
 ;
 resistance_color2 = (1,0,0) ;   resistance_name2 = red ;
 resistance_color3 = (1,165/255,0) ; resistance_name3 =
 orange ;
 resistance_color4 = (1,1,0) ;   resistance_name4 =
 yellow ;
 resistance_color5 = (0,1,0) ;   resistance_name5 = green
 ;
 resistance_color6 = (0,0,1) ;   resistance_name6 = blue ;
 resistance_color7 = (148/255,0,211/255) ;   resistance_name7 =
 darkviolet ;
 resistance_color8 = (190/255,190/255,190/255) ; resistance_name8 = gray ;
 resistance_color9 = (1,1,1) ;   resistance_name9 = white
 ;

 def rainbow(expr f) =
 hide(numeric n_ ; n_ = (abs(5f) mod 5) + 2 ;)
 (n_-floor(n_))[resistance_color[floor n_],resistance_color[ceiling n_]]
 enddef ;


 Alan

___
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
___