[NTG-context] Add arrow tips to axes in lmt_function

2020-09-19 Thread Jairo A. del Rio
Hi, list! I want to know how to add arrow tips for axes (x, y) to a
function. I did the following based on a luametafun example:

\starttext
\startMPcode{doublefun}
draw lmt_function
[
xmin=0, xmax=10,
xstep=.05,
ymin=-2, ymax=2,

code="1.5 * math.cosd(240 * math.sqrt(x))",

xlabels="no",ylabels="no",

sx=2mm, sy=4mm, linewidth=.025mm, offset=.1mm,]

xsized 8cm;
\stopMPcode
\stoptext

But I didn't find anywhere in manuals or the mailing list concerning
arrows, nor key-value pairs for lmt_function. Thank you in advance.

Best regards,

Jairo :)
___
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] footnotes in captions in floatcombinations

2020-09-19 Thread Henning Hraban Ramm


> Am 16.09.2020 um 13:48 schrieb Henning Hraban Ramm :
> 
> In MkIV I get images and footnotes, but the width of the footnotes is always 
> that of the image.
> 
> In LMTX I don’t get anything.

Current state (v. 2020.09.18 20:32):

Some progress: Footnotes are still as wide as the image they belong to (in both 
versions), but in LMTX some footnotes are missing.


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] Best way to store text for later use

2020-09-19 Thread Denis Maier

Am 19.09.2020 um 11:59 schrieb Hans Hagen:

On 9/18/2020 8:59 PM, Denis Maier wrote:



Am 18.09.2020 um 19:02 schrieb Hans Hagen:

On 9/18/2020 3:36 PM, Denis Maier wrote:


I've tried using buffers, but this here doesn't work:
Why not just fetch it when needed. There is no gain in storing it 
and fetching from the xml tree is fast.


Most likely due to my limited understanding of how these things work. 
I thought storing the text and retrieving it later would be the 
easiest way to get rid of the constraints of linar processing of the 
XML file. The layout itself is determined by setups such as this one:


there is no linear processing, you just start someplace and 
recursively deal with the tree (which often looks like linear when you 
start at the root but basically you can access everything everywhere)



\startsetups abstract
 \startabstract
     \documentvariable{abstract}
 \stopabstract
\stopsetups

\setuphead [chapter][
 alternative=middle,
 page=yes,
 indentnext=no,
 style=\tfa\setupinterlinespace,
 after={\directsetup{placeauthors}\directsetup{abstract}},
 footer=chapterfooter,
 ]

How could I fetch the xml node from here so I don't need a variable, 
buffer or the like?

just pass the root element i.e. instead of #1 in

 \xmlfilter{#1}{/abstract/command(xml:article-meta:abstract)}

as #1 is just an abstraction for the current element; you pass the 
name you used when loading the tree (often \xmldocument works too)




Thanks. That is very helpful. And indeed, that makes things much easier!

Denis
___
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] Allow pagebreaks in footnotes

2020-09-19 Thread Denis Maier

Thanks. I'll need to check what happens here.

Am 19.09.2020 um 12:03 schrieb Hans Hagen:

On 9/18/2020 11:10 PM, denis.maier.li...@mailbox.org wrote:


Hi

Is there a setting that prevents footnotes from spreading over more than
one page? I have a document where this seems to be the case, but I don't
know why. It just looks like ConTeXt tries to keep the complete footnote
on one page, which leads to ugly white space at the end of almost every
page. (LaTeX has \interfootnotelinepenalty to customize this, but what
about ConTeXt?)

split=strict|verystrict|tolerant

we're tolerant by default

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] ZapfDingbats Unicode differences MKIV vs LMTX

2020-09-19 Thread Hans Hagen

On 9/19/2020 6:18 AM, Christoph Reller wrote:
On Fri, Sep 18, 2020 at 4:17 PM Hans Hagen > wrote:


On 9/18/2020 11:23 AM, Christoph Reller wrote:
 > Dear List,
 >
 > I have the following MWE:
 >
 >
\definefontsynonym[ZapfDingbats][file:ZapfDingbats][features=dingbats]
 > \usemodule [fnt-10]
 > \starttext
 > (1) \getglyphdirect{ZapfDingbats}{61491}\crlf % MKIV log: char 
 > (U+0F033) in font 'ZapfDingbats-4' with id 8: missing
 > (2) \getglyphdirect{ZapfDingbats}{983059}     % LMTX log: char 󰀓
 > (U+F0013) in font 'ZapfDingbats-4' with id 8: missing
 > \ShowCompleteFont{name:ZapfDingbats}{14pt}{1}
 > \stoptext
 >
Dingbats are old school t1 without proper names so we can't use
unicodes. However, there is a goodie that should do that so that in
principle it should work with unicodes but there is some interference
going on (i'll look at that)

For nwo access by 'name' or 'index' (these are kind of stable for such
an old font):

       n:a34  : \getglyph{ZapfDingbats}{\tochar{n:a34}}  \par
       n:a35  : \getglyph{ZapfDingbats}{\tochar{n:a35}}  \par
       i:48   : \getglyph{ZapfDingbats}{\tochar{i:48}}   \par
       i:49   : \getglyph{ZapfDingbats}{\tochar{i:49}}   \par
       n:a104 : \getglyph{ZapfDingbats}{\tochar{n:a104}} \par
       n:a105 : \getglyph{ZapfDingbats}{\tochar{n:a105}} \par

Thank you Hans!
Access by glyph index with \tochar{i:19} works well for both MKIV and 
LMTX. Access by name with \tochar{n:a39} does not work in LMTX with log 
message: char ✓ (U+02713) in font 'ZapfDingbats-4' with id 8: missing. 
Also \ShowCompleteFont does not report any glyph names in LMTX.
should be a bit better in yesterdays upload (i also changed the file 
name alias so that in pinciple unicode should work too)


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] Allow pagebreaks in footnotes

2020-09-19 Thread Hans Hagen

On 9/18/2020 11:10 PM, denis.maier.li...@mailbox.org wrote:


Hi

Is there a setting that prevents footnotes from spreading over more than
one page? I have a document where this seems to be the case, but I don't
know why. It just looks like ConTeXt tries to keep the complete footnote
on one page, which leads to ugly white space at the end of almost every
page. (LaTeX has \interfootnotelinepenalty to customize this, but what
about ConTeXt?)

split=strict|verystrict|tolerant

we're tolerant by default

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] Best way to store text for later use

2020-09-19 Thread Hans Hagen

On 9/18/2020 8:59 PM, Denis Maier wrote:



Am 18.09.2020 um 19:02 schrieb Hans Hagen:

On 9/18/2020 3:36 PM, Denis Maier wrote:


I've tried using buffers, but this here doesn't work:
Why not just fetch it when needed. There is no gain in storing it and 
fetching from the xml tree is fast.


Most likely due to my limited understanding of how these things work. I 
thought storing the text and retrieving it later would be the easiest 
way to get rid of the constraints of linar processing of the XML file. 
The layout itself is determined by setups such as this one:


there is no linear processing, you just start someplace and recursively 
deal with the tree (which often looks like linear when you start at the 
root but basically you can access everything everywhere)



\startsetups abstract
     \startabstract
         \documentvariable{abstract}
     \stopabstract
\stopsetups

\setuphead [chapter][
     alternative=middle,
     page=yes,
     indentnext=no,
     style=\tfa\setupinterlinespace,
     after={\directsetup{placeauthors}\directsetup{abstract}},
     footer=chapterfooter,
     ]

How could I fetch the xml node from here so I don't need a variable, 
buffer or the like?

just pass the root element i.e. instead of #1 in

 \xmlfilter{#1}{/abstract/command(xml:article-meta:abstract)}

as #1 is just an abstraction for the current element; you pass the name 
you used when loading the tree (often \xmldocument works too)


there are plenty examples in the documentation and test suite and in 
some styles


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
___