[NTG-context] Cron /var/www/aanhet.net/context/bin/cron/context-mirror

2022-08-15 Thread Cron Daemon via ntg-context
rsync: failed to connect to rsync.pragma-ade.nl (213.125.29.165): Connection 
timed out (110)
rsync error: error in socket IO (code 10) at clientserver.c(125) 
[Receiver=3.1.2]
___
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] Accessing inserts from Lua in LuaMetaTeX

2022-08-15 Thread Max Chernoff via ntg-context

Hi Hans,

> > First, how do I get an insert's class/type from the "insert" nodes on
> > the page? With LuaTeX, the insert's class/type is the same as the
> > subtype of the "ins" nodes, but the subtype of the "insert" nodes is
> > always zero in LuaMetaTeX, so I'm not sure how to get the class/type.

After playing around, I found that this is stored in ".index". I'm able to write to this value just fine, but whenever I
read it I get an error.

This minimal example:

   \starttext
   \setbox999=\vbox{\hrule width 10pt height 10pt}
   
   \startluacode
   local insert = node.new("insert")
   local rule = tex.box[999].list
   insert.list = rule
   insert.index = 4
   
   node.write(insert)
   \stopluacode
   \stoptext
   
works perfectly, but this example:

   \startluacode
   local insert = node.new "insert"
   insert.index = 4
   print(insert.index)
   \stopluacode
   
gives this error message:

   In \insertmode 2 you can't use zero as index.
   
I suspect that this is a bug, but I may just be doing something wrong.

> Indeed, we don't use these boxes and registers because we run in 
> \insertmode=2. This gives us more state info (i kept the old method 
> around for now).

Inserts always felt a little hacky in TeX, so I think that the new
methods are a huge improvement.

> > Second, how do I get the head of the insert box from Lua? With LuaTeX,
> > from TeX you would use "\box" and from Lua you can use
> > "tex.box[]". With LuaMetaTeX, you use "\insertbox" from
> > TeX, but I'm not sure how to get at the insert box from Lua.
> 
> tex.getinsertdistance
> tex.getinsertmultiplier
> tex.getinsertlimit
> tex.getinsertheight
> tex.getinsertdepth
> tex.getinsertwidth
> tex.getinsertcontent
> tex.setinsertdistance
> tex.setinsertmultiplier
> tex.setinsertlimit
> tex.setinsertcontent

Perfect! "tex.getinsertcontent" does exactly what I need.

Really minor, but I would expect that

   tex.insertcontent[4] = 
= tex.insertcontent[4]
   
would be exist and be equivalent to

= tex.getinsertcontent(4)
   tex.setinsertcontent(4, )

> The insert (etc) handler is more clever and flexible. So, for instance
> we can bubble up inserts. I think you do a preroll so in that case you
> can set the migrations related parameter to not bubble up.
> 
> \starttext
> 
> \holdingmigrations\numexpr1+2+4\relax
> 
> \setbox0\hbox{test \footnote{test} test}
> 
> \setbox2\vbox{\unhcopy0}
> 
> \holdingmigrations0
> 
> \setbox4\vbox{\unhcopy0}
> 
> \unhbox0
> 
> \unvbox2
> 
> \unvbox4
> 
> \stoptext
> 
> But I have no clue how all that will work out with (lua) code that 
> manipulates these things. In list nodes you can consult the pre and post 
> fields to what got migrated.

I don't think that that will work in this case. I'm doing most of the
work in "pre_output_filter", which is after all of the insert nodes have
been removed from the page and put into their respective boxes. And I
can't postpone setting any inserts until then because TeX needs to know
their height for when it breaks the page. I don't really like how I have
to move the footnotes, but I can't find any better way of doing things.

If you're curious, most of the insert code is in these two functions:

   
   
https://github.com/gucci-on-fleek/lua-widow-control/blob/2bca90/source/lua-widow-control.lua#L612-L669
   
https://github.com/gucci-on-fleek/lua-widow-control/blob/2bca90/source/lua-widow-control.lua#L843-L924

Thanks,
-- Max

___
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] How can I make a Gentoo Linux package for ConTeXt LMTX?

2022-08-15 Thread Max Chernoff via ntg-context
Okay, I'm seeing a few separate issues here.

1. Gentoo expects to compile everything from source.

   This isn't an option here since LuaMetaTeX doesn't have any source
   available (yet). So for the time being, you'll need to use the provided
   binaries. These support pretty much every architecture, so this
   shouldn't really be a problem.

2. You want to install ConTeXt LMTX system-wide.

   This is doable with the standard Linux installer script. Just make sure
   to run the script as root and install the files in /opt/context. This is
   what I've done on my system, and it works quite well. 
   
  $ ls -l $(type -p context)
  lrwxrwxrwx. 1 root root 10 Jul 28 00:33 
/opt/context/tex/texmf-linux-64/bin/context -> luametatex*
  
3. You want to install ConTeXt without any network access.

   The easiest way to do this would be to install on a system with
   internet, then just copy over the files. 
   
   If you want to use the "original" installer files, it shouldn't be
   impossible, but probably not too easy either. (All steps below are
   untested)
   
   The platform-independent stuff is all in one big zip, located at:
   
  http://lmtx.pragma-ade.nl/install-lmtx/texmf-context.zip
  
   Unzip this file as "/tex/texmf-context/".
  
   Then you also need to download all of the binaries. You will need to
   download all of the paths listed in this file:
   
  http://lmtx.pragma-ade.nl/install-lmtx/tex/texmf-linux-64.tma
  
   All of those files need to be placed in "/tex/texmf-linux-
   64/bin".
   
   Then to finish installing you'll need to run "mtxrun --generate" and
   "context --make". There are probably a bunch of other steps that I'm
   missing, but this should get you close.
   
   Again, probably easier to just use the regular installer.

4. ConTeXt is really picky about texmfcnf stuff.

   This is an issue that I've had too:
   
  https://github.com/latex3/l3build/issues/232
   
   Pretty much any modification of anything texmfcnf-related with ConTeXt
   will completely prevent it from running. There's a thread discussing the
   problem (but with no real solutions) here:
   
  https://tug.org/pipermail/tex-live/2020-September/046099.html
  
   And a Wiki page here:
   
  https://wiki.contextgarden.net/Custom_Configuration
  
   I agree that this texmfcnf stuff makes it really difficult to install or
   use ConTeXt with any kind of custom paths. Does anyone know how to
   properly configure a texmfcnf with custom paths?
   
Hopefully this is of some help.
-- Max
___
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] How can I make a Gentoo Linux package for ConTeXt LMTX?

2022-08-15 Thread Alan Braslau via ntg-context

I believe that you are missing the point of LMTX.

LMTX Context is intended to be a self-contained AND PORTABLE directory 
tree. It does not need system installation paths and such and is 
designed to happily co-exist with system installed TeX (using packages) 
or TeXlive or others, without interference. The LMTX directory tree is 
very light-weight and indeed many production users might keep a separate 
copy with EACH major TeX project, thus ensuring that the project will 
continue to compile without changes as LMTX evolves. This strategy can 
be a successful insurance that very old projects will continue to 
compile yielding the same results many years later.


Not that you need to go that far.

Many users install LMTX for a system-wide use in some commonly 
accessible location. This is totally portable: only the PATH needs to be 
set to find the correct context executable.


LMTX does not go the route of system packages as this relies on package 
maintainers. ConTeXt mkiv with luatex continues to be made available and 
updated with TeXlive, so any system packages that provide TeXlive can 
provide ConTeXt.


Alan



On 15/08/2022 07:54, amano.kenji via ntg-context wrote:

 From my perspective, a few optimizations for system installation need to 
happen for ConTeXt.

contextcnf.lua needs to support system installation paths.

Arch Linux texlive-core packages has its own patched version of texmfcnf.lua 
that sets TEXMFSYSVAR=/var/lib/texmf, TEXMFOS=/usr/share, 
TEXMFDIST=/usr/share/texmf-dist, and TEXMFSYSCONFIG=/etc/texmf.

TexLive's own version of texmfcnf.lua is not suitable for system-wide 
installation.

contexcnf.lua assumes all paths are relative to /path/to/extracted-archive 
which is definitely not a system-wide installation.

A system-wide installation is installed to absolute paths.

On top of that, there needs to be a document called INSTALLATION or BUILD that 
offers a simplified version of build/installation instructions contained in 
install.sh, mtx-install.lua, and mtxrun.lua. It seems mtxrun can be used to 
build and install ConTeXt without internet access as long as all dependencies 
are already present.

If ConTeXt is optimized for system-wide installation by modifying 
contextcnf.lua and adding INSTALL or BUILD, then all POSIX-like operating 
systems will be able to easily make packages for ConTeXt. Not just Gentoo Linux.

Can anyone help me with optimizing ConTeXt for system-wide installation?

--- Original Message ---
On Monday, August 15th, 2022 at 12:12 PM, Bruce Horrocks  
wrote:



On 15 Aug 2022, at 13:03, amano.kenji via ntg-context ntg-context@ntg.nl wrote:

TexLive has texmfcnf.lua that doesn't really work with texlive-context 
installed by linux distributions.

Arch Linux has its own patched version of texmfcnf.lua.

It seems I'd be better off with a linux package for ConTeXt LMTX.

How can I build and install ConTeXt LMTX on Gentoo Linux or any linux 
distribution?

I wish it was as simple as ./configure, make, and make install.



Install instructions for LMTX on Linux are here:
https://wiki.contextgarden.net/Installation


It's pre-built so there are no make steps.

Try it and ask again if you have problems. :-)

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



--
--
Alan
___
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] How can I make a Gentoo Linux package for ConTeXt LMTX?

2022-08-15 Thread Bruce Horrocks via ntg-context


> On 15 Aug 2022, at 13:19, amano.kenji  wrote:
> 
> I was trying to translate instructions in install.sh and dependencies of 
> install.sh into shell commands in a Gentoo Linux package.
> 
> Gentoo Linux downloads all dependencies and builds a package in a network 
> namespace where there is no internet access.

If you must use a Linux that makes life hard... ;-)

I'm guessing you're trying to prepare ConTeXt for use in a private repository 
on a LAN so that your users can install it without needing Internet access?

ConTeXt only depends on glibc (iirc) - and it assumes it is present already. So 
do an install on a machine that does have Internet access and everything you 
need will then be self-contained in the directory you chose to install into. 
Zip up that directory and use it for subsequent installs as many times as you 
want just by unzipping it - no further Internet access required.

You'll need to set up the PATH for where you unzipped the file - but the 
install.sh file has the necessary information towards the end.

Try it and see - it's not like typical modern bloatware that pulls down 100's 
of Gbytes of dependencies willy-nilly.

> 
> Thus, install.sh cannot be directly used in a gentoo linux package. I have to 
> translate instructions used in install.sh into shell commands.
> 
> How can I do that? Can I somehow execute mtx-install.lua, mtxrun.lua, or 
> mtxrun in a way that doesn't require internet access?
> 
> --- Original Message ---
> On Monday, August 15th, 2022 at 12:12 PM, Bruce Horrocks  
> wrote:
> 
> 
>>> On 15 Aug 2022, at 13:03, amano.kenji via ntg-context ntg-context@ntg.nl 
>>> wrote:
>>> 
>>> TexLive has texmfcnf.lua that doesn't really work with texlive-context 
>>> installed by linux distributions.
>>> 
>>> Arch Linux has its own patched version of texmfcnf.lua.
>>> 
>>> It seems I'd be better off with a linux package for ConTeXt LMTX.
>>> 
>>> How can I build and install ConTeXt LMTX on Gentoo Linux or any linux 
>>> distribution?
>>> 
>>> I wish it was as simple as ./configure, make, and make install.
>> 
>> 
>> Install instructions for LMTX on Linux are here:
>> https://wiki.contextgarden.net/Installation
>> 
>> 
>> It's pre-built so there are no make steps.
>> 
>> Try it and ask again if you have problems. :-)
>> 
>> —
>> Bruce Horrocks
>> Hampshire, UK

—
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 / 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] Is rendering furigana over horizontal or vertical japanese text doable in ConTeXt?

2022-08-15 Thread Wolfgang Schuster via ntg-context

amano.kenji via ntg-context schrieb am 15.08.2022 um 14:00:

Is there any documentation about \ruby?


You can see all available parameters in setup-en.pdf, the example below 
shows a few of them:


 begin example
\setupinterlinespace[line=4ex]

\setuptype[style=\ttx]

\starttext

\start
x \ruby{aaa}{bbb} x
\stop

\start \setupruby[location=left]
\type{\setupruby[location=left]}\quad x \ruby{aaa}{bbb} x
\stop

\start \setupruby[location=right]
\type{\setupruby[location=right]}\quad x \ruby{aaa}{bbb} x
\stop

\start \setupruby[location=right,left={[},right={]}]
\type{\setupruby[left={[},right={]}]}\quad x \ruby{aaa}{bbb} 
x

\stop

\start \setupruby[align=flushleft]
\type{\setupruby[align=flushleft]}\quad x \ruby{aa}{bbb} 
x

\stop

\start \setupruby[align=flushright]
\type{\setupruby[align=flushright]}\quad x \ruby{aa}{bbb} 
x

\stop

\start \setupruby[style=\itxx]
\type{\setupruby[style=\itxx]}\quad x \ruby{aaa}{bbb} x
\stop

\start \setupruby[color=blue]
\type{\setupruby[color=blue]}\quad x \ruby{aaa}{bbb} x
\stop

\start \setupruby[voffset=-1.2ex]
\type{\setupruby[voffset=-1.2ex]}\quad x \ruby{aaa}{bbb} x
\stop

\stoptext
 end example


What about vertical text?


ConTeXt has a mechanism to produce vertical text but there is nothing 
yet which can
be used out of the box to produce a complete document with vertical 
paragraphs.


Wolfgang

___
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] Write a long chapter title in two lines

2022-08-15 Thread Jeong Dal via ntg-context
Dear all,

I’d like to write a long chapter title in two lines if it is longer than the 
textwidth.
It is OK when I use just bigger fonts.

But it writes the long title in one line if I use outlined font for title as in 
MWE.

Is there a way to write it in two lines using the outlined font?

Thanks,

Best regards,

Dalyoung

\startuseMPgraphic{outlineT}
  draw outlinetext.b (\MPvar{tt})
  (withcolor .75white)
  (withcolor .725blue withpen pencircle scaled .75pt);%\MPvar{thick});
\stopuseMPgraphic
\definefont[BigFontOne][NotoSansCJKkr-Bold sa 4]
\define[1]\outlineTitle{\useMPgraphic{outlineT}{tt="#1"}}

\setuphead[chapter]
[textcommand=\outlineTitle,
 style=\BigFontOne,
 numbercommand=\outlineTitle,
% align = middle,
 number=yes]

\setupexternalfigures[location={default,local,global}]
%\definefont[fancy][Zapfino at 24pt]

\starttext
\startchapter[title={Very Long Long Long Title}]
\startcombination[3*1]
 {\externalfigure[cow]   [combination]}{cow}
 {\externalfigure[mill]  [combination]}{mill}
 {\externalfigure[hacker][combination]}{hacker}
\stopcombination
\stopchapter
\stoptext


> On Aug 15, 2022, at 7:42 PM, Pablo Rodriguez via ntg-context 
>  wrote:
> 
> Dear list,
> 
> adapting a the sample from mkxl/page-str.mkxl (and code from the list),
> I came with the following sample:
> 
>  \setuppapersize[A6]
>  \showgrid
>  %\setuplayout[grid=yes]
>  \starttext
>  \input tufte
>  \startoutputstream[es]
>   \dorecurse{25}
>{\startlanguage[es]\input cervantes-es\stoplanguage%
>  \par\pushoutputstream}
>  \enableoutputstream[en]
>   \dorecurse{25}
>{\input zapf\par\pushoutputstream}
>  \disableoutputstream
>  \stopoutputstream
>  \synchronizestreams[es,en]
>  \page \flushoutputstream[es]
>  \page \flushoutputstream[en]
>  \stoptext
> 
> To reorder pages, I rename the output to "wg.pdf" and run the following
> code:
> 
>  \setuppapersize[A6]
>  \setuplayout[page]
>  \starttext
>  \dorecurse{26}
>  {\ifnum\recurselevel = 1
>\externalfigure[wg.pdf][page=\recurselevel]\else
>\externalfigure[wg.pdf][page=\recurselevel]
>\externalfigure[wg.pdf][page={\the\numexpr \recurselevel + 25}]\fi}
>  \stoptext
> 
> I’m afraid that the paragraph mistmatch is clear (the number of pages is
> way different for each versions).
> 
> Using the grid, the mismatch is not so evident (but there is still a
> different number of pages for each version).
> 
> Page reordering would be in this case:
> 
>  \setuppapersize[A6]
>  \setuplayout[page]
>  \starttext
>  \dorecurse{20}
>  {\ifnum\recurselevel = 1
>\externalfigure[wg.pdf][page=\recurselevel]\else
>\externalfigure[wg.pdf][page=\recurselevel]
>\externalfigure[wg.pdf][page={\the\numexpr \recurselevel + 19}]\fi}
>  \stoptext
> 
> I would need that for a bilingual edition. I don’t mind reodering the
> pages (if there is no other option).
> 
> But what am I doing wrong not to get synced text streams for facing pages?
> 
> 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 / 
> 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
> ___

___
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] Accessing inserts from Lua in LuaMetaTeX

2022-08-15 Thread Hans Hagen via ntg-context

On 8/15/2022 8:18 AM, Max Chernoff via ntg-context wrote:

Hi all,

I'm trying to manipulate some inserts from Lua in LuaMetaTeX, and I'm
having some problems that I'm not having with LuaTeX.

First, how do I get an insert's class/type from the "insert" nodes on
the page? With LuaTeX, the insert's class/type is the same as the
subtype of the "ins" nodes, but the subtype of the "insert" nodes is
always zero in LuaMetaTeX, so I'm not sure how to get the class/type.


Indeed, we don't use these boxes and registers because we run in 
\insertmode=2. This gives us more state info (i kept the old method 
around for now).



Second, how do I get the head of the insert box from Lua? With LuaTeX,
from TeX you would use "\box" and from Lua you can use
"tex.box[]". With LuaMetaTeX, you use "\insertbox" from
TeX, but I'm not sure how to get at the insert box from Lua.


tex.getinsertdistance
tex.getinsertmultiplier
tex.getinsertlimit
tex.getinsertheight
tex.getinsertdepth
tex.getinsertwidth
tex.getinsertcontent
tex.setinsertdistance
tex.setinsertmultiplier
tex.setinsertlimit
tex.setinsertcontent


The context for both of these is that my module lua-widow-control
sometimes moves a line containing footnotes to the next page, so I need
to do some surgery to make sure that the "footnote marks" stay with the
"footnote text". This is tricky but doable with LuaTeX, but I can't seem
to get it to work with the new inserts in LuaMetaTeX, hence the above
questions.
The insert (etc) handler is more clever and flexible. So, for instance 
we can bubble up inserts. I think you do a preroll so in that case you 
can set the migrations related parameter to not bubble up.


\starttext

\holdingmigrations\numexpr1+2+4\relax

\setbox0\hbox{test \footnote{test} test}

\setbox2\vbox{\unhcopy0}

\holdingmigrations0

\setbox4\vbox{\unhcopy0}

\unhbox0

\unvbox2

\unvbox4

\stoptext

But I have no clue how all that will work out with (lua) code that 
manipulates these things. In list nodes you can consult the pre and post 
fields to what got migrated.


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] How can I make a Gentoo Linux package for ConTeXt LMTX?

2022-08-15 Thread amano.kenji via ntg-context
From my perspective, a few optimizations for system installation need to happen 
for ConTeXt.

contextcnf.lua needs to support system installation paths.

Arch Linux texlive-core packages has its own patched version of texmfcnf.lua 
that sets TEXMFSYSVAR=/var/lib/texmf, TEXMFOS=/usr/share, 
TEXMFDIST=/usr/share/texmf-dist, and TEXMFSYSCONFIG=/etc/texmf.

TexLive's own version of texmfcnf.lua is not suitable for system-wide 
installation.

contexcnf.lua assumes all paths are relative to /path/to/extracted-archive 
which is definitely not a system-wide installation.

A system-wide installation is installed to absolute paths.

On top of that, there needs to be a document called INSTALLATION or BUILD that 
offers a simplified version of build/installation instructions contained in 
install.sh, mtx-install.lua, and mtxrun.lua. It seems mtxrun can be used to 
build and install ConTeXt without internet access as long as all dependencies 
are already present.

If ConTeXt is optimized for system-wide installation by modifying 
contextcnf.lua and adding INSTALL or BUILD, then all POSIX-like operating 
systems will be able to easily make packages for ConTeXt. Not just Gentoo Linux.

Can anyone help me with optimizing ConTeXt for system-wide installation?

--- Original Message ---
On Monday, August 15th, 2022 at 12:12 PM, Bruce Horrocks  
wrote:


> > On 15 Aug 2022, at 13:03, amano.kenji via ntg-context ntg-context@ntg.nl 
> > wrote:
> >
> > TexLive has texmfcnf.lua that doesn't really work with texlive-context 
> > installed by linux distributions.
> >
> > Arch Linux has its own patched version of texmfcnf.lua.
> >
> > It seems I'd be better off with a linux package for ConTeXt LMTX.
> >
> > How can I build and install ConTeXt LMTX on Gentoo Linux or any linux 
> > distribution?
> >
> > I wish it was as simple as ./configure, make, and make install.
>
>
> Install instructions for LMTX on Linux are here:
> https://wiki.contextgarden.net/Installation
>
>
> It's pre-built so there are no make steps.
>
> Try it and ask again if you have problems. :-)
>
> —
> 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 / 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] How can I make a Gentoo Linux package for ConTeXt LMTX?

2022-08-15 Thread amano.kenji via ntg-context
I was trying to translate instructions in install.sh and dependencies of 
install.sh into shell commands in a Gentoo Linux package.

Gentoo Linux downloads all dependencies and builds a package in a network 
namespace where there is no internet access.

Thus, install.sh cannot be directly used in a gentoo linux package. I have to 
translate instructions used in install.sh into shell commands.

How can I do that? Can I somehow execute mtx-install.lua, mtxrun.lua, or mtxrun 
in a way that doesn't require internet access?

--- Original Message ---
On Monday, August 15th, 2022 at 12:12 PM, Bruce Horrocks  
wrote:


> > On 15 Aug 2022, at 13:03, amano.kenji via ntg-context ntg-context@ntg.nl 
> > wrote:
> >
> > TexLive has texmfcnf.lua that doesn't really work with texlive-context 
> > installed by linux distributions.
> >
> > Arch Linux has its own patched version of texmfcnf.lua.
> >
> > It seems I'd be better off with a linux package for ConTeXt LMTX.
> >
> > How can I build and install ConTeXt LMTX on Gentoo Linux or any linux 
> > distribution?
> >
> > I wish it was as simple as ./configure, make, and make install.
>
>
> Install instructions for LMTX on Linux are here:
> https://wiki.contextgarden.net/Installation
>
>
> It's pre-built so there are no make steps.
>
> Try it and ask again if you have problems. :-)
>
> —
> 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 / 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] How can I make a Gentoo Linux package for ConTeXt LMTX?

2022-08-15 Thread Bruce Horrocks via ntg-context


> On 15 Aug 2022, at 13:03, amano.kenji via ntg-context  
> wrote:
> 
> TexLive has texmfcnf.lua that doesn't really work with texlive-context 
> installed by linux distributions.
> 
> Arch Linux has its own patched version of texmfcnf.lua.
> 
> It seems I'd be better off with a linux package for ConTeXt LMTX.
> 
> How can I build and install ConTeXt LMTX on Gentoo Linux or any linux 
> distribution?
> 
> I wish it was as simple as ./configure, make, and make install.

Install instructions for LMTX on Linux are here:


It's pre-built so there are no make steps.

Try it and ask again if you have problems. :-)

—
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 / 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] How can I make a Gentoo Linux package for ConTeXt LMTX?

2022-08-15 Thread amano.kenji via ntg-context
TexLive has texmfcnf.lua that doesn't really work with texlive-context 
installed by linux distributions.

Arch Linux has its own patched version of texmfcnf.lua.

It seems I'd be better off with a linux package for ConTeXt LMTX.

How can I build and install ConTeXt LMTX on Gentoo Linux or any linux 
distribution?

I wish it was as simple as ./configure, make, and make install.
___
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] Is rendering furigana over horizontal or vertical japanese text doable in ConTeXt?

2022-08-15 Thread amano.kenji via ntg-context
Is there any documentation about \ruby? What about vertical text?

--- Original Message ---
On Monday, August 15th, 2022 at 11:43 AM, Taco Hoekwater  
wrote:


> > On 15 Aug 2022, at 13:02, amano.kenji via ntg-context ntg-context@ntg.nl 
> > wrote:
> >
> > Typesetting furigana over kanji characters is common for japanese 
> > educational materials.
>
>
> Yes, using the \ruby command. That used to require a module, but is now in 
> the core.
>
> The wiki page on CJK fonts should probably be updated (new fonts, broken ftp 
> links, etc.)
> but at least it mentions this:
>
> https://wiki.contextgarden.net/CJK_fonts
>
> Best wishes,
> Taco
>
> —
> Taco Hoekwater E: t...@bittext.nl
> genderfluid (all pronouns)
>
___
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] Is rendering furigana over horizontal or vertical japanese text doable in ConTeXt?

2022-08-15 Thread Taco Hoekwater via ntg-context


> On 15 Aug 2022, at 13:02, amano.kenji via ntg-context  
> wrote:
> 
> Typesetting furigana over kanji characters is common for japanese educational 
> materials.

Yes, using the \ruby command. That used to require a module, but is now in the 
core. 

The wiki page on CJK fonts should probably be updated (new fonts, broken ftp 
links, etc.) 
but at least it mentions this:

  https://wiki.contextgarden.net/CJK_fonts

Best wishes,
Taco

— 
Taco Hoekwater  E: t...@bittext.nl
genderfluid (all pronouns)



___
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] Is rendering furigana over horizontal or vertical japanese text doable in ConTeXt?

2022-08-15 Thread amano.kenji via ntg-context
Typesetting furigana over kanji characters is common for japanese educational 
materials.

Is this doable in ConTeXt?
___
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] sync text streams in facing pages

2022-08-15 Thread Pablo Rodriguez via ntg-context
Dear list,

adapting a the sample from mkxl/page-str.mkxl (and code from the list),
I came with the following sample:

  \setuppapersize[A6]
  \showgrid
  %\setuplayout[grid=yes]
  \starttext
  \input tufte
  \startoutputstream[es]
   \dorecurse{25}
{\startlanguage[es]\input cervantes-es\stoplanguage%
  \par\pushoutputstream}
  \enableoutputstream[en]
   \dorecurse{25}
{\input zapf\par\pushoutputstream}
  \disableoutputstream
  \stopoutputstream
  \synchronizestreams[es,en]
  \page \flushoutputstream[es]
  \page \flushoutputstream[en]
  \stoptext

To reorder pages, I rename the output to "wg.pdf" and run the following
code:

  \setuppapersize[A6]
  \setuplayout[page]
  \starttext
  \dorecurse{26}
  {\ifnum\recurselevel = 1
\externalfigure[wg.pdf][page=\recurselevel]\else
\externalfigure[wg.pdf][page=\recurselevel]
\externalfigure[wg.pdf][page={\the\numexpr \recurselevel + 25}]\fi}
  \stoptext

I’m afraid that the paragraph mistmatch is clear (the number of pages is
way different for each versions).

Using the grid, the mismatch is not so evident (but there is still a
different number of pages for each version).

Page reordering would be in this case:

  \setuppapersize[A6]
  \setuplayout[page]
  \starttext
  \dorecurse{20}
  {\ifnum\recurselevel = 1
\externalfigure[wg.pdf][page=\recurselevel]\else
\externalfigure[wg.pdf][page=\recurselevel]
\externalfigure[wg.pdf][page={\the\numexpr \recurselevel + 19}]\fi}
  \stoptext

I would need that for a bilingual edition. I don’t mind reodering the
pages (if there is no other option).

But what am I doing wrong not to get synced text streams for facing pages?

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 / 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] Accessing inserts from Lua in LuaMetaTeX

2022-08-15 Thread Max Chernoff via ntg-context
Hi all,

I'm trying to manipulate some inserts from Lua in LuaMetaTeX, and I'm
having some problems that I'm not having with LuaTeX. 

First, how do I get an insert's class/type from the "insert" nodes on
the page? With LuaTeX, the insert's class/type is the same as the
subtype of the "ins" nodes, but the subtype of the "insert" nodes is
always zero in LuaMetaTeX, so I'm not sure how to get the class/type.

Second, how do I get the head of the insert box from Lua? With LuaTeX,
from TeX you would use "\box" and from Lua you can use
"tex.box[]". With LuaMetaTeX, you use "\insertbox" from
TeX, but I'm not sure how to get at the insert box from Lua.

The context for both of these is that my module lua-widow-control
sometimes moves a line containing footnotes to the next page, so I need
to do some surgery to make sure that the "footnote marks" stay with the
"footnote text". This is tricky but doable with LuaTeX, but I can't seem
to get it to work with the new inserts in LuaMetaTeX, hence the above
questions.

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