Re: [NTG-context] Percentage stacked bars chart

2021-07-23 Thread Jorge Manuel
Dear Hans


I think this is a very important piece of code 
(https://akela.mendelu.cz/~thala/statcharts/).
Unfortunately it still doesn't work with lmtx.
As I need to make graphics, I keep waiting for its compatibility with lmtx.

Thanks for your time and support.
Have a great day and, please, live forever.
Your ideas and your work are just amazing.

Jorge Magalhães

On 23 Jul 2021, 17:01 +0100, Hans Hagen , wrote:
> On 7/23/2021 4:43 PM, Jorge Manuel wrote:
> > Dear Sirs,
> >
> > Is there a way (out of the box) to draw percentage stacked bars chart
> > with  metapost or MetaFun xl?
> >
> > Thanks for your time and support.
> you can have a look at
>
> https://akela.mendelu.cz/~thala/statcharts/
>
> (at some point i'll see if i can add a lmtx interface but first i want
> lmtx to be stable)
>
>
> -
> 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] lmt_chart_bar with data from luacode

2021-07-23 Thread Jorge Manuel
Dear Hans

I tried this code, but it didn't work. This is not my day.


%%%
\starttext

\startluacode
 document.samples = {
 { 10, 30, 30, 40, 50 }
 }

 function document.dados()
 return { { 10, 30, 30, 40, 50 }}
 end
\stopluacode

\startMPcode
 draw lmt_chart_bar [
 samples = "table.load('document.dados')",
 percentage = true,
 cumulative = true,
 showlabels = false,
 backgroundcolor = "lightgray",
 ] ;
\stopMPcode

\startMPcode

draw lmt_chart_bar [
 width = 8cm,
 height = 10mm,
 trace = true,
 maximum = 100,
 linewidth = 1mm,
 showlabels = false,
 samples = "document.samples",
 originsize = 0,
 labelanchor = "lft",
 labelcolor = "black"
 labelstyle = "bfxx"
 legendstyle = "tfxx",
 labelstrut = "yes",
] ;
\stopMPcode

\stoptext
%

Jorge Magalhães

On 23 Jul 2021, 16:58 +0100, Hans Hagen , wrote:
>
> \startMPcode
>
> draw lmt_chart_bar [
> width = 8cm,
> height = 10mm,
> trace = true,
> maximum = 100,
> linewidth = 1mm,
> showlabels = false,
> sampleset = "document.samples",
> originsize = 0,
> labelanchor = "lft",
> labelcolor = "black"
> labelstyle = "bfxx"
> legendstyle = "tfxx",
> labelstrut = "yes",
> ] ;
> \stopMPcode
___
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] Every odd row with a background color with extreme tables?

2021-07-23 Thread T. Kurt Bond
Thanks, this has been very helpful.

On Fri, Jul 23, 2021 at 1:02 PM Wolfgang Schuster <
wolfgang.schuster.li...@gmail.com> wrote:

> T. Kurt Bond schrieb am 23.07.2021 um 17:55:
> > With natural tables I can define a color, tell the table to have to
> > use color backgrounds and turn the frame off and get every odd row in
> > all my tables will have that color for the background.
> >
> > == Example
> 
> > \definecolor[grayback][r=.8,g=.8,b=.8]
> > \setupTABLE[background=color,frame=off]
> > \setupTABLE[row][odd][backgroundcolor=grayback]
> > == End of Example
> =
> >
> > Can I get this same effect with extreme tables?
> >
> > My first try with extreme tables looked like this:
> >
> > == Example
> 
> > \definecolor[tablebackground][r=.8,g=.8,b=.8]
> > \setupxtable[background=color,frame=off]
> > \setupxtable[row][odd][backgroundcolor=tablebackground]
> > == End of Example
> =
> >
> > That didn't seem to have any effect.
> >
> > Is there a way to have every odd row of every table in my document
> > have color background?
>
> \startuseMPgraphic{xtablerow}
>  fill OverlayBox withcolor "gray";
> \stopuseMPgraphic
>
> \defineoverlay
>[xtablerow]
>[\ifodd\currentxtablerow
>   \useMPgraphic{xtablerow}%
> \fi]
>
> \starttext
>
> \startxtable[frame=off,background=xtablerow]
> \dorecurse{20}
>{\startxrow
>   \startxcell Column 1 \stopxcell
>   \startxcell Column 2 \stopxcell
> \stopxrow}
> \stopxtable
>
> \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://context.aanhet.net
> archive  : https://bitbucket.org/phg/context-mirror/commits/
> wiki : http://contextgarden.net
>
> ___
>


-- 
T. Kurt Bond, tkurtb...@gmail.com, https://tkurtbond.github.io
___
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] Use of lettrine module in LMTX

2021-07-23 Thread Gerben Wierda

Gerben Wierda (LinkedIn )
R Enterprise Architecture  (main site)
Book: Chess and the Art of Enterprise Architecture 
Book: Mastering ArchiMate 

> On 23 Jul 2021, at 13:04, Wolfgang Schuster 
>  wrote:
> 
> Gerben Wierda schrieb am 22.07.2021 um 08:43:
>> So, basically, the page on ConTeXt garden about using older modules in LMTX 
>> is incomplete: not all modules actually work.
> 
> Many of the modules on the garden are 10 years and older and predate 
> MkIV/LuaTeX.
> 
> A lot has changed since then and LMTX added many new commands which replaced
> older mechanism. There is no way all modules can work after these changes
> (especially modules which add font support in MkII).

It is OK and understandable that those modules wil be or become out of date.

I just made a remark on ConTeXtgarden not mentioning this. I have now 
downloaded those modules because of the suggestion there, but I should remove 
them again as they are no longer maintained for LMTX and may not work or stop 
working at any moment.

G

___
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] weekend update

2021-07-23 Thread Hans Hagen

Hi,

This time the update has, appart from already mentioned mp fixes and 
additions, another new feature.


% runpath=texruns:whatever

% runpath=e:/temporary/texruns/runtest
% runpath=temp:texruns/runtest
% runpath=home:texruns/runtest

\starttext
test
\stoptext

In context the first line can be used to control some aspects of the run 
and runpath (also as command line switch) will process the document 
elsewhere. The main reason for this feature is that when you have files 
in for instance a git repository (or export), you don't want the run 
path to be polluted by temporary files because everything can end up in 
the repository when it gets updates (after all these years I don't 
expect this pollution issue to be solved; svn is more explicit in what 
goes in).


So, for instance the manuals are on clean paths (on my machine i (am) 
put(ting) experiments, todo's etc under an ignored /private subpath 
which means that styles can still be found if needed).


The texruns: prefix resolves to an environment variable with the same 
name or when not set, to the temp directory. The temp: and home: 
prefixes resolve (as usual) to their counterparts (prefixes are a very 
old mkii mechanism but still useful).


When not present a path will be created, when no chdir is possible the 
run aborts.


There are probably some cases when resources are not found but that will 
be dealt with in due time. I might also update the underlying mechanisms 
at some point.


I already adapted some manuals so that means that when users process 
these themselves they will not see the runfiles fly to the temp path 
unless 'texruns' is configured. So be it.


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
___


Re: [NTG-context] Every odd row with a background color with extreme tables?

2021-07-23 Thread Wolfgang Schuster

T. Kurt Bond schrieb am 23.07.2021 um 17:55:

With natural tables I can define a color, tell the table to have to
use color backgrounds and turn the frame off and get every odd row in
all my tables will have that color for the background.

== Example 
\definecolor[grayback][r=.8,g=.8,b=.8]
\setupTABLE[background=color,frame=off]
\setupTABLE[row][odd][backgroundcolor=grayback]
== End of Example =

Can I get this same effect with extreme tables?

My first try with extreme tables looked like this:

== Example 
\definecolor[tablebackground][r=.8,g=.8,b=.8]
\setupxtable[background=color,frame=off]
\setupxtable[row][odd][backgroundcolor=tablebackground]
== End of Example =

That didn't seem to have any effect.

Is there a way to have every odd row of every table in my document
have color background?


\startuseMPgraphic{xtablerow}
fill OverlayBox withcolor "gray";
\stopuseMPgraphic

\defineoverlay
  [xtablerow]
  [\ifodd\currentxtablerow
 \useMPgraphic{xtablerow}%
   \fi]

\starttext

\startxtable[frame=off,background=xtablerow]
\dorecurse{20}
  {\startxrow
 \startxcell Column 1 \stopxcell
 \startxcell Column 2 \stopxcell
   \stopxrow}
\stopxtable

\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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] Every odd row with a background color with extreme tables?

2021-07-23 Thread Henning Hraban Ramm

> Am 23.07.2021 um 17:55 schrieb T. Kurt Bond :
> 
> With natural tables I can define a color, tell the table to have to
> use color backgrounds and turn the frame off and get every odd row in
> all my tables will have that color for the background.
> 
> Can I get this same effect with extreme tables?
> 
> My first try with extreme tables looked like this:
> 
> == Example 
> 
> \definecolor[tablebackground][r=.8,g=.8,b=.8]
> \setupxtable[background=color,frame=off]
> \setupxtable[row][odd][backgroundcolor=tablebackground]
> == End of Example 
> =
> 
> That didn't seem to have any effect.

\setupxtables has only a limited set of parameters:
https://wiki.contextgarden.net/Command/setupxtable

> Is there a way to have every odd row of every table in my document
> have color background?

As far as I can see, only via “styles” that you can setup with \definextable:

https://www.pragma-ade.com/general/manuals/xtables-mkiv.pdf


Hraban
___
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] Percentage stacked bars chart

2021-07-23 Thread Hans Hagen

On 7/23/2021 4:43 PM, Jorge Manuel wrote:

Dear Sirs,

Is there a way (out of the box) to draw percentage stacked bars chart 
with  metapost or MetaFun xl?


Thanks for your time and support.

you can have a look at

https://akela.mendelu.cz/~thala/statcharts/

(at some point i'll see if i can add a lmtx interface but first i want 
lmtx to be stable)



-
  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] lmt_chart_bar with data from luacode

2021-07-23 Thread Hans Hagen

On 7/23/2021 11:07 AM, Jorge Manuel wrote:

Dear Sirs

If I tried:

\starttext
\startluacode
sample = {10,30,30,40}

  function MP.GetP()
  mp.print(sample)
  end
\stopluacode

\startMPcode
draw lmt_chart_bar [
  width = 8cm,
  height = 10mm,
  samples = {lua.MP.GetP()} ,
  trace = true,
  maximum = 100,
  linewidth = 1mm,
  showlabels = false,
  originsize = 0,
  labelanchor = "lft",
  labelcolor = "black"
  labelstyle = "bfxx"
  legendstyle = "tfxx",
  labelstrut = "yes",
] ;
\stopMPcode

\stoptext

This works.

But with an extra element in the sample table:

\starttext
\startluacode
sample = {10,30,30,40,50}

  function MP.GetP()
  mp.print(sample)
  end
\stopluacode

\startMPcode
draw lmt_chart_bar [
  width = 8cm,
  height = 10mm,
  samples = {lua.MP.GetP()} ,
  trace = true,
  maximum = 100,
  linewidth = 1mm,
  showlabels = false,
  originsize = 0,
  labelanchor = "lft",
  labelcolor = "black"
  labelstyle = "bfxx"
  legendstyle = "tfxx",
  labelstrut = "yes",
] ;
\stopMPcode

\stoptext

Don't works anymore. Why?

(watch out: samples is global in your code)

your lua.MP.GetP() becomes some mp quantity and 4 entries becomes a 
cmykcolor and you're just lucky that that works (reverse casting makes 
it a table) and there is no 5 element quantity so, you end up in 
scantokens not being able to understand it


I'll think of a way to pass records (new submechanism) at some point but 
for now i added this:


\startluacode
document.samples = {
{ 10, 30, 30, 40, 50 }
}
\stopluacode

\startMPcode

draw lmt_chart_bar [
 width = 8cm,
 height = 10mm,
 trace = true,
 maximum = 100,
 linewidth = 1mm,
 showlabels = false,
 sampleset = "document.samples",
 originsize = 0,
 labelanchor = "lft",
 labelcolor = "black"
 labelstyle = "bfxx"
 legendstyle = "tfxx",
 labelstrut = "yes",
] ;
\stopMPcode

with the spec being some lua, so this will also work:

 sampleset = "table.load('foo.lua')",

asuming foo.lua has this:

return {
{ 10, 30, 30, 40, 50 }
}



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


[NTG-context] Every odd row with a background color with extreme tables?

2021-07-23 Thread T . Kurt Bond
With natural tables I can define a color, tell the table to have to
use color backgrounds and turn the frame off and get every odd row in
all my tables will have that color for the background.

== Example 
\definecolor[grayback][r=.8,g=.8,b=.8]
\setupTABLE[background=color,frame=off]
\setupTABLE[row][odd][backgroundcolor=grayback]
== End of Example =

Can I get this same effect with extreme tables?

My first try with extreme tables looked like this:

== Example 
\definecolor[tablebackground][r=.8,g=.8,b=.8]
\setupxtable[background=color,frame=off]
\setupxtable[row][odd][backgroundcolor=tablebackground]
== End of Example =

That didn't seem to have any effect.

Is there a way to have every odd row of every table in my document
have color background?

-- 
T. Kurt Bond, tkurtb...@gmail.com, tkurtbond.github.io and tkb.tx0.org
___
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] Percentage stacked bars chart

2021-07-23 Thread Jorge Manuel
Dear Sirs,

Is there a way (out of the box) to draw percentage stacked bars chart with  
metapost or MetaFun xl?

Thanks for your time and support.

Jorge Magalhães

___
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] Use of lettrine module in LMTX

2021-07-23 Thread Arthur Rosendahl
On Fri, Jul 23, 2021 at 03:10:59PM +0200, Gerben Wierda wrote:
> I just made a remark on ConTeXtgarden not mentioning this.

  The ConTeXt garden is a collaborative effort; feel free to edit the
page that contains incomplete or inaccurate information.

Arthur
___
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] LMTX: some alignment issues

2021-07-23 Thread Gerben Wierda
[still working to somewhat reproduce my old mkii setup in LMTX]

The following is a minimal example that shows the following:
context test2.tex results in
The first line after the initials not as much indented as it should be
Character protrusion in a footnote does not work (see “refer-“ at the end of 
the 5th line of the footnote) (I understand the trouble on the first line
context --mode=OPTIMA test2.tex results in
The first line after the initials not as much indented as it should be
"because” is not hyphenated. Note, I see this is a smaller font setup where 
there is clearly an option to hyphenate, the minimum example shows the same 
effect, but potentially not from the same cause)
Character protrusion in a footnote does not work
context --mode=OPTIMANOVA test2.tex results in
The first line after the initials not as much indented as it should be
Multiple instances of extending beyond the right
Character protrusion in a footnote does not work
Adding \setupalign[hanging,hz] to the Optima Nova example results in ‘because’ 
on the first line to be hyphenated as ‘be-cause’ and pigeonhole in a later line 
as 'pi-geonhole'. 

I am adding a screen shot of part of the Optima Nova result as most will not 
have that font available:



- All show no protrusion in the footnotes
- All show a problem with the first line after the initial
- When using Optima Nova, hyphenation isn’t used while the situation in Optima 
looks nearly identical.

MVP source:

%%%
\definepapersize[smallpaperback][width=5in,height=8in]
\setuppapersize[smallpaperback][smallpaperback]
\setuplayout[location=doublesided]
\setuppagenumbering[alternative=doublesided]
\setupsectionblock[frontpart][page=no]
\setupsectionblock[bodypart][page=no]
\setupsectionblock[appendix][page=no]
\setupsectionblock[backpart][page=no]

\definefontfeature
  [default]
  [default]
  [protrusion=quality,expansion=quality]

\setupbodyfont[default,11pt]
\startmode[OPTIMANOVA]
\definefontfamily
[bookfont]
[ss]
[Optima nova LT Pro]
[tf=style:Regular,
bf=style:Medium,
it=style:Italic,
bi=style:Medium Italic]
\setupbodyfont[bookfont,11pt]
\stopmode
\startmode[OPTIMA]
\definefontfamily
[bookfont]
[ss]
[Optima]
[tf=style:Regular,
bf=style:Bold,
it=style:Italic,
bi=style:Bold Italic]
\setupbodyfont[bookfont,11pt]
\stopmode
\setupalign[hanging] % only protrusion

\showframe

\starttext
\setupindenting[next]
\placeinitial \input tufte

Test footnote\footnote{If you are not technical and terms like
`application server',
`caught exceptions', or `web proxy' in the fragment that follows, do not
immediately get you started, do not worry: there is no need to know what
I am
talking about here in a technical sense. You can read this without
understanding any of the technical references. Just skip over them, their
specifics are not important to the story. They are real enough, though.  You
can trust me on that, or ask your engineers.}
\stoptext
%%%

Gerben Wierda (LinkedIn )
R Enterprise Architecture  (main site)
Book: Chess and the Art of Enterprise Architecture 
Book: Mastering ArchiMate 

___
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] TrueType font styles suddenly not found anymore

2021-07-23 Thread Gerben Wierda
That fixed it. Thanks.

G

On 23 Jul 2021, at 13:22, Wolfgang Schuster  
wrote:
> 
> Gerben Wierda schrieb am 23.07.2021 um 12:35:
>> My font setup is like this:
>> [...]
>> Now, both worked earlier today. But I’ve lost the old Optima font somehow. 
>> If I now try —mode=OPTIMA I get:
>> selectfont  > the requested font 'Optima' has no files for the 'tf' 
>> alternative, Latin Modern is used instead.
>> and the document is set in Latin Modern Sans Serif. Another OpenType 
>> Postscript font like Chaparral Pro works. Another TrueType like Century 
>> Gothic does not. I seem not to be able to load any TrueType font anymore.
>> I recall there being some way to rebuild a font cache of LMTX ConTeXt but I 
>> can’t find the instructions. Can someone enlighten me?
> 
> 
> Updating the font cache:
> 
>   mtxrun --script fonts --reload
> 
> or
> 
>   mtxrun --script fonts --reload --force
> 
> 
> Listing all available fonts:
> 
>   mtxrun --script fonts --list --all optima*
> 
> 
> 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
> ___

___
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] TrueType font styles suddenly not found anymore

2021-07-23 Thread Wolfgang Schuster

Gerben Wierda schrieb am 23.07.2021 um 12:35:


My font setup is like this:

[...]

Now, both worked earlier today. But I’ve lost the old Optima font 
somehow. If I now try —mode=OPTIMA I get:


selectfont      > the requested font 'Optima' has no files for the 'tf' 
alternative, Latin Modern is used instead.


and the document is set in Latin Modern Sans Serif. Another OpenType 
Postscript font like Chaparral Pro works. Another TrueType like Century 
Gothic does not. I seem not to be able to load any TrueType font anymore.


I recall there being some way to rebuild a font cache of LMTX ConTeXt 
but I can’t find the instructions. Can someone enlighten me?



Updating the font cache:

mtxrun --script fonts --reload

or

mtxrun --script fonts --reload --force


Listing all available fonts:

mtxrun --script fonts --list --all optima*


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
___


Re: [NTG-context] Use of lettrine module in LMTX

2021-07-23 Thread Wolfgang Schuster

Gerben Wierda schrieb am 22.07.2021 um 08:43:
So, basically, the page on ConTeXt garden about using older modules in 
LMTX is incomplete: not all modules actually work.


Many of the modules on the garden are 10 years and older and predate 
MkIV/LuaTeX.


A lot has changed since then and LMTX added many new commands which replaced
older mechanism. There is no way all modules can work after these changes
(especially modules which add font support in MkII).

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
___


Re: [NTG-context] Math cases

2021-07-23 Thread Jack Hill

Thank you.
I've updated the wiki to reflect those changes. The wiki's version of 
ConTeXt still seems to use the old \NC and \MC commands though.


Jack
___
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] TrueType font styles suddenly not found anymore

2021-07-23 Thread Gerben Wierda

My font setup is like this:

\startmode[OPTIMANOVA]
\definefontfamily
[bookfont]
[ss]
[Optima nova LT Pro]
[tf=style:Regular,
bf=style:Medium,
it=style:Italic,
bi=style:Medium Italic]
\setupbodyfont[bookfont,10pt]
\stopmode
\startmode[OPTIMA]
\definefontfamily
[bookfont]
[ss]
[Optima]
[tf=style:Regular,
bf=style:Bold,
it=style:Italic,
bi=style:Bold Italic]
\setupbodyfont[bookfont,10pt]
\stopmode

Now, both worked earlier today. But I’ve lost the old Optima font somehow. If I 
now try —mode=OPTIMA I get:

selectfont  > the requested font 'Optima' has no files for the 'tf' 
alternative, Latin Modern is used instead.

and the document is set in Latin Modern Sans Serif. Another OpenType Postscript 
font like Chaparral Pro works. Another TrueType like Century Gothic does not. I 
seem not to be able to load any TrueType font anymore.

I recall there being some way to rebuild a font cache of LMTX ConTeXt but I 
can’t find the instructions. Can someone enlighten me?

Gerben Wierda (LinkedIn )
R Enterprise Architecture  (main site)
Book: Chess and the Art of Enterprise Architecture 
Book: Mastering ArchiMate 

___
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] lmt_chart_bar with data from luacode

2021-07-23 Thread Jorge Manuel
Dear Sirs

If I tried:

\starttext
\startluacode
sample = {10,30,30,40}

 function MP.GetP()
 mp.print(sample)
 end
\stopluacode

\startMPcode
draw lmt_chart_bar [
 width = 8cm,
 height = 10mm,
 samples = {lua.MP.GetP()} ,
 trace = true,
 maximum = 100,
 linewidth = 1mm,
 showlabels = false,
 originsize = 0,
 labelanchor = "lft",
 labelcolor = "black"
 labelstyle = "bfxx"
 legendstyle = "tfxx",
 labelstrut = "yes",
] ;
\stopMPcode

\stoptext

This works.

But with an extra element in the sample table:

\starttext
\startluacode
sample = {10,30,30,40,50}

 function MP.GetP()
 mp.print(sample)
 end
\stopluacode

\startMPcode
draw lmt_chart_bar [
 width = 8cm,
 height = 10mm,
 samples = {lua.MP.GetP()} ,
 trace = true,
 maximum = 100,
 linewidth = 1mm,
 showlabels = false,
 originsize = 0,
 labelanchor = "lft",
 labelcolor = "black"
 labelstyle = "bfxx"
 legendstyle = "tfxx",
 labelstrut = "yes",
] ;
\stopMPcode

\stoptext

Don't works anymore. Why?

Thanks for your time and support.


Sent with a Spark
___
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] MP boxes: boxjoin not recognized?

2021-07-23 Thread Hans Hagen

On 7/23/2021 6:38 AM, Aditya Mahajan wrote:


On Wed, 21 Jul 2021, Hans Hagen wrote:


On 7/21/2021 12:29 PM, Rudd, Kevin wrote:

Hi---

All of my figures that use MP boxes are now failing. It looks like
"boxjoin" (from the MP "boxes" macros) is not being recognized. Also,
apparently unrelated, I wonder if the comparison in "boxes.mp" is
correct as it appears that lmtx loads "mp-xbox.mpiv" instead of
"mp-xbox.mpxl". Here is some log output and a (mostly) MWE.


Indeed, I made that one an mp-* because it removes a dependency.


Maybe we should also merge rboxes.mp with mp-xbox.* It is almost the same code 
as boxes.mp.


Never seen, where is it?

Btw, Alan's nodes module is also an alternative for connected stuff.

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
___