[NTG-context] floatcombinations seem to not work correctly after lmtx update

2023-06-19 Thread Gerion Entrup via ntg-context
Hi,

I recently updated my Context (lmtx). Unfortunately, I'm not aware of
the previous version anymore. The current one is 2023.06.04 18:58.

After the update one of my documents broke at floatcombinations.
The relevant code is this one:
```
\useMPlibrary[dum]
\setupcombinations[alternative=text]

\definefloat[subfigure][local=yes]
\setupcaption[subfigure][numberconversion=a, prefix=no, headseparator={)}]
\setuplabeltext[subfigure=]

\appendvalue{stopplacefigure}{\resetcounter[subfigure]}

\starttext
test sdlkf jlsdjf lksjdf
\startplacefigure[title=Test]
\startfloatcombination[nx=3]
  \startplacesubfigure[title=Test]
\externalfigure[dummy][width=0.3\textwidth]
  \stopplacesubfigure
  \startplacesubfigure[title=Test]
\externalfigure[dummy][width=0.3\textwidth]
  \stopplacesubfigure
  \startplacesubfigure[title=Test]
\externalfigure[dummy][width=0.3\textwidth]
  \stopplacesubfigure
\stopfloatcombination
\stopplacefigure
lskdjf lskjfd lksjdfljsdkjf
\stoptext
```
In this minimal example everything works. However, in my real document
the subfigures have enormous space between them so just two pictures are
visible (see the attached png).

Do you have a clue, why this happens? Otherwise, I would take the
preamble of the real document and try to lower it down to have a
reproducible example (but that takes a lot of time, so I wanted to ask
beforehand).

Best,
Gerion


signature.asc
Description: This is a digitally signed message part.
___
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
___


[NTG-context] Typeset multiple pictures not in a strict matrix (\startfloatcombination)

2023-03-07 Thread Gerion Entrup via ntg-context
Hi,

I'm trying to typeset several pictures as a floatcombination but not in
the form of strict cells of a matrix.

Here is some ASCII art to demonstrate the positions of the pictures:

  ---
  | |
  | |
  ---
a) Some caption

    -
  |  |  |   |
  |  |  |   |
  |  |  |   |
    -
 b) fooc) foo

 Figure 1.1: Foo Bar


I tried to typeset it with this code (based on 
https://tex.stackexchange.com/a/502903):

\useMPlibrary[dum]
\setupcombinations[alternative=text]

\definefloat[subfigure][local=yes]
\setupcaption[subfigure][numberconversion=a]
\setuplabeltext[subfigure=]

\appendvalue{stopplacefigure}{\resetcounter[subfigure]}

\starttext
\startplacefigure[title=Test]
\startfloatcombination[nx=1, ny=2]
  \startplacesubfigure[title=Test]
\externalfigure[dummy][width=4cm,height=1cm]
  \stopplacesubfigure
  \startfloatcombination[nx=2, ny=1]
\startplacesubfigure[title=Test]
  \externalfigure[dummy][width=4cm,height=1cm]
\stopplacesubfigure
\startplacesubfigure[title=Test]
  \externalfigure[dummy][width=4cm,height=1cm]
\stopplacesubfigure
  \stopfloatcombination
\stopfloatcombination
\stopplacefigure
\stoptext

However, this does not work (the pictures are all in one row).
Do you have some advice?

Gerion


signature.asc
Description: This is a digitally signed message part.
___
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] Description together with itemize, luametatex

2023-03-06 Thread Gerion Entrup via ntg-context
Am Montag, 6. März 2023, 14:34:28 CET schrieb Aditya Mahajan via ntg-context:
> On Mon, 6 Mar 2023, Gerion Entrup via ntg-context wrote:
> 
> > Hi,
> > 
> > I'm trying to use a description environment in conjunction with an
> > itemize with the latest luametatex. Is this supposed to work?
> > 
> > Here is an MWE:
> > ```
> > \definedescription[desc][headstyle=bold]
> > 
> > \starttext
> > Foo
> > 
> > \desc{Some title} Some text
> > \startitemize
> > \item Some item
> > \stopitemize
> > 
> > \stoptext
> 
> Use \startdesc ... \stopdesc
> 
> \definedescription[desc][headstyle=bold]
> 
> \starttext
> Foo
> 
> \startdesc[title={Some title}]
>   Some text
> \startitemize
> \item Some item
> \stopitemize
> \stopdesc
> 
> \stoptext

That worked. Thank you!


signature.asc
Description: This is a digitally signed message part.
___
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
___


[NTG-context] Visual highlighted text with title, mix of enumeration and framedtext

2023-03-06 Thread Gerion Entrup via ntg-context
Hi,

I want to typeset a "Good to know" section that is visually highlighted
and can spawn across multiple pages.

In LaTeX this would be possible with the mdframed package. See the
attached screenshot for an example how it might look like (it is copied
out of page 4: Definition: Inhomogeneous linear of the mdframed
documentation:
http://mirrors.ctan.org/macros/latex/contrib/mdframed/mdframed.pdf)

I have searched in the wiki and found \defineenumeration:
This is near of that what I need. However I explicitly does not need an
enumeration (so no number or counter). Also I am not sure if I can set a
background and so on.

The other possibility is \defineframedtext. For example this goes much
in the direction that I want:
\definecolor[gbackground][s=0.98]
\defineframedtext[gtk][frame=on,
   offset=5pt,
   background=color,
   width=0.95\textwidth,
   backgroundcolor=gbackground]

However, there does not seem a possibility to define a title and it
seems to not work on multiple pages.

Is there a mix of an enumeration and framedtext that can produce
something like in the attached picture?

Best,
Gerion


signature.asc
Description: This is a digitally signed message part.
___
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
___


[NTG-context] Description together with itemize, luametatex

2023-03-06 Thread Gerion Entrup via ntg-context
Hi,

I'm trying to use a description environment in conjunction with an
itemize with the latest luametatex. Is this supposed to work?

Here is an MWE:
```
\definedescription[desc][headstyle=bold]

\starttext
Foo

\desc{Some title} Some text
\startitemize
\item Some item
\stopitemize

\stoptext
```

This currently fails with:
```
resolvers   | formats | executing runner 'run luametatex format': 
/home/gerion/context/tex/texmf-linux-64/bin/luametatex --jobname="./test.tex" 
--fmt=/home/gerion/context/tex/texmf-cache/luametatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/formats/luametatex/cont-en.fmt
 
--lua=/home/gerion/context/tex/texmf-cache/luametatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/formats/luametatex/cont-en.lui
  --c:currentrun=1 --c:fulljobname="./test.tex" --c:input="./test.tex" 
--c:kindofrun=1 --c:maxnofruns=9 
--c:texmfbinpath="/home/gerion/context/tex/texmf-linux-64/bin"
system  >
system  > ConTeXt  ver: 2023.02.23 21:26 LMTX  fmt: 2023.3.4  int: 
english/english
system  >
system  > 'cont-new.mkxl' loaded
open source > level 1, order 1, name 
'/home/gerion/context/tex/texmf-context/tex/context/base/mkxl/cont-new.mkxl'
system  > beware: some patches loaded from cont-new.mkiv
close source> level 1, order 1, name 
'/home/gerion/context/tex/texmf-context/tex/context/base/mkxl/cont-new.mkxl'
system  > files > jobname './test', input './test.tex', result './test'
fonts   > latin modern fonts are not preloaded
languages   > language 'en' is active
open source > level 1, order 2, name './test.tex'
fonts   > preloading latin modern fonts (second stage)
fonts   > 'fallback modern rm 12pt' is loaded
lua error   > lua error on line 8 in file ./test.tex:

registered function call [809]: 
...ext/tex/texmf-context/tex/context/base/mkiv/strc-num.lua:448: attempt to 
index a nil value (local 'd')
stack traceback:
...ext/tex/texmf-context/tex/context/base/mkiv/strc-num.lua:448: in 
function <...ext/tex/texmf-context/tex/context/base/mkiv/strc-num.lua:442>
(...tail calls...)
 1 \definedescription[desc][headstyle=bold]
 2
 3 \starttext
 4 Foo
 5
 6 \desc{Some title} Some text
 7  \startitemize
 8 >>   \item Some item
 9  \stopitemize
10
11 \stoptext
12
mtx-context | fatal error: return code: 1
```

Best,
Gerion


signature.asc
Description: This is a digitally signed message part.
___
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] Help test a LMTX bug fix: tweaks in PDF generation

2022-10-11 Thread Gerion Entrup via ntg-context
Am Sonntag, 9. Oktober 2022, 17:33:09 CEST schrieb Leah Neukirchen via 
ntg-context:
> So please: Try to preview and then try to print the attached PDF;
> and report back if either preview or printout does not look like
> the attached reference PNG image (i.e. something is missing,
> the fonts look different, or have wrong relative size.)

Okular, MuPDF and pdf.js (Firefox) on Linux look fine.
Gimp and Krita also look fine (but I think they are both using poppler).
LibreOffice Draw does not (font sizes are wrong). However, this is not directly 
a PDF viewer, so I'm pretty sure it can be ignored.

Best,
Gerion




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


[NTG-context] Context path resolving, Problem with MkIV and TeXLive

2022-05-12 Thread Gerion Entrup via ntg-context
Hi,

I'm having a problem with TeXLive 2021 in conjunction with MkIV.
Basically, executing context results in:

% context
mtxrun  | unknown script 'context.lua' or 'mtx-context.lua

I researched this and found that probably there is a path problem.
LaTeX seems to be using kpathsea and /etc/texmf.cnf while context uses
texmfcnf.lua.

Looking into this file, it defines nearly all paths relative to "home:"
or "selfautoparent:". Home is self explaining. I have no clue what
selfautoparent is and also did not find an explanation in the internet.

Anyway, selfautoparent seems not to be resolved correctly. I figured
this by running `mtxrun --variables`. Here is a little excerpt:

resolvers   | lists | TEXMF
resolvers   | lists |   env: 
{$TEXMFCONFIG,$TEXMFHOME,!!$TEXMFSYSCONFIG,!!$TEXMFSYSVAR,!!$TEXMFPROJECT,!!$TEXMFFONTS,!!$TEXMFLOCAL,!!$TEXMFDIST}
resolvers   | lists |   var: TEXMF
resolvers   | lists |   exp: 
{home:.texlive2020/texmf-config,home:texmf,!!selfautoparent:texmf-config,!!selfautoparent:texmf-var,!!selfautoparent:texmf-project,!!selfautoparent:texmf-fonts,!!.,!!selfautoparent:texmf-dist}
resolvers   | lists |   res: 
{/home/gerion/.texlive2020/texmf-config,/home/gerion/texmf,!!./texmf-config,!!./texmf-var,!!./texmf-project,!!./texmf-fonts,!!.,!!./texmf-dist}
...
resolvers   | lists | TEXMFSYSVAR
resolvers   | lists |   env: selfautoparent:texmf-var
resolvers   | lists |   var: TEXMFSYSVAR
resolvers   | lists |   exp: selfautoparent:texmf-var
resolvers   | lists |   res: ./texmf-var
resolvers   | lists | TEXMFVAR
resolvers   | lists |   env: unset
resolvers   | lists |   var: TEXMFVAR
resolvers   | lists |   exp: home:.texlive2020/texmf-var
resolvers   | lists |   res: /home/gerion/.texlive2020/texmf-var

"home:" seems to be resolved correctly to "/home/gerion". "selfautoparent"
seems to be resolved to "." (the current directory?).
My context (and TeXLive) installation is in /usr/share/texmf-dist.
So running mtxrun --generate in exactly this directory and running
context after that works:

% mtxrun --generate
resolvers   | resolving | variable 'SELFAUTOLOC' set to '/usr/bin'
resolvers   | resolving | variable 'SELFAUTODIR' set to '/usr'
resolvers   | resolving | variable 'SELFAUTOPARENT' set to '.'
resolvers   | resolving | variable 'TEXMFCNF' set to ''
resolvers   | resolving | variable 'TEXMF' set to ''
resolvers   | resolving | variable 'TEXOS' set to 'usr'
resolvers   | resolving |
resolvers   | resolving | using configuration specification 
'home:texmf/web2c;{selfautoloc:,selfautoloc:/share/texmf-local/web2c,selfautoloc:/share/texmf-dist/web2c,selfautoloc:/share/texmf/web2c,selfautoloc:/texmf-local/web2c,selfautoloc:/texmf-dist/web2c,selfautoloc:/texmf/web2c,selfautodir:,selfautodir:/share/texmf-local/web2c,selfautodir:/share/texmf-dist/web2c,selfautodir:/share/texmf/web2c,selfautodir:/texmf-local/web2c,selfautodir:/texmf-dist/web2c,selfautodir:/texmf/web2c,$SELFAUTOGRANDPARENT/texmf-local/web2c,selfautoparent:,selfautoparent:/share/texmf-local/web2c,selfautoparent:/share/texmf-dist/web2c,selfautoparent:/share/texmf/web2c,selfautoparent:/texmf-local/web2c,selfautoparent:/texmf-dist/web2c,selfautoparent:/texmf/web2c}'
resolvers   | resolving |
resolvers   | resolving | looking for regular 'texmfcnf.lua' on 
given path '/home/gerion/texmf/web2c' from specification 'home:texmf/web2c'
resolvers   | resolving | looking for regular 'texmfcnf.lua' on 
weird path '/usr/bin' from specification 'selfautoloc:'
resolvers   | resolving | looking for regular 'texmfcnf.lua' on 
given path '/usr/bin/share/texmf-local/web2c' from specification 
'selfautoloc:/share/texmf-local/web2c'
resolvers   | resolving | looking for regular 'texmfcnf.lua' on 
given path '/usr/bin/share/texmf-dist/web2c' from specification 
'selfautoloc:/share/texmf-dist/web2c'
resolvers   | resolving | looking for regular 'texmfcnf.lua' on 
given path '/usr/bin/share/texmf/web2c' from specification 
'selfautoloc:/share/texmf/web2c'
resolvers   | resolving | looking for regular 'texmfcnf.lua' on 
given path '/usr/bin/texmf-local/web2c' from specification 
'selfautoloc:/texmf-local/web2c'
resolvers   | resolving | looking for regular 'texmfcnf.lua' on 
given path '/usr/bin/texmf-dist/web2c' from specification 
'selfautoloc:/texmf-dist/web2c'
resolvers   | resolving | looking for regular 'texmfcnf.lua' on 
given path '/usr/bin/texmf/web2c' from specification 'selfautoloc:/texmf/web2c'
resolvers   | resolving | looking for regular 'texmfcnf.lua' on 
weird path '/usr' from specification 'selfautodir:'