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