Re: [NTG-context] BUG: module loading is broken

2020-01-12 Thread Henri Menke
Here is a patch.

--- a/opt/context/tex/texmf-modules/tex/context/third/letter/base/s-cor-00.lua
+++ b/opt/context/tex/texmf-modules/tex/context/third/letter/base/s-cor-00.lua
@@ -85,7 +85,7 @@ end
 function correspondence.file(environment,name)
 local environment = environment
 local name= name
-commands.uselibrary {
+resolvers.uselibrary {
 name = name,
 patterns = patterns[environment],
 action   = action,

On 1/13/20 2:19 PM, Henri Menke wrote:
> Dear Hans,
> 
> Recent updates to ConTeXt broke my CV. This MWE
> 
> \usemodule[letter]
> \starttext
> \stoptext
> 
> fails with
> 
> ...texmf-modules/tex/context/third/letter/base/s-cor-00.lua:88: attempt to 
> call a nil value (field 'uselibrary')
> 
> Here are the steps by which I can reproduce on my machine:
> 
> rm -rf /opt/context/tex/texmf-cache
> mtxrun --generate
> context --make
> context test.mkvi
> 
> Same for LMTX.
> 
> Cheers, Henri
> 
___
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] BUG: module loading is broken

2020-01-12 Thread Henri Menke
Dear Hans,

Recent updates to ConTeXt broke my CV. This MWE

\usemodule[letter]
\starttext
\stoptext

fails with

...texmf-modules/tex/context/third/letter/base/s-cor-00.lua:88: attempt to call 
a nil value (field 'uselibrary')

Here are the steps by which I can reproduce on my machine:

rm -rf /opt/context/tex/texmf-cache
mtxrun --generate
context --make
context test.mkvi

Same for LMTX.

Cheers, Henri
___
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] fancy chapter setup

2020-01-12 Thread Henning Hraban Ramm
Since the structureuservariables of a section aren’t defined in that section’s 
"before", I would need a macro or buffer to define the contents of that 
epigraph page, like this:


\def\PreImg{Dummy}

\startsetups FancyChapter
  \setupheadertexts[][][][]
  \doifelsebuffer{Quote}{
\doifoddpageelse
  {\page[left]}
  {\donothing}
{\definedfont[SerifItalic at 16pt]\quotation{\getbuffer[Quote]}\par}
\externalfigure[\PreImg][width=\textwidth]
\resetbuffer[Quote]
  }{}
  \page[right]
\stopsetups

\setupheadertexts[][pagenumber][pagenumber][chapter]
\setuphead[chapter][
  page=yes,
  before={\directsetup{FancyChapter}},
]

\setuppagenumbering[alternative=doublesided]

\starttext

\completecontent

\startchapter[title={My Normal Text}]
\input knuth
\stopchapter

\def\PreImg{Real}
\startbuffer[Quote]
I thought that was real.
\stopbuffer

\startchapter[title={My Fancy Story}]
\input tufte
\stopchapter

\def\PreImg{Love}
\startbuffer[Quote]
All you need is love.
\stopbuffer

\startchapter[title={Another Fancy Story}]
\input zapf
\stopchapter

\startchapter[title={Another Normal Text}]
\input knuth
\stopchapter

\stoptext


That’s possible, but ugly. I would really like to set those quotes and image 
names in the chapter command.

Best, Hraban


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

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


Re: [NTG-context] fancy chapter setup

2020-01-12 Thread Henning Hraban Ramm

> Am 2020-01-11 um 19:49 schrieb Rik Kabel :
> For what it is worth, here is how I address this. This lets me place 
> epigraphs on the facing verso of a chapter, or under the section title, and 
> set lettrines and first line treatment for chapters. I set page numbers in a 
> separate overlay to better control the positioning. Perhaps a bit 
> overthought, but it works for me ...

Here’s my approach. Right/left stuff and placement is good, but I get always 
the extra contents of the previous chapter, i.e. “Another Fancy Story” gets the 
subtitle/quote from “My Fancy Story”, while “My Fancy Story” doesn’t show 
anything.
Is that why you used buffers?
Since I only need two user settings (image name and quote), only one in the 
example, I’d like to avoid a buffer for every chapter.

\startsetups FancyChapter
  \setupheadertexts[][][][]
  \doifnot{\structureuservariable{subtitle}}{}{
\doifoddpageelse
  {\page[left]}
  {\donothing}
{\definedfont[SerifItalic at 16pt]\structureuservariable{subtitle}\par}
\externalfigure[dummy][width=\textwidth]
  }
  \page[right]
\stopsetups

\setupheadertexts[][pagenumber][pagenumber][chapter]
\setuphead[chapter][
  page=yes,
  before={\directsetup{FancyChapter}},
]

\setuppagenumbering[alternative=doublesided]

\starttext

\completecontent

\startchapter[title={My Normal Text}]
\input knuth
\stopchapter

\startchapter[title={My Fancy Story}]
[subtitle={\quotation{I thought that was real.}}]
\input tufte
\stopchapter

\startchapter[title={Another Fancy Story}]
[subtitle={\quotation{Never mind the bollocks.}}]
\input zapf
\stopchapter

\startchapter[title={Another Normal Text}]
\input knuth
\stopchapter

\stoptext


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

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


Re: [NTG-context] luametatex segmentation fault

2020-01-12 Thread Hans Hagen

On 1/12/2020 1:23 PM, Ramón Casares wrote:

On Sun, 12 Jan 2020 12:00:55 +0100
Hans Hagen  wrote:


On 1/12/2020 8:22 AM, Ramón Casares wrote:

~/context/tex/texmf-linux-64/bin/luametatex --ini lmtx.tex


so what is that call?

luametatex --ini lmtx.tex

what in that tex file?



$ cat $(~/context/tex/texmf-linux-64/bin/mtxrun --locate lmtx.tex)
\input plain

\directlua {tex.enableprimitives('', tex.extraprimitives())}

\pdfoutput=1
you should initialize a couple of file relates callbacks in a lua file 
that is then passed as extra argument


but even then, \pdfoutput won't work because there is no backend and 
therefore there are no \pdf frontend commands


but if you want to play with plain, you can use a lot of plain commands 
in context so best use


lmtx.tex :

\starttext
  ...
\stoptext

with

context lmtx

unless you want to start with defining a backend and all kind of font 
related code


Hans

-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
   tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
-
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


Re: [NTG-context] luametatex segmentation fault

2020-01-12 Thread Ramón Casares
On Sun, 12 Jan 2020 12:42:50 +0100
Hans Hagen  wrote:

> On 1/12/2020 8:22 AM, Ramón Casares wrote:
> > ~/context/tex/texmf-linux-64/bin/luametatex --ini lmtx.tex
> 
> next version will say:
> 
>  >luametatex --ini whatever.tex
> This is LuaMetaTeX, Version 2.03.9  (INITEX)
> startup error : missing find_data_file callback
> 

OK. I will try then. I am still in 2.03.7.

$ cd ~/context/
$ ./install.sh
$ ~/context/tex/texmf-linux-64/bin/luametatex --ini plain.tex
This is LuaMetaTeX, Version 2.03.7  (INITEX)
Segmentation fault


> -- 
> 
> -
>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] luametatex segmentation fault

2020-01-12 Thread Ramón Casares
On Sun, 12 Jan 2020 12:00:55 +0100
Hans Hagen  wrote:

> On 1/12/2020 8:22 AM, Ramón Casares wrote:
> > ~/context/tex/texmf-linux-64/bin/luametatex --ini lmtx.tex
> 
> so what is that call?
> 
> luametatex --ini lmtx.tex
> 
> what in that tex file?


$ cat $(~/context/tex/texmf-linux-64/bin/mtxrun --locate lmtx.tex)
\input plain

\directlua {tex.enableprimitives('', tex.extraprimitives())}

\pdfoutput=1

\everyjob \expandafter {%
 \the\everyjob
 \input luatex-basics.tex\relax
 \input luatex-fonts.tex\relax
 \input luatex-mplib.tex\relax
}

\edef\fmtversion{\fmtversion+lmtx}


However, it also breaks with file plain.tex.


~/context/tex/texmf-linux-64/bin/luametatex --ini plain.tex
This is LuaMetaTeX, Version 2.03.7  (INITEX)
Segmentation fault


> 
> Hans
> 
> 
> -
>Hans Hagen | PRAGMA ADE
>Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
> tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
> -


-- 

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

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


Re: [NTG-context] luametatex segmentation fault

2020-01-12 Thread Hans Hagen

On 1/12/2020 8:22 AM, Ramón Casares wrote:

~/context/tex/texmf-linux-64/bin/luametatex --ini lmtx.tex


next version will say:

>luametatex --ini whatever.tex
This is LuaMetaTeX, Version 2.03.9  (INITEX)
startup error : missing find_data_file callback

--

-
  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] luametatex segmentation fault

2020-01-12 Thread Hans Hagen

On 1/12/2020 8:22 AM, Ramón Casares wrote:

~/context/tex/texmf-linux-64/bin/luametatex --ini lmtx.tex


so what is that call?

luametatex --ini lmtx.tex

what in that tex file?

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
___