[NTG-context] Lato typescripts (MKIV/LMTX)

2022-09-17 Thread Adam Reviczky via ntg-context
Hi,

With the latest upload (2022-09-16 14:41) I wanted to compare some older
projects that I've used with MKIV to the LMTX 2.10.00.

In one of which I am using the Lato 2.0 font (
https://packages.debian.org/sid/fonts-lato).
With MKIV I get the correct output but LMTX complains about not being able
to find the font.

There seems to be an issue with the typescript file type-imp-lato.mkiv.

MWE:
\setupbodyfont[lato,12pt]
\starttext
Hello World!
\stoptext

---
ConTeXt  ver: 2022.09.11 20:44 MKIV - luatex version: 1.1501, functionality
level: 7539:

mtxrun --script fonts --list --all --pattern=*lato*
identifier   familyname   fontname filename
 subfont   instances

latoblacklato latoblackLato-Bla.ttf
latoblackitalic  lato latoblackitalic  Lato-BlackItalic.ttf
latobold lato latobold Lato-Bol.ttf
latobolditalic   lato latobolditalic   Lato-BoldItalic.ttf
latoextraboldlato latoheavyLato-Heavy.ttf
latoextralight   lato latothin Lato-Thin.ttf
latohairline lato latohairline Lato-Hai.ttf
latohairlineitalic   lato latohairlineitalic   Lato-HaiIta.ttf
latoheavylato latoheavyLato-Heavy.ttf
latoheavyitalic  lato latoheavyitalic  Lato-HeavyItalic.ttf
latoitalic   lato latoitalic   Lato-Italic.ttf
latolightlato latolightLato-Lig.ttf
latolightitalic  lato latolightitalic  Lato-LightItalic.ttf
latomedium   lato latomedium   Lato-Medium.ttf
latomediumitalic lato latomediumitalic Lato-MediumItalic.ttf
latonormal   lato latohairline Lato-Hai.ttf
latoregular  lato latoregular  Lato-Reg.ttf
latosemibold lato latosemibold Lato-Semibold.ttf
latosemibolditalic   lato latosemibolditalic
Lato-SemiboldItalic.ttf
latothin lato latothin Lato-Thin.ttf
latothinitalic   lato latothinitalic   Lato-ThinItalic.ttf

fonts   > otf loading > loading
'/usr/share/texlive/texmf-dist/fonts/truetype/typoland/lato/Lato-Regular.ttf',
hash 'lato-regular'

mkiv lua stats  > loaded fonts: 3 files: xitsmath-bold.otf,
xitsmath-regular.otf, lato-regular.ttf
---
ConTeXt  ver: 2022.09.11 20:44 LMTX - luametatex version: 2.1,
functionality level: 20220918:

mtxrun --script fonts --list --all --pattern=*lato*
identifier   familyname   fontname filename
 subfont   instances

latoblacklato latoblackLato-Bla.ttf
latoblackitalic  lato latoblackitalic  Lato-BlackItalic.ttf
latobold lato latobold Lato-Bol.ttf
latobolditalic   lato latobolditalic   Lato-BoldItalic.ttf
latoextraboldlato latoheavyLato-Heavy.ttf
latoextralight   lato latothin Lato-Thin.ttf
latohairline lato latohairline Lato-Hai.ttf
latohairlineitalic   lato latohairlineitalic   Lato-HaiIta.ttf
latoheavylato latoheavyLato-Heavy.ttf
latoheavyitalic  lato latoheavyitalic  Lato-HeavyItalic.ttf
latoitalic   lato latoitalic   Lato-Italic.ttf
latolightlato latolightLato-Lig.ttf
latolightitalic  lato latolightitalic  Lato-LightItalic.ttf
latomedium   lato latomedium   Lato-Medium.ttf
latomediumitalic lato latomediumitalic Lato-MediumItalic.ttf
latonormal   lato latohairline Lato-Hai.ttf
latoregular  lato latoregular  Lato-Reg.ttf
latosemibold lato latosemibold Lato-Semibold.ttf
latosemibolditalic   lato latosemibolditalic
Lato-SemiboldItalic.ttf
latothin lato latothin Lato-Thin.ttf
latothinitalic   lato latothinitalic   Lato-ThinItalic.ttf

close source> level 2, order 6, name
'/usr/share/texmf/tex/context/fonts/mkiv/type-imp-lato.mkiv'
fonts   > defining > font with asked name 'lato-regular' is not
found using lookup 'file'
fonts   > defining > unable to define 'lato-regular' as
'lato-12pt-ss-tf-0--0'
---

If I change the file: reference I get it working with both MKIV/LMTX:

\starttypescript [\s!sans] [lato] [\s!name]
\setups[\s!font:\s!fallback:\s!sans]
% \definefontsynonym [\s!Sans]   [\s!file:lato-regular]
 [\s!features=\s!default]
% \definefontsynonym [\s!SansBold]   [\s!file:lato-bold]
[\s!features=\s!default]
\definefontsynonym [\s!Sans]   [\s!file:lato-reg]
 [\s!features=\s!default]
\definefontsynonym [\s!SansBold]   [\s!file:lato-bol]

[NTG-context] Repeating binary operators with split multiline formulas

2022-08-20 Thread Adam Reviczky via ntg-context
Hi,

Since there has been a lot of work done on the math side of things, I
wanted to ask if there is an automated way to have binary operators
repeated when splitting a formula.

From the MKIV math manual there is an option to move the operators into the
new line:

\setupmathematics[setups=math:spacing:split]
\setupformulas[split=yes,align=flushleft]
\startformula
x\dorecurse{30}{ + #1x^{#1x}} = 10
\stopformula

Would it be possible to achieve this via a custom setup like
math:spacing:split to get an output like this?

푥 + 1푥1푥 + 2푥2푥 + 3푥3푥 + 4푥4푥 + 5푥5푥 + 6푥6푥 + 7푥7푥 + 8푥8푥 +
9푥9푥 + 10푥10푥 +
+ 11푥11푥 + 12푥12푥 + 13푥13푥 + 14푥14푥 + 15푥15푥 + 16푥16푥 + 17푥17푥 +
18푥18푥 + 19푥19푥 +
+ 20푥20푥 + 21푥21푥 + 22푥22푥 + 23푥23푥 + 24푥24푥 + 25푥25푥 + 26푥26푥 +
27푥27푥 + 28푥28푥 +
+ 29푥29푥 + 30푥30푥 = 10

Adam
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___


Re: [NTG-context] Fwd: Typesetting modern Greek (UTF8) with ConTeXt

2022-08-12 Thread Adam Reviczky via ntg-context
Thanks Hanx for the fix!

>> Just curious: you're still in mkii?
No, I was just trying to compare an old project (nothing important) with
lmtx, otherwise I wouldn't have even noticed.

Adam


On Fri, Aug 12, 2022 at 8:14 AM Hans Hagen  wrote:

> On 8/12/2022 2:57 AM, Adam Reviczky wrote:
> > Hi Hans,
> >
> > I get a 'Nonletter' error with *fmtutil* for the mkii greek patterns
> (from
> > the latest cont-tmf.zip 2022-08-05 17:17).
> >
> > Is that an issue with texlive's *fmtutil* itself or something wrong with
> > the mkii greek pattern file?
>
> Actually, we never had a greek hyphenation pattern file, only for
> ancient greek. Modern greek in mkii has not encoding defined (we're
> talking 2005 and before when Tomas made the greek encoding that dealt
> with utf in pdftex). It has to do with 'setting what are letters' and
> these modern greek patterns have plenty different.
>
> You can patch lang-grk.mkii:
>
> \installlanguage
>[\s!gr]
>[\c!spacing=\v!packed,
> \c!leftsentence=---,
> \c!rightsentence=---,
> \c!leftsubsentence=---,
> \c!rightsubsentence=---,
> \c!leftquote=\greekleftquot,
> \c!rightquote=\greekrightquot,
> \c!leftquotation=\greekleftquot,
> \c!rightquotation=\greekrightquot,
>  % we're missing an encoding for greek
> \s!patterns=\s!agr,
> \s!mapping=\s!agr,
> \s!encoding=\s!agr,
> % but one can use mkiv / lmtx anyway
> \c!date={\v!day\ \v!month\ \v!year}]
>
> At least you get something. In mkiv and lmtx we have both.
>
> Just curious: you're still in mkii?
>
> 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 / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___


Re: [NTG-context] Crediting copyright on photographs

2022-05-04 Thread Adam Reviczky via ntg-context
Hi Bruce,

The Layers page has some examples (
https://wiki.contextgarden.net/Layers#Place_labels_on_pictures) and the
Collectors page as well (https://wiki.contextgarden.net/Collectors).

Some MWE:

\starttext
\definelayer  [figure][width=\overlaywidth,height=\overlayheight]
\defineoverlay[figure][{\directsetup{figure}\tightlayer[figure]}]
\startsetups figure
\setlayerframed[figure][frame=off,preset=rightbottom]{\copyright\ 2022}
\stopsetups
\externalfigure[cow][background={foreground,figure}]
\stoptext

\starttext
\definecollector[example]
\setcollector [example] {\externalfigure[cow][width=4cm,frame=off]}
\setcollector [example]
[corner={right,bottom},location={left,top}]{\copyright\ 2022}
\composedcollector{example}
\stoptext

Adam

On Wed, May 4, 2022 at 11:01 PM Bruce Horrocks via ntg-context <
ntg-context@ntg.nl> wrote:

> I need to include the copyright acknowledgement / photographer credit on
> an image but I'm not sure what's the best way to do it.
>
> Option 1: I can add the acknowledgement to the end of the \placefigure
> caption text:
>
> e.g.   \placefigure{A picture of a cow. Image of a cow that may or may not
> be under copyright anymore.}{\externalfigure[cow][height=6cm]}
>
> then the copyright bit will appear in the Table of Figures which I don't
> really want to happen. Is there a way to truncate this?
>
>
> Option 2: some magazines print the copyright credit running up the side of
> the image, independently of the caption. I'd quite like to do this and
> wondered if anyone had already written something they could share?
>
> —
> Bruce Horrocks
> Hampshire, UK
>
>
> ___
> 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] Xml - Lua - context

2022-03-28 Thread Adam Reviczky via ntg-context
Hi Thomas,

Not sure whether it helps or not, but in regards to combinations and Lua I
have had some challenges as well, but Hans' and Wolfgangs' solution with
externalfigures works fine for me now:

https://mailman.ntg.nl/pipermail/ntg-context/2021/103822.html
https://mailman.ntg.nl/pipermail/ntg-context/2021/103827.html

Adam

On Mon, Mar 28, 2022 at 2:42 PM Thomas A. Schmitz via ntg-context <
ntg-context@ntg.nl> wrote:

> And here comes question 2, a very basic one: on A4 landscape pages, I want
> to place two images next to each other (like the spread pages of a book).
> What would be the preferred way of the really competent users to do this,
> again keeping in mind that I want to loop over page numbers in a pdf file
> and thus am coding in Lua. So far, I have tried or thought about:
>
> 1. Embedded xtable
>
> This is what I’m using now, an xtable of two columns for every A4 page. It
> works, but I wonder if it’s a good method.
>
> 2. combinations
>
> This appeared to be the most natural approach (because it’s what
> combinations are for), but I ran into expansion problems, added a few
> “function () end” in my code, but couldn’t make it compile. Combinations,
> combined with framed and externalfigure, are difficult to write in Lua - or
> am I too stupid to find the winning combination (sorry for the puns).
>
> 3. columns
>
> Again, this would seen like a natural approach, having every A4 page set
> up as two columns, but maybe that’s overkill?
>
> I’d be curious to know what you think!
>
> All best
>
> Thomas
>
> ___
> 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] Chapter number retrieval

2022-03-22 Thread Adam Reviczky via ntg-context
Hi Willi,

You could also access the number by using the
\getmarking[chapternumber][current].
I think you have used a similar approach in the
https://wiki.contextgarden.net/Thumb_index.

Adam

On Tue, Mar 22, 2022 at 11:15 PM Willi Egger via ntg-context <
ntg-context@ntg.nl> wrote:

> Hello Adam!
>
> Many thanks for your solution. — It works very well in your example and
> also in an extended version with \startfrontmatter..\stopfrontmatter
> \startbodymatter…\stopbodymatter. — Unfortunately It does not work to my
> wish in the actual setup of my book. — I am using now the solution
> presented by Sreeram.
>
> Again thank you so much!
> Kind regards
>
> Willi
>
> > On 22 Mar 2022, at 01:21, Adam Reviczky via ntg-context <
> ntg-context@ntg.nl> wrote:
> >
> > Hi,
> >
> > There is a good overview of accessible variables at:
> https://tex.stackexchange.com/questions/134474/context-part-chapter-section-and-subsection-names
> >
> > Maybe you want something like this?
> >
> > \starttext
> > \setuphead[chapter][number=no]
> > \startchapter[title={My Chapter}]
> > Hello world!
> > \startMPcode
> > label("\currentstructurelistnumber\ \currentstructuretitle", origin);
> > draw fullcircle scaled 3cm;
> > \stopMPcode
> > \stopchapter
> > \stoptext
> >
> > Adam
> >
> > On Mon, Mar 21, 2022 at 11:46 PM jbf via ntg-context 
> wrote:
> > Willi, offlist: Have to admit I didn't actually try your own comment,
> > but if it doesn't work, I'll be interested in the eventual answer. I
> > recently had to do something similar for the TOC, and Hraban pointed me
> > to \currentlistentrynumber. There probably has to be a command along
> > those lines (which led me to your 2011 comment, sorry ) for non-list
> > retrieval. \structurenumber? \currentstructurenumber? Something along
> > those lines? There seem to be a number of these but as yet undocumented
> > as far as I can see.
> >
> > Julian
> >
> > On 22/3/22 10:19, Willi Egger via ntg-context wrote:
> > > Hi Julian,
> > >
> > > :-) I am confronted with my own comments :-)
> > >
> > > However, this is precisely what I am using in my attempt to get this
> hidden number. But no it does not appear…
> > >
> > > Thank you!
> > > Willi
> > >
> > >> On 21 Mar 2022, at 22:33, jbf via ntg-context 
> wrote:
> > >>
> > >> Willi,
> > >>
> > >> I see a comment by yourself back in 2011 at
> https://wiki.contextgarden.net/Last_Head_Number
> > >>
> > >> I wonder if this helps?
> > >>
> > >> Julian
> > >>
> > >> On 22/3/22 07:47, Willi Egger via ntg-context wrote:
> > >>> Hello everybody!
> > >>>
> > >>>
> > >>> I would like to typeset the chapter title without number in the
> text. — However I still would need to retrieve the number for a calculation
> in a MetaFun graphic. I assume, that even though this number is not
> typeset, it is kept in the background. How to retrieve it?
> > >>>
> > >>> Kind regards
> > >>>
> > >>> Willi
> > >>>
> ___
> > >>> 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] Chapter number retrieval

2022-03-21 Thread Adam Reviczky via ntg-context
Hi,

There is a good overview of accessible variables at:
https://tex.stackexchange.com/questions/134474/context-part-chapter-section-and-subsection-names

Maybe you want something like this?

\starttext
\setuphead[chapter][number=no]
\startchapter[title={My Chapter}]
Hello world!
\startMPcode
label("\currentstructurelistnumber\ \currentstructuretitle", origin);
draw fullcircle scaled 3cm;
\stopMPcode
\stopchapter
\stoptext

Adam

On Mon, Mar 21, 2022 at 11:46 PM jbf via ntg-context 
wrote:

> Willi, offlist: Have to admit I didn't actually try your own comment,
> but if it doesn't work, I'll be interested in the eventual answer. I
> recently had to do something similar for the TOC, and Hraban pointed me
> to \currentlistentrynumber. There probably has to be a command along
> those lines (which led me to your 2011 comment, sorry ) for non-list
> retrieval. \structurenumber? \currentstructurenumber? Something along
> those lines? There seem to be a number of these but as yet undocumented
> as far as I can see.
>
> Julian
>
> On 22/3/22 10:19, Willi Egger via ntg-context wrote:
> > Hi Julian,
> >
> > :-) I am confronted with my own comments :-)
> >
> > However, this is precisely what I am using in my attempt to get this
> hidden number. But no it does not appear…
> >
> > Thank you!
> > Willi
> >
> >> On 21 Mar 2022, at 22:33, jbf via ntg-context 
> wrote:
> >>
> >> Willi,
> >>
> >> I see a comment by yourself back in 2011 at
> https://wiki.contextgarden.net/Last_Head_Number
> >>
> >> I wonder if this helps?
> >>
> >> Julian
> >>
> >> On 22/3/22 07:47, Willi Egger via ntg-context wrote:
> >>> Hello everybody!
> >>>
> >>>
> >>> I would like to typeset the chapter title without number in the text.
> — However I still would need to retrieve the number for a calculation in a
> MetaFun graphic. I assume, that even though this number is not typeset, it
> is kept in the background. How to retrieve it?
> >>>
> >>> Kind regards
> >>>
> >>> Willi
> >>>
> ___
> >>> 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
> >>
> ___
> >
> ___
> > 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
>
> ___
>
___
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] zint module on LMTX

2022-03-16 Thread Adam Reviczky via ntg-context
Hi Pablo,

You are correct, the LuaMetaTeX file is still expecting the old "isbn" as
the name, whereas the MKIV running zint directly requires the new one with
"isbnx".
Not sure with which zint version the "isbn" got changed to "isbnx".

@Hans Hagen  can you update the libs-imp-zint.lmt
<https://github.com/contextgarden/context-mirror/compare/beta...reviczky:patch-4#diff-e9a8d1468821ebec460080cb3a74fedac5a4f5d9d8b4cd262531a65345145ebe>
to have the same interface for MKIV and LMTX:

https://github.com/contextgarden/context-mirror/compare/beta...reviczky:patch-4

- ["code 128"] = 20, ["isbn"] = 69, ["han xin code"] = 116,
+ ["code 128"] = 20, ["isbnx"] = 69, ["han xin code"] = 116,

- if lower(code) == "isbn" then
+ if lower(code) == "isbnx" then

This way the sample works in the same way for both MKIV and LMTX:

zint-test.tex
---
\usemodule[zint]
\starttext
\barcode[alternative=isbnx, text=9783865419026, width=4cm]
\stoptext
---

context zint-test.tex
context --luatex zint-test.tex

Adam

On Wed, Mar 16, 2022 at 9:39 PM Pablo Rodriguez via ntg-context <
ntg-context@ntg.nl> wrote:

> On 3/16/22 19:11, Adam Reviczky via ntg-context wrote:
> > Hi Pablo,
> >
> > If you use an older version of zint, maybe "isbn" instead of "isbnx"
> > would work.
>
> Hi Adam,
>
> I have just installed version 2.10.
>
> "isbn" works, but "isbnx" doesn’t. As already reported is an
> unrecognized option that is also listed as available alternative (weird).
>
> > I have used both isbnx and qrcode successfully with zint 2.10 on linux.
>
> As said, for some strange reason, "isbnx" doesn’t work on my Linux machine.
>
> On Windows, I need to check the issue further.
>
> Many thanks for your help,
>
> Pablo
>
> ___
> 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] zint module on LMTX

2022-03-16 Thread Adam Reviczky via ntg-context
Hi Pablo,

If you use an older version of zint, maybe "isbn" instead of "isbnx" would
work.

I have used both isbnx and qrcode successfully with zint 2.10 on linux.

\usemodule[zint]
\starttext
\barcode[alternative=isbn,text=9783865419026,width=4cm]
%\barcode[alternative=isbnx,text=9783865419026,width=4cm]
 \stoptext

Adam

On Wed, Mar 16, 2022 at 5:07 PM Hans Hagen via ntg-context <
ntg-context@ntg.nl> wrote:

> On 3/16/2022 5:37 PM, Pablo Rodriguez via ntg-context wrote:
> > Dear list,
> >
> > using latest LMTX and following the steps from
> > https://wiki.contextgarden.net/Barcodes#Zint_module, I’m afraid I don’t
> > get any barcode either in Linux or Windows.
> >
> > Minimal sample:
> >
> >\starttext
> >\usemodule[zint]
> >\barcode[alternative=isbnx, text=9783865419026, width=4cm]
> >\stoptext
> >
> > Error message is rather weird on Linux:
> >
> >optional> using library '/home/ousia/context/tex/texmf-linux-
> >  64/bin/lib/luametatex/zint/libzint.so'
> >zint> unknown barcode alternative 'isbnx'
> >zint>
> >zint> valid barcode alternatives:
> >zint>
> >[...]
> >zint>   isbn
> >zint>   isbnx
> >[...]
> >
> > It seems that a valid barcode alternative ends up being unknown to the
> > library.
> >
> > What am I missing here?
> >
> > Many thanks for your help,
> Are you sure that you have the latest zint? (from sourceforge)
>
>
> -
>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] sorting for particular sub entries to register

2022-01-31 Thread Adam Reviczky via ntg-context
Hi Julian,

How about using the keys in every instance?

\setupregister[index][n=1,method={zc,pc,zm,pm,uc},style=WORD]
\defineprocessor[special][style=italic]

\starttext
P\index[Plenary+periti]{Plenary Council+{\it periti} (experts)}
B\index[Plenary+beriti]{Plenary Council+{\it beriti} (experts)}
A\index[Plenary+aeriti]{Plenary Council+aeriti (experts)}

S\index[animals+special]{animals+‘special kinds’}
B\index[animals+bpecial]{animals+bpecial}
A\index[animals+apecial]{animals+‘apecial’}
U\index[animals+upecial]{animals+‘upecial’}
T\index[animals+tpecial]{animals+tpecial}

\placeindex
\stoptext

See result in: https://live.contextgarden.net/cgi-bin/result.cgi?id=j46XhZ

Adam

On Mon, Jan 31, 2022 at 10:38 PM jbf via ntg-context 
wrote:

> Let me come back to the unresolved (for me) question of two situations in
> sub entries to a book index (register). Sub entries that have formatting or
> sub entries that are surrounded by quote marks (straight or curly, it makes
> no difference) do not appear in the correct alphabetical order.
>
> Two attempts on my part:
>
> text before \index[Plenary+periti]{Plenary Council+{\it periti} (experts)}
> text after.
>
> text before \index{animals+‘special kinds’} text after. Or alternatively,
> \index[animals+special]{animals+‘special kinds’}
>
> The setup for my register is a pretty standard one. The processor is not
> for the 'periti' case above but I use it for book titles.
>
> \setupregister[index][n=1,method={zc,pc,zm,pm,uc},style=WORD]
>
> \defineprocessor[special][style=italic]
>
> In the periti case it is the \it command that clearly interferes with
> correct alphabetic positioning in the sub entry list. Placing +periti in
> the key does not overcome that problem.
>
> In the ‘special kinds’ case it is the initial single quote mark (‘) that
> causes the problem. The item comes last in the sub entry list. And if i
> include a key [special], then it comes first in the sub entry list. Either
> way, it is out of the desired sorting order.
>
> I believe I have followed the helpful suggestions of various ones, but it
> is always possible that I have not fully understood those suggestions. The
> reality is that at the moment the issue remains unresolved for me. Any
> further wisdom out there to offer me?
>
> Julian
>
>
> ___
> 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] Why isn't bold + italics working together?

2022-01-29 Thread Adam Reviczky via ntg-context
Hi Joel,

I don't think you can stack those, just use \bi (see:
https://wiki.contextgarden.net/Font_Switching)

\starttext
\startitemize
\item This text has {\bf bold} in it.
\item This text has {\it italics} in it.
\item Why doesn't this have {\bi bold and italics} in it?
\stopitemize

See also: https://www.mail-archive.com/ntg-context@ntg.nl/msg4.html

Adam

On Sat, Jan 29, 2022 at 2:52 PM Joel via ntg-context 
wrote:

> I am finishing the final touches on a manuscript, which I hope to send to
> a publisher later today and noticed this problem where bold and italic text
> isn't rendered at the same time.
>
> I am using the EB Garamond font in my document. I set it up exactly as
> shown below. Strangely, bold works, italics works, but when bold and
> italics are together, it only display in italics, it doesn't display a bold
> italic text. I've confirmed the `EBGaramond-BoldItalic.otf` font is present
> and seems just fine. I've also tried by just using the default ConTeXt font
> and the error still appears, also in live.contextgarden.net. I tried
> searching the mailing list, as this seems like something that must have
> come up, but couldn't find any question about this.
>
> Why won't it render both?
>
>
> \starttypescript[serif] [garamond]
> \definefontsynonym[Serif] [file:~/.fonts/12/EBGaramond-Regular.otf]
> \definefontsynonym[SerifBold] [file:~/.fonts/12/EBGaramond-Bold.otf]
> \definefontsynonym[SerifItalic] [file:~/.fonts/12/EBGaramond-Italic.otf]
> \definefontsynonym[SerifBoldItalic]
> [file:~/.fonts/12/EBGaramond-BoldItalic.otf]
> \stoptypescript
> %
> \starttypescript[sans] [garamond]
> \definefontsynonym[Sans] [file:~/.fonts/12/EBGaramond-Regular.otf]
> \definefontsynonym[SansBold] [file:~/.fonts/12/EBGaramond-Bold.otf]
> \definefontsynonym[SansItalic] [file:~/.fonts/12/EBGaramond-Italic.otf]
> \definefontsynonym[SansBoldItalic]
> [file:~/.fonts/12/EBGaramond-BoldItalic.otf]
> \stoptypescript
> %
> \starttypescript[garamond]
> \definetypeface[garamond] [rm][serif][garamond][default]
> \definetypeface[garamond] [ss][sans][garamond][default]
> \definetypeface[garamond] [mm][math][modern][default]
> \stoptypescript
> %
>
> \setupbodyfont[garamond, 12pt]%
>
> \starttext
> \startitemize
> \item This text has {\bf bold} in it.
> \item This text has {\it italics} in it.
> \item Why doesn't this have {\bf\it bold and italics} in it?
> \stopitemize
>
> \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
>
> ___
>
___
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] registers, how to ignore quote marks

2022-01-28 Thread Adam Reviczky via ntg-context
Hi Julian,

Have you tried \index[Innovative]{‘Innovative’}?

See wiki entry: https://wiki.contextgarden.net/Registers
- To sort a word (such as "ConTeXt" under "C"), use: \index
[CONTEXT]{\ConTeXt}

You would have to change each index call though.

Adam

On Sat, Jan 29, 2022 at 2:42 AM jbf via ntg-context 
wrote:

> I have an issue that has been raised at least twice in this list but as
> far as I can see it has not received an answer. Perhaps someone can help
> with the following?
>
> I have an index entry that has unicode quote marks either side:
> ‘Innovative Beings’.  I need to retain those quote marks. If I put
> \index{‘Innovative’} then ‘Innovative’ is sorted under ‘ instead of under
> the letter I. How do I get my indexing to ignore the quote marks, at the
> very least the initial one?
>
> My index setup at the moment is as follows:
>
> \defineregister[index][compress=yes]
>
> \setupregister[index][n=1]
>
> \defineprocessor[special][style=italic]
>
> The only hint I could gain from the wiki was that it might depend on using
> a method key in \setupregister, but I could not see which to use. Tried a
> few and got weird results.
>
> Julian
>
>
> ___
> 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] undefined control sequence c!symbolcolor in MkIV, was new upload

2022-01-19 Thread Adam Reviczky via ntg-context
Hi Rik,

In the interim you can change one more occurrence of "symbolcolor" in line
317:
https://github.com/reviczky/context-mirror/commit/f4bfe0baaeb4bdcc6b8098de6ef1f8c96f928d07

Adam

On Wed, Jan 19, 2022 at 5:31 PM Rik Kabel via ntg-context <
ntg-context@ntg.nl> wrote:

> On 2022-01-15 14:29, Hans Hagen wrote:
> > On 1/15/2022 7:34 PM, Rik Kabel via ntg-context wrote:
> >> MWE:
> >>
> >> \definelabel[xx][headcolor=red]
> >> \starttext
> >> ab\xx
> >> \stoptext
> >>
> >> fails, reporting in log:
> >>
> >> tex error   > tex error on line 4 in file G:/Desktop/mwe.tex: !
> >> Undefined control sequence
> >>
> >>  \c!symbolcolor
> >>
> >> \labelparameter #1->\csname \ifcsname \??labels \currentlabel :#1
> >> \endcsname \??labels \currentlabel :#1\else \expandafter
> >> \dolabelparentparameter \csname \??labels \currentlabel :\s!parent
> >> \endcsname {#1}\fi \endcsname
> >> \useconstructionstyleandcolor ...pty \else
> >> \dousecurrentstyleparameter \fi \edef \currentcolorparameter
> >> {\labelparameter {#2}
> >>
> >> MkIV only, no problem in LMTX.
> > replace by \c!numbercolor and remake the format
> >
> >
> This is still (or perhaps once again) a problem using the latest MkIV
> (context --luatex).
>
> --
> Rik
>
>
> ___
> 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] Paragraph break over pages with hanging float

2021-11-15 Thread Adam Reviczky via ntg-context
Thank Hans,

I thought something along those lines, but thank you for the explanation.
Indeed, I probably should do it differently.

If the "force" option would not break anything then I would like to try
that, otherwise it is all fine as is.
This is not really critical and I will rather change the float in my
document than create more issues.

Regards,
Adam

On Mon, Nov 15, 2021 at 2:00 PM Hans Hagen  wrote:

> On 11/15/2021 6:26 AM, Adam Reviczky via ntg-context wrote:
> > Hi,
> >
> > Is there a way to allow a paragraph to break over two pages (between the
> > paragraph start and the placement of the float) with a hanging float
> > further down the paragraph?
> >
> > MWE:
> >
> > \starttext
> > \input lorem
> > \blank[20*line]
> >
> > % commenting out the hanging float allows paragraph break
> > \startplacefigure[location={right,15*hang}]
> > \framed[width=3cm,height=2cm]{graphic}
> > \stopplacefigure
> >
> > \dorecurse{10}{\input lorem}
> > \stoptext
> >
> > When I remove the hanging float, the paragraph is broken down at the
> > first pagebreak.
> > With the float, the paragraph starts always on the next page, regardless
> > of the space left on the previous page.
> Yes and no ... tex cannot really lookahead here. But thanks to some
> recent new trickery I can provide:
>
>location={right,15*hang,force}
>
> However, it really is up to the user to check of all works out right
> (but i assume that the 15*hang is also soemthing specific for the
> situation). Adapting this already (too) complex mechanism too much is
> asking for issues.
>
> 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
___


[NTG-context] Paragraph break over pages with hanging float

2021-11-14 Thread Adam Reviczky via ntg-context
Hi,

Is there a way to allow a paragraph to break over two pages (between the
paragraph start and the placement of the float) with a hanging float
further down the paragraph?

MWE:

\starttext
\input lorem
\blank[20*line]

% commenting out the hanging float allows paragraph break
\startplacefigure[location={right,15*hang}]
\framed[width=3cm,height=2cm]{graphic}
\stopplacefigure

\dorecurse{10}{\input lorem}
\stoptext

When I remove the hanging float, the paragraph is broken down at the first
pagebreak.
With the float, the paragraph starts always on the next page, regardless of
the space left on the previous page.

Adam
___
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] PDF text stream with delimitedtext

2021-10-30 Thread Adam Reviczky via ntg-context
Hi,

I am trying to use quotation or blockquote in a document, but when
selecting and copying the text in poppler/pdf.js I get double marks.

Looking at the minimal example below:
\nopdfcompression
\setuppagenumbering[location=]
\starttext
\startquotation Hello world! \stopquotation
\setupquotation[left=«,right=»]
\startquotation Hello world! \stopquotation
\setupquotation[left=‘,right=’]
\startquotation Hello world! \stopquotation
\setupdelimitedtext[blockquote][left=‘,right=’]
\startblockquote Hello world! \stopblockquote
“Hello world!”\\
«Hello world!»\\
‘Hello world!’\\
\startquote Hello world! \stopquote\\
\quote{Hello world!}\\
\stoptext

The text stream seems to have an additional object for the quotation and
blockquote lines.

Rendering the PDF in itself is fine but when copying the text I get mixed
results (poppler/evince and pdf.js give double marks but mupdf does not:
“Hello world!””,«Hello world!»»,‘Hello world!’’,‘Hello world!’’).

Is this just an issue with poppler/pdf.js when trying to extract the text
(as the PDF rendering seems all fine)?

Adam
___
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] logo from wiki

2021-10-23 Thread Adam Reviczky via ntg-context
Hi Pablo,

https://gitlab.com/schickele/new-context-logo
(See: https://mailman.ntg.nl/pipermail/ntg-context/2019/093859.html)

Adam

On Sat, Oct 23, 2021 at 8:16 AM Pablo Rodriguez via ntg-context <
ntg-context@ntg.nl> wrote:

> Dear list,
>
> where could I get the vector version from
>
> https://wiki.contextgarden.net/skins/common/images/context/context_logo_inv.png
> ?
>
> Many thanks for your help,
>
> Pablo
> --
> http://www.ousia.tk
>
> ___
> 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] combination with lua

2021-10-12 Thread Adam Reviczky via ntg-context
Thank you Hans and Wolfgang for the explanation!

Adam

On Tue, Oct 12, 2021 at 4:22 PM Wolfgang Schuster <
wolfgang.schuster.li...@gmail.com> wrote:

> Hans Hagen via ntg-context schrieb am 12.10.2021 um 14:12:
> > On 10/11/2021 1:38 PM, Adam Reviczky via ntg-context wrote:
> >> Hi,
> >>
> >> I am trying to use a combination figure with luacode (both with
> >> latest MKIV and LMTX).
> >> However, the figures do not line up in the grid of the combination.
> >>
> >> I get the correct result with examples 1 and 2 below, but example 3
> >> using lua functions for combination and externalfigure is what I
> >> wanted to use in the first place.
> >>
> >> MWE:
> >>
> >> \starttext
> >>
> >> \startluacode
> >>
> >> -- Combination 1
> >> context.startplacefigure({title = "Figure"})
> >> context.startcombination({nx = "2", ny = "2"},
> >>
> >> "\\externalfigure[cow][width=50mm]","Caption 1",
> >> "\\externalfigure[cow][width=50mm]","Caption 2",
> >> "\\externalfigure[cow][width=50mm]","Caption 3",
> >> "\\externalfigure[cow][width=50mm]","Caption 4"
> >> )
> >>
> >> context.stopcombination()
> >> context.stopplacefigure()
> >>
> >> -- Combination 2
> >>
> >> context.startplacefigure({title = "Figure"})
> >> context.startcombination({nx = "2", ny = "2"},
> >>
> >> "Picture 1","Caption 1",
> >> "Picture 2","Caption 2",
> >> "Picture 3","Caption 3",
> >> "Picture 4","Caption 4"
> >> )
> >>
> >> context.stopcombination()
> >> context.stopplacefigure()
> >>
> >> -- Combination 3
> >>
> >> context.startplacefigure({title = "Figure"})
> >> context.startcombination({nx = "2", ny = "2"},
> >>
> >> context.externalfigure({"cow"},{width = "50mm"}),"Caption 1",
> >> context.externalfigure({"cow"},{width = "50mm"}),"Caption 2",
> >> context.externalfigure({"cow"},{width = "50mm"}),"Caption 3",
> >> context.externalfigure({"cow"},{width = "50mm"}),"Caption 4"
> >> )
> >>
> >> context.stopcombination()
> >> context.stopplacefigure()
> >>
> >> \stopluacode
> >> \stoptext
> >>
> >> Any hints on what I am doing wrong in example 3?
> > as in any prodedural language a function as argument gets immediately
> > executed so you need to delay:
> >
> > context.startplacefigure({title = "Figure"})
> > context.startcombination({nx = "2", ny = "2"},
> > context.delayed.externalfigure({"cow"},{width = "50mm"}),
> > "Caption 1",
> > context.delayed.externalfigure({"cow"},{width = "50mm"}),
> > "Caption 2",
> > context.delayed.externalfigure({"cow"},{width = "50mm"}),
> > "Caption 3",
> > context.delayed.externalfigure({"cow"},{width = "50mm"}),
> > "Caption 4"
> > )
> > context.stopcombination()
> > context.stopplacefigure()
> >
> > (this is why encoding complex documents completely in a scrtipt
> > language is non trivial and why for instance these template systems
> > are there because these accumulate)
>
> Another solution is to use the content and caption blocks for each
> combination entry.
>
> \starttext
>
> \startluacode
>
> context.startplacefigure({title = "Figure"})
>  context.startcombination({nx = 1, ny = 1})
>  context.startcontent()
>  context.externalfigure({"cow"},{width = "50mm"})
>  context.stopcontent()
>  context.startcaption()
>  context("Caption 1")
>  context.stopcaption()
>  context.stopcombination()
> context.stopplacefigure()
>
> \stopluacode
>
> \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
___


[NTG-context] combination with lua

2021-10-11 Thread Adam Reviczky via ntg-context
Hi,

I am trying to use a combination figure with luacode (both with latest MKIV
and LMTX).
However, the figures do not line up in the grid of the combination.

I get the correct result with examples 1 and 2 below, but example 3 using
lua functions for combination and externalfigure is what I wanted to use in
the first place.

MWE:

\starttext

\startluacode

-- Combination 1
context.startplacefigure({title = "Figure"})
context.startcombination({nx = "2", ny = "2"},

"\\externalfigure[cow][width=50mm]","Caption 1",
"\\externalfigure[cow][width=50mm]","Caption 2",
"\\externalfigure[cow][width=50mm]","Caption 3",
"\\externalfigure[cow][width=50mm]","Caption 4"
)

context.stopcombination()
context.stopplacefigure()

-- Combination 2

context.startplacefigure({title = "Figure"})
context.startcombination({nx = "2", ny = "2"},

"Picture 1","Caption 1",
"Picture 2","Caption 2",
"Picture 3","Caption 3",
"Picture 4","Caption 4"
)

context.stopcombination()
context.stopplacefigure()

-- Combination 3

context.startplacefigure({title = "Figure"})
context.startcombination({nx = "2", ny = "2"},

context.externalfigure({"cow"},{width = "50mm"}),"Caption 1",
context.externalfigure({"cow"},{width = "50mm"}),"Caption 2",
context.externalfigure({"cow"},{width = "50mm"}),"Caption 3",
context.externalfigure({"cow"},{width = "50mm"}),"Caption 4"
)

context.stopcombination()
context.stopplacefigure()

\stopluacode
\stoptext

Any hints on what I am doing wrong in example 3?

Thanks,
Adam
___
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] prefixstarter in captions

2021-08-28 Thread Adam Reviczky via ntg-context
Hi,

There was a question on the list before on prepending to the numberpart of
a caption with the 'numberstarter' command, which works just fine (
https://mailman.ntg.nl/pipermail/ntg-context/2017/089142.html).

I wanted to try the same but for prepending to the entire prefix (not just
the number part) when prefixsegments are used, however using
'prefixstarter' does not seem to make a difference.

For the sake of the example I have added the numberstarter in as well, just
for comparison.

Caption with the example reads "Figure 1.S.1" whereas I was expecting
"Figure C.1.S.1".

MWE:

\setupfloatcaption[figure][number=yes,way=bytext,prefix=yes,prefixstarter={C.},numberstarter={S.}]
\starttext
\startchapter[title={Cow}]
\startplacefigure[title={Custom caption}]
\externalfigure[cow]
\stopplacefigure
\stopchapter
\stoptext

Not sure whether prefixstarter is the intended command to use, but the wiki
of setupcation (https://wiki.contextgarden.net/Command/setupcaption) says
it inherits from setupcounter which has both numberstarter and
prefixstarter defined in the same way.

Adam
___
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] MKIV ansi/ansilog

2021-08-25 Thread Adam Reviczky via ntg-context
Hi,

I have been using the ansi and ansilog flags in the past and they work fine
with lmtx, but do not seem to make a difference with luatex/mkiv. (There
was a thread back in 2019:
https://mailman.ntg.nl/pipermail/ntg-context/2019/095666.html)

I am trying just a simple hello world:

\starttext
Hello World!
\stoptext

>From the latest lmtx install (2021.08.24 22:16) on an ubuntu 64bit live
system:

These give the desired color output for lmtx
context --ansi test.tex
context --ansilog test.tex

But with luatex, these make no difference in the stdout (no ansi colors)
context --luatex --ansi test.tex
context --luatex --ansilog test.tex

Adam
___
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] TOC labeltext and no partlabel

2021-08-25 Thread Adam Reviczky via ntg-context
Thank you very much Wolfgang for the explanation,

Both solutions make sense now and work great.

Regards,
Adam

On Wed, Aug 25, 2021 at 11:46 AM Wolfgang Schuster <
wolfgang.schuster.li...@gmail.com> wrote:

> Adam Reviczky via ntg-context schrieb am 25.08.2021 um 02:02:
> > Hi,
> >
> > I have asked this question before, but now I cannot get it working again.
> >
> https://ntg-context.ntg.narkive.com/lvvdNOQz/the-appendices-envrionment-and-title-in-toc
> >
> > I want to set partlabels in my TOC but not in the document itself.
> >
> > The desired output would be:
> > ---
> > Contents
> > Chapter 1 Bodypart
> > Appendix A Appendix
> >
> > 1 Bodypart
> > A Appendix
> > ---
> >
> > [...]
> >
> > But that does not show the labels in the TOC (trying it with LMTX and
> MKIV).
>
> The easy way is to create a new heading for the appendices (e.g.
> \extrachapter) and set the label you want to use in the list.
>
> \setuplist [chapter]  [label=chapter]
> \setuplist [extrachapter] [label=appendix]
>
>
> A complexer solution where you can keep \chapter in the appendices can
> be achieved with a customized number type and the use of the processor
> mechanism to set the labels in the list entries.
>
> \setuplist
>[chapter]
>[width=fit,
> distance=\spaceamount]
>
> \defineconversionset [bodypart:chapternumber] [] [bodypartnumber->n]
> \defineconversionset [appendix:chapternumber] [] [appendixnumber->A]
>
> \setuphead
>[chapter]
>[sectionconversionset=chapternumber]
>
> \startsectionblockenvironment [frontpart]
>
>  \defineprocessor [bodypartnumber] [left=Chapter~]
>  \defineprocessor [appendixnumber] [left=Appendix~]
>
> \stopsectionblockenvironment
>
> \starttext
>
> \startfrontmatter
> \completecontent
> \stopfrontmatter
>
> \startbodymatter
> \chapter{Bodypart}
> \stopbodymatter
>
> \startappendices
> \chapter{Appendix}
> \stopappendices
>
> \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
___


[NTG-context] TOC labeltext and no partlabel

2021-08-24 Thread Adam Reviczky via ntg-context
Hi,

I have asked this question before, but now I cannot get it working again.
https://ntg-context.ntg.narkive.com/lvvdNOQz/the-appendices-envrionment-and-title-in-toc

I want to set partlabels in my TOC but not in the document itself.

The desired output would be:
---
Contents
Chapter 1 Bodypart
Appendix A Appendix

1 Bodypart
A Appendix
---

Based on Wolfgang's example, I am trying this MWE:

\setuplabeltext[en][chapter=Chapter~]
\setuplabeltext[en][appendix=Appendix~]

\setuplist[chapter][label=yes,width=fit,stopper=~]
\setuphead[chapter][bodypartlabel=,appendixlabel=]

\starttext

\startfrontmatter
\completecontent[label=section]
\stopfrontmatter

\startbodymatter
\chapter{Bodypart}
\stopbodymatter

\startappendices
\chapter{Appendix}
\stopappendices

\stoptext

But that does not show the labels in the TOC (trying it with LMTX and MKIV).

I must be doing something wrong.
Any hints?

Thanks,
Adam
___
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] footnote interaction in titles

2021-08-09 Thread Adam Reviczky via ntg-context
Hi,

I probably shouldn't use footnotes within titles, but I am misusing the
title elements for a quick interview style document (I use them in the ToC).

One thing I have noticed is that interaction style (color and styles) are
not applied in the footnote and footnote numbering.
Is that a side effect or intended like that?

A half-workaround is to apply the styles directly, but not sure how I can
force the numbering style (same-page reference).

See MWE:

\setupinteraction[state=start]
\starttext
\startchapter[title={Long question with footnote \footnote{see: \goto{
https://wiki.contextgarden.net}[url(https://wiki.contextgarden.net)]}
and with a workaround \footnote{see: \goto{\bf\startcolor[darkgreen]
https://wiki.contextgarden.net\stopcolor}[url(https://wiki.contextgarden.net
)]}?}]
\input knuth
\footnote{see: \goto{https://wiki.contextgarden.net}[url(
https://wiki.contextgarden.net)]}
\stopchapter
\stoptext

It is not crucial, and if the behaviour is intended as such because of the
title element, that is fine, I am just curious.

Thanks,
Adam
___
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] Trying to make all links in my document blue instead of red or green

2021-06-21 Thread Adam Reviczky
Hi Kurt,

It is because of the spaces after the last line in contrastcolor.

Use any of the following instead:

\setupinteraction
  [state=start,
  color=blue,
  contrastcolor=blue,
  ]


\setupinteraction
  [state=start,
  color=blue,
  contrastcolor=blue%
  ]


\setupinteraction
  [state=start,
  color=blue,
  contrastcolor=blue]


Adam


On Mon, Jun 21, 2021 at 4:10 PM T. Kurt Bond  wrote:

> I'm trying to make all the hyperlinks in my document blue.  Here's my
> example:
>
> \setupinteraction
>   [state=start,
>   color=blue,
>   contrastcolor=blue
>   ]
>
>
> \starttext
> \completecontent
> \section{Section A}
> \subsection{SubSection A.A}
> \pagebreak[yes]
> \section {Section B — on another page}
> \subsection {SubSection B.A — on another page}
> \stoptext
>
> When I format it with ConTeXt (ConTeXt  ver: 2021.06.18 23:37 LMTX  fmt:
> 2021.6.19  int: english/english) links to destinations on the same page
> come out black while links to destinations on another page come out blue,
> as I'd intended.  Here is a screen shot:
> [image: image.png]
> Notice that the Contents lines with Section A and SubSection A.A are
> black?  I'd expected them to be blue.
> --
> 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
>
> ___
>
___
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] PDF forms not creating proper children

2021-06-08 Thread Adam Reviczky
Not sure how good it is, but in the poppler discussion this site was
mentioned to verify the signature details: https://validator.docusign.com/

I have tried using with poppler's pdfsig and Okular.

Adam

On Tue, Jun 8, 2021 at 10:14 PM Leonard Janis Robert König 
wrote:

> On Tue, 2021-06-08 at 17:41 +0200, Pablo Rodriguez wrote:
> > On 6/7/21 10:43 PM, Leonard Janis Robert König wrote:
> > > Hi Adam, Hi Pablo,
> > >
> > > I just noticed your replies, sorry for the late answer!
> > >
> > > I could sign forms with both okular as well as mupdf just fine,
> > > although the behavior is different.  The former assumes that the
> > > field
> > > is already an existing signature and segfaults when you look at the
> > > properties, but cann successfully add another signature using the
> > > "Tools" menu.
> >
>
> Hi Pablo,
>
> > I’m afraid that I don’t use Okular.
> >
> > >  With the latter you can click on the form field to
> > > trigger a menu to select the signature you want to sign with, and
> > > it
> > > "replaces" the "empty" signature generated by ConTeXt.  Both work
> > > fine,
> > > even with my newer ConTeXt.
> >
> > mupdf-gl signs the document, but in a way that only mupdf-gl
> > understands it.
> >
> > Try to open a PDF document signed with mupdf-gl in Acrobat (Reader or
> > not). You will see that the signature is wrong.
>
> Hm, I tested with Okular, Firefox and MasterPDF as I don't have Acrobat
> on Linux, and both understand the signature, which is why I thought
> it'd be correct.
>
> >
> > > > On Sun, May 2, 2021 at 5:50 PM Pablo Rodriguez 
> > > > wrote:
> > > > > [...]
> > > > > From my experience, only Acrobat deals with child objects in
> > > > > signatures
> > > > > generating a valid signature (and rewriting the two objects
> > > > > into a
> > > > > single one).
> > >
> > > As mentioned above, it seems that mupdf (now?) actually rewrites
> > > "both"
> > > signatures into one, however Okular doesn't.
> >
> > Sorry, objects is a very special term in PDF parlance. It has nothing
> > to
> > do with signatures.
> >
> > Just in case it might help,
>
> Ah, I see.  I'm still a bit unsure what to make of the "fields nested
> in TABLEs" issue, but maybe further debugging will show at some point.
>
> ~ Leo
>
>
> ___
> 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] chapter number sought

2021-05-30 Thread Adam Reviczky
Hi Hans,

Does this help:
https://tex.stackexchange.com/questions/134474/context-part-chapter-section-and-subsection-names
?

\starttext
\startchapter[title={First chapter}]
\structurenumber\ - \structuretitle
\stopchapter
\stoptext

Although getmarking is probably what you're really after:
\getmarking[chapternumber] and \getmarking[chapter].

\starttext
\startchapter[title={First chapter}]
\getmarking[chapternumber][current]\ - \getmarking[chapter][current]
\stopchapter
\stoptext

Adam

On Sun, May 30, 2021 at 11:12 AM Hans van der Meer 
wrote:

> With \pagenumber I can call up the current pagenumber and typeset it.
> But \chapternumber is not defined.
> How can I typeset the current chapternumber or even the current
> chapternumber.sectionnumber.subsectionnumber, for example?
>
> dr. Hans van der Meer
>
>
>
> ___
> 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] ctxlua percentage format escape

2021-05-29 Thread Adam Reviczky
Thank you Jairo!

I have tried playing around with letterpercent/catcodes as well, not sure
what I did wrong, but your examples work just fine, so thanks again.

Adam

On Sat, May 29, 2021 at 2:04 PM Jairo A. del Rio 
wrote:

> Hi, Adam. There are some ways to do it. I'm sure there are many more, but
> I don't remember them right now. Hi, Hans. There's a bug (?) in
> syst-lua.lua related to \expression in MkIV (xmath and xcomplex aren't
> defined). Please fix that
>
>
> %Temporary hack for MkIV
>
> %Only use it in case \expression ... \relax doesn't work
>
> \startmkivmode
>
> \startluacode
>
> xmath = xmath or math
>
> xcomplex = xcomplex or {} --maybe math too???
>
> \stopluacode
>
> \stopmkivmode
>
> \starttext
>
> $\pi = \ctxlua{context("\letterpercent.6f", math.pi)}$
>
>
> $\pi = \expression string.format("\letterpercent.6f", pi)\relax$
>
>
> %Changing catcodes so $ and % are letter characters
>
> \startasciimode
>
> \m{\pi = \expression ("%.6f"):format(pi) \relax}
>
>
> \m{\pi = \ctxlua{context("%.6f", math.pi)}}
>
> \stopasciimode
>
> \stoptext
>
> Regards,
>
>
> Jairo
>
> El sáb, 29 de may. de 2021 a la(s) 07:32, Adam Reviczky (
> revic...@gmail.com) escribió:
>
>> Hi,
>>
>> I was trying to use a quick calculation like the new mathfun in lmtx for
>> an older mkiv document.
>>
>> MWE from the wiki:
>> https://wiki.contextgarden.net/Programming_in_LuaTeX#Examples
>>
>> \starttext
>> $\pi = \ctxlua{context("\%.6f", math.pi)}$
>> \stoptext
>>
>> But that gives an error (actually for both lmtx and mkiv): token call,
>> syntax: [ctxlua]:1: invalid escape sequence near '"\%'
>>
>> Whereas
>>
>> \starttext
>> $\pi = \startluacode context("%.6f", math.pi) \stopluacode$
>> \stoptext
>>
>> Works fine as expected.
>>
>> Is there a way to escape the percentage sign in ctxlua as a format value?
>>
>> Adam
>>
>> ___
>> 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
>
> ___
>
___
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] ctxlua percentage format escape

2021-05-29 Thread Adam Reviczky
Hi,

I was trying to use a quick calculation like the new mathfun in lmtx for an
older mkiv document.

MWE from the wiki:
https://wiki.contextgarden.net/Programming_in_LuaTeX#Examples

\starttext
$\pi = \ctxlua{context("\%.6f", math.pi)}$
\stoptext

But that gives an error (actually for both lmtx and mkiv): token call,
syntax: [ctxlua]:1: invalid escape sequence near '"\%'

Whereas

\starttext
$\pi = \startluacode context("%.6f", math.pi) \stopluacode$
\stoptext

Works fine as expected.

Is there a way to escape the percentage sign in ctxlua as a format value?

Adam
___
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] xtable in def or setups

2021-05-18 Thread Adam Reviczky
Hi Werner,

Did you try startembeddedxtable ?

See Section 5 in the manual (
https://www.pragma-ade.com/general/manuals/xtables-mkiv.pdf).

Adam

On Tue, May 18, 2021 at 6:38 PM Werner Hennrich  wrote:

> Hello everyone,
>
> I'm trying to create an xtable from within a \def (or within a \setups)
> but always run into "runaway error: end of file encountered"
> whenever the xtable-commands are in there.
>
> \definextable[icbtable]
> \setupxtable[icbtable]
> [frame=off,
> top=\vskip7mm]
> \long\def\iconblock[#1]#2{%
> \ignorespaces
> \startxtable[icbtable]
> \startxrow
> \startxcell[width=17mm]
> \externalfigure[img/#1.svg][height=15mm,width=15mm]
> \stopxcell
> \startxcell #2 \stopxcell
> \stopxrow
> \stopxtable
> \removeunwantedspaces
> }
>
> Is this simply not possible or am I doing something wrong there?
>
> system  > ConTeXt  ver: 2021.05.15 22:45 LMTX  fmt: 2021.5.18
> int: english/english
>
> Thank you,
> Werner
>
> ___
> 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] NotoColorEmoji - loca table not found

2021-05-14 Thread Adam Reviczky
Hi Hans,

Yes, sorry about the error :).

Thanks for the explanation, will use lmtx for that, though probably best
just using another font (some mentioned on the list
https://www.mail-archive.com/ntg-context@ntg.nl/msg92800.html and
https://mailman.ntg.nl/pipermail/ntg-context/2020/098136.html) or svg or
metapost as I do not need it in colour.

I thought it would be easier via fonts but backtracking on the idea now and
maybe using something like this instead:
https://thenounproject.com/term/handshake/153516/.

Thank you,
Adam

On Fri, May 14, 2021 at 4:33 PM Hans Hagen  wrote:

> On 5/14/2021 3:21 AM, Jairo A. del Rio wrote:
> >
> >
> > El jue, 13 de may. de 2021 a la(s) 19:52, Adam Reviczky
> > (revic...@gmail.com <mailto:revic...@gmail.com>) escribió:
> >
> > Thanks Jairo,
> >
> > That indeed works, should've read that it is bitmap only.
> >
> > I do get a white background though (MKIV), is that how the bitmap is
> > stored?
> >
> >
> > In LuaLaTeX with Harfbuzz shaper as well as ConTeXt LMTX, transparency
> > is properly handled, so I suppose ConTeXt MkIV is to blame in this case.
> > In case you understand how does ConTeXt handle with bitmap fonts,
> > relevant files are under
> >
> /home/coragyps/lmtx/tex/texmf-cache/luatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/fonts/
> >
> > \definefontfeature[Emoji][default][sbix=yes]
> >
> > \starttext
> >
> >
>  
> \framed[background=color,background=black]{\definedfont[file:NotoColorEmoji.ttf*Emoji]\char"1F91D}
>
> took me quite a while to realize that there is an error in that line
>
> > \stoptext
> >
> >
> > In Hans' example for applecoloremoji there is no white background
> > (page 5, bachotex-2017-emoji.pdf).
> >
> > I also do not get a white background with LibreOfiice.
> >
> >
> >
> > I'd wait for Hans to fix it, as I don't really understand font
> > management in ConTeXt...
> in lmtx we use a different method
>
> in mkiv we can actually switch to a variant that was on hold till
> texlive release (i.e. luatex 1.13, i forgot about that)
>
> even then, because we cache the problem in mkiv is more with the
> conversion tools that drop masks ..
>
> 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
>
> ___
>
___
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] NotoColorEmoji - loca table not found

2021-05-13 Thread Adam Reviczky
Thanks Jairo,

That indeed works, should've read that it is bitmap only.

I do get a white background though (MKIV), is that how the bitmap is stored?

\definefontfeature[Emoji][default][sbix=yes]

\starttext

\framed[background=color,background=black]{\definedfont[file:NotoColorEmoji.ttf*Emoji]\char"1F91D}

\stoptext


In Hans' example for applecoloremoji there is no white background (page 5,
bachotex-2017-emoji.pdf).

I also do not get a white background with LibreOfiice.


Adam

On Fri, May 14, 2021 at 12:51 AM Jairo A. del Rio 
wrote:

> In ConTeXt LMTX this works just fine (try mtxrun --generate and context
> --make first):
>
> \definefontfeature[Emoji][default][sbix=yes]
>
> \starttext
>
> \definedfont[file:NotoColorEmoji.ttf*Emoji]\char"1F91D
>
> \stoptext
>
> However, when one tries to convert it with ImageMagick the following
> happens:
>
> Error reading a content stream. The page may be incomplete.
>Output may be incorrect.
> Error: Ignoring spurious ET operator.
>Output may be incorrect.
> Error: File did not complete the page properly and may be damaged.
>Output may be incorrect.
>
>
> Only SVG fonts don't trigger this error in LMTX.
>
>
> I confirm ConTeXt MkIV is having issues with emoji fonts. It seems that
> GraphicsMagick is not properly generating images as it complains about an
> improper header.
>
> Jairo
>
> El jue, 13 de may. de 2021 a la(s) 18:26, Adam Reviczky (
> revic...@gmail.com) escribió:
>
>> Hi,
>>
>> I am trying to use the 'handshake' character (
>> https://www.fileformat.info/info/unicode/char/1f91d/fontsupport.htm)
>> from the Noto Color Emoji font (
>> https://github.com/googlefonts/noto-emoji/blob/main/fonts/NotoColorEmoji.ttf
>> ).
>>
>> The following MWE gives an error:
>>
>> \starttext
>>
>> \definedfont[file:NotoColorEmoji.ttf] \char"1F91D
>>
>> \stoptext
>>
>> fonts   > otf loading > loading 'NotoColorEmoji.ttf', hash
>> 'notocoloremoji'
>> system  > lua > compiling
>> '/home/ubuntu/.texlive2020/texmf-var/luatex-cache/context/b47c3d3cee7cb6c86268d0595268c442/fonts/png/notocoloremoji.tma'
>> into
>> '/home/ubuntu/.texlive2020/texmf-var/luatex-cache/context/b47c3d3cee7cb6c86268d0595268c442/fonts/png/notocoloremoji.tmc'
>> system  > lua > dumping
>> '/home/ubuntu/.texlive2020/texmf-var/luatex-cache/context/b47c3d3cee7cb6c86268d0595268c442/fonts/png/notocoloremoji.tma'
>> into
>> '/home/ubuntu/.texlive2020/texmf-var/luatex-cache/context/b47c3d3cee7cb6c86268d0595268c442/fonts/png/notocoloremoji.tmc'
>> stripped
>> fonts   > otf loading > loading done
>> fonts   > otf loading > saving 'NotoColorEmoji.ttf' in cache
>> system  > lua > compiling
>> '/home/ubuntu/.texlive2020/texmf-var/luatex-cache/context/b47c3d3cee7cb6c86268d0595268c442/fonts/otl/notocoloremoji.tma'
>> into
>> '/home/ubuntu/.texlive2020/texmf-var/luatex-cache/context/b47c3d3cee7cb6c86268d0595268c442/fonts/otl/notocoloremoji.tmc'
>> system  > lua > dumping
>> '/home/ubuntu/.texlive2020/texmf-var/luatex-cache/context/b47c3d3cee7cb6c86268d0595268c442/fonts/otl/notocoloremoji.tma'
>> into
>> '/home/ubuntu/.texlive2020/texmf-var/luatex-cache/context/b47c3d3cee7cb6c86268d0595268c442/fonts/otl/notocoloremoji.tmc'
>> stripped
>> fonts   > otf loading > loading, optimizing, packing and caching
>> time 2.557
>> pages   > flushing realpage 1, userpage 1, subpage 1
>> close source> level 2, order 3, name '/tmp/MWE.tex'
>> close source> level 1, order 3, name
>> '/usr/share/texmf/tex/context/base/mkiv/cont-yes.mkiv'
>> ! error:  (file NotoColorEmoji.ttf) (ttf): loca table not
>> foundmtx-context | fatal error: return code: 256
>>
>> Any idea what is wrong?
>>
>> Adam
>>
>>
>> ___
>> 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 intere

[NTG-context] NotoColorEmoji - loca table not found

2021-05-13 Thread Adam Reviczky
Hi,

I am trying to use the 'handshake' character (
https://www.fileformat.info/info/unicode/char/1f91d/fontsupport.htm) from
the Noto Color Emoji font (
https://github.com/googlefonts/noto-emoji/blob/main/fonts/NotoColorEmoji.ttf
).

The following MWE gives an error:

\starttext

\definedfont[file:NotoColorEmoji.ttf] \char"1F91D

\stoptext

fonts   > otf loading > loading 'NotoColorEmoji.ttf', hash
'notocoloremoji'
system  > lua > compiling
'/home/ubuntu/.texlive2020/texmf-var/luatex-cache/context/b47c3d3cee7cb6c86268d0595268c442/fonts/png/notocoloremoji.tma'
into
'/home/ubuntu/.texlive2020/texmf-var/luatex-cache/context/b47c3d3cee7cb6c86268d0595268c442/fonts/png/notocoloremoji.tmc'
system  > lua > dumping
'/home/ubuntu/.texlive2020/texmf-var/luatex-cache/context/b47c3d3cee7cb6c86268d0595268c442/fonts/png/notocoloremoji.tma'
into
'/home/ubuntu/.texlive2020/texmf-var/luatex-cache/context/b47c3d3cee7cb6c86268d0595268c442/fonts/png/notocoloremoji.tmc'
stripped
fonts   > otf loading > loading done
fonts   > otf loading > saving 'NotoColorEmoji.ttf' in cache
system  > lua > compiling
'/home/ubuntu/.texlive2020/texmf-var/luatex-cache/context/b47c3d3cee7cb6c86268d0595268c442/fonts/otl/notocoloremoji.tma'
into
'/home/ubuntu/.texlive2020/texmf-var/luatex-cache/context/b47c3d3cee7cb6c86268d0595268c442/fonts/otl/notocoloremoji.tmc'
system  > lua > dumping
'/home/ubuntu/.texlive2020/texmf-var/luatex-cache/context/b47c3d3cee7cb6c86268d0595268c442/fonts/otl/notocoloremoji.tma'
into
'/home/ubuntu/.texlive2020/texmf-var/luatex-cache/context/b47c3d3cee7cb6c86268d0595268c442/fonts/otl/notocoloremoji.tmc'
stripped
fonts   > otf loading > loading, optimizing, packing and caching
time 2.557
pages   > flushing realpage 1, userpage 1, subpage 1
close source> level 2, order 3, name '/tmp/MWE.tex'
close source> level 1, order 3, name
'/usr/share/texmf/tex/context/base/mkiv/cont-yes.mkiv'
! error:  (file NotoColorEmoji.ttf) (ttf): loca table not foundmtx-context
| fatal error: return code: 256

Any idea what is wrong?

Adam
___
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] simpleslides gives 'input stack overflow'

2021-05-09 Thread Adam Reviczky
Hi,

Looks like it is a problem with "StartPage" and "StopPage" in metapost.

I get the same error with any MP graphic using those commands.

More minimal example (without simpleslides) as per the wiki:
https://wiki.contextgarden.net/Cover_Pages

colors  > 'rgb' color space is supported
colors  > 'cmyk' color space is supported
fonts   > preloading latin modern fonts (second stage)
fonts   > 'fallback modern-designsize rm 12pt' is loaded
metapost> initializing instance 'metafun:1' using format 'metafun'
and method 'default'
metapost> loading 'metafun' as
'/usr/share/texmf/metapost/context/base/mpiv/metafun.mpiv' using method
'default'
metapost> initializing number mode 'scaled'
input stack overflow
mtx-context | fatal error: return code: 256

Commenting out "StartPage" and "StopPage" compiles.

mtx-context | current version: 2021.05.09 17:14
This is LuaTeX, Version 1.14.0
Development id: 7438

Adam

On Sun, May 9, 2021 at 9:57 PM Adam Reviczky  wrote:

> Hi,
>
> With the latest luatex change from
> https://github.com/TeX-Live/luatex/commit/1566b63b338abbe38ed839fac9f2022ebbfa7d59
> (and MKIV 2021-05-09 17:14:00) I get an input stack overflow:
>
> simpleslides> loading style Boxed
> system  > command '\NormalHeight' is already defined
> system  > command '\NormalWidth' is already defined
> system  > command '\PictureFrameHeight' is already defined
> system  > command '\PictureFrameWidth' is already defined
> close source> level 4, order 8, name
> '/usr/share/texmf/tex/context/third/simpleslides/s-simpleslides-Boxed.tex'
> close source> level 3, order 8, name
> '/usr/share/texmf/tex/context/third/simpleslides/t-simpleslides.mkiv'
> fonts   > bodyfont '24.0414pt' is defined (can better be done
> global)
> metapost> initializing instance 'metafun:1' using format 'metafun'
> and method 'default'
> metapost> loading 'metafun' as
> '/usr/share/texmf/metapost/context/base/mpiv/metafun.mpiv' using method
> 'default'
> metapost> initializing number mode 'scaled'
> input stack overflow
> mtx-context | fatal error: return code: 256
>
> MWE from the documentation:
> \usemodule[simpleslides][style=Boxed]
> \setupTitle[title={Title of the presentation},author={Name of
> authors},date={Date of presentation}]
> \starttext
> \placeTitle
> \SlideTitle{The first slide}
> Write whatever you want.
> \SlideTitle{The second slide}
> Continue writing.
> \stoptext
>
> Does that mean the simpleslides module has some recursion problems?
> I have tried a couple of themes but getting the same error.
>
> Adam
>
>
___
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] simpleslides gives 'input stack overflow'

2021-05-09 Thread Adam Reviczky
Hi,

With the latest luatex change from
https://github.com/TeX-Live/luatex/commit/1566b63b338abbe38ed839fac9f2022ebbfa7d59
(and MKIV 2021-05-09 17:14:00) I get an input stack overflow:

simpleslides> loading style Boxed
system  > command '\NormalHeight' is already defined
system  > command '\NormalWidth' is already defined
system  > command '\PictureFrameHeight' is already defined
system  > command '\PictureFrameWidth' is already defined
close source> level 4, order 8, name
'/usr/share/texmf/tex/context/third/simpleslides/s-simpleslides-Boxed.tex'
close source> level 3, order 8, name
'/usr/share/texmf/tex/context/third/simpleslides/t-simpleslides.mkiv'
fonts   > bodyfont '24.0414pt' is defined (can better be done
global)
metapost> initializing instance 'metafun:1' using format 'metafun'
and method 'default'
metapost> loading 'metafun' as
'/usr/share/texmf/metapost/context/base/mpiv/metafun.mpiv' using method
'default'
metapost> initializing number mode 'scaled'
input stack overflow
mtx-context | fatal error: return code: 256

MWE from the documentation:
\usemodule[simpleslides][style=Boxed]
\setupTitle[title={Title of the presentation},author={Name of
authors},date={Date of presentation}]
\starttext
\placeTitle
\SlideTitle{The first slide}
Write whatever you want.
\SlideTitle{The second slide}
Continue writing.
\stoptext

Does that mean the simpleslides module has some recursion problems?
I have tried a couple of themes but getting the same error.

Adam
___
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] PDF forms not creating proper children

2021-05-02 Thread Adam Reviczky
Hi Pablo,

First of all, my bad, the test suite example works just fine in Adobe,
including with ConTeXt latest.

I have messed up my form by overriding the PDF version to 2.0, shouldn't
have done that.

On the viewers, I cannot recall exactly what I've done earlier in the year,
but indeed, most likely I have tried evince after signing it from the
command line. From https://gitlab.gnome.org/GNOME/evince/-/issues/143 there
is still no support for the signing itself, though okular should have some
support.

In any case, thanks for the hints (I probably should've done more testing)!

Adam


On Sun, May 2, 2021 at 5:50 PM Pablo Rodriguez  wrote:

> On 5/2/21 12:20 AM, Adam Reviczky wrote:
> > Hi,
> >
> > I cannot get the signature working either, but almost certain it did
> > work in February this year, as I have done some with MKIV.
> > [...]
>
> Hi Adam,
>
> I’m on a Linux computer, so I’m not able to check this now.
>
> If the signature isn’t working, you mean that the output PDF document
> from fields-007.tex cannot be signed with Acrobat DC, don’t you?
>
> Sorry for asking the obvious question, but this worked perfectly fine
> each time I tested.
>
> > Using the https://live.contextgarden.net/ with (LuaTeX 2.06 20200630 +
> > ConTeXt MkIV 2020.06.30 17:30) looks good, but evince does not display
> > the field.
>
> Evince never displays the signature field, only when signed.
>
> BTW, using mupdf-gl to sign the PDF document will mess it, since it has
> problems to recognize the child object.
>
> From my experience, only Acrobat deals with child objects in signatures
> generating a valid signature (and rewriting the two objects into a
> single one).
>
> Just in case it might help,
>
> Pablo
> --
> http://www.ousia.tk
>
> ___
> 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] PDF forms not creating proper children

2021-05-01 Thread Adam Reviczky
Hi,

I cannot get the signature working either, but almost certain it did work
in February this year, as I have done some with MKIV.

>From the test suite:

fields-007.tex
\nopdfcompression
\setupinteraction[state=start]
\starttext
\definefield[x][signature]
\field[x]
\stoptext

Using the https://live.contextgarden.net/ with (LuaTeX 2.06 20200630 +
ConTeXt MkIV 2020.06.30 17:30) looks good, but evince does not display the
field.

Adam

On Fri, Apr 23, 2021 at 8:52 PM Leonard Janis Robert König 
wrote:

> Hello,
>
> I currently try to build a document with AcroForms, e.g., the examples
> from [1] also linked in the Wiki.  The most recent example is in the
> form/ subdirectory and dated mid 2020.  However, when building the
> file(s) with my ConTeXt distribution the file created is broken, in
> comparison to the PDF checked in into the Git.
>
> The more obvious difference is that the PDF in the repository can be
> filled in the Firefox 89 beta, while the other PDF doesn't even display
> the fields as forms.  Running pdfinfo also yields:
>
> > Syntax Error: Form field child is not a dictionary
>
> I suspect that due to some breakage the forms children aren't set in
> the AcroForms dictionary anymore?  My ConTeXt versions are:
>
> # ArchLinux Repos
>
> context --version
> mtx-context | ConTeXt Process Management 1.04
> mtx-context |
> mtx-context | main context file: /usr/share/texmf-
> dist/tex/context/base/mkiv/context.mkiv
> mtx-context | current version: 2021.03.05 19:11
> mtx-context | main context file: /usr/share/texmf-
> dist/tex/context/base/mkxl/context.mkxl
> mtx-context | current version: 2021.03.05 19:11
>
> # Debian Buster Repos
> mtx-context | ConTeXt Process Management 1.02
> mtx-context |
> mtx-context | main context file:
> /usr/share/texmf/tex/context/base/mkiv/context.mkiv
> mtx-context | current version: 2018.04.04 00:51
>
> # Docker Image: Current
>
> mtx-context | ConTeXt Process Management 1.03
> mtx-context |
> mtx-context | main context file: /context/tex/texmf-
> context/tex/context/base/mkiv/context.mkiv
> mtx-context | current version: 2020.01.30 14:13
> mtx-context | main context file: /context/tex/texmf-
> context/tex/context/base/mkiv/context.mkxl
> mtx-context | current version: 2020.01.30 14:13
>
> # Docker Image: Beta
> mtx-context | ConTeXt Process Management 1.03
> mtx-context |
> mtx-context | main context file: /context/tex/texmf-
> context/tex/context/base/mkiv/context.mkiv
> mtx-context | current version: 2020.01.30 14:13
> mtx-context | main context file: /context/tex/texmf-
> context/tex/context/base/mkiv/context.mkxl
> mtx-context | current version: 2020.01.30 14:13
>
> # Docker Image: LMTX
> mtx-context | ConTeXt Process Management 1.04
> mtx-context |
> mtx-context | main context file: /context/tex/texmf-
> context/tex/context/base/mkiv/context.mkiv
> mtx-context | current version: 2021.04.14 22:58
> mtx-context | main context file: /context/tex/texmf-
> context/tex/context/base/mkxl/context.mkxl
> mtx-context | current version: 2021.04.14 22:58
>
> # Docker Image: Beta from 2019-09
> mtx-context | ConTeXt Process Management 1.03
> mtx-context |
> mtx-context | main context file: /context/tex/texmf-
> context/tex/context/base/mkiv/context.mkiv
> mtx-context | current version: 2019.09.10 20:03
> mtx-context | main context file: /context/tex/texmf-
> context/tex/context/base/mkiv/context.mkxl
> mtx-context | current version: 2019.09.10 20:03
>
> The ConTeXt version of the checked in file on GitHub is (according to
> pdfinfo):
>
> > Creator:LuaTeX 1.10 7138 + ConTeXt MkIV 2019.08.20 17:20
> > Producer:   macOS Version 10.14.6 (Build 18G5033) Quartz
> PDFContext
>
> I also remebered another time were I toyed around with it and indeed
> that PDF also had broken form field children:
>
>
> > Creator:LuaTeX 1.12 7306 + ConTeXt MkIV 2020.03.10 14:44
> > Producer:   LuaTeX-1.12
>
> A broken version that I built locally using the :current IslandOfTeX
> [2] can be found at [3].
>
> The version difference between the broken and not-broken PDFs hints
> that the breakage occured between 2019.08.20 and 2019.09.10-beta, while
> the Debian breackage might be due to a backport(?)
>
> Alternatively, this could just be a mistake on my side?
>
> Cheers
> Leo König
>
>
> [1]: https://github.com/fiee/ConTeXt
> [2]: https://gitlab.com/islandoftex/images/context/
> [3]:
> https://mega.nz/file/ThcghTqb#JqRCSsd59bBbMgTMr3ahaPdU4LPlZd0cpA3ZFBJLJ3A
>
>
>
>
> ___
> 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/

Re: [NTG-context] Formulanumbers in margin

2021-03-23 Thread Adam Reviczky
Hi,

So the numbercommand does work after all, I just needed to keep something
in the "formulanumber" part of the textline, otherwise it wouldn't get
drawn.

Not sure how nice this looks, but it does work like this now:

\starttext
\showframe
\setupformulas[numbercommand=\nbsp\inrightmargin]
\startplaceformula \startformula c^2 = a^2 + b^2
\stopformula \stopplaceformula
\stoptext

Adam

On Sun, Mar 21, 2021 at 8:41 PM Adam Reviczky  wrote:

> Thanks Hraban,
>
> That should be fine, I've tried to increase the margins as well, but not
> sure that's the issue as I can perfectly place text with \inmargin
> directly, just not with the numbercommand.
>
> MWE:
>
> \starttext
> \setuplayout[margin=2cm, leftmargin=2cm, rightmargin=2cm]
>
> \showframe
> \showlayout
>
> \setupcaption[figure][location={rightmargin}]
> \startplacefigure[title=Cow] \externalfigure[cow] \stopplacefigure
>
> \define[1]\MyFormulaNumber{\inleftmargin{#1}}
> \setupformula[numbercommand=\MyFormulaNumber]
>
> \inleftmargin{Left Margin Text}
> \inrightmargin{Right Margin Text}
>
> \startplaceformula[reference=eq1] \startformula c^2 = a^2 + b^2
> \stopformula \stopplaceformula
> \stoptext
>
> Adam
>
> On Sun, Mar 21, 2021 at 8:31 PM Henning Hraban Ramm 
> wrote:
>
>>
>> > Am 21.03.2021 um 20:56 schrieb Adam Reviczky :
>> >
>> > Thanks Hraban,
>> >
>> > I've tried the numbercommand as well, but that also just makes the
>> formula number disappear, unless I am doing something wrong.
>> >
>> > The framing as per the math manual (manuals/math/math-framing.tex)
>> however does work, so not sure:
>> > \setupformula[numbercommand={\inframed[framecolor=green]}]
>>
>> Are your margins actually non-zero? (\setuplayout)
>> Maybe check with \showlayout
>>
>> 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
>>
>> ___
>>
>
___
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] Formulanumbers in margin

2021-03-21 Thread Adam Reviczky
Thanks Hraban,

That should be fine, I've tried to increase the margins as well, but not
sure that's the issue as I can perfectly place text with \inmargin
directly, just not with the numbercommand.

MWE:

\starttext
\setuplayout[margin=2cm, leftmargin=2cm, rightmargin=2cm]

\showframe
\showlayout

\setupcaption[figure][location={rightmargin}]
\startplacefigure[title=Cow] \externalfigure[cow] \stopplacefigure

\define[1]\MyFormulaNumber{\inleftmargin{#1}}
\setupformula[numbercommand=\MyFormulaNumber]

\inleftmargin{Left Margin Text}
\inrightmargin{Right Margin Text}

\startplaceformula[reference=eq1] \startformula c^2 = a^2 + b^2
\stopformula \stopplaceformula
\stoptext

Adam

On Sun, Mar 21, 2021 at 8:31 PM Henning Hraban Ramm  wrote:

>
> > Am 21.03.2021 um 20:56 schrieb Adam Reviczky :
> >
> > Thanks Hraban,
> >
> > I've tried the numbercommand as well, but that also just makes the
> formula number disappear, unless I am doing something wrong.
> >
> > The framing as per the math manual (manuals/math/math-framing.tex)
> however does work, so not sure:
> > \setupformula[numbercommand={\inframed[framecolor=green]}]
>
> Are your margins actually non-zero? (\setuplayout)
> Maybe check with \showlayout
>
> 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
>
> ___
>
___
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] Formulanumbers in margin

2021-03-21 Thread Adam Reviczky
Thanks Hraban,

I've tried the numbercommand as well, but that also just makes the formula
number disappear, unless I am doing something wrong.

The framing as per the math manual (manuals/math/math-framing.tex
<https://github.com/contextgarden/context-mirror/blob/a0270f13065d116355a953c6f246cbba26289fc2/doc/context/sources/general/manuals/math/math-framing.tex>)
however does work, so not sure:
\setupformula[numbercommand={\inframed[framecolor=green]}]

Adam

On Sun, Mar 21, 2021 at 7:47 PM Henning Hraban Ramm  wrote:

>
>
> > Am 21.03.2021 um 19:40 schrieb Adam Reviczky :
> >
> > % this makes the formulanumber disappear
> > % \setupformulas[location={rightmargin}]
>
> No, \setupformula’s location understands only left and right.
>
> Try something like:
>
> \define[1]\MyFormulaNumber{\inmargin{#1}}
>
> \setupformula[
> numbercommand=\MyFormulaNumber
> ]
>
>
> 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
>
> ___
>
___
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] Formulanumbers in margin

2021-03-21 Thread Adam Reviczky
Hi,

One more question on formulas. How can I get the formula number to be put
into the left/right margin instead of left/right inside the text?

I have tried the following:

\starttext
\showframe
% figure caption into the margin
\setupcaption[figure][location={rightmargin}]
\startplacefigure[title=Cow] \externalfigure[cow] \stopplacefigure

% this makes the formulanumber disappear
% \setupformulas[location={rightmargin}]
\startplaceformula[reference=eq1,location={rightmargin}] \startformula c^2
= a^2 + b^2 \stopformula \stopplaceformula
\stoptext

But the setupformulas will make the number disappear entirely, and the
placeformula location doesn't seem to take the margin option.

Thanks,
Adam
___
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] Formula numbering including all prefix segments

2021-03-21 Thread Adam Reviczky
Hi Hans,

That does it indeed, thank you!

Together with prefixconversion I mainly wanted to use this for formulas in
the appendix with the added prefix.

I'll add it to the wiki, as it is a very helpful information.

Adam

On Sun, Mar 21, 2021 at 12:55 PM Hans Hagen  wrote:

> On 3/20/2021 11:45 PM, Adam Reviczky wrote:
> > Hi,
> >
> > Is there a way to have formula numbers showing all prefix segments?
> > When I use prefixsegments, I get the desired numbering in the placelist
> > but not in the formula number itself.
> >
> > For example:
> > \starttext
> > \setupcaption[figure][way=bytext,prefixsegments=1:*]
> > \setupformulas[way=bytext,prefixsegments=1:*]
> > \startsection[title=Section]
> > \startsubsection[title=SubSection]
> > \startplacefigure[list=cow] \externalfigure[cow] \stopplacefigure
> > \startplaceformula[reference=eq1] \startformula c^2 = a^2 + b^2
> > \stopformula \stopplaceformula
> > \stopsubsection
> > \stopsection
> > \placelistoffigures[criterium=all]
> > \placelist[formula][criterium=all]
> > \stoptext
> >
> > The figure has number 1.1.1 and is in the list as 1.1.1, the formula has
> > number 1.1 but is listed as 1.1.1.
> > I would like to have the formula numbered 1.1.1 as well (as referenced
> > in the placelist), so with section and subsection numbering.
> you need to add: prefixset=all (default is limited to 3, see strc-def)
>
> \starttext
>  \setupcounter[formula][way=bytext]
>  \setupcaption[figure][way=bytext,prefixsegments=1:*]
>  \setupformulas[way=bytext,prefixsegments=1:*,prefixset=all]
>
>  \startchapter[title=Chapter]
>  \dorecurse{4}{
>  \startsection[title=Section]
>  \startsubsection[title=SubSection]
>  \startplacefigure[list=cow] \externalfigure[cow]
> \stopplacefigure
>  \startplaceformula[reference=eq1] \startformula c^2
> = a^2 + b^2 \stopformula \stopplaceformula
>  \stopsubsection
>  \startsubsection[title=SubSection]
>  \startplacefigure[list=cow] \externalfigure[cow]
> \stopplacefigure
>  \startplaceformula[reference=eq1] \startformula c^2
> = a^2 + b^2 \stopformula \stopplaceformula
>  \stopsubsection
>  \stopsection
>  }
>  \stopchapter
>
>  \placelistoffigures[criterium=all]
>  \placelist[formula][criterium=all]
> \stoptext
> -
>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] Formula numbering including all prefix segments

2021-03-20 Thread Adam Reviczky
Hi,

Is there a way to have formula numbers showing all prefix segments?
When I use prefixsegments, I get the desired numbering in the placelist but
not in the formula number itself.

For example:
\starttext
\setupcaption[figure][way=bytext,prefixsegments=1:*]
\setupformulas[way=bytext,prefixsegments=1:*]
\startsection[title=Section]
\startsubsection[title=SubSection]
\startplacefigure[list=cow] \externalfigure[cow] \stopplacefigure
\startplaceformula[reference=eq1] \startformula c^2 = a^2 + b^2
\stopformula \stopplaceformula
\stopsubsection
\stopsection
\placelistoffigures[criterium=all]
\placelist[formula][criterium=all]
\stoptext

The figure has number 1.1.1 and is in the list as 1.1.1, the formula has
number 1.1 but is listed as 1.1.1.
I would like to have the formula numbered 1.1.1 as well (as referenced in
the placelist), so with section and subsection numbering.

Adam
___
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] (no subject)

2021-03-20 Thread Adam Reviczky
Hi,

Is there a way to have formula numbers showing all prefix segments?
When I use prefixsegments, I get the desired numbering in the placelist but
not in the formula number itself.

For example:
\starttext
\setupcaption[figure][way=bytext,prefixsegments=1:*]
\setupformulas[way=bytext,prefixsegments=1:*]
\startsection[title=Section]
\startsubsection[title=SubSection]
\startplacefigure[list=cow] \externalfigure[cow] \stopplacefigure
\startplaceformula[reference=eq1] \startformula c^2 = a^2 + b^2
\stopformula \stopplaceformula
\stopsubsection
\stopsection
\placelistoffigures[criterium=all]
\placelist[formula][criterium=all]
\stoptext

The figure has number 1.1.1 and is in the list as 1.1.1, the formula has
number 1.1 but is listed as 1.1.1.
I would like to have the formula numbered 1.1.1 as well (as referenced in
the placelist), so with section and subsection numbering.

Adam
___
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] placenamedformula in placelist (MKII vs MKIV/LMTX)

2021-03-17 Thread Adam Reviczky
Hi,

Or would it be possible to just add a "list=" option to placeformula
similar to placefigure? (although that might conflict with the combination
of "title=")

All I am really after is to label or name numbered formulas in the
placelist.

---
\starttext

% 1   This is a picture of a cow  . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . .  1
\startplacefigure[title={My cow},list={This is a picture of a cow}]
\externalfigure[cow] \stopplacefigure

% Mass-energy equivalence . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . 1
\startplaceformula[reference=eq:one,title={Mass-energy equivalence}]
\startformula e=mc^2 \stopformula \stopplaceformula

% 1   . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . .  1
% list option could give: 1   Mass-energy equivalence . . . . . . . . . . .
. . . . . . . . . . . .  1
\startplaceformula[reference=eq:one,list={Mass-energy equivalence}]
\startformula e=mc^2 \stopformula \stopplaceformula

\placelistoffigures[criterium=all,alternative=c]
\placelist[formula][criterium=all,alternative=c]

\stoptext
--

Adam

On Tue, Mar 16, 2021 at 5:28 AM Adam Reviczky  wrote:

> Hi,
>
> I want to use placenamedformula to list a formula in the placelist with
> both the formula name and the formula number (alongside the pagenumber).
>
> The example in the wiki (https://wiki.contextgarden.net/Math/Display) and
> the test suite (cont-tst/doc/context/tests/mkiv/math/formulas-003.tex)
> shows what I would like to have.
>
> Using MKII I get the desired output (1 formulaname ... and 3b formulaname
> ...) but with MKIV and LMTX I only get the reference from the placeformula
> (as 1 and correctly not listed in the placelist) and none of the
> placenamedformula numbers. The placeformula number is then carried onto the
> second placenamedformula as 1 (resulting in formulaname ... and 1
> formulaname ...).
>
> I have attached the test suite file output with both MKII and MKIV.
>
> Is there a way to get the MKII output with MKIV/LMTX somehow?
>
> Adam
>
___
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] placenamedformula in placelist (MKII vs MKIV/LMTX)

2021-03-15 Thread Adam Reviczky
Hi,

I want to use placenamedformula to list a formula in the placelist with
both the formula name and the formula number (alongside the pagenumber).

The example in the wiki (https://wiki.contextgarden.net/Math/Display) and
the test suite (cont-tst/doc/context/tests/mkiv/math/formulas-003.tex)
shows what I would like to have.

Using MKII I get the desired output (1 formulaname ... and 3b formulaname
...) but with MKIV and LMTX I only get the reference from the placeformula
(as 1 and correctly not listed in the placelist) and none of the
placenamedformula numbers. The placeformula number is then carried onto the
second placenamedformula as 1 (resulting in formulaname ... and 1
formulaname ...).

I have attached the test suite file output with both MKII and MKIV.

Is there a way to get the MKII output with MKIV/LMTX somehow?

Adam


formulas-003-mkii.pdf
Description: Adobe PDF document


formulas-003.mkiv.pdf
Description: Adobe PDF document
___
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] MKIV format generation error with latest 2021-02-17 13:33

2021-02-17 Thread Adam Reviczky
Hi,

I am getting the following error with luatex/mkiv with today's latest:

context --make

loading : ConTeXt Token Support / Initialization
/usr/share/texmf/tex/context/base/mkxl/toks-ini.lmt:21: attempt to call a
nil value (field 'getcommandvalues')
stack traceback:
/usr/share/texmf/tex/context/base/mkxl/toks-ini.lmt:21: in local 'code'
/usr/share/texmf/tex/context/base/mkiv/util-lua.lua:96: in field
'loadedluacode'
/usr/share/texmf/tex/context/base/mkiv/luat-env.lua:108: in field
'luafilechunk'
/usr/share/texmf/tex/context/base/mkiv/luat-cod.lua:75: in function
'lua.registercode'
[\directlua]:1: in main chunk.
\registerctxluafile #1#2->\ctxlua {lua.registercode("#1","#2")}

l.18 \registerctxluafile{toks-ini}{autosuffix}

?

---
mtx-context | ConTeXt Process Management 1.04
mtx-context |
mtx-context | main context file:
/usr/share/texmf/tex/context/base/mkiv/context.mkiv
mtx-context | current version: 2021.02.17 13:30
mtx-context | main context file:
/usr/share/texmf/tex/context/base/mkxl/context.mkxl
mtx-context | current version: 2021.02.17 13:30
---
Compiled with libpng 1.6.37; using 1.6.37
Compiled with lua version 5.3.6
Compiled with mplib version 2.00
Compiled with zlib 1.2.11; using 1.2.11

Development id: 7405
---

Adam
___
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] mkiv broken in 2020-12-04 20:21:00 (typo-spa.lua)

2020-12-05 Thread Adam Reviczky
Hi Hans,

The removal of typo-spa.lua breaks the format generation in mkiv:

loading > ConTeXt Typesetting Macros / Wrapping
resolvers   > lua > loading file
'/usr/share/texmf/tex/context/base/mkiv/typo-wrp.lua' succeeded
close source> level 1, order 226, name
'/usr/share/texmf/tex/context/base/mkiv/typo-wrp.mkiv'
open source > level 1, order 227, name
'/usr/share/texmf/tex/context/base/mkiv/typo-spa.mkiv'
loading > ConTeXt Typesetting Macros / Spacing
resolvers   > lua > unknown file 'typo-spa.lua'

error loading file: typo-spa.lua (aborting)resolvers   | formats |
resolvers   | formats | binary path  : /usr/bin
resolvers   | formats | format path  :
/home/reviczky/.texlive2020/texmf-var/luatex-cache/context/b47c3d3cee7cb6c86268d0595268c442/formats/luatex
resolvers   | formats | luatex engine: luatex
resolvers   | formats | lua startup file :
/usr/share/texmf/tex/context/base/mkiv/luat-cod.lua
resolvers   | formats | context file :
/usr/share/texmf/tex/context/base/mkiv/cont-en.mkiv
resolvers   | formats | run time : 1.394 seconds
resolvers   | formats | return value : okay
resolvers   | formats |
system  | total runtime: 3.790 seconds

Adding the file back creates the formats again.

mtx-context | current version: 2020.12.04 20:19
This is LuaTeX, Version 1.13.0 (TeX Live 2021/dev/Debian)
Development id: 7387

Regards,
Adam
___
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] format error with latest 2020-11-16 19:40 with mkiv (luatex)

2020-11-17 Thread Adam Reviczky
Thank you Hans, all fine now again!

Adam

On Tue, Nov 17, 2020 at 8:54 AM Hans Hagen  wrote:

> On 11/17/2020 3:06 AM, Adam Reviczky wrote:
> > Hi,
> >
> > I am getting the following error message trying to generate the formats
> > (context --make) with the latest version (latest 2020-11-16 19:40) with
> > luatex 1.13.0 7385 (not lmtx).
> >
> > loading > ConTeXt Typesetting Macros / Triggering Actions
> > resolvers   > lua > loading file
> > '/usr/share/texmf/tex/context/base/mkiv/typo-inj.lua' succeeded
> >
> > tex error   > tex error on line 49 in file
> > /usr/share/texmf/tex/context/base/mkiv/typo-inj.mkiv: ! Parameters must
> > be numbered consecutively
> >
> > 
> > *
> > l.49 \permanent\tolerant\protected\def\checkinjector  [#1]#*
> >
> > [#2]{\clf_checkinjector{#1}{#2}}
> I'll upload a fixed zip.
>
> \permanent\tolerant\protected\def\checkinjector[#1]#*[#2]{...}
>
> is lmtx speak for pick up [#1], skip spaces, pickup [#2] but don't bark
> when these are missing (be \tolerant). And, prevent the user from
> overloading this macro {\permanent).
>
> 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
___


[NTG-context] format error with latest 2020-11-16 19:40 with mkiv (luatex)

2020-11-16 Thread Adam Reviczky
Hi,

I am getting the following error message trying to generate the formats
(context --make) with the latest version (latest 2020-11-16 19:40) with
luatex 1.13.0 7385 (not lmtx).

loading > ConTeXt Typesetting Macros / Triggering Actions
resolvers   > lua > loading file
'/usr/share/texmf/tex/context/base/mkiv/typo-inj.lua' succeeded

tex error   > tex error on line 49 in file
/usr/share/texmf/tex/context/base/mkiv/typo-inj.mkiv: ! Parameters must be
numbered consecutively


*
l.49 \permanent\tolerant\protected\def\checkinjector  [#1]#*

[#2]{\clf_checkinjector{#1}{#2}}

39 %D \placeregister[index][criterium=text]
40 %D \page
41 %D \startsection[title=Alpha] first  \index{first}  \stopsection
42 %D \startsection[title=Beta]  second \index{second} \stopsection
43 %D \startsection[title=Gamma] third  \index{third}  \stopsection
44 %D \startsection[title=Delta] fourth \index{fourth} \stopsection
45 %D \stoptext
46
47 \permanent \protected\def\resetinjector
 [#1]{\clf_resetinjector{#1}}
48 \permanent \protected\def\markinjector
[#1]{\dontleavehmode\clf_markinjector{#1}}
49 >>  \permanent\tolerant\protected\def\checkinjector
 [#1]#*[#2]{\clf_checkinjector{#1}{#2}}
50 \permanent \protected\def\checknextinjector
 [#1]{\clf_checkinjector{#1}{\v!next}}
51 \permanent \protected\def\checkpreviousinjector
 [#1]{\clf_checkinjector{#1}{\v!previous}}
52 %permanent \protected\def\checknextinjector
 [#1]{\clf_checknextinjector{#1}}
53 %permanent \protected\def\checkpreviousinjector
 [#1]{\clf_checkpreviousinjector{#1}}
54 \permanent\tolerant\protected\def\setinjector
 [#1]#*[#2]#*[#3]{\clf_setinjector{#1}{#2}{#3}}
55 \permanent\tolerant\protected\def\showinjector
[#1]{\clf_showinjector{#1}}
56
57 \permanent\protected\def\domarkinjector#1#2% called at the lua end
58   {\dontleavehmode\llap{\infofont\ifcase#1\else\red\fi<#2>\quad}}
59

Swapping typo-inj.mkxl with typo-inj.mkiv makes it work though, changing
\permanent\tolerant\protected\def\checkinjector [#1]#*[#2]{\clf
_checkinjector{#1}{#2}}
\permanent\tolerant\protected\def\setinjector [#1]#*[#2]#*[#3]{\clf
_setinjector{#1}{#2}{#3}}
back to
\unexpanded\def\docheckinjector [#1][#2]{\clf_checkinjector{#1}{#2}}
\unexpanded\def\dosetinjector [#1][#2][#3]{\clf_setinjector{#1}{#2}{#3}}

Were the files mixed up?
Shouldn't the former be for mkxl (lmtx) and the latter for mkiv?

Adam
___
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] gnuplot module broken with latest 2020-07-13 16:31

2020-07-13 Thread Adam Reviczky
Many thanks for the quick fix Hans,

I have tried the lmtx inclusions as well, very nice indeed (and added it to
the wiki)!

Kind Regards,
Adam Reviczky

On Mon, Jul 13, 2020 at 10:38 PM Hans Hagen  wrote:

> On 7/13/2020 8:53 PM, Adam Reviczky wrote:
> > Hi,
> >
> > Using the minimal example from the contextgarden for gnuplot
> > (https://wiki.contextgarden.net/Gnuplot) I am getting the following
> > error message:
> >
> > This is LuaTeX, Version 1.13.0 (TeX Live 2021/dev/Debian)
> >   system commands enabled.
> > open source > level 1, order 1, name
> > '/usr/share/texmf/tex/context/base/mkiv/cont-yes.mkiv'
> > system  >
> > system  > ConTeXt  ver: 2020.07.13 16:23 MKIV  fmt: 2020.7.13
> >   int: english/english
> > system  >
> > system  > 'cont-new.mkiv' loaded
> > open source > level 2, order 2, name
> > '/usr/share/texmf/tex/context/base/mkiv/cont-new.mkiv'
> > system  > beware: some patches loaded from cont-new.mkiv
> > close source> level 2, order 2, name
> > '/usr/share/texmf/tex/context/base/mkiv/cont-new.mkiv'
> > system  > files > jobname 'mwe', input './mwe', result 'mwe'
> > fonts   > latin modern fonts are not preloaded
> > languages   > language 'en' is active
> > open source > level 2, order 3, name '/tmp/4/mwe.tex'
> > modules > 'gnuplot' is loaded
> > open source > level 3, order 4, name
> > '/usr/share/texmf/tex/context/third/gnuplot/t-gnuplot.mkiv'
> > loading > Gnuplot module
> > open source > level 4, order 5, name
> > '/usr/share/texmf/tex/context/fonts/mkiv/type-imp-texgyre.mkiv'
> > close source> level 4, order 5, name
> > '/usr/share/texmf/tex/context/fonts/mkiv/type-imp-texgyre.mkiv'
> > close source> level 3, order 5, name
> > '/usr/share/texmf/tex/context/third/gnuplot/t-gnuplot.mkiv'
> >
> > lua error   > lua error on line 4 in file /tmp/4/mwe.tex:
> >
> > /usr/share/texmf/tex/context/base/mkiv/buff-ini.lua:439: attempt to call
> > a nil value (upvalue 'gettoken')
> > stack traceback:
> > /usr/share/texmf/tex/context/base/mkiv/buff-ini.lua:439: in upvalue
> 'pickup'
> > /usr/share/texmf/tex/context/base/mkiv/buff-ini.lua:635: in function
> > 
> > (...tail calls...)
> >
> >   1 \usemodule[gnuplot]
> >   2
> >   3 % write a script for gnuplot
> >   4 >>  \startGNUPLOTscript[sin]
> >   5plot sin(x)
> >   6 \stopGNUPLOTscript
> >   7
> >   8 % include the resulting graphic into the document
> >   9 \useGNUPLOTgraphic[sin]
> > 10
> >
> > mtx-context | fatal error: return code: 256
> >
> > Does the gnuplot module need adjustments?
> No, i messed up something ... will be fixed tomorrow
>
> Do you have lmtx installed? It has nicer gnuplot support:
>
> m-gnuplot-demo.gp :
>
> 
> set format xy "$%g$"
>
> set title  'This is a plot of $y=\\sin(x)$'
> set xlabel 'This is the $x$ axis'
> set ylabel 'This is the $y$ axis'
>
> plot [0:6.28] [0:1] sin(x)
> 
>
> Can be included with:
>
> \starttext
>
>  \externalfigure[m-gnuplot-demo.gp][conversion=svg,width=4cm]
>
>  \externalfigure[m-gnuplot-demo.gp][conversion=svg,width=8cm]
>
> \stoptext
>
>
> -
>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] gnuplot module broken with latest 2020-07-13 16:31

2020-07-13 Thread Adam Reviczky
Hi,

Using the minimal example from the contextgarden for gnuplot (
https://wiki.contextgarden.net/Gnuplot) I am getting the following error
message:

This is LuaTeX, Version 1.13.0 (TeX Live 2021/dev/Debian)
 system commands enabled.
open source > level 1, order 1, name
'/usr/share/texmf/tex/context/base/mkiv/cont-yes.mkiv'
system  >
system  > ConTeXt  ver: 2020.07.13 16:23 MKIV  fmt: 2020.7.13  int:
english/english
system  >
system  > 'cont-new.mkiv' loaded
open source > level 2, order 2, name
'/usr/share/texmf/tex/context/base/mkiv/cont-new.mkiv'
system  > beware: some patches loaded from cont-new.mkiv
close source> level 2, order 2, name
'/usr/share/texmf/tex/context/base/mkiv/cont-new.mkiv'
system  > files > jobname 'mwe', input './mwe', result 'mwe'
fonts   > latin modern fonts are not preloaded
languages   > language 'en' is active
open source > level 2, order 3, name '/tmp/4/mwe.tex'
modules > 'gnuplot' is loaded
open source > level 3, order 4, name
'/usr/share/texmf/tex/context/third/gnuplot/t-gnuplot.mkiv'
loading > Gnuplot module
open source > level 4, order 5, name
'/usr/share/texmf/tex/context/fonts/mkiv/type-imp-texgyre.mkiv'
close source> level 4, order 5, name
'/usr/share/texmf/tex/context/fonts/mkiv/type-imp-texgyre.mkiv'
close source> level 3, order 5, name
'/usr/share/texmf/tex/context/third/gnuplot/t-gnuplot.mkiv'

lua error   > lua error on line 4 in file /tmp/4/mwe.tex:

/usr/share/texmf/tex/context/base/mkiv/buff-ini.lua:439: attempt to call a
nil value (upvalue 'gettoken')
stack traceback:
/usr/share/texmf/tex/context/base/mkiv/buff-ini.lua:439: in upvalue 'pickup'
/usr/share/texmf/tex/context/base/mkiv/buff-ini.lua:635: in function

(...tail calls...)

 1 \usemodule[gnuplot]
 2
 3 % write a script for gnuplot
 4 >>  \startGNUPLOTscript[sin]
 5plot sin(x)
 6 \stopGNUPLOTscript
 7
 8 % include the resulting graphic into the document
 9 \useGNUPLOTgraphic[sin]
10

mtx-context | fatal error: return code: 256

Does the gnuplot module need adjustments?
Version 2020-07-09 14:50 is fine.

Regards,
Adam
___
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] Interaction references with Reference List and Bibliography

2020-06-10 Thread Adam Reviczky
Hi,

When I try to create a "Reference List" (for cited references in the
document) followed by a "Bibliography" (for the rest of literature, not
cited) I get wrong references linked back in the document when citing a
reference multiple times, although the citation in the text is always fine.

See MWE:
---
\setupinteraction[state=start]

\usebtxdataset[sample.bib]
\usebtxdefinitions[apa]

\starttext
\input tufte \cite[hh2010a]
\input zapf \cite[hh2010a]

\title{Reference List}
\placelistofpublications[criterium=all]

\title{Bibliography}
\placelistofpublications[method=dataset]
\stoptext
---

Publications taken from (https://wiki.contextgarden.net/Sample_bib) as
sample.bib.

The outcome is correctly cited (Hagen, 2010a) including the interaction to
the reference list, but the second citation is also linked to the first
item in the bibliography Eijkhout, V. (1991) rather than the reference list
entry again. If I cite the item again, then the second item in the
bibliography is referenced and so on.

"aps" doesn't seem to create an interactive back reference, so the issue is
only with "apa".

Is this because I mix both references and bibliography with
placelistofpublications? Any other way to achieve this keeping interaction
links in place?

Thanks,
Adam
___
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] Short weekday option for date command

2020-04-08 Thread Adam Reviczky
Thank you Wolfgang!

Adam

On Wed, Apr 8, 2020 at 9:11 PM Wolfgang Schuster <
wolfgang.schuster.li...@gmail.com> wrote:

> Adam Reviczky schrieb am 08.04.2020 um 21:53:
> > Thank you Hans and Wolfgang,
> >
> > I have updated the wiki (https://wiki.contextgarden.net/Command/date)
> > with the new dayshort/daylong options, but I seem to get an empty value
> > for every day after day 7, see example:
> >
> > \starttext
> > \date[d=7,m=4,y=2008][{\dayshort\normalday},{,~},day,~,month,~,year] \par
> > \date[d=8,m=4,y=2008][{\dayshort\normalday},{,~},day,~,month,~,year]
> > \stoptext
> >
> > This gives me (note "sun" is missing in the second line):
> >
> > sat, 7 April 2008
> > , 8 April 2008
> >
> > Am I using the options correctly?
>
> No, the \daylong and \dayshort expect a number between 1 and 7 and
> result in a label for the requested day of the week but it's not meant
> to be used in \currentdate.
>
> > Still using luatex and not luametatex.
>
> To get the short names with \currentdate you have to append ":mnem" to
> the weekday, w, WEEKDAY or W keywords.
>
> \starttext
>
> \startlines
> \date[d=7,m=4,y=2008][weekday,{,~},day,~,month,~,year]
> \date[d=7,m=4,y=2008][weekday:mnem,{,~},day,~,month,~,year]
> \date[d=8,m=4,y=2008][weekday,{,~},day,~,month,~,year]
> \date[d=8,m=4,y=2008][weekday:mnem,{,~},day,~,month,~,year]
> \stoplines
>
> \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] Short weekday option for date command

2020-04-08 Thread Adam Reviczky
Thank you Hans and Wolfgang,

I have updated the wiki (https://wiki.contextgarden.net/Command/date) with
the new dayshort/daylong options, but I seem to get an empty value for
every day after day 7, see example:

\starttext
\date[d=7,m=4,y=2008][{\dayshort\normalday},{,~},day,~,month,~,year] \par
\date[d=8,m=4,y=2008][{\dayshort\normalday},{,~},day,~,month,~,year]
\stoptext

This gives me (note "sun" is missing in the second line):

sat, 7 April 2008
, 8 April 2008

Am I using the options correctly?
Still using luatex and not luametatex.

ConTeXt  ver: 2020.04.08 14:34 MKIV beta  fmt: 2020.4.8  int:
english/english
mtx-context | current version: 2020.04.08 14:34

This is LuaTeX, Version 1.13.0 (TeX Live 2020/Debian)
Compiled with libpng 1.6.37; using 1.6.37
Compiled with lua version 5.3.5
Compiled with mplib version 2.00
Compiled with zlib 1.2.11; using 1.2.11
Development id: 7330

Thanks,
Adam

On Sat, Apr 4, 2020 at 11:24 AM Hans Hagen  wrote:

> On 4/4/2020 11:47 AM, Adam Reviczky wrote:
> > Hi,
> >
> > Is there a way to achieve a short weekday option with \date[] to get 3
> > letter equivalents (Mon, Tue, Wed, Thu, Fri, Sat, Sun) similar to the
> > monthshort either through context or lua?
> Not currently but I will add the basics (I have to double check with WS
> to see where if conflicts as such an extension involves additional
> commands it has to go into the setups too) but others have to add the
> abbreviations.
>
> 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
___


[NTG-context] Short weekday option for date command

2020-04-04 Thread Adam Reviczky
Hi,

Is there a way to achieve a short weekday option with \date[] to get 3
letter equivalents (Mon, Tue, Wed, Thu, Fri, Sat, Sun) similar to the
monthshort either through context or lua?

Thanks,
Adam
___
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] metafun 2

2019-08-17 Thread Adam Reviczky
Hi Hans, Alan,

This is really cool! Not sure how I missed this feature, works exactly for
my use-case.

Thanks a lot for pointing this out, I was able to find it in the MAPS as
well.

Cheers,
Adam

On Sat, Aug 17, 2019 at 9:52 AM Hans Hagen  wrote:

> On 8/17/2019 3:27 AM, Alan Braslau wrote:
> > We have eofill in MP (in pdf/ps in fact) and that likely will do what
> you need.
> You forgot the MWD (Minimal Working Demo):
>
> \starttext
>
> \startMPpage
> path p ; p := fullcircle scaled 1cm ;
> path q ; q := fullcircle scaled .5cm ;
>
> nofill p ;
> eofill q ;
> \stopMPpage
>
> \stoptext
>
> -
>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] metafun 2

2019-08-16 Thread Adam Reviczky
Hi Hans,

One MetaPost feature that I was looking forward to is the ability to create
a fill between two shapes.
Something like a difference function of two path's.

For logos I use the workaround with creating a path alongside the excluded
areas but it is always cumbersome.

I have briefly mentioned it back here:
https://mailman.ntg.nl/pipermail/ntg-context/2011/056910.html

Just for illustration purposes, if I wanted to fill the area in between two
circles:

*path p ;
**p := fullcircle scaled 1cm ;
**path q ;
**q := fullcircle scaled .5cm ;
*

Instead of creating a new path along both circles with:


*r := p -- reverse q -- cycle ;*

It would be nice to have something like:

*fill p excluding q ;*

or something like that.

I mainly have use-cases for differences in shapes, but filling the
intersection of two shapes would be the same idea.

Thanks,
Adam


On Wed, Aug 14, 2019 at 10:57 AM Hans Hagen  wrote:

> Hi,
>
> In the process of providing an additional (more abstract) interface to
> some of the old and also new MetaFun code we wonder what kind of
> features users would like to see.
>
> http://www.pragma-ade.com/general/magazines/mag-1104-mkiv.pdf
>
> As a teaser I uploaded a MyWay document that shows some of what is
> coming. All is experimental but it shows the direction. We're talking
> ConTeXt LMTX here. For instance,
>
>  draw lmt_outline [
>  content   = "hello",
>  kind  = "reverse",
>  fillcolor = "darkred",
>  drawcolor = "darkblue",
>  rulethickness = 1/2,
>  ] ysized h shifted (3.75h,-1.25h) ;
>
> Wraps all the outline drawing in one macro with a set of options (there
> will be xml interface definitions for that). Or take:
>
>  draw lmt_followtext [
>  content = "How well does it work {\bf 1}! ",
>  path= (fullcircle scaled 4cm),
>  trace   = true,
>  spread  = true,
>  ] ysized 5cm ;
>
> which is an easier interface to text along a curve. Arrows can be drawn
> with
>
>  draw lmt_arrow [
>  kind= "draw",
>  location= "middle",
>  alternative = "curved",
>  path= fullcircle
>  scaled  3cm
>  shifted (3.5cm,0cm),
>  ] withcolor "darkblue" ;
>
> but of course the low level interface with its many variables for
> tweaking stays around. Other examples are shown in the mentioned document.
>
> So the question is: What do you miss in metapost support? Of course it
> should fit within the concept, so 'artistic freehand drawings' is not
> something that is likely to get interfaced. We are particularly
> interested in educational applications, if only because ConTeXt started
> out that way.
>
> 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
>
> ___
>
___
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] MetaPost shading broken with latest beta

2018-06-23 Thread Adam Reviczky
Hi,

Using the shading function in a metapost image the whole page is
filled in instead of the figure that defines it.

Minimal example as from the metafun manual 8.3.3
(http://www.pragma-ade.nl/general/manuals/metafun-p.pdf):
\starttext
\startMPcode
fill fullsquare xyscaled (1cm,1cm)
withshademethod "linear"
withshadevector (1,0)
withshadecolors (darkred,darkgreen)
;
\stopMPcode
\stoptext

ConTeXt  ver: 2018.06.23 12:12 MKIV beta  fmt: 2018.6.23  int: english/english
luatex version 1.09 with functionality level 6823,
MetaPost 2.00

With this, I get a full A4 page with the shading colors.
This worked until the beta 2018-06-22 16:02 and the desired output is
shown when using live.contextgarden.net.

Thanks,
Adam
___
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] setmemstream to use pdfe.new instead of epdf.openMemStream

2018-06-23 Thread Adam Reviczky
Hi,

I am using the "figures.setmemstream" for inline images and it is
broken now with the latest luatex on the changes from
epdf.openMemStream to pdfe.new.

Although it does say "very experimental and likely to change", but can
we update the call from epdf.openMemStream?

Minimal example:
\starttext
\startluacode
figures.setmemstream("inline",mime.unb64("iVBORw0KGgoNSUhEUgEBAQMl21bKA1BMVEUAAACnej3aAXRSTlMAQObYZgpJREFUCNdjYAIAAeIhvDMASUVORK5CYII="))
context.externalfigure({"memstream:///inline"})
\stopluacode
\stoptext

or as in grph-mem.lua:
-- \startluacode
-- figures.setmemstream("whatever",io.loaddata("t:/sources/cow.pdf"))
-- \stopluacode
--
-- \externalfigure[memstream:///t:/sources/cow.pdf]
-- \externalfigure[memstream:///whatever]

The error message is:
/usr/share/texmf/tex/context/base/mkiv/grph-mem.lua:32: attempt to
index global 'epdf' (a nil value)
stack traceback:
/usr/share/texmf/tex/context/base/mkiv/grph-mem.lua:32: in
function 'setmemstream'
[ctxlua]:2: in main chunk

Which points to the line of "local memstream, identifier =
epdf.openMemStream(stream,#stream,name)"
LuaTeX commit 6822 change was "epdf.new (aka memstreams) (HH)"

ConTeXt  ver: 2018.06.23 12:12 MKIV beta  fmt: 2018.6.23  int: english/english
luatex version 1.09 with functionality level 6823,

Thanks,
Adam
___
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
___