[NTG-context] Weird error when using \startformula inside lua

2021-09-10 Thread Aditya Mahajan via ntg-context
I sometimes define lua functions for showing out worked out calculations. The 
following minimal example shows that 

  context([[\startformula ... \stopformula]]) 

fails in LMTX with an error message:

tex error   > tex error on line 3 in file ./test.tex: Undefined control 
sequence \undefined 

MWE:

\startluacode
  thirddata = thirddata or {}

  local comment = [[
This is a famous formula
\startformula
  a^2 + b^2 = c^2
\stopformula
  ]]

  function thirddata.explanation()
  context(comment)
  end

\stopluacode

\starttext
\ctxlua{thirddata.explanation()}
\stoptext

The actual use case is more complicated (where I use templates, so I don't want 
to convert everything to context.startformula() etc.). The example compiles 
with MkIV but not LMTX.

Any idea what is going on?

Thanks,
Aditya

___
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] Setting up the double pages of part beginnings

2021-09-10 Thread Christian Dekant via ntg-context
Dear List,

I am trying to set up double pages at the beginning of a new part in such a
way that:
- on an odd/right-hand page there will be number and the title typeset in
some fashion, and
- on the even/left-hand page there should be a full (printpaper)size image.

If the part title ends up on an even page then there is no additional page
break (but then image and title are not on the same double-page obviously).
But there is a page break (and an empty left page) when the part title ends
up on an odd page (when you put page=right e.g.) as in the following
example:

%
% How to get rid of the empty page preceding a part title?
%

\setuppagenumbering [alternative=doublesided]

\setupexternalfigures[location=default] % cow


% startTEXpage does not increase page number => incrementpagenumber

% trimming in the print shop => printpaperwidth/height

\define[1]\FullScreen{\startTEXpage\externalfigure[#1][width=\printpaperwidth,height=\printpaperheight]\stopTEXpage\incrementpagenumber}

% tried page=yes/no/right/odd

\setuphead

[part]

[placehead=yes,

page=right,

before={\nowhitespace}, % ???

]


\starttext

\completecontent

\FullScreen{cow}

\startpart[title={A nice part}]

Some text ...

\stoppart

\FullScreen{cow}

\startpart[title={A nice part}]

Some text ...

\stoppart

\stoptext


On an additional note: I would love to utilise the XML capabilities of
context, so ... is the usage of \startTEpage XML-export-friendly?

Anyway, best regards, thank you for your patience in advance and a happy
weekend for everybody!

Cheers
Christian
___
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 as LaTeX to XHTML/ePub transpiler?

2021-09-10 Thread Denis Maier via ntg-context
Oh, as a a more general response I can only reiterate what has been said 
already: Depending on your particular needs it might be better to start with 
some neutral input and generate output formats from there. There are plenty of 
options each with particular up- and downsides, e.g. markdown via pandoc, or 
asciidoc., or XML with XSLT. In the Racket ecosystem there's also 
scribble/pollen which looks quite interesting. I have never used that though.

Denis


> -Ursprüngliche Nachricht-
> Von: ntg-context  Im Auftrag von Denis Maier via
> ntg-context
> Gesendet: Freitag, 10. September 2021 17:35
> An: ntg-context@ntg.nl
> Cc: Maier, Denis Christian (UB) ;
> hugo.fis...@gmail.com
> Betreff: Re: [NTG-context] LuaMetaTEX as LaTeX to XHTML/ePub transpiler?
> 
> You may want to have a look at the lwarp package as an alternative to tex4ht.
> 
> Denis
> 
> > -Ursprüngliche Nachricht-
> > Von: ntg-context  Im Auftrag von Hugh
> > Fisher via ntg-context
> > Gesendet: Freitag, 10. September 2021 13:14
> > An: ntg-context@ntg.nl
> > Cc: Hugh Fisher 
> > Betreff: [NTG-context] LuaMetaTEX as LaTeX to XHTML/ePub transpiler?
> >
> > I have documents in LaTeX, and would like to generate XHTML (ePub)
> > output without going through an intermediate DVI or PDF step.
> > Markup to markup, translating or transpiling rather than typesetting.
> >
> > My use case is that I have two tabletop gaming books, 60 - 80 pages of
> > text and diagrams, written for pdfLaTeX and now with XeLaTeX. I'm very
> > happy with LaTeX and the wonderful PDF output for print.
> >
> > But now I also want to create ePub/XHTML as well as print versions.
> > So far I've tried tex4ebook and tex4ht and neither works for me.
> > Firstly, some of the LaTeX commands are not recognised or causing errors.
> >
> > And secondly, when I managed to get a small test section to work, the
> > generated XHTML/HTML is very large, full of tiny s. The problem
> > seems to be that tex4ht runs TeX which typesets everything into DVI
> > with every element carefully placed on a page, and then tex4ht tries
> > to reverse that back into HTML. All this extra HTML will slow down /
> > interfere with the ebook reader which is doing the final page layout at
> runtime on a particular device.
> >
> > How I would like it to work is directly from LaTeX to HTML without any
> > low level typesetting. If I have a LaTex source paragraph
> >
> > This is some text with \textbf{some parts} in bold.
> >
> > The TEX will copy the source text to the destination. If
> > there's a TeX command, here \textbf, it looks for a Lua function with
> > that name and invokes it with whatever argument text is present.
> > The Lua function emits , then recursively processes the argument
> > text, then emits . Similarly there would be an implied lookup of
> > \beginParagraph and \endParagraph which would emit  and .
> > Plain text just gets copied through unchanged.
> >
> >
> > So (finally) my question: is LuaMetaTEX what I'm looking for?
> >
> > Yes is the answer I'm hoping for. And any guidance would be much
> > appreciated.
> >
> > No, but best starting point? I've never tried modifying TeX code
> > itself, but I am an experienced and sometimes competent programmer.
> > who has written a compiler parser and a high level code generator.
> >
> > No and not a good idea to try?
> >
> > Any other responses?
> >
> >
> > --
> >
> > cheers,
> > Hugh Fisher
> >
> 
> > ___
> > 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] LuaMetaTEX as LaTeX to XHTML/ePub transpiler?

2021-09-10 Thread Denis Maier via ntg-context
You may want to have a look at the lwarp package as an alternative to tex4ht.

Denis

> -Ursprüngliche Nachricht-
> Von: ntg-context  Im Auftrag von Hugh Fisher via
> ntg-context
> Gesendet: Freitag, 10. September 2021 13:14
> An: ntg-context@ntg.nl
> Cc: Hugh Fisher 
> Betreff: [NTG-context] LuaMetaTEX as LaTeX to XHTML/ePub transpiler?
> 
> I have documents in LaTeX, and would like to generate XHTML (ePub) output
> without going through an intermediate DVI or PDF step.
> Markup to markup, translating or transpiling rather than typesetting.
> 
> My use case is that I have two tabletop gaming books, 60 - 80 pages of text 
> and
> diagrams, written for pdfLaTeX and now with XeLaTeX. I'm very happy with
> LaTeX and the wonderful PDF output for print.
> 
> But now I also want to create ePub/XHTML as well as print versions.
> So far I've tried tex4ebook and tex4ht and neither works for me.
> Firstly, some of the LaTeX commands are not recognised or causing errors.
> 
> And secondly, when I managed to get a small test section to work, the
> generated XHTML/HTML is very large, full of tiny s. The problem seems
> to be that tex4ht runs TeX which typesets everything into DVI with every
> element carefully placed on a page, and then tex4ht tries to reverse that back
> into HTML. All this extra HTML will slow down / interfere with the ebook
> reader which is doing the final page layout at runtime on a particular device.
> 
> How I would like it to work is directly from LaTeX to HTML without any low
> level typesetting. If I have a LaTex source paragraph
> 
> This is some text with \textbf{some parts} in bold.
> 
> The TEX will copy the source text to the destination. If there's a 
> TeX
> command, here \textbf, it looks for a Lua function with that name and invokes
> it with whatever argument text is present.
> The Lua function emits , then recursively processes the argument text, then
> emits . Similarly there would be an implied lookup of \beginParagraph and
> \endParagraph which would emit  and .
> Plain text just gets copied through unchanged.
> 
> 
> So (finally) my question: is LuaMetaTEX what I'm looking for?
> 
> Yes is the answer I'm hoping for. And any guidance would be much
> appreciated.
> 
> No, but best starting point? I've never tried modifying TeX code itself, but 
> I am
> an experienced and sometimes competent programmer.
> who has written a compiler parser and a high level code generator.
> 
> No and not a good idea to try?
> 
> Any other responses?
> 
> 
> --
> 
> cheers,
> Hugh Fisher
> 
> ___
> 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] If you really absolutely need more capacity, you can ask a wizard to enlarge me

2021-09-10 Thread Marcus Vinicius Mesquita via ntg-context
Yes, in texmf-local/web2c

Only mtxrun --generate

But even after now also running context --make,
when compiling the mwe, lmtx throws:
tex error   > tex error on line 540005 in file ./mwe.tex: TeX capacity
exceeded, sorry [node memory size=5000]

On Fri, Sep 10, 2021 at 8:49 AM Hans Hagen  wrote:

> On 9/10/2021 1:45 PM, Marcus Vinicius Mesquita wrote:
> > Hi,
> >
> > After perusing the texmfcnf.lua file, I created a file with the same name
> > in my texmf-local folder, changing the settings for the node memory and
> > step size, but it did not affect the compilation of the original MWE
> > (without the enableexperiments switches), which still fails.  What am I
> > missing?
> >
> > Below the contents of the file:
> >
> > return {
> > content = {
> > directives = {
> > ["luametatex.nodesize"] = { size = 6000, step =  60 },
> > }
> >}
> > }
> hm, in texmf-local/web2c ? did you run mtxrun --generate and context
> --make ?
>
> 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
> -
>


-- 
Todas as coisas fatigam o corpo, salvo a música, que não fatiga nem o corpo
nem seus membros, por ser descanso da alma, primavera do coração, distração
do aflito, entretenimento do solitário, e viático do viajante.

Kunnâsh al-Hâ'ik (Cancioneiro de al-Hâ'ik)
___
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] If you really absolutely need more capacity, you can ask a wizard to enlarge me

2021-09-10 Thread Hans Hagen via ntg-context

On 9/10/2021 1:45 PM, Marcus Vinicius Mesquita wrote:

Hi,

After perusing the texmfcnf.lua file, I created a file with the same name
in my texmf-local folder, changing the settings for the node memory and 
step size, but it did not affect the compilation of the original MWE 
(without the enableexperiments switches), which still fails.  What am I 
missing?


Below the contents of the file:

return {
    content = {
directives = {
        ["luametatex.nodesize"] = { size = 6000, step =  60 },
}
   }
}
hm, in texmf-local/web2c ? did you run mtxrun --generate and context 
--make ?


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 as LaTeX to XHTML/ePub transpiler?

2021-09-10 Thread Hans Hagen via ntg-context

On 9/10/2021 1:13 PM, Hugh Fisher via ntg-context wrote:


I have documents in LaTeX, and would like to generate XHTML (ePub)
output without going through an intermediate DVI or PDF step.
Markup to markup, translating or transpiling rather than typesetting.

My use case is that I have two tabletop gaming books, 60 - 80 pages
of text and diagrams, written for pdfLaTeX and now with XeLaTeX. I'm
very happy with LaTeX and the wonderful PDF output for print.


indeed, stay with what you're happy working with


But now I also want to create ePub/XHTML as well as print versions.
So far I've tried tex4ebook and tex4ht and neither works for me.
Firstly, some of the LaTeX commands are not recognised or causing
errors.


i suppose that you can define commands that somehow make your own 
commands export something; i have no experience with latex or tex4ht



And secondly, when I managed to get a small test section to work,
the generated XHTML/HTML is very large, full of tiny s. The
problem seems to be that tex4ht runs TeX which typesets everything
into DVI with every element carefully placed on a page, and then
tex4ht tries to reverse that back into HTML. All this extra HTML
will slow down / interfere with the ebook reader which is doing the
final page layout at runtime on a particular device.


that's probbaly because there is not enough info in the dvi file ... 
maybe you can use xslt to sanitize the spans?



How I would like it to work is directly from LaTeX to HTML without
any low level typesetting. If I have a LaTex source paragraph

 This is some text with \textbf{some parts} in bold.


so kind of interpreting


The TEX will copy the source text to the destination. If
there's a TeX command, here \textbf, it looks for a Lua function
with that name and invokes it with whatever argument text is present.
The Lua function emits , then recursively processes the argument
text, then emits . Similarly there would be an implied lookup
of \beginParagraph and \endParagraph which would emit  and .
Plain text just gets copied through unchanged.


i once played with this (context speak):

\def\textbf#1{\type{}#1\type{}}

so, you define all the commands that you use (normally a subset of what 
a macro package provides, you just ignore what doesn't make sense)


then you define a very large page (say A1) that you use completely

then you typeset the document in verbatim (nil headers and footers)

the resulting pdf can then be converted to html with pdftotex or 
something like that


so, basically, you just typeset the html


So (finally) my question: is LuaMetaTEX what I'm looking for?


in this area there is nothing in luametatex that luatex can't do


Yes is the answer I'm hoping for. And any guidance would be much
appreciated.


as said, i don't know latex but context has an xml export option
 > No, but best starting point? I've never tried modifying TeX code

itself, but I am an experienced and sometimes competent programmer.
who has written a compiler parser and a high level code generator.


so, if your source uses a limited set of commands you can write a parser 
(in any language)



No and not a good idea to try?

Any other responses?
you can consider coding your documents in xml and convert them to latex 
and html .. neutral input so to say


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] If you really absolutely need more capacity, you can ask a wizard to enlarge me

2021-09-10 Thread Marcus Vinicius Mesquita via ntg-context
Hi,

After perusing the texmfcnf.lua file, I created a file with the same name
in my texmf-local folder, changing the settings for the node memory and
step size, but it did not affect the compilation of the original MWE
(without the enableexperiments switches), which still fails.  What am I
missing?

Below the contents of the file:

return {
   content = {
directives = {
   ["luametatex.nodesize"] = { size = 6000, step =  60 },
}
  }
}

Marcus Vinicius

On Fri, Sep 10, 2021 at 5:55 AM Marcus Vinicius Mesquita <
marcusvinicius.mesqu...@gmail.com> wrote:

> Hi, Hans
>
> The enableexperiments switches you pointed to solved the problem for the
> mwe I sent, but I'll take a look at the texmfcnf.lua configuration file to
> learn more.
>
> Thank you for your suggestions.
>
> Marcus Vinicius
>
>
> On Thu, Sep 9, 2021 at 5:12 AM Hans Hagen  wrote:
>
>> On 9/9/2021 12:52 AM, Marcus Vinicius Mesquita via ntg-context wrote:
>> > Dear list,
>> >
>> > In the MWE below, ConTeXt lmtx throws an error with the message in the
>> > title:
>> >
>> > \starttext
>> > \startluacode
>> >
>> > local upperlimit = 9
>> >
>> > context.starttabulate({ "|l|l|l|" })
>> > for i=1,upperlimit do
>> > context.NC()
>> > context("word 1")
>> > context.NC()
>> > context("word 2")
>> > context.NC()
>> > context("word 3")
>> > context.NC()
>> > context.AR()
>> > end
>> > context.stoptabulate()
>> >
>> > \stopluacode
>> > \stoptext
>> >
>> > But it compiles with no problems with MKIV.
>> >
>> > context version: 2021.09.06 11:47
>> >
>> > How to avoid this with lmtx?
>> In luatex there is also a max on configured memory usage but because in
>> luametatex we have larger nodes you hit limits earlier. Also, the memory
>> allocation in luametatex is somewhat different (larger nodes are
>> compensated by savings elsewhere so in the end mem usage for this run is
>> similar).
>>
>>  luatex  luametatex
>>
>> pages   21962196
>> pps/s  8  11
>> time 278 195
>> mem 1.1G1.1G
>>
>> now, luametatex reports
>>
>> tex memory  > bumping category 'node' succeeded, details:
>> all=40050 | ini=0 | max=5000 | mem=4450 | min=100 |
>> ptr=-843956 | set=5000 | stp=50 | top=4399
>>
>> you can bump the the max in the configuration file and also the step. As
>> you can see, luametatex runs quite a bit faster on this test but that is
>> due to other differences between the two engines.
>>
>> The reason why it does run on my machine is that i have this:
>>
>> \enableexperiments [tabulatesparseskips]
>> \enableexperiments [tabulateusesize]
>>
>> this makes tabulate a bit more efficient in terms of node usage so i
>> stay some 20% below the configured max .. you can try to run with this
>> option. Of course adding more text will also demand more mem but then
>> you can always bump the max (in a configuration file in texmf-local or
>> so; maybe some day i will add a --huge flag to the runner).
>>
>> 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
>> -
>>
>
>
> --
> Todas as coisas fatigam o corpo, salvo a música, que não fatiga nem o
> corpo nem seus membros, por ser descanso da alma, primavera do coração,
> distração do aflito, entretenimento do solitário, e viático do viajante.
>
> Kunnâsh al-Hâ'ik (Cancioneiro de al-Hâ'ik)
>


-- 
Todas as coisas fatigam o corpo, salvo a música, que não fatiga nem o corpo
nem seus membros, por ser descanso da alma, primavera do coração, distração
do aflito, entretenimento do solitário, e viático do viajante.

Kunnâsh al-Hâ'ik (Cancioneiro de al-Hâ'ik)
___
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 as LaTeX to XHTML/ePub transpiler?

2021-09-10 Thread Henning Hraban Ramm via ntg-context


> Am 10.09.2021 um 13:13 schrieb Hugh Fisher via ntg-context 
> :
> 
> So (finally) my question: is LuaMetaTEX what I'm looking for?

No.

LuaMetaTeX is ConTeXt-only.
You would need a LaTeX -> ConTeXt conversion, and there is none.

Did you try pandoc?

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
___


[NTG-context] LuaMetaTEX as LaTeX to XHTML/ePub transpiler?

2021-09-10 Thread Hugh Fisher via ntg-context
I have documents in LaTeX, and would like to generate XHTML (ePub)
output without going through an intermediate DVI or PDF step.
Markup to markup, translating or transpiling rather than typesetting.

My use case is that I have two tabletop gaming books, 60 - 80 pages
of text and diagrams, written for pdfLaTeX and now with XeLaTeX. I'm
very happy with LaTeX and the wonderful PDF output for print.

But now I also want to create ePub/XHTML as well as print versions.
So far I've tried tex4ebook and tex4ht and neither works for me.
Firstly, some of the LaTeX commands are not recognised or causing
errors.

And secondly, when I managed to get a small test section to work,
the generated XHTML/HTML is very large, full of tiny s. The
problem seems to be that tex4ht runs TeX which typesets everything
into DVI with every element carefully placed on a page, and then
tex4ht tries to reverse that back into HTML. All this extra HTML
will slow down / interfere with the ebook reader which is doing the
final page layout at runtime on a particular device.

How I would like it to work is directly from LaTeX to HTML without
any low level typesetting. If I have a LaTex source paragraph

This is some text with \textbf{some parts} in bold.

The TEX will copy the source text to the destination. If
there's a TeX command, here \textbf, it looks for a Lua function
with that name and invokes it with whatever argument text is present.
The Lua function emits , then recursively processes the argument
text, then emits . Similarly there would be an implied lookup
of \beginParagraph and \endParagraph which would emit  and .
Plain text just gets copied through unchanged.


So (finally) my question: is LuaMetaTEX what I'm looking for?

Yes is the answer I'm hoping for. And any guidance would be much
appreciated.

No, but best starting point? I've never tried modifying TeX code
itself, but I am an experienced and sometimes competent programmer.
who has written a compiler parser and a high level code generator.

No and not a good idea to try?

Any other responses?


-- 

cheers,
Hugh Fisher
___
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] If you really absolutely need more capacity, you can ask a wizard to enlarge me

2021-09-10 Thread Marcus Vinicius Mesquita via ntg-context
Hi, Hans

The enableexperiments switches you pointed to solved the problem for the
mwe I sent, but I'll take a look at the texmfcnf.lua configuration file to
learn more.

Thank you for your suggestions.

Marcus Vinicius


On Thu, Sep 9, 2021 at 5:12 AM Hans Hagen  wrote:

> On 9/9/2021 12:52 AM, Marcus Vinicius Mesquita via ntg-context wrote:
> > Dear list,
> >
> > In the MWE below, ConTeXt lmtx throws an error with the message in the
> > title:
> >
> > \starttext
> > \startluacode
> >
> > local upperlimit = 9
> >
> > context.starttabulate({ "|l|l|l|" })
> > for i=1,upperlimit do
> > context.NC()
> > context("word 1")
> > context.NC()
> > context("word 2")
> > context.NC()
> > context("word 3")
> > context.NC()
> > context.AR()
> > end
> > context.stoptabulate()
> >
> > \stopluacode
> > \stoptext
> >
> > But it compiles with no problems with MKIV.
> >
> > context version: 2021.09.06 11:47
> >
> > How to avoid this with lmtx?
> In luatex there is also a max on configured memory usage but because in
> luametatex we have larger nodes you hit limits earlier. Also, the memory
> allocation in luametatex is somewhat different (larger nodes are
> compensated by savings elsewhere so in the end mem usage for this run is
> similar).
>
>  luatex  luametatex
>
> pages   21962196
> pps/s  8  11
> time 278 195
> mem 1.1G1.1G
>
> now, luametatex reports
>
> tex memory  > bumping category 'node' succeeded, details:
> all=40050 | ini=0 | max=5000 | mem=4450 | min=100 |
> ptr=-843956 | set=5000 | stp=50 | top=4399
>
> you can bump the the max in the configuration file and also the step. As
> you can see, luametatex runs quite a bit faster on this test but that is
> due to other differences between the two engines.
>
> The reason why it does run on my machine is that i have this:
>
> \enableexperiments [tabulatesparseskips]
> \enableexperiments [tabulateusesize]
>
> this makes tabulate a bit more efficient in terms of node usage so i
> stay some 20% below the configured max .. you can try to run with this
> option. Of course adding more text will also demand more mem but then
> you can always bump the max (in a configuration file in texmf-local or
> so; maybe some day i will add a --huge flag to the runner).
>
> 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
> -
>


-- 
Todas as coisas fatigam o corpo, salvo a música, que não fatiga nem o corpo
nem seus membros, por ser descanso da alma, primavera do coração, distração
do aflito, entretenimento do solitário, e viático do viajante.

Kunnâsh al-Hâ'ik (Cancioneiro de al-Hâ'ik)
___
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] Default page layout

2021-09-10 Thread Hans Hagen via ntg-context

On 9/10/2021 7:26 AM, kauśika cittūr via ntg-context wrote:

Dear List,

I am using LMTX 2021.08.30 19:56.

I have the following example –
\starttext
\showlayout

\input knuth
\stoptext

which yields an output (attached here) with a "asymmetric" layout.

Am I doing something wrong? Or have I missed something? Please advise.
this is indeed the default, originating in initial usage decades ago: 
singlesided stapled prints and a wide outer margin for making notes


you can do

  \setuplayout[width=middle,height=middle]

as well as

  \setuppagenumbering[alternative=doublesided]

and more like that

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] Why do we install context in $HOME/bin?

2021-09-10 Thread juh via ntg-context
Dear all,

the installation documentation on the wiki says:

mkdir $HOME/bin/context
cd $HOME/bin/context
wget http://lmtx.pragma-ade.nl/install-lmtx/context-linux-64.zip
unzip context-linux-64.zip
sh install.sh

AFAIR we had $HOME/context before.

Is this intended? Is it because $HOME/bin is often in $PATH by default?

What is the advantage to do it like this?

juh
-- 
Autoren-Homepage: . http://literatur.hasecke.com
Satiren & Essays: . http://www.sudelbuch.de
Privater Blog:  http://www.hasecke.eu
Netzliteratur-Projekt:  http://www.generationenprojekt.de




signature.asc
Description: PGP signature
___
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
___