[NTG-context] LuaMetaTeX code
Dear Hans, I saw the C code of LuaMetaTeX and I saw a lot of gotos which is not good coding practice. These potions of code which have goto should be refactored. I am a C programmer, but I know very little of TeX. If you can point me towards where should I start for TeX(perhaps TeX Book or TeX for the Impatient), I can help with refactoring of code to make is more efficient/easier. -- Respect, Shiv Shankar Dayal ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror) archive : https://github.com/contextgarden/context wiki : https://wiki.contextgarden.net ___
Re: [NTG-context] LuaMetaTeX doesn't find files when symlinked
hi, Max The two suggestions don't work. I get a message, "Could not start the command..." each time. $ /usr/local/ConTeXt_Standalone/context-linux-64/bin/context --nofile results in " no such file or directory " which is, indeed, the case. NB: I have just let the installer program do its thing, I didn't manipulate the file structure before or after. Here is what the tree looks likepartially expanded On 2023-04-28 01:28, Max Chernoff via ntg-context wrote: > Hi Lynx, > >> Today, I created a separate "user command" within TeXstudio, and it >> points to "/usr/local/ConTeXt_Standalone/context-linux-64/bin/mtxrun" >> This command generates the same log output as the example at >> https://gitlab.com/islandoftex/images/texlive/-/issues/30. > > This is probably not the same issue, since the path "context-linux- > 64/bin/mtxrun" suggests that that isn't a symlink. (Well, it is a > symlink mtxrun => ./luametatex, but that email is about multi-level > symlinks like /usr/bin/context => /usr/local/texlive/2023/bin/x86_64- > linux/context => ./luametatex) > > To compile a document, you almost certainly want to use "context" > instead of "mtxrun". So try changing the user command to > "/usr/local/ConTeXt_Standalone/context-linux-64/bin/context". > > If that doesn't fix anything, run > > $ /usr/local/ConTeXt_Standalone/context-linux-64/bin/mtxrun --generate > $ /usr/local/ConTeXt_Standalone/context-linux-64/bin/context --make > > and try again. > > If it still doesn't work, then what do you get when you run > > $ /usr/local/ConTeXt_Standalone/context-linux-64/bin/context --nofile > > -- 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 > __ 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] LuaMetaTeX doesn't find files when symlinked
Hi Lynx, > Today, I created a separate "user command" within TeXstudio, and it > points to "/usr/local/ConTeXt_Standalone/context-linux-64/bin/mtxrun" > This command generates the same log output as the example at > https://gitlab.com/islandoftex/images/texlive/-/issues/30. This is probably not the same issue, since the path "context-linux- 64/bin/mtxrun" suggests that that isn't a symlink. (Well, it is a symlink mtxrun => ./luametatex, but that email is about multi-level symlinks like /usr/bin/context => /usr/local/texlive/2023/bin/x86_64- linux/context => ./luametatex) To compile a document, you almost certainly want to use "context" instead of "mtxrun". So try changing the user command to "/usr/local/ConTeXt_Standalone/context-linux-64/bin/context". If that doesn't fix anything, run $ /usr/local/ConTeXt_Standalone/context-linux-64/bin/mtxrun --generate $ /usr/local/ConTeXt_Standalone/context-linux-64/bin/context --make and try again. If it still doesn't work, then what do you get when you run $ /usr/local/ConTeXt_Standalone/context-linux-64/bin/context --nofile -- 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] LuaMetaTeX doesn't find files when symlinked
Max & Hans: I installed the stand-alone ConTeXt installation just today. It seems like I have my $PATH set correctly now. I have been editing ConTeXt and running it within TeXstudio. I had set up a "user command" to execute arara on LaTeX and ConTeXt files when I did NOT have the "standalone" version installed. It still works correctly. Today, I created a separate "user command" within TeXstudio, and it points to "/usr/local/ConTeXt_Standalone/context-linux-64/bin/mtxrun" This command generates the same log output as the example at https://gitlab.com/islandoftex/images/texlive/-/issues/30. If I understand this correctly, my OLD user command within TeXstudio is still finding the TeXlive version of ConTeXt, and that TeXlive version does have the symlinks mentioned by Max (and BTW, I did NOT create those, they are part of the default TeXlive installation process!). This is because my OLD "arara" command has the path to the March 13 version of TeXlive 2023 version (installed from ISO image, with some updates using tlmgr already installed). Lynx On 2023-04-27 21:00, Max Chernoff via ntg-context wrote: > Hi Hans, > > With the LuaMetaTeX-based ConTeXt wrapper, it's not generally possible > to run ConTeXt from a symlinked binary in another directory. This shows > up if someone makes symlinks in "/usr/bin" so that they can avoid adding > anything to their $PATH. > > If you make run a symlink to the LuaMetaTeX-based ConTeXt wrapper, it > looks for texmfcnf.lua relative to the symlink location, not the symlink > target. With the old LuaTeX/kpse-based wrapper, the script would look > for texmfcnf.lua relative to the symlink target. > > I know that my description above is terrible, so here's a demo: > > $ bin=$(mtxrun --expand-var TEXMFOS | head -1)/* > $ cd $(mktemp -d) > $ ln -s $bin/luatex $bin/luametatex $bin/context $bin/context.lua $bin/mtxrun > $bin/mtxrun.lua . > $ ./context --nofile > $ ./context --luatex --nofile > > Running the above commands used to work with the old LuaTeX/kpse-based > wrapper, but it doesn't work any more. I was able to ""fix"" this by > adding the lines > > if os.selfpath then > environment.ownbin = lfs.symlinktarget(os.selfpath .. io.fileseparator .. > os.selfname) > environment.ownpath = environment.ownbin:match("^.*" .. io.fileseparator) > else > environment.ownpath = kpse.new("luatex"):var_value("SELFAUTOLOC") > environment.ownbin = environment.ownpath .. io.fileseparator .. (arg[-2] or > arg[-1] or arg[0] or "luatex"):match("[^" .. io.fileseparator .. "]*$") > end > > to mtxrun.lua, right below the line > > package.loaded["data-ini"] = package.loaded["data-ini"] or true > > but this is obviously not a very good fix. > > There are some threads with more details at: > > https://tug.org/pipermail/tex-live/2023-March/049028.html > https://gitlab.com/islandoftex/images/texlive/-/issues/30 > > Those links only discuss TL, but I get the same issue if I make a symlink > to the standalone ConTeXt files. > > 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 > __ 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] LuaMetaTeX doesn't find files when symlinked
Hi Hans, With the LuaMetaTeX-based ConTeXt wrapper, it's not generally possible to run ConTeXt from a symlinked binary in another directory. This shows up if someone makes symlinks in "/usr/bin" so that they can avoid adding anything to their $PATH. If you make run a symlink to the LuaMetaTeX-based ConTeXt wrapper, it looks for texmfcnf.lua relative to the symlink location, not the symlink target. With the old LuaTeX/kpse-based wrapper, the script would look for texmfcnf.lua relative to the symlink target. I know that my description above is terrible, so here's a demo: $ bin=$(mtxrun --expand-var TEXMFOS | head -1)/* $ cd $(mktemp -d) $ ln -s $bin/luatex $bin/luametatex $bin/context $bin/context.lua $bin/mtxrun $bin/mtxrun.lua . $ ./context --nofile $ ./context --luatex --nofile Running the above commands used to work with the old LuaTeX/kpse-based wrapper, but it doesn't work any more. I was able to ""fix"" this by adding the lines if os.selfpath then environment.ownbin = lfs.symlinktarget(os.selfpath .. io.fileseparator .. os.selfname) environment.ownpath = environment.ownbin:match("^.*" .. io.fileseparator) else environment.ownpath = kpse.new("luatex"):var_value("SELFAUTOLOC") environment.ownbin = environment.ownpath .. io.fileseparator .. (arg[-2] or arg[-1] or arg[0] or "luatex"):match("[^" .. io.fileseparator .. "]*$") end to mtxrun.lua, right below the line package.loaded["data-ini"] = package.loaded["data-ini"] or true but this is obviously not a very good fix. There are some threads with more details at: https://tug.org/pipermail/tex-live/2023-March/049028.html https://gitlab.com/islandoftex/images/texlive/-/issues/30 Those links only discuss TL, but I get the same issue if I make a symlink to the standalone ConTeXt files. 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 ___
[NTG-context] LuaMetaTeX insert nodes patch
Hi Hans, I see that you've released the LuaMetaTeX source code, yay! I'm really impressed with how easy it is to build, and with how quickly it builds. Can you please apply this patch to the LuaMetaTeX source code: diff --git source/lua/lmtnodelib.c source/lua/lmtnodelib.c index ff98a70..1aade86 100644 --- source/lua/lmtnodelib.c +++ source/lua/lmtnodelib.c @@ -6557,10 +6557,7 @@ static int nodelib_common_getfield(lua_State *L, int direct, halfword n) break; case insert_node: if (lua_key_eq(s, index)) { -halfword index = lmt_tohalfword(L, 3); -if (tex_valid_insert_id(index)) { -insert_index(n) = index; -} +lua_pushinteger(L, insert_index(n)); } else if (lua_key_eq(s, cost)) { lua_pushinteger(L, insert_float_cost(n)); } else if (lua_key_eq(s, depth)) { This should fix the following minimal example: \startluacode local insert = node.new "insert" insert.index = 4 print(insert.index) \stopluacode 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] LuaMetaTEX as LaTeX to XHTML/ePub transpiler?
On 9/11/2021 1:49 PM, Hugh Fisher via ntg-context wrote: It may be unfair, but my impression is that TeX and typesetting / layout systems based on TeX can do more interesting things than say XML or Sphinx. Moving to a more "universal" markup format might broaden my options, but I don't want a lowest common denominator solution. As soon as documents become more complex and one wants control over th elayout all these alternative-to-tex formats in the end are not better than structured tex input. The simpler the input tagging, the more complex the escaping from that. So in the end it all depends on what kind of documents one has to deal with. And it's all about abstraction and structure: the more, the easier. 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?
On 9/11/2021 1:19 PM, Hugh Fisher wrote: On Fri, 10 Sept 2021 at 21:47, Hans Hagen wrote: [ munch ] in this area there is nothing in luametatex that luatex can't do As in my earlier reply, I'm thinking about replacing Adobe Illustrator with Metapost, and LuaMetaTEX seems to have better integration? indeed the interfaces in lmtx/luametatex are better than in mkiv/luatex and new things will only be done in lmtx anyway, context users most likely will move to lmtx (mkiv is not really frozen as it is also the test case for luatex, but there will be no fundamental new things added) so, if your source uses a limited set of commands you can write a parser (in any language) This parser would need to understand TeX source files and conventions such as % for comments, recognise commands starting with \ and with arguments/parameters bracketed by [] and {}, and look up command names that might be written in Lua, then call them. Isn't that what LuaMetaTEX does? No, I haven't looked at the actual source code yet, but starting with something that already does most of what you want is always quicker than writing from scratch. sure, any tex engine is better at parsing tex input the main differences between luatex and luametatex (much is disucussed in articles and manuals) is that luametatex has no backend built in and has some better interfaces in the front end; there are extension to the subsystems of the tex engine (fonts, language, math, inserts, marks, alignments, conditionals, macro definition, par handling) that are not in luatex (which is basically frozen in order to permit other macro packages to support it); lua helpers have been cleaned up and there are some more; luametatex has a smaller binary, is more efficient wrt memory and has better performance (if used well) than luatex 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?
Collating several suggestions into one: On Fri, 10 Sept 2021 at 21:26, Henning Hraban Ramm wrote: > Did you try pandoc? On Fri, 10 Sept 2021 at 21:47, Hans Hagen wrote: > you can consider coding your documents in xml and convert them to latex > and html .. neutral input so to say On Sat, 11 Sept 2021 at 01:07, T. Kurt Bond wrote: > You might also consider hevea (a LaTeX to HTML translator) and pandoc (which > bills itself as a universal document converter) and can convert into and out > of LaTeX. I use pandoc a lot, although not for LaTeX to HTML translation. > Pandoc can output EPUB, BTW. On Sat, 11 Sept 2021 at 01:34, wrote: > You may want to have a look at the lwarp package as an alternative to tex4ht. Thanks T. Kurt Bond and Denis Maier for the suggestions. A better alternative to tex4ht / tex4ebook would certainly be much easier for me, even if I'm still somewhat offended by the intermediate steps. As for xml or pandoc, I'd rather not because I want to keep print (PDF) as the primary output, and I don't want to lose what TeX/LaTeX can do that most markup languages can't. From what I know of pandoc, it is like Sphinx in that the way it generates PDF output is by translating pandoc into LaTeX/TeX, then running TeX! So instead of my current toolchain where I write the LaTeX I want directly, I'd be examining the pandoc output and if it isn't what I want, poking at pandoc in the hope of making things better. It may be unfair, but my impression is that TeX and typesetting / layout systems based on TeX can do more interesting things than say XML or Sphinx. Moving to a more "universal" markup format might broaden my options, but I don't want a lowest common denominator solution. -- 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] LuaMetaTEX as LaTeX to XHTML/ePub transpiler?
On Fri, 10 Sept 2021 at 21:47, Hans Hagen wrote: > [ munch ] > > in this area there is nothing in luametatex that luatex can't do As in my earlier reply, I'm thinking about replacing Adobe Illustrator with Metapost, and LuaMetaTEX seems to have better integration? > > so, if your source uses a limited set of commands you can write a parser > (in any language) This parser would need to understand TeX source files and conventions such as % for comments, recognise commands starting with \ and with arguments/parameters bracketed by [] and {}, and look up command names that might be written in Lua, then call them. Isn't that what LuaMetaTEX does? No, I haven't looked at the actual source code yet, but starting with something that already does most of what you want is always quicker than writing from scratch. -- 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] LuaMetaTEX as LaTeX to XHTML/ePub transpiler?
On Fri, 10 Sept 2021 at 21:26, Henning Hraban Ramm wrote: > > No. > > LuaMetaTeX is ConTeXt-only. > You would need a LaTeX -> ConTeXt conversion, and there is none. > Well I am thinking about switching to ConTeX/LuaMetaTEX anyway, because at the moment I draw vector art in the last non-subscription version of Adobe Illustrator, now approaching ten years old. I'll be trying out Metapost as a replacement. My markup isn't that complicated, so at worst I could translate by hand. But it occurs to me that if I get this markup to markup text translation going, I'd be able to write a LaTeX -> ConTeXt converter as a set of LaTeX named Lua functions. -- 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] LuaMetaTEX as LaTeX to XHTML/ePub transpiler?
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?
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] LuaMetaTEX as LaTeX to XHTML/ePub transpiler?
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] LuaMetaTEX as LaTeX to XHTML/ePub transpiler?
> 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?
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] LuaMetaTeX: \hbox dir vs. direction
On 12/17/2020 11:48 AM, Henri Menke wrote: Dear Hans, In LuaMetaTeX the directional syntax for boxes \hbox dir TLT {...} is no longer supported. Currently this is necessary for PGF because certain things like shading have to always be typeset in TLT. Is there a simple workaround? Just use \naturalhbox in mkiv and lmtx. 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] LuaMetaTeX: \hbox dir vs. direction
Dear Hans, In LuaMetaTeX the directional syntax for boxes \hbox dir TLT {...} is no longer supported. Currently this is necessary for PGF because certain things like shading have to always be typeset in TLT. Is there a simple workaround? Cheers, Henri See also: https://github.com/pgf-tikz/pgf/issues/958 ___ 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 dereferences NULL pointer
Hi, with the latest LuaMetaTeX upload (running on Linux x64), \normalunexpanded tries to write to address 0 and therefore segfaults: \normalunexpanded{abc} \starttext \stoptext ConTeXt fails with mtx-context | fatal error: return code: 139 The most interesting message from valgrind is ==53200== Invalid write of size 4 ==53200==at 0x17113D: ??? (in /home/marcel/lmtx-install/tex/texmf-linux-64/bin/luametatex) ==53200==by 0x151625: ??? (in /home/marcel/lmtx-install/tex/texmf-linux-64/bin/luametatex) ==53200==by 0x151E40: ??? (in /home/marcel/lmtx-install/tex/texmf-linux-64/bin/luametatex) ==53200==by 0x15E1A2: ??? (in /home/marcel/lmtx-install/tex/texmf-linux-64/bin/luametatex) ==53200==by 0x154AA1: ??? (in /home/marcel/lmtx-install/tex/texmf-linux-64/bin/luametatex) ==53200==by 0x122347: ??? (in /home/marcel/lmtx-install/tex/texmf-linux-64/bin/luametatex) ==53200==by 0x4A0C151: (below main) (in /usr/lib/libc-2.32.so) ==53200== Address 0x0 is not stack'd, malloc'd or (recently) free'd ==53200== ==53200== ==53200== Process terminating with default action of signal 11 (SIGSEGV): dumping core ==53200== Access not within mapped region at address 0x0 ==53200==at 0x17113D: ??? (in /home/marcel/lmtx-install/tex/texmf-linux-64/bin/luametatex) ==53200==by 0x151625: ??? (in /home/marcel/lmtx-install/tex/texmf-linux-64/bin/luametatex) ==53200==by 0x151E40: ??? (in /home/marcel/lmtx-install/tex/texmf-linux-64/bin/luametatex) ==53200==by 0x15E1A2: ??? (in /home/marcel/lmtx-install/tex/texmf-linux-64/bin/luametatex) ==53200==by 0x154AA1: ??? (in /home/marcel/lmtx-install/tex/texmf-linux-64/bin/luametatex) ==53200==by 0x122347: ??? (in /home/marcel/lmtx-install/tex/texmf-linux-64/bin/luametatex) ==53200==by 0x4A0C151: (below main) (in /usr/lib/libc-2.32.so) ==53200== If you believe this happened as a result of a stack ==53200== overflow in your program's main thread (unlikely but ==53200== possible), you can try to increase the size of the ==53200== main thread stack using the --main-stacksize= flag. ==53200== The main thread stack size used in this run was 8388608. Best regards, Marcel ___ 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
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
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
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
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
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 ___
Re: [NTG-context] luametatex segmentation fault
On Sat, 11 Jan 2020 22:14:21 +0100 Hans Hagen wrote: > On 1/11/2020 3:27 PM, Ramón Casares wrote: > > Hi list, > > > > I am new to LMTX, so before going any further > > I wanted to compile my plain TeX documents with LMTX. > > I am aware that LMTX is experimental, so perhaps > > what I am doing is impossible for the moment > > or worse, it is not even in your plans. > > In any case, this is how I got a segmentation fault > > when I was trying to make the plain format for LMTX > > in my Debian 10 Buster OS on linux-64 PC. > > > > > > $ cd ~/context/ > > $ ./install.sh > > $ ~/context/tex/texmf-linux-64/bin/luametatex --ini lmtx.tex > > does > > mtxrun --generate > context --make > > crash too? No, cont-en.fmt was generated, and I can compile ConTeXt documents. > > This is LuaMetaTeX, Version 2.03.7 (INITEX) > > Segmentation fault > > $ cd ~/context/tex/texmf-cache > > $ rm -R * > > $ cd ~/context/ > > $ ~/context/tex/texmf-linux-64/bin/mtxrun --generate > > $ ~/context/tex/texmf-linux-64/bin/context --make > > $ ~/context/tex/texmf-linux-64/bin/luametatex --ini lmtx.tex > > This is LuaMetaTeX, Version 2.03.7 (INITEX) > > Segmentation fault > > $ ~/context/tex/texmf-linux-64/bin/luametatex --ini plain.tex > > This is LuaMetaTeX, Version 2.03.7 (INITEX) > > Segmentation fault > > $ 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} > > > > > > Best regards, > > Ramón Casares > > ___ > > 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 > > ___ > > > > > -- > > - >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
On 1/11/2020 3:27 PM, Ramón Casares wrote: Hi list, I am new to LMTX, so before going any further I wanted to compile my plain TeX documents with LMTX. I am aware that LMTX is experimental, so perhaps what I am doing is impossible for the moment or worse, it is not even in your plans. In any case, this is how I got a segmentation fault when I was trying to make the plain format for LMTX in my Debian 10 Buster OS on linux-64 PC. $ cd ~/context/ $ ./install.sh $ ~/context/tex/texmf-linux-64/bin/luametatex --ini lmtx.tex does mtxrun --generate context --make crash too? This is LuaMetaTeX, Version 2.03.7 (INITEX) Segmentation fault $ cd ~/context/tex/texmf-cache $ rm -R * $ cd ~/context/ $ ~/context/tex/texmf-linux-64/bin/mtxrun --generate $ ~/context/tex/texmf-linux-64/bin/context --make $ ~/context/tex/texmf-linux-64/bin/luametatex --ini lmtx.tex This is LuaMetaTeX, Version 2.03.7 (INITEX) Segmentation fault $ ~/context/tex/texmf-linux-64/bin/luametatex --ini plain.tex This is LuaMetaTeX, Version 2.03.7 (INITEX) Segmentation fault $ 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} Best regards, Ramón Casares ___ 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 ___ -- - 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] luametatex segmentation fault
Hi list, I am new to LMTX, so before going any further I wanted to compile my plain TeX documents with LMTX. I am aware that LMTX is experimental, so perhaps what I am doing is impossible for the moment or worse, it is not even in your plans. In any case, this is how I got a segmentation fault when I was trying to make the plain format for LMTX in my Debian 10 Buster OS on linux-64 PC. $ cd ~/context/ $ ./install.sh $ ~/context/tex/texmf-linux-64/bin/luametatex --ini lmtx.tex This is LuaMetaTeX, Version 2.03.7 (INITEX) Segmentation fault $ cd ~/context/tex/texmf-cache $ rm -R * $ cd ~/context/ $ ~/context/tex/texmf-linux-64/bin/mtxrun --generate $ ~/context/tex/texmf-linux-64/bin/context --make $ ~/context/tex/texmf-linux-64/bin/luametatex --ini lmtx.tex This is LuaMetaTeX, Version 2.03.7 (INITEX) Segmentation fault $ ~/context/tex/texmf-linux-64/bin/luametatex --ini plain.tex This is LuaMetaTeX, Version 2.03.7 (INITEX) Segmentation fault $ 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} Best regards, Ramón Casares ___ 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 install as root in OpenBSD
Hello, When I installed luametatex as root under OpenBSD amd64 this morning, I first had "no permission" to launch context. So I checked my /usr/local/context file (where I unpacked the zip). The symlink context had the right permissions after install process (-rwxr-xr-x root wheel) but not luametatex. I changed permissions for luametatex to -rwxr-xr-x root wheel but maybe it should be introduced at install script level? Btw, context.lua and mtxrun.lua are both installed with permissions -rwxr--r-- root wheel Are those lua script only called by root? Should I change their permissions as well to -rwxr-xr-x? Greetings, Damien Thiriet ___ 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 and modules
I followed the steps andt worked! Thnk you Aditya for both your help and the packages ;) Le dim. 25 août 2019 à 12:35, Aditya Mahajan a écrit : > On Sat, 24 Aug 2019, kaddour kardio wrote: > > > Hi everybody, i have luametatex installed in /opt/luametatex, thanks to > the > > [aur] package maintainer , my question is how do i manage to get my > modules > > working? > > If you are using the arch linux, install the context-minimals-git package > from AUR and then reinstall luametatex from AUR. The install script from > luametatex will copy texmf-modules subdirectory from context-minimals-git > to luametatex. > > Aditya (who maintains both AUR packages) > > ___ > 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 > > ___ > -- Dr YAHYAOUI Mohamed Kaddour, cardiologue . ___ 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 and modules
On Sat, 24 Aug 2019, kaddour kardio wrote: Hi everybody, i have luametatex installed in /opt/luametatex, thanks to the [aur] package maintainer , my question is how do i manage to get my modules working? If you are using the arch linux, install the context-minimals-git package from AUR and then reinstall luametatex from AUR. The install script from luametatex will copy texmf-modules subdirectory from context-minimals-git to luametatex. Aditya (who maintains both AUR packages) ___ 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 and modules
Hi everybody, i have luametatex installed in /opt/luametatex, thanks to the [aur] package maintainer , my question is how do i manage to get my modules working? Thank you in advance. -- Dr YAHYAOUI Mohamed Kaddour, cardiologue . ___ 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 : command not found
You only have to write export PATH = $HOME/data/context/tex/texmf-linux-64/bin:$ PATH Le lun. 8 avr. 2019 à 10:04, Fabrice Couvreur a écrit : > Hi Joseph, > Yes I did it as with standalone context > export PATH = $HOME/home/viserion/context/tex/texmf-linux-64/bin:$ PATH > but writing this time > > export PATH = $HOME/home/viserion/data/context/tex/texmf-linux-64/bin:$ > PATH > Thanks > Fabrice > > Le dim. 7 avr. 2019 à 23:07, Joseph Canedo a > écrit : > >> Hi Fabrice, >> >> >> >> Have you added /home/viserion/data/context/tex/texmf-linux-64/bin to >> your PATH environment variable? >> >> >> >> Joseph >> >> >> >> *De : *Fabrice Couvreur >> *Envoyé le :*dimanche 7 avril 2019 13:13 >> *À : *mailing list for ConTeXt users >> *Objet :*[NTG-context] luametatex : command not found >> >> >> >> Hi, >> My system is unix and my platform is linux-64. I installed ConTeXt LMTX >> as described, namely in my home and in the directory /data /context/ >> I then tried to compile but without success a file : >> >> >> >> [viserion@archlinux ~]$ >> /home/viserion/data/context/tex/texmf-linux-64/bin/context area.tex >> mtx-context | run 1: luametatex >> --fmt="/home/viserion/data/context/tex/texmf-cache/luatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/formats/luametatex/cont-en" >> --jobname="area" >> --lua="/home/viserion/data/context/tex/texmf-cache/luatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/formats/luametatex/cont-en.lui" >> --c:currentrun=1 --c:fulljobname="./area.tex" --c:input="./area.tex" >> --c:kindofrun=1 --c:maxnofruns=9 >> --c:texmfbinpath="/home/viserion/data/context/tex/texmf-linux-64/bin" >> "cont-yes.mkiv" >> >> sh: luametatex : commande introuvable >> mtx-context | fatal error: return code: 32512 >> [viserion@archlinux ~]$ >> >> Thanks >> >> Fabrice >> >> >> >> ___ >> 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 : command not found
Hi Joseph, Yes I did it as with standalone context export PATH = $HOME/home/viserion/context/tex/texmf-linux-64/bin:$ PATH but writing this time export PATH = $HOME/home/viserion/data/context/tex/texmf-linux-64/bin:$ PATH Thanks Fabrice Le dim. 7 avr. 2019 à 23:07, Joseph Canedo a écrit : > Hi Fabrice, > > > > Have you added /home/viserion/data/context/tex/texmf-linux-64/bin to your > PATH environment variable? > > > > Joseph > > > > *De : *Fabrice Couvreur > *Envoyé le :*dimanche 7 avril 2019 13:13 > *À : *mailing list for ConTeXt users > *Objet :*[NTG-context] luametatex : command not found > > > > Hi, > My system is unix and my platform is linux-64. I installed ConTeXt LMTX as > described, namely in my home and in the directory /data /context/ > I then tried to compile but without success a file : > > > > [viserion@archlinux ~]$ > /home/viserion/data/context/tex/texmf-linux-64/bin/context area.tex > mtx-context | run 1: luametatex > --fmt="/home/viserion/data/context/tex/texmf-cache/luatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/formats/luametatex/cont-en" > --jobname="area" > --lua="/home/viserion/data/context/tex/texmf-cache/luatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/formats/luametatex/cont-en.lui" > --c:currentrun=1 --c:fulljobname="./area.tex" --c:input="./area.tex" > --c:kindofrun=1 --c:maxnofruns=9 > --c:texmfbinpath="/home/viserion/data/context/tex/texmf-linux-64/bin" > "cont-yes.mkiv" > > sh: luametatex : commande introuvable > mtx-context | fatal error: return code: 32512 > [viserion@archlinux ~]$ > > Thanks > > Fabrice > > > > ___ > 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 : command not found
Hi Fabrice, Have you added /home/viserion/data/context/tex/texmf-linux-64/bin to your PATH environment variable? Joseph De : Fabrice Couvreur Envoyé le :dimanche 7 avril 2019 13:13 À : mailing list for ConTeXt users Objet :[NTG-context] luametatex : command not found Hi, My system is unix and my platform is linux-64. I installed ConTeXt LMTX as described, namely in my home and in the directory /data /context/ I then tried to compile but without success a file : [viserion@archlinux ~]$ /home/viserion/data/context/tex/texmf-linux-64/bin/context area.tex mtx-context | run 1: luametatex --fmt="/home/viserion/data/context/tex/texmf-cache/luatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/formats/luametatex/cont-en" --jobname="area" --lua="/home/viserion/data/context/tex/texmf-cache/luatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/formats/luametatex/cont-en.lui" --c:currentrun=1 --c:fulljobname="./area.tex" --c:input="./area.tex" --c:kindofrun=1 --c:maxnofruns=9 --c:texmfbinpath="/home/viserion/data/context/tex/texmf-linux-64/bin" "cont-yes.mkiv" sh: luametatex : commande introuvable mtx-context | fatal error: return code: 32512 [viserion@archlinux ~]$ Thanks Fabrice ___ 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 : command not found
Hi, My system is unix and my platform is linux-64. I installed ConTeXt LMTX as described, namely in my home and in the directory /data /context/ I then tried to compile but without success a file : [viserion@archlinux ~]$ /home/viserion/data/context/tex/texmf-linux-64/bin/context area.tex mtx-context | run 1: luametatex --fmt="/home/viserion/data/context/tex/texmf-cache/luatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/formats/luametatex/cont-en" --jobname="area" --lua="/home/viserion/data/context/tex/texmf-cache/luatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/formats/luametatex/cont-en.lui" --c:currentrun=1 --c:fulljobname="./area.tex" --c:input="./area.tex" --c:kindofrun=1 --c:maxnofruns=9 --c:texmfbinpath="/home/viserion/data/context/tex/texmf-linux-64/bin" "cont-yes.mkiv" sh: luametatex : commande introuvable mtx-context | fatal error: return code: 32512 [viserion@archlinux ~]$ Thanks Fabrice ___ 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
On 4/3/2019 12:06 PM, Dmitry Starostin wrote: To sum up problems of setting up after installing context-lmtx (context mkiv on my machine is gone, so these are quite pressing questions): how gone ... all can live alongside Some were addressed, but I cannot resolve them 1. luametatex: works as intended from within TexShop, but 'command not found' from terminal $CONTEXTHOME/tex/texmf-osx-64/bin/even after chmod 755. What to source? is there a luametatex mtxrun -> luametatex context -> luametatex 2. ./luametatex 'no format given' indeed, when called directly without any argument 3. there used to be context --run, now there isn't. there should be a binary or link to binary 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] Luametatex
To sum up problems of setting up after installing context-lmtx (context mkiv on my machine is gone, so these are quite pressing questions): Some were addressed, but I cannot resolve them 1. luametatex: works as intended from within TexShop, but 'command not found' from terminal $CONTEXTHOME/tex/texmf-osx-64/bin/even after chmod 755. What to source? 2. ./luametatex 'no format given' 3. there used to be context --run, now there isn't. ___ 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 ___