[NTG-context] How to rotate the caption of a table...
Hello everybody, in my project is a table which does not fit the width of the page. Hence I need to rotate it. Rotating the table is ok, but the caption is not rotated. My question is how can I instruct ConTeXt to rotate the caption and place it on the right side? My attempt: test.pdf Description: Adobe PDF document \setupcaption[table][location=right,orientation=90] \startplacetable [location=middle, reference=tab:papierformaten, title={Standaardformaten}] \rotate[rotation=90]{\externalfigure[Table1][type=buffer]} \stopplacetable Thank you for your support Willi___ 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] registered function call [1160]:...live/2023/texmf-dist/tex/context/base/mkiv/l-sandbox.lua:87: cannot open /.: Permission denied - Alpine Linux
On 3/25/2023 8:55 PM, Carlos via ntg-context wrote: Hello list: This is under a fresh TeXLive installation. Sort as to put aside any texlive prepackaged issues. And the followign lines is the output of the error I've been having with the call of context on a recent texlive installation by both mtxrun --generate and luatools --generate right after. there i no need to use luatools (it's something old from the early days) what does mtxrun --generate --verbose report (whre does it fail) 57 \starttext 58 59 \usetypescriptfile[type-lucida] 60 \usetypescript[Lucida][texnansi] 61 >> \setupbodyfont[MyLucida, 10pt] 62 63 \input zapf 64 65 \input tufte fwiw, lucida type one makes no sense any more because the opentype version is way better (and in the updated math setup in lmtx we didn't even look at it) Is LuaLaTeX behaving the same way? Answer: no. no surprise because it doesn't use the same setup what cache path does mtxrun --variables report Hans - Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl - ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
[NTG-context] registered function call [1160]:...live/2023/texmf-dist/tex/context/base/mkiv/l-sandbox.lua:87: cannot open /.: Permission denied - Alpine Linux
Hello list: This is under a fresh TeXLive installation. Sort as to put aside any texlive prepackaged issues. And the followign lines is the output of the error I've been having with the call of context on a recent texlive installation by both mtxrun --generate and luatools --generate right after. mtxrun --script cache --erase has also been called out to no avail registered function call [1160]: ...live/2023/texmf-dist/tex/context/base/mkiv/l-sandbox.lua:87: cannot open /.: Permission denied stack traceback: [C]: in upvalue 'func' ...live/2023/texmf-dist/tex/context/base/mkiv/l-sandbox.lua:87: in function 'lfs.dir' .../texlive/2023/texmf-dist/tex/context/base/mkiv/l-dir.lua:139: in upvalue 'glob_pattern_table' .../texlive/2023/texmf-dist/tex/context/base/mkiv/l-dir.lua:163: in upvalue 'glob_pattern_table' .../texlive/2023/texmf-dist/tex/context/base/mkiv/l-dir.lua:163: in upvalue 'glob_pattern_table' .../texlive/2023/texmf-dist/tex/context/base/mkiv/l-dir.lua:163: in upvalue 'glob_pattern_table' .../texlive/2023/texmf-dist/tex/context/base/mkiv/l-dir.lua:163: in upvalue 'glob_pattern_table' .../texlive/2023/texmf-dist/tex/context/base/mkiv/l-dir.lua:180: in function <.../texlive/2023/texmf-dist/tex/context/base/mkiv/l-dir.lua:169> (...tail calls...) ...xlive/2023/texmf-dist/tex/context/base/mkiv/font-syn.lua:1030: in upvalue 'walk_tree' ...xlive/2023/texmf-dist/tex/context/base/mkiv/font-syn.lua:1190: in local 'method' ...xlive/2023/texmf-dist/tex/context/base/mkiv/font-syn.lua:1152: in local 'traverse' ...xlive/2023/texmf-dist/tex/context/base/mkiv/font-syn.lua:1200: in upvalue 'analyzefiles' ...xlive/2023/texmf-dist/tex/context/base/mkiv/font-syn.lua:1286: in field 'identify' ...xlive/2023/texmf-dist/tex/context/base/mkiv/font-syn.lua:1311: in field 'load' ...xlive/2023/texmf-dist/tex/context/base/mkiv/font-syn.lua:1322: in field 'load' ...xlive/2023/texmf-dist/tex/context/base/mkiv/font-syn.lua:1588: in field 'getfilename' ...xlive/2023/texmf-dist/tex/context/base/mkxl/font-otl.lmt:835: in function <...xlive/2023/texmf-dist/tex/context/base/mkxl/font-otl.lmt:828> (...tail calls...) ...xlive/2023/texmf-dist/tex/context/base/mkxl/font-def.lmt:378: in function <...xlive/2023/texmf-dist/tex/context/base/mkxl/font-def.lmt:366> (...tail calls...) ...xlive/2023/texmf-dist/tex/context/base/mkxl/font-def.lmt:485: in field 'read' ...xlive/2023/texmf-dist/tex/context/base/mkxl/font-ctx.lmt:1377: in function <...xlive/2023/texmf-dist/tex/context/base/mkxl/font-ctx.lmt:1234> (...tail calls...) 51 ;definetypeface[MyLucida][rm][serif][lucida][default][encoding=texnansi] 52 \definetypeface[MyLucida][ss][sans][lucida][default][encoding=texnansi] 53 \definetypeface[MyLucida][tt][mono][lucida][default][encoding=texnansi] 54 \stoptypescript 55 56 57 \starttext 58 59 \usetypescriptfile[type-lucida] 60 \usetypescript[Lucida][texnansi] 61 >> \setupbodyfont[MyLucida, 10pt] 62 63 \input zapf 64 65 \input tufte 66 67 68 \stoptext 69 mtx-context | fatal error: return code: 1 it doesn't matter either whatever the typescript name goes and whether is type-lucida from texnansi-lucida-map file as it has been previously advised to change the name from . makes no difference. Is LuaLaTeX behaving the same way? Answer: no. The permission denied message happened first with folders whose permeissions were not owned by the user, but the root, so I moved the files out of harm's way to another folder . Anothr folder, NOT a subfolder. Then the problem persisted to read folders and even subfolders (directories, subdirectories) with cache filenames and headers that follow So let's not get to apprehensive, It's understandable that say, not reasonable, but understandable maybe? that mtxrun or lua for that matter will stop right before. So the folders were moved right after. Gone out of the binaries. But what I can't understand is why would it try to access cache folders unrelated with anything TeX or header folders for that matter This is perhaps more serious than I thought at first. And Let's not blame the TeXLive pre-packaged running under Alpine Linux. To put it in laymans' terms and If anything is clear to me, is that Alpine ir not letting Lua running beserk on the system and its folders, owned by whatever/whoever else, and with pesmissions set elsewhere. It's out of the question. Or it rather be. This is all writh a fresh TeX Live Installation. I mentioned the problem that may arise by questioning the Alpine installation because there were some problems with some binaries from the prepackaged TeX Live put out by Alpine devs. But this is not prepackaged. Nope. -- &
Re: [NTG-context] building from source
Hans Hagen via ntg-context writes: > On 3/21/2023 12:14 PM, Rainer J.H. Brandt via ntg-context wrote: > > Dear Context developers, > > > > I want to build Context MkXL from source and use that. I went to the [...] > First define 'build from source'. The lmtx (mkxl) installation can be Building from source is the production of executables from source code files, using the appropriate tools for the chosen type of source code, e.g. compilers, linkers, and other build tools like GNU autotools, make, cmake, or other build mechanisms. With regard to complete software packages, the process usually also takes care of moving other support files to where they are expected at run-time. (Coming from LaTeX, I would expect e.g. formats, fonts, style files etc.) > installed using an installer. If there is not one for the platform one > uses, then one can download the cont-lmt zip and build the binary in > /source/luametatex usign the build.sh script in there. Thanks. That's the first step of what I was looking for. Using "bash build.sh", the build succeeded. The output gives hints about what to put where. I'll see if I can turn it into something that resembles what you offer via the installer packages. Thanks, Rainer ___ 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] problem with LMTX on Linux: need to execute install.sh twice
Hi, When I reinstall LMTX on my linux 64 system, the first executing install.sh gives the error message: tex error > tex error on line 34 in file /home/garfileo/public/context/tex/texmf-context/tex/context/base/mkiv/type-set.mkiv: ! I can't find file `type-imp-latinmodern.mkiv'. so I have to execute install.sh again to finish the installation. -- Best regards, Li Yanrui ___ 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] cannot compile with MkIV
Dear list, I have the following sample: \starttext \null \stoptext Trying to compile it with "context --luatex", I get the error message copied bellow. Could anyone confirm that the format file for MkIV (LuaTeX) cannot be generated with current latest (from today [2023.03.06 14:48])? Many thanks for your help, Pablo lua error > lua error on line 21 in file ~/context/tex/texmf-context/tex/context/base/mkiv/back-pdf.mkiv: ...ext/tex/texmf-context/tex/context/base/mkiv/lpdf-nod.lua:72: creating a whatsit requires the subtype number as a second argument stack traceback: [C]: in local 'new_node' ...ext/tex/texmf-context/tex/context/base/mkiv/lpdf-nod.lua:72: in local 'code' ...ext/tex/texmf-context/tex/context/base/mkiv/util-lua.lua:96: in field 'loadedluacode' ...ext/tex/texmf-context/tex/context/base/mkiv/luat-env.lua:108: in field 'luafilechunk' ...ext/tex/texmf-context/tex/context/base/mkiv/luat-cod.lua:73: in function 'lua.registercode' [ctxlua]:1: in main chunk 11 %C therefore copyrighted by \PRAGMA. See mreadme.pdf for 12 %C details. 13 14 %D The less there is here, the better. After a decade it is time to remove the \type 15 %D {\pdf*} ones completely. For the moment I keep them commented but even that will 16 %D go away. 17 18 \writestatus{loading}{ConTeXt Backend Macros / PDF} 19 20 \registerctxluafile{lpdf-ini}{optimize} 21 >> \registerctxluafile{lpdf-nod}{} 22 \registerctxluafile{lpdf-eng}{optimize} 23 \registerctxluafile{lpdf-col}{} 24 \registerctxluafile{lpdf-vfc}{} 25 \registerctxluafile{lpdf-xmp}{} 26 \registerctxluafile{lpdf-ano}{} 27 \registerctxluafile{lpdf-res}{} 28 \registerctxluafile{lpdf-mis}{} 29 \registerctxluafile{lpdf-ren}{} 30 \registerctxluafile{lpdf-grp}{} 31 \registerctxluafile{lpdf-wid}{} resolvers | formats | resolvers | formats | binary path : ~/context/tex/texmf-linux-64/bin resolvers | formats | format path : ~/context/tex/texmf-cache/luatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/formats/luatex resolvers | formats | luatex engine: luatex resolvers | formats | lua startup file : ~/context/tex/texmf-context/tex/context/base/mkiv/luat-cod.lua resolvers | formats | context file : ~/context/tex/texmf-context/tex/context/base/mkiv/cont-en.mkiv resolvers | formats | run time : 1.497 seconds resolvers | formats | return value : error resolvers | formats | mtx-context | error, no format found with name: cont-en, aborting ___ 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] Problem with LMTX on macOS: no format file given, quitting
Hello list, I am writing to you about a problem with ConTeXt LMTX and TeXShop 5.11 on macOS 12.6.3 (MacBook Air M2). Yesterday I installed LMTX on my computer following the instructions here: https://wiki.contextgarden.net/Installing_ConTeXt_LMTX_on_MacOS The LMTX tree is correctly installed in the directory I've chosen: charlie@Air-di-Tommaso ~ % which luametatex /Users/charlie/Documents/ConTeXt/ConTeXt-LMTX/tex/texmf-osx-arm64/bin/luametatex charlie@Air-di-Tommaso ~ % type luametatex luametatex is /Users/charlie/Documents/ConTeXt/ConTeXt-LMTX/tex/texmf-osx-arm64/bin/luametatex charlie@Air-di-Tommaso ~ % luametatex --version This is LuaMetaTeX, Version 2.10.06 Execute 'luametatex --credits' for credits and version details. There is NO warranty. Redistribution of this software is covered by the terms of the GNU General Public License, version 2 or (at your option) any later version. For more information about these matters, see the file named COPYING and the LuaMetaTeX source. Functionality : level 20230126 Support : cont...@ntg.nl Copyright : The Lua(Meta)TeX Team(s) (2005-2022+) The LuaMetaTeX project is related to ConTeXt development. This macro package tightly integrates TeX and MetaPost in close cooperation with Lua. Updates will happen in sync with ConTeXt and when needed. Don't be fooled by unchanged dates: long-term stability is the objective. However, I also get this: charlie@Air-di-Tommaso ~ % luametatex startup error : no format file given, quitting Also, I created the TeXShop engine as indicated on the page (I've done it before with no problems). However, now when I run LMTX from editor to compose a source, the source is compiled with MkIV Standalone, which I have in another folder ( /Users/charlie/Documents/ConTeXt/ConTeXt-MkIV). LMTX doesn't even work from a terminal, of course. The curious thing is that even by launching the ConTeXt present in TeX Live, what really works is always MkIV Standalone. Do you have any idea where I might have gone wrong? Thank you very much Tommaso ___ 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] Best way to access casul fonts
this to the wiki as well? I feel like what I'm doing is non-standard. I'm also repeating a lot of what's in the Lucida typescript file that comes with the distribution. There must be some easy way to monkey patch the existing type script file. Mattias --- Original Message --- On Monday, January 30th, 2023 at 1:20 PM, Pablo Rodriguez via ntg-context wrote: > > > > On 1/29/23 19:07, Mattias Märka via ntg-context wrote: > > > Hi > > > > This is probably the most reasonable solution. > > > Hi Mattias, > > would you be so kind to update > https://wiki.contextgarden.net/Use_the_fonts_you_want to include this? > > Many thanks for your help, > > Pablo > > ___ > If your question is of interest to others as well, please add an entry to the > Wiki! > > maillist : ntg-context@ntg.nl / > https://www.ntg.nl/mailman/listinfo/ntg-context > webpage : https://www.pragma-ade.nl / http://context.aanhet.net > archive : https://bitbucket.org/phg/context-mirror/commits/ > wiki : https://contextgarden.net > ___ ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
[NTG-context] Best way to access casul fonts
Hi, I'm trying to access Lucida Casual. I see in type-imp-lucida-typeone.mkiv that there is, indeed, a typescript for it, but I can't figure out how to switch to it. That is, I want to make some text be Lucida Casual. I gather from a previous thread that I should be using \definefontstyle, but I don't know how to go about this. Currently I'm just defining a new typescript and making Lucida Casual a synonym for Serif and then using \switchtobodyfont --- but this feel silly. I searched the wiki and skimmed the reference manual, but to no avail. Perhaps I don't know what I should be looking for. Any help would be appreciated. What's the easiest way to access a casual font? What's the cleanest way? Thanks, Mattias Märka ___ 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] Change in \vec behavior
On Sun, Jan 22, 2023 at 9:21 AM Jean-Philippe Rey via ntg-context wrote: > > Hello, > > Does anyone have some insight on this issue? > > Thanks, > > > Le 18 déc. 2022 à 19:37, Jean-Philippe Rey via ntg-context > a écrit : > > Hello, > > As I usually do at the end of each year, I upgraded my ConTeXt installation. > I noticed a change in \vec behavior which doesn't extend the arrow anymore. > Here is my example: > > \starttext > Engine: \texenginename\ \texengineversion > > \ConTeXt: \contextversionnumber > > \type{$\vec{AB}$} : $\vec{AB}$ > \stoptext > > The result with the latest ConTeXt version: > > > > and with the version from a year ago: > > > > I am aware that I could use \overrightarrow, but I prefer the shape and > position of the \vec arrow, especially with single letters. > > > What is the rationale for the change in \vec? Is there a way to get the > previous behavior back? > > Thanks, There was a similar thread the other day. \definemathtopaccent[top:stretch][vec]["20D7] seems to work as a temporary solution. Does it give what you expect? I think there will be an update in the next few days. /Mikael ___ 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] Change in \vec behavior
Hello,Does anyone have some insight on this issue?Thanks,Le 18 déc. 2022 à 19:37, Jean-Philippe Rey via ntg-context <ntg-context@ntg.nl> a écrit :Hello,As I usually do at the end of each year, I upgraded my ConTeXt installation. I noticed a change in \vec behavior which doesn't extend the arrow anymore. Here is my example:\starttextEngine: \texenginename\ \texengineversion\ConTeXt: \contextversionnumber\type{$\vec{AB}$} : $\vec{AB}$\stoptextThe result with the latest ConTeXt version: GraphiqueCollé-1.pdf Description: Adobe PDF document and with the version from a year ago: GraphiqueCollé-2.pdf Description: Adobe PDF document I am aware that I could use \overrightarrow, but I prefer the shape and position of the \vec arrow, especially with single letters. GraphiqueCollé-3.pdf Description: Adobe PDF document GraphiqueCollé-4.pdf Description: Adobe PDF document What is the rationale for the change in \vec? Is there a way to get the previous behavior back?Thanks, -- Jean-Philippe Reyjean-philippe@centralesupelec.fr91192 Gif-sur-Yvette Cedex - FranceEmpreinte PGP : 807A 5B2C 69E4 D4B5 783A 428A 1B5E E83E 261B BF51 ___ 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] ConTeXt features in pandoc 3
> > > Hi Albert, Fantastic news. Thanks to Pandoc and completions in editors I can create great looking documents at the speed of light... Since you've asked for ideas or suggestions here are a few: ** Create a Pandoc markdown directive that woulc allow for document includes - in the style and spirit of Context components. ** Add the ability to place a pandoc.yaml file in the folder so it can be picked by Pandoc to get options for this folder and contained documents, ** Use LUA to run something like pipes inside Pandoc itself - LUA could be the format for the 'pandoc' file I've mentioned, ** Something Context and accessibility related: Screen readers allow to navigate quickly by element type, for example: heading / list / form elements. Headings are very useful to quickly move around the document but htere is one corner case. Context splits the heading number and heading itself into separate parts. When doing this quick navigation the user hears for example: 1.2 or 3.4 and need to reach for the arrow keys to scroll to the next logical line to read the very heading. I don't know if it is possible at the tagging level to combine the number and the heading tible togehter wiht a space in between, os htey are not stringed together in an unnatural way. Taggs are a bit like a parallel universe. Please drop a line if you would like to digg further... All the best, Pawel ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
[NTG-context] ConTeXt features in pandoc 3
Hello, a new version of pandoc, the universal document converter, was released two days ago; pandoc 3 comes with new ConTeXt-related features on which we've spend a good bit of time: - *Syntax highlighting*: Pandoc makes use of the syntax definitions and styles created by the KDE project to highlight source code. This already worked with HTML, LaTeX, and formats like docx, and is now also supported for ConTeXt. - *Inline code*: older versions of pandoc had some weird behavior wrt inline code in ConTeXt, switching between `\type` and `\mono`, which made it difficult to customize the output. This has been fixed. - *Tagging-focused output*: Calling pandoc with `--to=context+tagging` creates markup that is geared towards the creation of tagged PDFs. This can be combined with `-V pdfa=3a` to produce accessible PDFs from various input sources. - *Unlisted/unnumbered headings*: Headings with class "unnumbered" are not numbered; those with class "unlisted" get omitted from the ToC. - *Figures*: We have improved support for figures considerably, and now also support subfigures. This is currently most noticeable when converting from HTML to ConTeXt. Downloads and full changelog: https://github.com/jgm/pandoc/releases/tag/3.0 I'm grateful for any and all feedback, including tips on how to improve pandoc further. Cheers, Albert -- Albert Krewinkel GPG: 8eed e3e2 e8c5 6f18 81fe e836 388d c0b2 1f63 1124 ___ 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] question about multimedia renderings
On 1/16/23 02:42, Michal Vlasák via ntg-context wrote: > [...] > I would think that something like the attached could work. But in some > cases it fails on the TeX side with something I am not sure about. I > probably overlooked something. Anyways the idea is to just use the > Start/StopRendering actions with the correct label. Hi Michal, many thanks for your reply. Your code fixes the "auto" option. At least with the following sample: \setupinteraction[state=start] \unexpanded\def\IncludeVideo[#1] {\definerenderingwindow[#1] [width=\textwidth, height=\textwidth, framecolor=red] \userendering[#1][video/mp4][#1] [embed=yes, auto] \placerenderingwindow[#1][#1]} \starttext \null\page \startTEXpage[offset=1em, pagestate=start] \IncludeVideo[video-1.mp4] \stopTEXpage \null\page \startTEXpage[offset=1em, pagestate=start] \IncludeVideo[video-2.mp4] \stopTEXpage \null\page \stoptext I attach a diff and complete file with the the fix from today and the addition of controls, volume, repeat and opacity you sent me some days ago (already sent in https://mailman.ntg.nl/pipermail/dev-context/2022/003957.html). Just in case Hans may review your code and merge into ConTeXt. Many thanks for your help, Pablo--- /home/ousia/Desktop/lpdf-wid.lmt +++ /home/ousia/mkxl/lpdf-wid.lmt @@ -64,6 +64,10 @@ local v_compress = variables.compress local v_list = variables.list local v_title = variables.title +local v_controls = variables.controls +local v_volume = variables.volume +local v_repeat = variables["repeat"] +local v_opacity= variables.opacity local lpdf = lpdf @@ -615,7 +619,7 @@ -- sound is different, no window (or zero) so we need to collect them and -- force them if not set -local ms, mu, mf = { }, { }, { } +local mu, mf = { }, { }, { } local function delayed(label) local reserved = mu[label] @@ -623,7 +627,7 @@ reserved = pdfreserveobject() mu[label] = reserved end -return pdfreference(reserved) +return reserved end local function checkedreference(ref) @@ -639,16 +643,16 @@ local openpage = specification.openpage local closepage = specification.closepage local option= settings_to_hash(specification.option) -if option[v_auto] then -if not openpage or openpage == "" then -openpage = variables.StartCurrentRendering -end -if not closepage or closepage == "" then -closepage = variables.StopCurrentRendering -end -end openpage = checkedreference(openpage) closepage = checkedreference(closepage) +if option[v_auto] then +if not openpage then +openpage = executers.startrendering(label) +end +if not closepage then +closepage = executers.stoprendering(label) +end +end if openpage or closepage then actions = pdfdictionary { PO = openpage, @@ -656,13 +660,8 @@ } end local page = tonumber(specification.page) or texgetcount("realpageno") -- todo -local r = mu[label] or pdfreserveobject() -- reserve, child refers to parent -local a = pdfdictionary { -S = pdfconstant("Rendition"), -R = mf[label], -OP = 0, -AN = pdfreference(r), -} +local r = delayed(label) -- reserve, child refers to parent +local a = executers.startrendering(label) local bs, bc = pdfborder() local d = pdfdictionary { Subtype = pdfconstant("Screen"), @@ -676,7 +675,6 @@ local width = specification.width or 0 local height = specification.height or 0 context(nodeinjections.annotation(width,height,0,d(),r)) -- save ref -return pdfreference(r) end -- some dictionaries can have a MH (must honor) or BE (best effort) capsule @@ -713,7 +711,7 @@ -- B = start, -- } -- } -local parameters = pdfdictionary { +local permissions = pdfdictionary { Type = pdfconstant("MediaPermissions"), TF = pdfstring("TEMPALWAYS"), -- TEMPNEVER TEMPEXTRACT TEMPACCESS TEMPALWAYS / needed for acrobat/wmp } @@ -733,6 +731,20 @@ forcereference = option[v_list] ~= v_no, } end +local media_play_params = pdfdictionary { +Type = pdfconstant("MediaPlayParams"), +BE = pdfdictionary { +C = option[v_controls] and option[v_controls] ~= v_no or false, +V = tonumber(option[v_volume]) or 100, +RC = tonumber(option[v_repeat]) or 1, +}, +
Re: [NTG-context] question about multimedia renderings
On Sun Jan 15, 2023 at 10:49 PM CET, Pablo Rodriguez via ntg-context wrote: > Dear list, > > I’m planning to add an explanation about multimedia inclusion to the > wiki, but first I wanted to discuss an issue I have found. > > I have the following sample (adapted from scrn-wid.mklx): > > \setupinteraction[state=start] > \starttext > \null\page > \definerenderingwindow[myrenderingwindow] > [width=\textwidth, height=\textwidth, > %openpageaction=StartCurrentRendering, > %closepageaction=StopCurrentRendering, > openpageaction=StartRendering{\currentrendering}, > closepageaction=StopRendering{\currentrendering}, > framecolor=red] > \startTEXpage[offset=1em, pagestate=start] > \userendering[key-name][video/mp4][video.mp4] > [embed=yes, > auto, > ] > \placerenderingwindow[myrenderingwindow][key-name] > \stopTEXpage > \null\page > \stoptext > > \userendering[][][auto] would enable automatic play or stop when the > page with the rendering is reached or left (respectively). > > I cannot get it working. Neither do work the commented lines in > \definerenderingwindow. > > Inspecting the PDF code, the screen annotation only gets an additional > actions dictionary > (https://opensource.adobe.com/dc-acrobat-sdk-docs/standards/pdfstandards/pdf/PDF32000_2008.pdf#G11.2096829) > with /PO and /PC entries, when open and close page actions are set to > StartRendering{\currentrendering} and StopRendering{\currentrendering}. > > Just for reference, this is the screen annotation object with the > additional actions dictionary: > > 13 0 obj > << > /Type /Annot > /A << > /AN 13 0 R > /OP 0 > /R 12 0 R > /S /Rendition > >> > /AA << > /PC << > /AN 13 0 R > /OP 1 > /R 12 0 R > /S /Rendition > >> > /PO << > /AN 13 0 R > /OP 0 > /R 12 0 R > /S /Rendition > >> > >> > /Border [ 0 0 0 ] > /P 14 0 R > /Subtype /Screen > /T > /Rect [ 12.353668 12.353668 437.54664 437.54664 ] > >> > endobj > > And this is what I get with \userendering[][][auto]: > > 13 0 obj > << > /Type /Annot > /A << > /AN 13 0 R > /OP 0 > /R 12 0 R > /S /Rendition > >> > /Border [ 0 0 0 ] > /P 14 0 R > /Subtype /Screen > /T > /Rect [ 12.353668 12.353668 437.54664 437.54664 ] > >> > endobj > > Could anyone be so kind to confirm the issue? AFAICT I based the auto option on the "Start/StopCurrentRendering" actions (2021-09-14) which we later agreed to remove (2021-09-17), so there was a bug. Reasoning for removal of the "Current" variants at the time: On Tue Sep 14, 2021 at 9:37 PM CEST, Hans Hagen wrote: > Because \currentrendering is local we could as well drop the Current > variants ... it's not like people will put hundreds of videos in a file > so enforcing the named one makes sense. So Start/StopRendering{label} should be used instead (Hans already redid most of the examples, you found the two places in scrn-wid.mklx where there is an incosistency. I would think that something like the attached could work. But in some cases it fails on the TeX side with something I am not sure about. I probably overlooked something. Anyways the idea is to just use the Start/StopRendering actions with the correct label. Michal if not modules then modules = { } end modules ['lpdf-wid'] = { version = 1.001, comment = "companion to lpdf-ini.mkiv", author= "Hans Hagen, PRAGMA-ADE, Hasselt NL", copyright = "PRAGMA ADE / ConTeXt Development Team", license = "see context related readme files" } -- It's about time to give up on media in pdf and admit that pdf lost it to html. -- First we had movies and sound, quite easy to deal with, but obsolete now. Then we -- had renditions but they turned out to be unreliable from the start and look -- obsolete too or at least they are bound to the (obsolete) flash technology for -- rendering. They were already complex constructs. Now we have rich media which -- instead of providing a robust future proof framework for general media types -- again seems to depend on viewers built in (yes, also kind of obsolete) flash -- technology, and we cannot expect this non-open technology to show up in open -- browsers. So, in the end we can best just use links to external resources to be -- future proof. Just look at the viewer preferences pane to see how fragile support -- is. Interestingly u3d support is kind of b
[NTG-context] question about multimedia renderings
Dear list, I’m planning to add an explanation about multimedia inclusion to the wiki, but first I wanted to discuss an issue I have found. I have the following sample (adapted from scrn-wid.mklx): \setupinteraction[state=start] \starttext \null\page \definerenderingwindow[myrenderingwindow] [width=\textwidth, height=\textwidth, %openpageaction=StartCurrentRendering, %closepageaction=StopCurrentRendering, openpageaction=StartRendering{\currentrendering}, closepageaction=StopRendering{\currentrendering}, framecolor=red] \startTEXpage[offset=1em, pagestate=start] \userendering[key-name][video/mp4][video.mp4] [embed=yes, auto, ] \placerenderingwindow[myrenderingwindow][key-name] \stopTEXpage \null\page \stoptext \userendering[][][auto] would enable automatic play or stop when the page with the rendering is reached or left (respectively). I cannot get it working. Neither do work the commented lines in \definerenderingwindow. Inspecting the PDF code, the screen annotation only gets an additional actions dictionary (https://opensource.adobe.com/dc-acrobat-sdk-docs/standards/pdfstandards/pdf/PDF32000_2008.pdf#G11.2096829) with /PO and /PC entries, when open and close page actions are set to StartRendering{\currentrendering} and StopRendering{\currentrendering}. Just for reference, this is the screen annotation object with the additional actions dictionary: 13 0 obj << /Type /Annot /A << /AN 13 0 R /OP 0 /R 12 0 R /S /Rendition >> /AA << /PC << /AN 13 0 R /OP 1 /R 12 0 R /S /Rendition >> /PO << /AN 13 0 R /OP 0 /R 12 0 R /S /Rendition >> >> /Border [ 0 0 0 ] /P 14 0 R /Subtype /Screen /T /Rect [ 12.353668 12.353668 437.54664 437.54664 ] >> endobj And this is what I get with \userendering[][][auto]: 13 0 obj << /Type /Annot /A << /AN 13 0 R /OP 0 /R 12 0 R /S /Rendition >> /Border [ 0 0 0 ] /P 14 0 R /Subtype /Screen /T /Rect [ 12.353668 12.353668 437.54664 437.54664 ] >> endobj Could anyone be so kind to confirm the issue? Many thanks for your help, Pablo ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
Re: [NTG-context] Non-standard font alternatives
On 12/14/2022 11:49 AM, Matthew McCabe wrote: For anyone else looking to do something similar, since the typescript is just a tex file it seems if one places it in one’s local directory it will be accessible when ConTeXt generates the pdf. I saved it as type-imp-roboto.tex in my local directory and used ‘\usebodyfont[roboto]’ and ‘\usebodyfont[roboto-light]’ to preload the fonts as recommended (\usetypescriptfile didn’t seem to be required). you can also put the definitions in the style (depends on how often you reuse it) Hans - Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl - ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
Re: [NTG-context] New c-o-w: The XMas gift for ConTeXt users
Dear Zdeněk, Thanks for your prompt response. Yes, great, I got the right PDF now. Best regards 黄复雄(Huang Fysyong) Zdeněk Svoboda via ntg-context 于2022年12月28日周三 10:42写道: > > Hello Huang, > > This was probably an error on my side. > > Can you please try again now? I have tried to fix it, it should > hopefully work now. > > Sincerely, > Zdeněk Svoboda > > Dne 28. 12. 22 v 3:01 黄复雄 via ntg-context napsal(a): > >> You can probably test with uploading a font the the work directory. > >> > > Hans, > > thanks for the tip. > > > > I uploaded a noto-cjk font file, NotoSerifCJKsc-Regular.otf, to the > > root directory. > > Also, my typography file, test.tex, is in the root directory, and it reads > > > > ```context > > \definefont[myfont][file:NotoSerifCJKsc-Regular.otf*default at 12pt] > > > > \starttext > > > > {\myfont 我我} > > > > \stoptext > > ``` > > > > Then I did not get the correct PDF file, i.e. the two Chinese > > characters are not displayed on it. and the log shows: > > > > ```log > > .. > > fonts > defining > forced type 'otf' of 'NotoSerifCJKsc-Regular' not found > > 17fonts > defining > unable to define 'NotoSerifCJKsc-Regular.otf' as > > 'myfont--0' > > .. > > 51fonts > start missing characters: > > /home/admin/context/tex/texmf/fonts/data/gust/lm/lmroman10-regular.otf > > 52fonts > 2 U+06211 我 > > 53fonts > stop missing characters > > .. > > ``` > > > > I processed on my Win10 PC, with the same font file, test.tex and the > > same directory structure, > > and got the correct PDF file and the log is as follows: > > > > ```log > > .. > > fonts > defining > source file > > 'c:/windows/fonts/NotoSerifCJKsc-Regular.otf' is not found > > fonts > defining > using source file > > 'NotoSerifCJKsc-Regular.otf' due to cache mismatch > > .. > > mkiv lua stats > loaded fonts: 3 files: latinmodern-math.otf, > > lmroman12-regular.otf, notoserifcjksc-regular.otf > > .. > > ``` > > > > Any further hints? > > > > Best regards, > > 黄复雄(Huang Fusyong) > > ___ > > 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 > ___ ___ 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] New c-o-w: The XMas gift for ConTeXt users
Hello Huang, This was probably an error on my side. Can you please try again now? I have tried to fix it, it should hopefully work now. Sincerely, Zdeněk Svoboda Dne 28. 12. 22 v 3:01 黄复雄 via ntg-context napsal(a): You can probably test with uploading a font the the work directory. Hans, thanks for the tip. I uploaded a noto-cjk font file, NotoSerifCJKsc-Regular.otf, to the root directory. Also, my typography file, test.tex, is in the root directory, and it reads ```context \definefont[myfont][file:NotoSerifCJKsc-Regular.otf*default at 12pt] \starttext {\myfont 我我} \stoptext ``` Then I did not get the correct PDF file, i.e. the two Chinese characters are not displayed on it. and the log shows: ```log .. fonts > defining > forced type 'otf' of 'NotoSerifCJKsc-Regular' not found 17fonts > defining > unable to define 'NotoSerifCJKsc-Regular.otf' as 'myfont--0' .. 51fonts > start missing characters: /home/admin/context/tex/texmf/fonts/data/gust/lm/lmroman10-regular.otf 52fonts > 2 U+06211 我 53fonts > stop missing characters .. ``` I processed on my Win10 PC, with the same font file, test.tex and the same directory structure, and got the correct PDF file and the log is as follows: ```log .. fonts > defining > source file 'c:/windows/fonts/NotoSerifCJKsc-Regular.otf' is not found fonts > defining > using source file 'NotoSerifCJKsc-Regular.otf' due to cache mismatch .. mkiv lua stats > loaded fonts: 3 files: latinmodern-math.otf, lmroman12-regular.otf, notoserifcjksc-regular.otf .. ``` Any further hints? Best regards, 黄复雄(Huang Fusyong) ___ 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] New c-o-w: The XMas gift for ConTeXt users
> > You can probably test with uploading a font the the work directory. > Hans, thanks for the tip. I uploaded a noto-cjk font file, NotoSerifCJKsc-Regular.otf, to the root directory. Also, my typography file, test.tex, is in the root directory, and it reads ```context \definefont[myfont][file:NotoSerifCJKsc-Regular.otf*default at 12pt] \starttext {\myfont 我我} \stoptext ``` Then I did not get the correct PDF file, i.e. the two Chinese characters are not displayed on it. and the log shows: ```log .. fonts > defining > forced type 'otf' of 'NotoSerifCJKsc-Regular' not found 17fonts > defining > unable to define 'NotoSerifCJKsc-Regular.otf' as 'myfont--0' .. 51fonts > start missing characters: /home/admin/context/tex/texmf/fonts/data/gust/lm/lmroman10-regular.otf 52fonts > 2 U+06211 我 53fonts > stop missing characters .. ``` I processed on my Win10 PC, with the same font file, test.tex and the same directory structure, and got the correct PDF file and the log is as follows: ```log .. fonts > defining > source file 'c:/windows/fonts/NotoSerifCJKsc-Regular.otf' is not found fonts > defining > using source file 'NotoSerifCJKsc-Regular.otf' due to cache mismatch .. mkiv lua stats > loaded fonts: 3 files: latinmodern-math.otf, lmroman12-regular.otf, notoserifcjksc-regular.otf .. ``` Any further hints? Best regards, 黄复雄(Huang Fusyong) ___ 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] New c-o-w: The XMas gift for ConTeXt users
Hi Zdeněk! Congratulation, the online version, the web-site looks very nice. you have built in a lot of nice features! I tried the interface for a short while. During testing I was thrown out each time and you do not understand why. — Does this have to do with the fact that I did not create a user-account? While creating a tabulate I detected, that the use of the tab-key is only possible at the beginning of the line. When using the tab-key inside a tabulate line the whole line is indented for another tab. While it is nice to see all the available command-choices it is rather less intuitive, that always the brackets are placed. Specially while editing \bTABLE … \eTABLE and the commands belonging to this table-type it could be good to have the right arrow key to have the command placed with brackets and with the down-arrow-key the command being placed without brackets (?) — I think, that the source should not be cluttered with empty brackets all over the place. When you start the editor from the website you have no idea, what the layout of the page will be. While being somewhere in the edited text I switched to the layout-wizzard. Strange enough it is A4 on A3-Paper, I think for a normal user it should be A4 on A4 paper. The default layout dimension is in pt. — I doubt whether this is the best for a newcomer. May be mm would be better? — After returning to the editor I detected, that the new layout is placed at the cursor's position. Might it be a good idea, to place this at the top of the document or probably to ask the user whether the layout change should be placed at the cursor’s place? In the meantime I also created an account. — Strange that I have to confirm the account to an e-mail, which does not make any reference to what account this confirmation is asked for. Nice is that now I was not kicked out of the editor anymore! While testing further I experienced, that the system is eating up a letter: \blank[small] —> caused a sequence undefined error: in the log there was \blank[smal … Hereafter I put a space after small and it worked correctly. Then I withdrew the space, saved the file and started generation of PDF. — got a hanger… After restarting everything it appeared, that my test file was not listed in the editor’s left pane and also not the two uploaded picture-files. — I tried to logout. Logout does not seem to work. Not withstanding all my comments, I am impressed how your system works. Once it will be stable I am convinced, that it can be a useful tool to promote the use of ConTeXt. Thank you for all the work performed so far! Kind regards Willi > On 27 Dec 2022, at 00:57, Zdeněk Svoboda via ntg-context > wrote: > > Hello ConTeXt community! > > I'm Zdeněk Svoboda, a master degree student at Mendel university in Brno. > I've been using ConTeXt for a while now and have always been impressed by its > capabilities and the helpfulness of this community. > > For my thesis project with Tomáš Hála as the supervisor, I've developed an > online application for working with ConTeXt. The main goal was to create an > application capable of compiling ConTeXt source right from the browser but I > thought that it's not enough and added a few features or tools on top of > that. Functions of the application include: > > - User accounts to save files and access them from other computers. > - Editor with syntax highlighting and autocompletion for ConTeXt command. > - Generating PDF document and previewing it directly from the browser. > - Layout designer to customize the layout of their documents with a > variety of options and mouse resizability of each layout element. > - Table designer for creating and customize tables with alignment and > border settings, colors, merging and splitting cells eg. > - Lists designer with a simple interface to customize lists. > - Help function for ConTeXt commands (hidden under the "?" button) > > Developing this application was a great learning experience for me, and I > faced a number of technical challenges along the way. For example, having to > dig through the XML document to extract all the information needed for the > "?" help function. > > I'm excited to share my project with the ConTeXt community and hope that it > will be a useful resource for someone. If you're interested in trying it out, > you can find it at https://www.context-on-web.eu/. I'd love to hear any > feedback or suggestions you have. If you find a bug or encounter an error > while using the application, please let me know (and cc: th...@mendelu.cz) > the steps you took that caused it. > > Known bugs: > - Generated code from table designer needs better formatting > - Duplicated color definitions in table designer > - Layout designer -- numbers are
Re: [NTG-context] move glyph vertically
On 12/22/22 13:18, Hans Hagen via ntg-context wrote: > On 12/22/2022 12:54 PM, Pablo Rodriguez via ntg-context wrote: >> […] >> Could anyone tell me how could I move vertically single glyphs? >> […] > > so: > > \startluacode > fonts.handlers.otf.addfeature { > name = "gpos_test", > type = "single", > data = { > [ '¿' ] = { 0, 400 }, > [ '¡' ] = { 0, 400 }, > } > } > \stopluacode Many thanks for your fast reply and help, Hans. Pablo ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
Re: [NTG-context] move glyph vertically
On 12/22/2022 12:54 PM, Pablo Rodriguez via ntg-context wrote: Dear list, I have the following sample: \startluacode fonts.handlers.otf.addfeature { name = "gpos_test", type = "single", data = { [ '¿' ] = 1000, [ '¡' ] = 1000, } } \stopluacode \definefontfeature[ktest][gpost_tes=yes] \starttext \startTEXpage[offset=1em] \feature[+][gpos_test] ¿? ¡! \stopTEXpage \stoptext This tries to move vertically the opening question and exclamation marks, so they are at the same height that its closing counterparts. I thought there may be a GPOS feature that could achieve this, but I must admit I have no idea about how to achive it. In my document, this should only work with the slanted feature. Could anyone tell me how could I move vertically single glyphs? Many thanks for your help, typos \definefontfeature[ktest][gpost_tes=yes] and wrong feature name \feature[+][gpos_test] so: \startluacode fonts.handlers.otf.addfeature { name = "gpos_test", type = "single", data = { [ '¿' ] = { 0, 400 }, [ '¡' ] = { 0, 400 }, } } \stopluacode \definefontfeature[ktest][gpos_test=yes] \starttext \startTEXpage[offset=1em] \ruledhbox{¿? xx ¡!} \addfeature{ktest} \ruledhbox{¿? xx ¡!} \stopTEXpage \stoptext - Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl - ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
[NTG-context] move glyph vertically
Dear list, I have the following sample: \startluacode fonts.handlers.otf.addfeature { name = "gpos_test", type = "single", data = { [ '¿' ] = 1000, [ '¡' ] = 1000, } } \stopluacode \definefontfeature[ktest][gpost_tes=yes] \starttext \startTEXpage[offset=1em] \feature[+][gpos_test] ¿? ¡! \stopTEXpage \stoptext This tries to move vertically the opening question and exclamation marks, so they are at the same height that its closing counterparts. I thought there may be a GPOS feature that could achieve this, but I must admit I have no idea about how to achive it. In my document, this should only work with the slanted feature. Could anyone tell me how could I move vertically single glyphs? Many thanks for your help, Pablo ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
Re: [NTG-context] upload
rpage 70, subpage 70 pages > flushing realpage 71, userpage 71, subpage 71 structures > bookmark: [Contracubierta] structure > sectioning > hiddentitle @ level 2 : 0.0 -> \xmlflush {main::1070} pages > flushing realpage 72, userpage 72, subpage 72 structures > end of sectionblock 'whatcomeslast' backend > bookmarks > confusing level change at level 2 around 'Prólogo' backend > bookmarks > confusing level change at level 2 around 'Conceptos previos' backend > bookmarks > confusing level change at level 3 around 'Conclusiones' backend > bookmarks > confusing level change at level 2 around 'Apéndices' backend > bookmarks > confusing level change at level 3 around 'Notas' mkiv lua stats > scheme handling time: 0.003 seconds, 1 processed, threshold 86400 seconds, loaded: http:1, reused: http:1 mkiv lua stats > used config file: selfautoparent:/texmf/web2c/texmfcnf.lua mkiv lua stats > used cache path: ~/context/tex/texmf-cache/luametatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e mkiv lua stats > resource resolver: loadtime 0.005 seconds, 1 scans with scantime 0.000 seconds, 0 shared scans, 29 found files, scanned paths: ~/texmf mkiv lua stats > stored bytecode data: 507 modules (0.177 sec), 106 tables (0.010 sec), 613 chunks (0.187 sec) mkiv lua stats > traced context: maxstack: 1658, freed: 1, unreachable: 1657 mkiv lua stats > cleaned up reserved nodes: 84 nodes, 7 lists of 434 mkiv lua stats > node memory usage: 37 attribute, 4 dir, 46 fontspec, 8 glue, 121 gluespec, 3 kern, 647 mathspec, 8 penalty, 2 temp mkiv lua stats > node list callback tasks: 13 unique task lists, 18 instances (re)created, 9335 calls mkiv lua stats > h-node processing time: 0.211 seconds including kernel mkiv lua stats > attribute processing time: 0.014 seconds front- and backend mkiv lua stats > driver time: 0.185 seconds mkiv lua stats > used backend: pdf mkiv lua stats > jobdata time: 0.011 seconds saving, 0.003 seconds loading mkiv lua stats > callbacks: file: 2632, saved: 17724, direct: 148, function: 18648, value: 86, message: 0, bytecode: 613, late 0, total: 39851 (553 per page) mkiv lua stats > randomizer: resumed with value 0.96080909448678 mkiv lua stats > v-node processing time: 0.018 seconds mkiv lua stats > loaded patterns: agr:gr:62 de::3 en::1 es::64 la::67, load time: 0.000 mkiv lua stats > hyphenation: 5575 words hyphenated, 1995 unique, used time 0.217 seconds mkiv lua stats > xml load time: 0.022 seconds, 1 files, 1 converted mkiv lua stats > lxml preparation time: 0.063 seconds, 1383 nodes, 659 lpath calls, 506 cached calls mkiv lua stats > interactive elements: 240 references, 143 destinations mkiv lua stats > margin data: 6 entries, 0 pending mkiv lua stats > loaded fonts: 12 files: cousine-bold.ttf, cousine-regular.ttf, gfsheraklit.otf, p052-bold.otf, p052-italic.otf, p052-roman.otf, urwclassico-regular.otf, texgyrepagella-bold.otf, texgyrepagella-italic.otf, texgyrepagella-math.otf, texgyrepagella-regular.otf, dejavusans.ttf mkiv lua stats > font engine: otf 3.131, afm 1.513, tfm 1.000, 24 instances, 11 shared in backend, 5 common vectors, 6 common hashes, load time 0.184 seconds mkiv lua stats > body font sizes: defined: 10pt 11pt 12pt 14.4pt 17.3pt 20.7pt 4pt 5pt 6pt 7pt 8pt 9pt, undefined: 15pt 18pt 20pt 25pt 30pt mkiv lua stats > math tweaking time: 0.007 seconds, 2 math goodie tables mkiv lua stats > pdf annotations: 240 links (240 unique), 6 special mkiv lua stats > font embedding time: 0.010 seconds, 7 fonts mkiv lua stats > result saved in file: xml-context.pdf, compresslevel 1, objectcompresslevel 3 mkiv lua stats > positions: 428 collected, 307 deltas, 422 shared partials, 30 partial entries mkiv lua stats > used platform: linux-64, type: unix, binary subtree: texmf-linux-64 mkiv lua stats > used engine: luametatex version: 2.1004, functionality level: 20221216, format id: 680, compiler: gcc mkiv lua stats > tex properties: 740852 hash slots used of 2097152, 54566 control sequences, approximate memory usage: 39 MB mkiv lua stats > lua properties: engine: lua 5.4, used memory: 109 MB, ctx: 104 MB, max: 104 MB, symbol mask: utf (τεχ) mkiv lua stats > runtime: 2.114 seconds, 72 processed pages, 72 shipped pages, 34.062 pages/second resolvers | formats | executing runner 'run luametatex format': ~/context/tex/texmf-linux-64/bin/luametatex --jobname="./xml-context.xml" --fmt=~/context/tex/texmf-cache/luametatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/formats/luametatex/cont-en.fmt --lua=~/context/tex/texmf-cache/luametatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/formats/luametatex/cont-en.lui --c:currentrun=4 --c:environment="xml-context.tex" --c:fulljobname="./xml-context.xml" --c:in
[NTG-context] Change in \vec behavior
Hello, As I usually do at the end of each year, I upgraded my ConTeXt installation. I noticed a change in \vec behavior which doesn't extend the arrow anymore. Here is my example: \starttext Engine: \texenginename\ \texengineversion \ConTeXt: \contextversionnumber \type{$\vec{AB}$} : $\vec{AB}$ \stoptext The result with the latest ConTeXt version: GraphiqueCollé-1.pdf Description: Adobe PDF document and with the version from a year ago: GraphiqueCollé-2.pdf Description: Adobe PDF document I am aware that I could use \overrightarrow, but I prefer the shape and position of the \vec arrow, especially with single letters. GraphiqueCollé-3.pdf Description: Adobe PDF document GraphiqueCollé-4.pdf Description: Adobe PDF document What is the rationale for the change in \vec? Is there a way to get the previous behavior back? Thanks, -- Jean-Philippe Rey jean-philippe@centralesupelec.fr 91192 Gif-sur-Yvette Cedex - France Empreinte PGP : 807A 5B2C 69E4 D4B5 783A 428A 1B5E E83E 261B BF51 ___ 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] bottlenecks
On 12/18/2022 4:21 PM, mf via ntg-context wrote: Il 18/12/22 14:49, Hans Hagen via ntg-context ha scritto: On 12/18/2022 2:14 PM, mf via ntg-context wrote: > ... So we gained a lot in the meantime. mkiv lua stats > loaded fonts: 27 files: lmmono10-regular.otf, texgyrepagella-math.otf, dejavusansmono.ttf, gfsneohellenic.otf, firasans-bolditalic.otf, firasans-regular.otf, firasans-regularitalic.otf, firasanscondensed-bold.otf, firasanscondensed-regular.otf, garamondpremrpro-bdit.otf, garamondpremrpro-med.otf, garamondpremrpro-medcapt.otf, garamondpremrpro-meddisp.otf, garamondpremrpro-medit.otf, garamondpremrpro-meditcapt.otf, garamondpremrpro-medsubh.otf, garamondpremrpro-smbdit.otf, myriadpro-bold.otf, myriadpro-boldcond.otf, myriadpro-boldcondit.otf, myriadpro-cond.otf, myriadpro-condit.otf, myriadpro-it.otf, myriadpro-regular.otf, myriadpro-semiboldit.otf, quivira.otf, sileot.ttf mkiv lua stats > font engine: otf 3.131, afm 1.513, tfm 1.000, 533 instances, 501 shared in backend, 6 common vectors, 495 common hashes, load time 0.196 seconds How does that report with compact font mode? mkiv lua stats > resource resolver: loadtime 0.005 seconds, 0 scans with scantime 0.000 seconds, 0 shared scans, 107 found files, scanned paths: mkiv lua stats > stored bytecode data: 507 modules (0.285 sec), 106 tables (0.017 sec), 613 chunks (0.302 sec) mkiv lua stats > traced context: maxstack: 1923, freed: 246, unreachable: 1677 mkiv lua stats > cleaned up reserved nodes: 76 nodes, 9 lists of 504 mkiv lua stats > node memory usage: 1684 attribute, 110 fontspec, 419 glue, 87 gluespec, 3 kern, 647 mathspec, 4 penalty, 2 temp, 591 whatsit mkiv lua stats > node list callback tasks: 13 unique task lists, 17 instances (re)created, 325895 calls mkiv lua stats > h-node processing time: 10.654 seconds including kernel mkiv lua stats > attribute processing time: 2.810 seconds front- and backend mkiv lua stats > driver time: 11.714 seconds mkiv lua stats > used backend: pdf mkiv lua stats > jobdata time: 0.810 seconds saving, 0.194 seconds loading mkiv lua stats > callbacks: file: 5439, saved: 644924, direct: 1386, function: 534140, value: 1033, message: 0, bytecode: 613, late 0, total: 1187535 (1151 per page) mkiv lua stats > randomizer: resumed with value 0.58701179146283 mkiv lua stats > v-node processing time: 1.480 seconds mkiv lua stats > loaded patterns: en::1 it::66, load time: 0.000 mkiv lua stats > xml load time: 0.444 seconds, 1 files, 1 converted mkiv lua stats > lxml preparation time: 26.359 seconds, 47936 nodes, 24702 lpath calls, 24331 cached calls mkiv lua stats > interactive elements: 9327 references, 12951 destinations mkiv lua stats > margin data: 6 entries, 0 pending mkiv lua stats > loaded fonts: 27 files: lmmono10-regular.otf, texgyrepagella-math.otf, dejavusansmono.ttf, gfsneohellenic.otf, firasans-bolditalic.otf, firasans-regular.otf, firasans-regularitalic.otf, firasanscondensed-bold.otf, firasanscondensed-regular.otf, garamondpremrpro-bdit.otf, garamondpremrpro-med.otf, garamondpremrpro-medcapt.otf, garamondpremrpro-meddisp.otf, garamondpremrpro-medit.otf, garamondpremrpro-meditcapt.otf, garamondpremrpro-medsubh.otf, garamondpremrpro-smbdit.otf, myriadpro-bold.otf, myriadpro-boldcond.otf, myriadpro-boldcondit.otf, myriadpro-cond.otf, myriadpro-condit.otf, myriadpro-it.otf, myriadpro-regular.otf, myriadpro-semiboldit.otf, quivira.otf, sileot.ttf mkiv lua stats > font engine: otf 3.131, afm 1.513, tfm 1.000, 46 instances, 16 shared in backend, 4 common vectors, 12 common hashes, load time 0.148 seconds mkiv lua stats > text directions: 5.911 seconds mkiv lua stats > metapost: 1.180 seconds, loading: 0.083, execution: 1.109, n: 1039, average: 0.002, instances: 2, luacalls: 46885 (file: 34713, text: 0, script: 5932, log: 6240), memory: 8.995 M mkiv lua stats > math tweaking time: 0.462 seconds, 8 math goodie tables mkiv lua stats > math processing time: 0.211 seconds mkiv lua stats > pdf annotations: 9327 links (9316 unique), 0 special mkiv lua stats > font embedding time: 0.104 seconds, 23 fonts mkiv lua stats > result saved in file: v32.pdf, compresslevel 0, objectcompresslevel 0 mkiv lua stats > positions: 8572 collected, 4774 deltas, 8565 shared partials, 305 partial entries mkiv lua stats > used platform: linux-64, type: unix, binary subtree: texmf-linux-64 mkiv lua stats > used engine: luametatex version: 2.1004, functionality level: 20221214, format id: 679, compiler: gcc mkiv lua stats > tex properties: 740852 hash slots used of 2097152, 93821 control sequences, approximate memory usage: 65 MB mkiv lua stats > lua properties: engine: lua 5.4, used memory: 338 MB, ctx: 266 MB, max: 415 MB, symbol mask: utf (τεχ) mkiv lua stats > runtime: 114.917 seconds, 1032 processed pages, 1032 shipped pag
Re: [NTG-context] bottlenecks
Il 18/12/22 14:49, Hans Hagen via ntg-context ha scritto: On 12/18/2022 2:14 PM, mf via ntg-context wrote: > ... So we gained a lot in the meantime. mkiv lua stats > loaded fonts: 27 files: lmmono10-regular.otf, texgyrepagella-math.otf, dejavusansmono.ttf, gfsneohellenic.otf, firasans-bolditalic.otf, firasans-regular.otf, firasans-regularitalic.otf, firasanscondensed-bold.otf, firasanscondensed-regular.otf, garamondpremrpro-bdit.otf, garamondpremrpro-med.otf, garamondpremrpro-medcapt.otf, garamondpremrpro-meddisp.otf, garamondpremrpro-medit.otf, garamondpremrpro-meditcapt.otf, garamondpremrpro-medsubh.otf, garamondpremrpro-smbdit.otf, myriadpro-bold.otf, myriadpro-boldcond.otf, myriadpro-boldcondit.otf, myriadpro-cond.otf, myriadpro-condit.otf, myriadpro-it.otf, myriadpro-regular.otf, myriadpro-semiboldit.otf, quivira.otf, sileot.ttf mkiv lua stats > font engine: otf 3.131, afm 1.513, tfm 1.000, 533 instances, 501 shared in backend, 6 common vectors, 495 common hashes, load time 0.196 seconds How does that report with compact font mode? mkiv lua stats > resource resolver: loadtime 0.005 seconds, 0 scans with scantime 0.000 seconds, 0 shared scans, 107 found files, scanned paths: mkiv lua stats > stored bytecode data: 507 modules (0.285 sec), 106 tables (0.017 sec), 613 chunks (0.302 sec) mkiv lua stats > traced context: maxstack: 1923, freed: 246, unreachable: 1677 mkiv lua stats > cleaned up reserved nodes: 76 nodes, 9 lists of 504 mkiv lua stats > node memory usage: 1684 attribute, 110 fontspec, 419 glue, 87 gluespec, 3 kern, 647 mathspec, 4 penalty, 2 temp, 591 whatsit mkiv lua stats > node list callback tasks: 13 unique task lists, 17 instances (re)created, 325895 calls mkiv lua stats > h-node processing time: 10.654 seconds including kernel mkiv lua stats > attribute processing time: 2.810 seconds front- and backend mkiv lua stats > driver time: 11.714 seconds mkiv lua stats > used backend: pdf mkiv lua stats > jobdata time: 0.810 seconds saving, 0.194 seconds loading mkiv lua stats > callbacks: file: 5439, saved: 644924, direct: 1386, function: 534140, value: 1033, message: 0, bytecode: 613, late 0, total: 1187535 (1151 per page) mkiv lua stats > randomizer: resumed with value 0.58701179146283 mkiv lua stats > v-node processing time: 1.480 seconds mkiv lua stats > loaded patterns: en::1 it::66, load time: 0.000 mkiv lua stats > xml load time: 0.444 seconds, 1 files, 1 converted mkiv lua stats > lxml preparation time: 26.359 seconds, 47936 nodes, 24702 lpath calls, 24331 cached calls mkiv lua stats > interactive elements: 9327 references, 12951 destinations mkiv lua stats > margin data: 6 entries, 0 pending mkiv lua stats > loaded fonts: 27 files: lmmono10-regular.otf, texgyrepagella-math.otf, dejavusansmono.ttf, gfsneohellenic.otf, firasans-bolditalic.otf, firasans-regular.otf, firasans-regularitalic.otf, firasanscondensed-bold.otf, firasanscondensed-regular.otf, garamondpremrpro-bdit.otf, garamondpremrpro-med.otf, garamondpremrpro-medcapt.otf, garamondpremrpro-meddisp.otf, garamondpremrpro-medit.otf, garamondpremrpro-meditcapt.otf, garamondpremrpro-medsubh.otf, garamondpremrpro-smbdit.otf, myriadpro-bold.otf, myriadpro-boldcond.otf, myriadpro-boldcondit.otf, myriadpro-cond.otf, myriadpro-condit.otf, myriadpro-it.otf, myriadpro-regular.otf, myriadpro-semiboldit.otf, quivira.otf, sileot.ttf mkiv lua stats > font engine: otf 3.131, afm 1.513, tfm 1.000, 46 instances, 16 shared in backend, 4 common vectors, 12 common hashes, load time 0.148 seconds mkiv lua stats > text directions: 5.911 seconds mkiv lua stats > metapost: 1.180 seconds, loading: 0.083, execution: 1.109, n: 1039, average: 0.002, instances: 2, luacalls: 46885 (file: 34713, text: 0, script: 5932, log: 6240), memory: 8.995 M mkiv lua stats > math tweaking time: 0.462 seconds, 8 math goodie tables mkiv lua stats > math processing time: 0.211 seconds mkiv lua stats > pdf annotations: 9327 links (9316 unique), 0 special mkiv lua stats > font embedding time: 0.104 seconds, 23 fonts mkiv lua stats > result saved in file: v32.pdf, compresslevel 0, objectcompresslevel 0 mkiv lua stats > positions: 8572 collected, 4774 deltas, 8565 shared partials, 305 partial entries mkiv lua stats > used platform: linux-64, type: unix, binary subtree: texmf-linux-64 mkiv lua stats > used engine: luametatex version: 2.1004, functionality level: 20221214, format id: 679, compiler: gcc mkiv lua stats > tex properties: 740852 hash slots used of 2097152, 93821 control sequences, approximate memory usage: 65 MB mkiv lua stats > lua properties: engine: lua 5.4, used memory: 338 MB, ctx: 266 MB, max: 415 MB, symbol mask: utf (τεχ) mkiv lua stats > runtime: 114.917 seconds, 1032 processed pages, 1032 shipped pages, 8.980 pages/second It's better, but the
Re: [NTG-context] bottlenecks
latest ConTeXt 2022.12.15 18:12: mkiv lua stats > resource resolver: loadtime 0.009 seconds, 0 scans with scantime 0.000 seconds, 0 shared scans, 107 found files, scanned paths: mkiv lua stats > stored bytecode data: 507 modules (0.346 sec), 106 tables (0.023 sec), 613 chunks (0.369 sec) mkiv lua stats > traced context: maxstack: 1923, freed: 246, unreachable: 1677 mkiv lua stats > cleaned up reserved nodes: 76 nodes, 9 lists of 504 mkiv lua stats > node memory usage: 1684 attribute, 419 glue, 87 gluespec, 3 kern, 647 mathspec, 4 penalty, 2 temp, 591 whatsit mkiv lua stats > node list callback tasks: 13 unique task lists, 17 instances (re)created, 325602 calls mkiv lua stats > h-node processing time: 10.442 seconds including kernel mkiv lua stats > attribute processing time: 2.783 seconds front- and backend mkiv lua stats > driver time: 11.187 seconds mkiv lua stats > used backend: pdf mkiv lua stats > jobdata time: 0.747 seconds saving, 0.195 seconds loading mkiv lua stats > callbacks: file: 5438, saved: 644352, direct: 1374, function: 540269, value: 1027, message: 0, bytecode: 613, late 0, total: 1193073 (1163 per page) mkiv lua stats > randomizer: resumed with value 0.58701179146283 mkiv lua stats > v-node processing time: 1.955 seconds mkiv lua stats > loaded patterns: en::1 it::66, load time: 0.000 mkiv lua stats > xml load time: 0.416 seconds, 1 files, 1 converted mkiv lua stats > lxml preparation time: 29.478 seconds, 47936 nodes, 24702 lpath calls, 24331 cached calls mkiv lua stats > interactive elements: 9336 references, 12951 destinations mkiv lua stats > margin data: 6 entries, 0 pending mkiv lua stats > loaded fonts: 27 files: lmmono10-regular.otf, texgyrepagella-math.otf, dejavusansmono.ttf, gfsneohellenic.otf, firasans-bolditalic.otf, firasans-regular.otf, firasans-regularitalic.otf, firasanscondensed-bold.otf, firasanscondensed-regular.otf, garamondpremrpro-bdit.otf, garamondpremrpro-med.otf, garamondpremrpro-medcapt.otf, garamondpremrpro-meddisp.otf, garamondpremrpro-medit.otf, garamondpremrpro-meditcapt.otf, garamondpremrpro-medsubh.otf, garamondpremrpro-smbdit.otf, myriadpro-bold.otf, myriadpro-boldcond.otf, myriadpro-boldcondit.otf, myriadpro-cond.otf, myriadpro-condit.otf, myriadpro-it.otf, myriadpro-regular.otf, myriadpro-semiboldit.otf, quivira.otf, sileot.ttf mkiv lua stats > font engine: otf 3.131, afm 1.513, tfm 1.000, 533 instances, 501 shared in backend, 6 common vectors, 495 common hashes, load time 0.196 seconds mkiv lua stats > text directions: 5.754 seconds mkiv lua stats > metapost: 1.182 seconds, loading: 0.129, execution: 1.112, n: 1033, average: 0.002, instances: 2, luacalls: 46777 (file: 34671, text: 0, script: 5902, log: 6204), memory: 8.992 M mkiv lua stats > math tweaking time: 5.640 seconds, 126 math goodie tables mkiv lua stats > math processing time: 0.251 seconds mkiv lua stats > pdf annotations: 9336 links (9326 unique), 0 special mkiv lua stats > font embedding time: 0.049 seconds, 23 fonts mkiv lua stats > result saved in file: v32.pdf, compresslevel 0, objectcompresslevel 0 mkiv lua stats > positions: 8563 collected, 4775 deltas, 8556 shared partials, 304 partial entries mkiv lua stats > used platform: linux-64, type: unix, binary subtree: texmf-linux-64 mkiv lua stats > used engine: luametatex version: 2.1004, functionality level: 20221214, format id: 679, compiler: gcc mkiv lua stats > tex properties: 740852 hash slots used of 2097152, 94301 control sequences, approximate memory usage: 385 MB mkiv lua stats > lua properties: engine: lua 5.4, used memory: 1527 MB, ctx: 1436 MB, max: 1585 MB, symbol mask: utf (τεχ) mkiv lua stats > runtime: 130.080 seconds, 1026 processed pages, 1026 shipped pages, 7.887 pages/second system | total runtime: 130.269 seconds of 130.342 seconds ConTeXt 2020-04-22: mkiv lua stats > resource resolver: loadtime 0.005 seconds, 0 scans with scantime 0.000 seconds, 0 shared scans, 124 found files, scanned paths: mkiv lua stats > stored bytecode data: 468 modules (0.349 sec), 93 tables (0.030 sec), 561 chunks (0.378 sec) mkiv lua stats > traced context: maxstack: 2799, freed: 246, unreachable: 2553 mkiv lua stats > cleaned up reserved nodes: 61 nodes, 11 lists of 512 mkiv lua stats > node memory usage: 200320 attribute, 23928 attribute_list, 419 glue, 368 glue_spec, 27234 glyph, 3 kern, 4 penalty, 2 temp, 1159 whatsit mkiv lua stats > node list callback tasks: 8 unique task lists, 14 instances (re)created, 236679 calls mkiv lua stats > h-node processing time: 13.188 seconds including kernel mkiv lua stats > attribute processing time: 5.444 seconds front- and backend mkiv lua stats > driver time: 12.650 seconds mkiv lua stats > used backend: lmtx version 0.10, pdf (backend for directly gener
Re: [NTG-context] bottlenecks
With lots of MetaPost, lots of references, lots of figures, lots of tables, lots of bibliography entries, lots of chemical structures, ... mkiv lua stats > used config file: selfautoparent:/texmf/web2c/texmfcnf.lua mkiv lua stats > used cache path: /home/braslau/context/beta/tex/texmf-cache/luametatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e mkiv lua stats > resource resolver: loadtime 0.003 seconds, 0 scans with scantime 0.000 seconds, 0 shared scans, 98 found files, scanned paths: mkiv lua stats > stored bytecode data: 507 modules (0.117 sec), 106 tables (0.000 sec), 613 chunks (0.117 sec) mkiv lua stats > traced context: maxstack: 5959, freed: 2352, unreachable: 3607 mkiv lua stats > cleaned up reserved nodes: 101 nodes, 15 lists of 439 mkiv lua stats > node memory usage: 2491 attribute, 76 boundary, 84 dir, 1167 glue, 85 gluespec, 430 glyph, 242 hlist, 333 kern, 32 math, 647 mathspec, 238 par, 328 penalty, 88 rule, 2 temp, 100 vlist, 18 whatsit mkiv lua stats > node list callback tasks: 13 unique task lists, 376 instances (re)created, 147276 calls mkiv lua stats > h-node processing time: 4.724 seconds including kernel mkiv lua stats > attribute processing time: 0.202 seconds front- and backend mkiv lua stats > driver time: 1.419 seconds mkiv lua stats > used backend: pdf mkiv lua stats > jobdata time: 0.224 seconds saving, 0.068 seconds loading mkiv lua stats > callbacks: file: 32365, saved: 278423, direct: 486, function: 259776, value: 579, message: 0, bytecode: 613, late 0, total: 572242 (990 per page) mkiv lua stats > randomizer: resumed with value 0.86690391712354 mkiv lua stats > v-node processing time: 0.186 seconds mkiv lua stats > loaded tex modules: 2 requested, all found (*-graph *-three) mkiv lua stats > loaded patterns: de::3 en::1 fr::63, load time: 0.000 mkiv lua stats > interactive elements: 12106 references, 5886 destinations mkiv lua stats > loaded fonts: 5 files: cambria.ttc, cambriab.ttf, cambriai.ttf, dejavusansmono-oblique.ttf, dejavusansmono.ttf mkiv lua stats > font engine: otf 3.131, afm 1.513, tfm 1.000, 73 instances, 65 shared in backend, 5 common vectors, 60 common hashes, load time 1.571 seconds mkiv lua stats > body font sizes: defined: 10pt 11pt 12pt 14.4pt 17.3pt 20.7pt 4pt 5pt 6pt 7pt 8pt 9pt, undefined: 18pt 21.6pt mkiv lua stats > metapost: 1.277 seconds, loading: 0.083, execution: 1.260, n: 881, average: 0.003, instances: 6, luacalls: 108876 (file: 90144, text: 0, script: 10120, log: 8568), memory: 30.514 M mkiv lua stats > math tweaking time: 0.852 seconds, 96 math goodie tables mkiv lua stats > math processing time: 0.158 seconds mkiv lua stats > chemical formulas: 58 chemical structure formulas mkiv lua stats > graphics processing time: 0.414 seconds including tex, 264 processed images, 220 unique asked, 200 bad names mkiv lua stats > publications load time: 0.026 seconds, 584341 bytes, 835 definitions, 14 shortcuts mkiv lua stats > pdf annotations: 12106 links (11765 unique), 0 special mkiv lua stats > font embedding time: 0.016 seconds, 7 fonts mkiv lua stats > result saved in file: Cristaux_Liquides_tome2.pdf, compresslevel 1, objectcompresslevel 3 mkiv lua stats > positions: 2708 collected, 769 deltas, 2645 shared partials, 484 partial entries mkiv lua stats > cross referencing: 13943 identified, 34 unknown mkiv lua stats > used platform: freebsd-amd64, type: unix, binary subtree: texmf-freebsd-amd64 mkiv lua stats > used engine: luametatex version: 2.1004, functionality level: 20221214, format id: 679, compiler: clang mkiv lua stats > tex properties: 740852 hash slots used of 2097152, 50741 control sequences, approximate memory usage: 125 MB mkiv lua stats > lua properties: engine: lua 5.4, used memory: 301 MB, ctx: 275 MB, max: 445 MB, symbol mask: utf (τεχ) mkiv lua stats > runtime: 17.027 seconds, 578 processed pages, 578 shipped pages, 33.946 pages/second system | total runtime: 68.547 seconds of 68.576 seconds Alan ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
Re: [NTG-context] bottlenecks
On 12/17/2022 4:05 PM, Rik Kabel via ntg-context wrote: On 2022-12-17 04:48, Hans Hagen via ntg-context wrote: On 12/17/2022 1:05 AM, Rik Kabel via ntg-context wrote: The laptop was hot stuff in 2017 with 16GB RAM, 1TB SSD, and a 4K touch screen -- today, not so hot. Due to be replaced next year. so a bit like the surface i have as spare (which was slower than the 2013 precission that i recently replaced by a 2018 one) Here are the numbers without compact fonts enabled. Not much difference. mkiv lua stats > font engine: otf 3.131, afm 1.513, tfm 1.000, 84 instances, 67 shared in backend, 3 common vectors, 64 common hashes, load time 1.076 seconds which means that you don't run in compact mode Indeed, I had a typo. Running with compact fonts, I get: mkiv lua stats > used config file: selfautoparent:/texmf/web2c/texmfcnf.lua mkiv lua stats > used cache path: C:/ConTeXt_LMTX/tex/texmf-cache/luametatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e mkiv lua stats > resource resolver: loadtime 0.045 seconds, 1 scans with scantime 0.037 seconds, 0 shared scans, 37 found files, scanned paths: C:/Users/micro/texmf mkiv lua stats > stored bytecode data: 507 modules (0.267 sec), 106 tables (0.015 sec), 613 chunks (0.282 sec) mkiv lua stats > traced context: maxstack: 4108, freed: 2453, unreachable: 1655 mkiv lua stats > cleaned up reserved nodes: 78 nodes, 8 lists of 438 mkiv lua stats > node memory usage: 6860 attribute, 4602 dir, 69 fontspec, 4606 glue, 84 gluespec, 2301 glyph, 3068 hlist, 3 kern, 647 mathspec, 5 penalty, 2 temp mkiv lua stats > node list callback tasks: 13 unique task lists, 37 instances (re)created, 87134 calls mkiv lua stats > h-node processing time: 3.146 seconds including kernel mkiv lua stats > inserted spaces in output: 106025 mkiv lua stats > attribute processing time: 0.248 seconds front- and backend mkiv lua stats > driver time: 2.425 seconds mkiv lua stats > used backend: pdf mkiv lua stats > jobdata time: 0.198 seconds saving, 0.059 seconds loading mkiv lua stats > callbacks: file: 34385, saved: 191160, direct: 8, function: 173538, value: 345, message: 0, bytecode: 613, late 0, total: 400049 (1184 per page) mkiv lua stats > randomizer: resumed with value 0.88558194690977 mkiv lua stats > v-node processing time: 0.208 seconds mkiv lua stats > loaded patterns: agr:gr:62 cn::58 de::3 deo:de:9 en::1 es::64 fr::63 it::66 la::67 ru::22, load time: 0.000 mkiv lua stats > structure elements: 28148 element chains identified mkiv lua stats > interactive elements: 3983 references, 4873 destinations mkiv lua stats > margin data: 497 entries, 0 pending mkiv lua stats > loaded fonts: 14 files: antykwatorunska-bold.otf, antykwatorunskacond-bold.otf, antykwatorunskacond-regular.otf, libertinusmath-regular.otf, libertinusmono-regular.otf, libertinussans-italic.otf, libertinussans-regular.otf, libertinusserif-italic.otf, libertinusserif-regular.otf, libertinusserif-semibold.otf, zentb___.otf, keteraramtsova.ttf, msjh.ttc, times.ttf *mkiv lua stats > font engine: otf 3.131, afm 1.513, tfm 1.000, 18 instances, 2 shared in backend, 2 common vectors, 0 common hashes, load time 0.534 seconds * mkiv lua stats > text directions: 4.229 seconds mkiv lua stats > math tweaking time: 0.023 seconds, 2 math goodie tables mkiv lua stats > pdf annotations: 3983 links (3983 unique), 0 special mkiv lua stats > font embedding time: 0.055 seconds, 13 fonts mkiv lua stats > result saved in file: misquotation_bodyonly.pdf, compresslevel 1, objectcompresslevel 3 mkiv lua stats > positions: 4034 collected, 1723 deltas, 4025 shared partials, 111 partial entries mkiv lua stats > used platform: win64, type: windows, binary subtree: texmf-win64 mkiv lua stats > used engine: luametatex version: 2.1004, functionality level: 20221214, format id: 679, compiler: gcc mkiv lua stats > tex properties: 740852 hash slots used of 2097152, 51822 control sequences, approximate memory usage: 41 MB mkiv lua stats > lua properties: engine: lua 5.4, used memory: 225 MB, ctx: 200 MB, max: 200 MB, symbol mask: utf (τεχ) mkiv lua stats > runtime: 19.993 seconds, 338 processed pages, 338 shipped pages, 16.906 pages/second but the overall runtime is essentially unchanged. interesting, normally we gain something (ok, at least one gains memory) I do have some macros that are likely to make you (and others who are more adept at such things) cringe. Happy to share more of the source if it is helpful. sure I have also run with --profile and have attached that log as well as the complete execution log (zipped together as logs.zip). here are a few: 0.613002300 s 0.138 % 0.609968531 s 0.160 % 3674 # prerollreference 0.420704300 s 0.095 % 0.420702649 s 0.110 % 2 # analyzeregister 0.425307400 s 0.096 %
Re: [NTG-context] bottlenecks
On 2022-12-17 04:48, Hans Hagen via ntg-context wrote: On 12/17/2022 1:05 AM, Rik Kabel via ntg-context wrote: The laptop was hot stuff in 2017 with 16GB RAM, 1TB SSD, and a 4K touch screen -- today, not so hot. Due to be replaced next year. so a bit like the surface i have as spare (which was slower than the 2013 precission that i recently replaced by a 2018 one) Here are the numbers without compact fonts enabled. Not much difference. mkiv lua stats > font engine: otf 3.131, afm 1.513, tfm 1.000, 84 instances, 67 shared in backend, 3 common vectors, 64 common hashes, load time 1.076 seconds which means that you don't run in compact mode Indeed, I had a typo. Running with compact fonts, I get: mkiv lua stats > used config file: selfautoparent:/texmf/web2c/texmfcnf.lua mkiv lua stats > used cache path: C:/ConTeXt_LMTX/tex/texmf-cache/luametatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e mkiv lua stats > resource resolver: loadtime 0.045 seconds, 1 scans with scantime 0.037 seconds, 0 shared scans, 37 found files, scanned paths: C:/Users/micro/texmf mkiv lua stats > stored bytecode data: 507 modules (0.267 sec), 106 tables (0.015 sec), 613 chunks (0.282 sec) mkiv lua stats > traced context: maxstack: 4108, freed: 2453, unreachable: 1655 mkiv lua stats > cleaned up reserved nodes: 78 nodes, 8 lists of 438 mkiv lua stats > node memory usage: 6860 attribute, 4602 dir, 69 fontspec, 4606 glue, 84 gluespec, 2301 glyph, 3068 hlist, 3 kern, 647 mathspec, 5 penalty, 2 temp mkiv lua stats > node list callback tasks: 13 unique task lists, 37 instances (re)created, 87134 calls mkiv lua stats > h-node processing time: 3.146 seconds including kernel mkiv lua stats > inserted spaces in output: 106025 mkiv lua stats > attribute processing time: 0.248 seconds front- and backend mkiv lua stats > driver time: 2.425 seconds mkiv lua stats > used backend: pdf mkiv lua stats > jobdata time: 0.198 seconds saving, 0.059 seconds loading mkiv lua stats > callbacks: file: 34385, saved: 191160, direct: 8, function: 173538, value: 345, message: 0, bytecode: 613, late 0, total: 400049 (1184 per page) mkiv lua stats > randomizer: resumed with value 0.88558194690977 mkiv lua stats > v-node processing time: 0.208 seconds mkiv lua stats > loaded patterns: agr:gr:62 cn::58 de::3 deo:de:9 en::1 es::64 fr::63 it::66 la::67 ru::22, load time: 0.000 mkiv lua stats > structure elements: 28148 element chains identified mkiv lua stats > interactive elements: 3983 references, 4873 destinations mkiv lua stats > margin data: 497 entries, 0 pending mkiv lua stats > loaded fonts: 14 files: antykwatorunska-bold.otf, antykwatorunskacond-bold.otf, antykwatorunskacond-regular.otf, libertinusmath-regular.otf, libertinusmono-regular.otf, libertinussans-italic.otf, libertinussans-regular.otf, libertinusserif-italic.otf, libertinusserif-regular.otf, libertinusserif-semibold.otf, zentb___.otf, keteraramtsova.ttf, msjh.ttc, times.ttf *mkiv lua stats > font engine: otf 3.131, afm 1.513, tfm 1.000, 18 instances, 2 shared in backend, 2 common vectors, 0 common hashes, load time 0.534 seconds * mkiv lua stats > text directions: 4.229 seconds mkiv lua stats > math tweaking time: 0.023 seconds, 2 math goodie tables mkiv lua stats > pdf annotations: 3983 links (3983 unique), 0 special mkiv lua stats > font embedding time: 0.055 seconds, 13 fonts mkiv lua stats > result saved in file: misquotation_bodyonly.pdf, compresslevel 1, objectcompresslevel 3 mkiv lua stats > positions: 4034 collected, 1723 deltas, 4025 shared partials, 111 partial entries mkiv lua stats > used platform: win64, type: windows, binary subtree: texmf-win64 mkiv lua stats > used engine: luametatex version: 2.1004, functionality level: 20221214, format id: 679, compiler: gcc mkiv lua stats > tex properties: 740852 hash slots used of 2097152, 51822 control sequences, approximate memory usage: 41 MB mkiv lua stats > lua properties: engine: lua 5.4, used memory: 225 MB, ctx: 200 MB, max: 200 MB, symbol mask: utf (τεχ) mkiv lua stats > runtime: 19.993 seconds, 338 processed pages, 338 shipped pages, 16.906 pages/second but the overall runtime is essentially unchanged. I do have some macros that are likely to make you (and others who are more adept at such things) cringe. Happy to share more of the source if it is helpful. sure I have also run with --profile and have attached that log as well as the complete execution log (zipped together as logs.zip). here are a few: 0.613002300 s 0.138 % 0.609968531 s 0.160 % 3674 # prerollreference 0.420704300 s 0.095 % 0.420702649 s 0.110 % 2 # analyzeregister 0.425307400 s 0.096 % 0.425299968 s 0.111 % 9 # action 1358 ...MTX/tex/texmf-context/tex/con
Re: [NTG-context] bottlenecks
stats > math tweaking time: 0.187 seconds, 18 math goodie tables mkiv lua stats > pdf annotations: 3982 links (3982 unique), 0 special mkiv lua stats > font embedding time: 0.195 seconds, 13 fonts mkiv lua stats > result saved in file: misquotation_bodyonly.pdf, compresslevel 1, objectcompresslevel 3 mkiv lua stats > positions: 4034 collected, 1722 deltas, 4025 shared partials, 112 partial entries mkiv lua stats > used platform: win64, type: windows, binary subtree: texmf-win64 mkiv lua stats > used engine: luametatex version: 2.1004, functionality level: 20221214, format id: 679, compiler: gcc mkiv lua stats > tex properties: 740852 hash slots used of 2097152, 51846 control sequences, approximate memory usage: 73 MB mkiv lua stats > lua properties: engine: lua 5.4, used memory: 314 MB, ctx: 288 MB, max: 288 MB, symbol mask: utf (τεχ) mkiv lua stats > runtime: 23.731 seconds, 338 processed pages, 338 shipped pages, 14.243 pages/second I do have some macros that are likely to make you (and others who are more adept at such things) cringe. Happy to share more of the source if it is helpful. I have also run with --profile and have attached that log as well as the complete execution log (zipped together as logs.zip). -- Rik<> ___ 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] bottlenecks
Hans, Here are the stats for a 346 page book. Fonts are all cached. Compilation is via a make file which processes this as: context --noconsole --overloadmode=error --batchmode --nonstopmode --nosynctex misquotation_bodyonly.mkvi > nul and is run under W11 x64 on an i7-8550U. The only tables are contents and acronyms, and such, nothing complex. No graphics. Compact fonts are enabled. mkiv lua stats > used config file: selfautoparent:/texmf/web2c/texmfcnf.lua mkiv lua stats > used cache path: C:/ConTeXt_LMTX/tex/texmf-cache/luametatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e mkiv lua stats > resource resolver: loadtime 0.042 seconds, 1 scans with scantime 0.035 seconds, 0 shared scans, 37 found files, scanned paths: C:/Users/micro/texmf mkiv lua stats > stored bytecode data: 507 modules (0.236 sec), 106 tables (0.015 sec), 613 chunks (0.251 sec) mkiv lua stats > traced context: maxstack: 4107, freed: 2452, unreachable: 1655 mkiv lua stats > cleaned up reserved nodes: 78 nodes, 8 lists of 438 mkiv lua stats > node memory usage: 6869 attribute, 4608 dir, 4612 glue, 84 gluespec, 2304 glyph, 3072 hlist, 3 kern, 647 mathspec, 5 penalty, 2 temp mkiv lua stats > node list callback tasks: 13 unique task lists, 37 instances (re)created, 87130 calls mkiv lua stats > h-node processing time: 3.010 seconds including kernel mkiv lua stats > inserted spaces in output: 106016 mkiv lua stats > attribute processing time: 0.236 seconds front- and backend mkiv lua stats > driver time: 2.099 seconds mkiv lua stats > used backend: pdf mkiv lua stats > jobdata time: 0.191 seconds saving, 0.051 seconds loading mkiv lua stats > callbacks: file: 34388, saved: 191153, direct: 8, function: 173575, value: 345, message: 0, bytecode: 613, late 0, total: 400082 (1184 per page) mkiv lua stats > randomizer: resumed with value 0.88558194690977 mkiv lua stats > v-node processing time: 0.194 seconds mkiv lua stats > loaded patterns: agr:gr:62 cn::58 de::3 deo:de:9 en::1 es::64 fr::63 it::66 la::67 ru::22, load time: 0.000 mkiv lua stats > structure elements: 28145 element chains identified mkiv lua stats > interactive elements: 3982 references, 4873 destinations mkiv lua stats > margin data: 497 entries, 0 pending mkiv lua stats > loaded fonts: 14 files: antykwatorunska-bold.otf, antykwatorunskacond-bold.otf, antykwatorunskacond-regular.otf, libertinusmath-regular.otf, libertinusmono-regular.otf, libertinussans-italic.otf, libertinussans-regular.otf, libertinusserif-italic.otf, libertinusserif-regular.otf, libertinusserif-semibold.otf, zentb___.otf, keteraramtsova.ttf, msjh.ttc, times.ttf mkiv lua stats > font engine: otf 3.131, afm 1.513, tfm 1.000, 84 instances, 67 shared in backend, 3 common vectors, 64 common hashes, load time 0.947 seconds mkiv lua stats > text directions: 4.273 seconds mkiv lua stats > math tweaking time: 0.152 seconds, 18 math goodie tables mkiv lua stats > pdf annotations: 3982 links (3982 unique), 0 special mkiv lua stats > font embedding time: 0.058 seconds, 13 fonts mkiv lua stats > result saved in file: misquotation_bodyonly.pdf, compresslevel 1, objectcompresslevel 3 mkiv lua stats > positions: 4034 collected, 1722 deltas, 4025 shared partials, 112 partial entries mkiv lua stats > used platform: win64, type: windows, binary subtree: texmf-win64 mkiv lua stats > used engine: luametatex version: 2.1004, functionality level: 20221214, format id: 679, compiler: gcc mkiv lua stats > tex properties: 740852 hash slots used of 2097152, 51846 control sequences, approximate memory usage: 73 MB mkiv lua stats > lua properties: engine: lua 5.4, used memory: 315 MB, ctx: 288 MB, max: 288 MB, symbol mask: utf (τεχ) mkiv lua stats > runtime: 19.332 seconds, 338 processed pages, 338 shipped pages, 17.484 pages/second and here are the stats for the same book with pdf images replacing some of the text (I still don't have rights to some images, so preparing either way): mkiv lua stats > used config file: selfautoparent:/texmf/web2c/texmfcnf.lua mkiv lua stats > used cache path: C:/ConTeXt_LMTX/tex/texmf-cache/luametatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e mkiv lua stats > resource resolver: loadtime 0.044 seconds, 1 scans with scantime 0.037 seconds, 0 shared scans, 62 found files, scanned paths: C:/Users/micro/texmf mkiv lua stats > stored bytecode data: 507 modules (0.236 sec), 106 tables (0.015 sec), 613 chunks (0.251 sec) mkiv lua stats > traced context: maxstack: 4112, freed: 2457, unreachable: 1655 mkiv lua stats > cleaned up reserved nodes: 78 nodes, 8 lists of 438 mkiv lua stats > node me
Re: [NTG-context] bottlenecks
Am 16.12.22 um 18:10 schrieb Hans Hagen via ntg-context: So the challenge is how to determine bottlenecks. Are there users on this list that have document runs of more than 10 seconds (as reference: the luametatex manual takes < 9 seconds for 350 pages and loads plenty fonts and has many tables) or have many (small) runs and are annoyed by the runtime? And if so, what does one guess are the bottlenecks? (1) This is my 366 page ConTeXt book: mkiv lua stats > used config file: home:texmf/web2c/texmfcnf.lua;selfautoparent:/texmf/web2c/texmfcnf.lua mkiv lua stats > used cache path: /Users/hraban/lmtx/tex/texmf-cache/luametatex-cache/context/c821363a6b068765c2a3bbfe3917fcf5 mkiv lua stats > resource resolver: loadtime 0.046 seconds, 1 scans with scantime 0.037 seconds, 0 shared scans, 165 found files, scanned paths: /Users/hraban/texmf mkiv lua stats > stored bytecode data: 507 modules (0.378 sec), 106 tables (0.017 sec), 613 chunks (0.395 sec) mkiv lua stats > traced context: maxstack: 3112, freed: 1448, unreachable: 1664 mkiv lua stats > cleaned up reserved nodes: 202 nodes, 22 lists of 517 mkiv lua stats > node memory usage: 1137 attribute, 46 dir, 559 glue, 82 gluespec, 177 glyph, 236 hlist, 3 kern, 647 mathspec, 48 penalty, 2 submlist, 2 temp mkiv lua stats > node list callback tasks: 13 unique task lists, 180 instances (re)created, 216502 calls mkiv lua stats > h-node processing time: 2.544 seconds including kernel mkiv lua stats > synctex tracing: 46 referenced files, 22 files ignored, 41808 objects flushed, logfile: prd_de.synctex mkiv lua stats > attribute processing time: 0.201 seconds front- and backend mkiv lua stats > driver time: 5.265 seconds mkiv lua stats > used backend: pdf mkiv lua stats > jobdata time: 0.271 seconds saving, 0.056 seconds loading mkiv lua stats > callbacks: file: 26780, saved: 405242, direct: 524, function: 281755, value: 2288, message: 0, bytecode: 613, late 0, total: 717202 (1960 per page) mkiv lua stats > randomizer: resumed with value 0.57895496379132 mkiv lua stats > v-node processing time: 1.464 seconds mkiv lua stats > loaded tex modules: 10 requested, all found (*-filter *-libs-imp-zint *-module-catcodes *-s-fonts-show *-s-symbols-show *-scite *-syntax-groups *-syntax-highlight *-vim *-visual) mkiv lua stats > loaded patterns: de::3 en::1, load time: 0.000 mkiv lua stats > xml load time: 0.002 seconds, 1 files, 1 converted mkiv lua stats > lxml preparation time: 0.000 seconds, 0 nodes, 31 lpath calls, 4 cached calls mkiv lua stats > interactive elements: 2536 references, 2870 destinations mkiv lua stats > margin data: 295 entries, 1 pending mkiv lua stats > loaded fonts: 31 files: latinmodern-math.otf, lmmono10-italic.otf, lmmono10-regular.otf, lmmonocaps10-regular.otf, lmmonolt10-bold.otf, lmmonolt10-boldoblique.otf, lmmonoltcond10-regular.otf, lmmonoslant10-regular.otf, lmroman10-bold.otf, lmroman10-italic.otf, lmroman10-regular.otf, lmromancaps10-regular.otf, lmsans10-oblique.otf, lmsans10-regular.otf, cc-icons.ttf, dejavusansmono.ttf, marvosym.ttf, font awesome 5 brands-regular-400.otf, font awesome 5 free-regular-400.otf, font awesome 5 free-solid-900.otf, cambria.ttc, cambriab.ttf, cambriai.ttf, cambriaz.ttf, segoe ui bold italic.ttf, segoe ui bold.ttf, segoe ui italic.ttf, segoe ui.ttf, segoepr.ttf, symbola.otf, unifrakturmaguntia.ttf (suspicious x height) mkiv lua stats > font engine: otf 3.131, afm 1.513, tfm 1.000, 193 instances, 157 shared in backend, 11 common vectors, 146 common hashes, load time 15.349 seconds mkiv lua stats > body font sizes: defined: 10pt 11pt 12pt 14.4pt 17.3pt 20.7pt 4pt 5pt 6pt 7pt 8pt 9pt, undefined: 11.2pt 14pt 16.8pt mkiv lua stats > visualization time: 0.154 seconds mkiv lua stats > metapost: 0.678 seconds, loading: 0.092, execution: 0.651, n: 528, average: 0.003, instances: 2, luacalls: 37745 (file: 31092, text: 0, script: 3507, log: 3146), memory: 8.825 M mkiv lua stats > math tweaking time: 8.659 seconds, 116 math goodie tables mkiv lua stats > math processing time: 0.012 seconds mkiv lua stats > graphics processing time: 2.885 seconds including tex, 247 processed images, 69 unique asked, 42 bad names mkiv lua stats > pdf annotations: 2536 links (2535 unique), 0 special mkiv lua stats > font embedding time: 0.084 seconds, 31 fonts mkiv lua stats > result saved in file: prd_de.pdf, compresslevel 1, objectcompresslevel 0 mkiv lua stats > positions: 6786 collected, 3635 deltas, 6678 shared partials, 46 partial entries mkiv lua stats > used platform: osx-64, type: unix, binary subtree: texmf-osx-64 mkiv lua stats > used engine: luametatex version: 2.1004, functionality level: 20221208, format id: 678, compiler: clang mkiv lua stats > tex properties: 740852 hash slots used of 2097152, 59643 control sequences, approximate m
Re: [NTG-context] Non-standard font alternatives
> On 13 Dec 2022, at 7:53 pm, Hans Hagen via ntg-context > wrote: > > On 12/13/2022 9:15 AM, Matthew McCabe via ntg-context wrote: >> Hi list, >> I'm looking to import a font with medium and light weights (in this case >> Roboto) and define font alternatives so one can quickly switch to light text >> just as one would switch to bold text. There is a stackexchange answer from >> Wolfgang >> (https://tex.stackexchange.com/questions/303648/context-font-weights >> <https://tex.stackexchange.com/questions/303648/context-font-weights>) which >> details a solution to this problem for ConTeXt MkIV but despite my best >> efforts I haven't been able to get things to work for me. There is the >> Roboto typescript example on ConTeXt garden but it isn't exactly what I'm >> looking for as for the document I'm making I would prefer to be able to >> treat the font weights as alternatives rather than separate families since I >> will be switching often. > take a look at type-imp-plex.mkiv (just remove the \s! in your case) > > basically you define two typefaces: normal and light and then just switch > between these, as in: > > at the top of your document you say > > \usebodyfont[plex] % preloads > \usebodyfont[plex-light] % preloads > > \setupbodyfont[plex] % enables main font > > and after that > > {\switchtobodyfont[plex-light] } > > will do a consistent switch > > Hans > > > - > Hans Hagen | PRAGMA ADE > Ridderstraat 27 | 8061 GH Hasselt | The Netherlands > tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl > - > > ___ > If your question is of interest to others as well, please add an entry to the > Wiki! > > maillist : ntg-context@ntg.nl / > https://www.ntg.nl/mailman/listinfo/ntg-context > webpage : https://www.pragma-ade.nl / http://context.aanhet.net > archive : https://bitbucket.org/phg/context-mirror/commits/ > wiki : https://contextgarden.net > ___ Thanks for the reply and your help Hans, ok so if I understand correctly the canonical way to integrate light weight font is to define two typefaces. I wrote up a typescript for (Sans) Roboto based on the example typescript from ConTeXt garden using only the Sans variants and it’s working well. For anyone else looking to do something similar, since the typescript is just a tex file it seems if one places it in one’s local directory it will be accessible when ConTeXt generates the pdf. I saved it as type-imp-roboto.tex in my local directory and used ‘\usebodyfont[roboto]’ and ‘\usebodyfont[roboto-light]’ to preload the fonts as recommended (\usetypescriptfile didn’t seem to be required). Here is my typescript, for the Sans Roboto font, pretty much picked out of the context garden example typescript for Roboto: \definefontfeature[robotofeatures][ mode=node, ccmp=yes, % character composition liga=yes, tlig=yes, % ligatures pnum=yes, cpsp=yes, % capital spacing kern=yes, language=dflt, protrusion=quality, expansion=quality, ] \definefontfeature[smallcaps][ % use with \addff smcp=yes, % smallcaps % c2sc=yes, % caps to smallcaps ] \starttypescript[sans][roboto,robotosans] \definefontsynonym[Roboto-Regular][name:robotoregular] \definefontsynonym[Roboto-Black][name:robotoblack] \definefontsynonym[Roboto-BlackItalic][name:robotoblackitalic] \definefontsynonym[Roboto-Bold][name:robotobold] \definefontsynonym[Roboto-BoldItalic][name:robotobolditalic] \definefontsynonym[Roboto-Italic][name:robotoitalic] \definefontsynonym[Roboto-Light][name:robotolight] \definefontsynonym[Roboto-LightItalic][name:robotolightitalic] \definefontsynonym[Roboto-Medium][name:robotomedium] \definefontsynonym[Roboto-MediumItalic][name:robotomediumitalic] \definefontsynonym[Roboto-Italic][name:robotoitalic] \definefontsynonym[Roboto-Regular][name:robotoregular] \definefontsynonym[Roboto-Thin][name:robotothin] \definefontsynonym[Roboto-ThinItalic][name:robotothinitalic] \stoptypescript \starttypescript[sans][roboto,robotosans][name] \definefontsynonym [SansThin] [Roboto-Thin] [features=robotofeatures] \definefontsynonym [SansThinItalic] [Roboto-ThinItalic] [features=robotofeatures] \definefontsynonym [SansThinSlanted] [Roboto-ThinItalic] [features=robotofeatures] \definefontsynonym [SansLight][Roboto-Light] [features=robotofeatures] \definefontsynonym [SansLightItalic] [Roboto-LightIt
Re: [NTG-context] Non-standard font alternatives
On 12/13/2022 9:15 AM, Matthew McCabe via ntg-context wrote: Hi list, I'm looking to import a font with medium and light weights (in this case Roboto) and define font alternatives so one can quickly switch to light text just as one would switch to bold text. There is a stackexchange answer from Wolfgang (https://tex.stackexchange.com/questions/303648/context-font-weights <https://tex.stackexchange.com/questions/303648/context-font-weights>) which details a solution to this problem for ConTeXt MkIV but despite my best efforts I haven't been able to get things to work for me. There is the Roboto typescript example on ConTeXt garden but it isn't exactly what I'm looking for as for the document I'm making I would prefer to be able to treat the font weights as alternatives rather than separate families since I will be switching often. take a look at type-imp-plex.mkiv (just remove the \s! in your case) basically you define two typefaces: normal and light and then just switch between these, as in: at the top of your document you say \usebodyfont[plex] % preloads \usebodyfont[plex-light] % preloads \setupbodyfont[plex] % enables main font and after that {\switchtobodyfont[plex-light] } will do a consistent switch Hans - Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl - ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
Re: [NTG-context] two issues with variable fonts
On 12/2/2022 7:06 PM, Pablo Rodriguez via ntg-context wrote: Hi Hans, I have two issues with variable fonts (using current latest from yesterday): 1. Using the following sample: \usemodule[fonts-variable] \starttext \showfontvariations[font=file:grenze.ttf] \stoptext With the fonts from https://github.com/Omnibus-Type/Grenze/tree/master/fonts-/gx, I get the following error message: lua error: run callback [6]: ...ext/tex/texmf-context/tex/context/base/mkxl/lpdf-emb.lmt:84: number (local 'n') has no integer representation stack traceback: ...base/mkxl/lpdf-emb.lmt:84: in upvalue 'tocardinal2' ...base/mkxl/lpdf-emb.lmt:771: in local 'writer' ...base/mkxl/lpdf-emb.lmt:2358: in field 'integer index' ...base/mkxl/lpdf-ini.lmt:828: in upvalue 'run' ...base/mkxl/lpdf-ini.lmt:859: in field 'finalizedocument' ...base/mkxl/lpdf-lmt.lmt:3413: in field '?' ...base/mkxl/luat-run.lmt:58: in function <...ext/tex/texmf-context/tex/context/base/mkxl/luat-run.lmt:56> mtx-context | fatal error: return code: 1 This crashes LuaMetaTeX but not LuaTeX. i'll catch it 2. The other font is Recursive (https://github.com/arrowtype/recursive/tree/main/fonts/recursive_for_googlefonts). \usemodule[fonts-variable] \starttext \showfontvariations[font=file:recursive.ttf] \stoptext There are some some instances (in pages 4 to 14) that don’t have the font (only Latin Modern Roman). i'll catch it Also in the last instances (at least, pages 19 to 25), kerning or interletter spacing clearly needs to be improved. no clue (ok, a little) Hans - Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl - ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
[NTG-context] two issues with variable fonts
Hi Hans, I have two issues with variable fonts (using current latest from yesterday): 1. Using the following sample: \usemodule[fonts-variable] \starttext \showfontvariations[font=file:grenze.ttf] \stoptext With the fonts from https://github.com/Omnibus-Type/Grenze/tree/master/fonts-/gx, I get the following error message: lua error: run callback [6]: ...ext/tex/texmf-context/tex/context/base/mkxl/lpdf-emb.lmt:84: number (local 'n') has no integer representation stack traceback: ...base/mkxl/lpdf-emb.lmt:84: in upvalue 'tocardinal2' ...base/mkxl/lpdf-emb.lmt:771: in local 'writer' ...base/mkxl/lpdf-emb.lmt:2358: in field 'integer index' ...base/mkxl/lpdf-ini.lmt:828: in upvalue 'run' ...base/mkxl/lpdf-ini.lmt:859: in field 'finalizedocument' ...base/mkxl/lpdf-lmt.lmt:3413: in field '?' ...base/mkxl/luat-run.lmt:58: in function <...ext/tex/texmf-context/tex/context/base/mkxl/luat-run.lmt:56> mtx-context | fatal error: return code: 1 This crashes LuaMetaTeX but not LuaTeX. 2. The other font is Recursive (https://github.com/arrowtype/recursive/tree/main/fonts/recursive_for_googlefonts). \usemodule[fonts-variable] \starttext \showfontvariations[font=file:recursive.ttf] \stoptext There are some some instances (in pages 4 to 14) that don’t have the font (only Latin Modern Roman). Also in the last instances (at least, pages 19 to 25), kerning or interletter spacing clearly needs to be improved. Many thanks for your help, Pablo ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
Re: [NTG-context] Xml filtering in Lua
Hi Duncan, Thank you for pointing this out! I knew this was true inside the xmlns namespace, so you can’t have identical xml:id tags, but you’re probably right that it’s better to avoid this confusion altogether. Alas, this doesn’t help with my problem. Since there was a type in my minimal example from my experimentations, I include a corrected version, avoiding the identical tags All best Thomas \startbuffer[test] This is the first test 22/11/16 This is the second test 22/11/17 This will be the content of the first chapter. This will be the content of the second chapter. \stopbuffer \startxmlsetups xml:testsetups \xmlsetsetup{#1}{*}{-} \xmlsetsetup{#1}{document|chapters|chapter|content|emph}{xml:*} \stopxmlsetups \xmlregistersetup{xml:testsetups} \startxmlsetups xml:document \xmlflush{#1} \stopxmlsetups \startxmlsetups xml:chapters \xmlflush{#1} \stopxmlsetups \startxmlsetups xml:chapter \xmlfunction {#1} {chapter} \xmlflush {#1} \stopxmlsetups \startxmlsetups xml:chapter:content \xmltext {#1} {content} \stopxmlsetups \startxmlsetups xml:emph {\em \xmlflush {#1}} \stopxmlsetups \startluacode function xml.functions.chapter (t) local ch_id = t.at.ch:id local metadata = xml.filter (t, '../../topics/topic[@t:id=="%s"]', ch_id) print (inspect(metadata)) lxml.command(t, ".", "xml:chapter:content") context.par () context (ch_id) context.par () end \stopluacode > On 16. Nov 2022, at 17:18, Duncan Hothersall via ntg-context > wrote: > > I'm not sure about the code, sorry, but I do know that an XML document can't > have two IDs of the same value. Typically you would use a linkend attribute > on the element which is referencing an id (in this case the topics, I think). > > Probably doesn't help with your problem, but it's likely a prerequisite for > it to work. > > Bests, > > Duncan ___ 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] LMTX: reimplementing texquotes as OTF feature
Hans Hagen via ntg-context writes: > can you show what is wrong and what it should be with > > fonts.handlers.otf.addfeature { > name = "germantexlig", > type = "ligature", > data = { > ['“'] = { "`", "`" }, > ['”'] = { "'", "'" }, > ['„'] = { '"', "`" }, > ['“'] = { '"', "'" }, > ['‘'] = { "`" }, > ['’'] = { "'" } > } > } Since `` and "' map to the same character, only "' works. The table has only 5 entries, not 6! (This took me a while to realize. ;)) > best not use an existign feature because we accumulate ... features > come in order (you can force order if needed as you probably saw in > one of the test files) > > \definefontfeature[ltest][germantexlig=yes,trep=no] \addff{ltest} I think "texlig" and "texsub" aren't existing features. But even renaming doesn't help. I've attached the working Schola screenshot and the broken LModern behavior. -- Leah Neukirchenhttps://leahneukirchen.org/ ___ 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] LMTX: reimplementing texquotes as OTF feature
On 11/11/2022 10:19 PM, Leah Neukirchen via ntg-context wrote: Hi, as Hans recommended in the last video meeting, I tried to implement the texquotes feature using OTF features, and hit two problems: 1) To support German quotes as well, I have two ligatures that end up as the same glyph: `` -> “ "' -> “ This can't be in the same ligature feature, as it will overwrite the table entry with a duplicate key. After some fiddling, I decided to map "' to a Unicode PUA symbol and then add a second feature that maps this symbol to “ using the substitute feature. This works for TeX Gyre Schola. But perhaps someone knows a nicer way. 2) This approach doesn't work for lmodern or palatino, I still get "' as inch-sign/quote there... anything else I need to tweak for these fonts? \startluacode fonts.handlers.otf.addfeature { name = "texlig", type = "ligature", data = { ['“'] = { "`", "`" }, ['”'] = { "'", "'" }, ['„'] = { '"', "`" }, [''] = { '"', "'" }, ['‘'] = { "`" }, ['’'] = { "'" } } } fonts.handlers.otf.addfeature { name = "texsub", type = "substitute", data = { [''] = '“', } } \stopluacode % with lmodern or palatino it breaks \setupbodyfont[schola] \definefontfeature[ltest][texlig=yes,texsub=yes,trep=no] \addff{ltest} \starttext ``foo'' `foo' "`foo"' 19" rack \stoptext can you show what is wrong and what it should be with fonts.handlers.otf.addfeature { name = "germantexlig", type = "ligature", data = { ['“'] = { "`", "`" }, ['”'] = { "'", "'" }, ['„'] = { '"', "`" }, ['“'] = { '"', "'" }, ['‘'] = { "`" }, ['’'] = { "'" } } } best not use an existign feature because we accumulate ... features come in order (you can force order if needed as you probably saw in one of the test files) \definefontfeature[ltest][germantexlig=yes,trep=no] \addff{ltest} - Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl - ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
[NTG-context] LMTX: reimplementing texquotes as OTF feature
Hi, as Hans recommended in the last video meeting, I tried to implement the texquotes feature using OTF features, and hit two problems: 1) To support German quotes as well, I have two ligatures that end up as the same glyph: `` -> “ "' -> “ This can't be in the same ligature feature, as it will overwrite the table entry with a duplicate key. After some fiddling, I decided to map "' to a Unicode PUA symbol and then add a second feature that maps this symbol to “ using the substitute feature. This works for TeX Gyre Schola. But perhaps someone knows a nicer way. 2) This approach doesn't work for lmodern or palatino, I still get "' as inch-sign/quote there... anything else I need to tweak for these fonts? \startluacode fonts.handlers.otf.addfeature { name = "texlig", type = "ligature", data = { ['“'] = { "`", "`" }, ['”'] = { "'", "'" }, ['„'] = { '"', "`" }, [''] = { '"', "'" }, ['‘'] = { "`" }, ['’'] = { "'" } } } fonts.handlers.otf.addfeature { name = "texsub", type = "substitute", data = { [''] = '“', } } \stopluacode % with lmodern or palatino it breaks \setupbodyfont[schola] \definefontfeature[ltest][texlig=yes,texsub=yes,trep=no] \addff{ltest} \starttext ``foo'' `foo' "`foo"' 19" rack \stoptext Thanks, -- Leah Neukirchenhttps://leahneukirchen.org/ ___ 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] New VSCode extenstion using ConTeXt Language server
On Tue, 8 Nov 2022 22:20:10 +0800 Ramkumar KB via ntg-context wrote: > Hello All, > > I have published the new VSCode Extension for ConTeXt, that I > presented during the 2022 ConTeXt meeting - > > https://wiki.contextgarden.net/VSCode Any plan to make it work with other editors which do support LSP? Sincerely, Saša -- In this endeavor there is no loss or diminution, and a little advancement on this path can protect one from the most dangerous type of fear. ___ 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] New VSCode extenstion using ConTeXt Language server
On Tue, 8 Nov 2022 22:20:10 +0800 Ramkumar KB via ntg-context wrote: > Hello All, > > I have published the new VSCode Extension for ConTeXt, that I > presented during the 2022 ConTeXt meeting - > > https://wiki.contextgarden.net/VSCode Any plan to make it work with other editors which do support LSP? Sincerely, Saša -- In this endeavor there is no loss or diminution, and a little advancement on this path can protect one from the most dangerous type of fear. ___ 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] Bug in math alignment
Hi, On Wed, Nov 2, 2022 at 9:19 PM Otared Kavian via ntg-context wrote: > > Dear Jeong, > > Thanks for testing my example, and pointing to the solution using \dm (which > I didn’t know…). > I think the correct behaviour of math alignments should avoid using > additional commands such as \dm. > > We’ll see what Hans and Mikael say. > > Best regards: OK > > On 2 Nov 2022, at 12:53, Jeong Dal via ntg-context wrote: > > Dear Otared, > > > I think there is an issue with the size of math fonts in \frac when used in > math alignments, as it is is shown in the following example. > > > I confirm what you said. > > However, if I use \dm{} instead of \displaystyle as following, then the > output is correct. > > \placeformula > \startformula > \startalignedcases > \NC - \Delta u \NC = 0 \NC \qquad\text{in }\, \Omega \NR > \NC \dm{\frac{\partial u}{\partial {\bi n}}} > \NC = V u + \phi \NC \qquad\text{on }\, \partial\Omega. \NR > \stopalignedcases > \stopformula > or this (with\type{\displaystyle} added) > \placeformula > \startformula > \startalignedcases > \NC - \Delta u \NC = 0 \NC \qquad\text{in }\, \Omega \NR > \NC \dm{\frac{\partial u}{\partial {\bi n}}} > \NC = V u + \phi \NC \qquad\text{on }\, \partial\Omega. \NR > \stopalignedcases > \stopformula > > In this example, it is OK to use \dm inside of \startformula … \stopformula. > I am not sure that it is what Hans and Mikael want. > > Thanks, > > Best regards, > > Dalyoung > > I think in this case it is better to use a mathsimplealign instead of a matrix. \definemathsimplealign[pdeproblem][ left={\startmathfenced[cases]}, right=\stopmathfenced, align={1:right,2:left,3:left}, strut=yes, ] \definemathsimplealign[collected][ left={\startmathfenced[sesac]}, right=\stopmathfenced, align={1:right,2:left,3:left}, strut=yes, ] \starttext \placeformula \startformula \startpdeproblem \NC - \Delta u \NC = 0 \NC \qquad\text{in } \Omega \NR \NC \frac{\partial u}{\partial {\bi n}} \NC = V u + \phi \NC \qquad\text{on } \partial\Omega \NR \stoppdeproblem \stopformula \placeformula \startformula \startcollected \NC - \Delta u \NC = 0 \NC \qquad\text{in } \Omega \NR \NC \frac{\partial u}{\partial {\bi n}} \NC = V u + \phi \NC \qquad\text{on } \partial\Omega \NR \stopcollected \stopformula \stoptext Best, Mikael ___ 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] Bug in math alignment
Dear Jeong, Thanks for testing my example, and pointing to the solution using \dm (which I didn’t know…). I think the correct behaviour of math alignments should avoid using additional commands such as \dm. We’ll see what Hans and Mikael say. Best regards: OK > On 2 Nov 2022, at 12:53, Jeong Dal via ntg-context wrote: > > Dear Otared, > >> >> I think there is an issue with the size of math fonts in \frac when used in >> math alignments, as it is is shown in the following example. >> > > I confirm what you said. > > However, if I use \dm{} instead of \displaystyle as following, then the > output is correct. > > \placeformula > \startformula > \startalignedcases > \NC - \Delta u \NC = 0 \NC \qquad\text{in }\, \Omega \NR > \NC \dm{\frac{\partial u}{\partial {\bi n}}} > \NC = V u + \phi \NC \qquad\text{on }\, \partial\Omega. \NR > \stopalignedcases > \stopformula > or this (with\type{\displaystyle} added) > \placeformula > \startformula > \startalignedcases > \NC - \Delta u \NC = 0 \NC \qquad\text{in }\, \Omega \NR > \NC \dm{\frac{\partial u}{\partial {\bi n}}} > \NC = V u + \phi \NC \qquad\text{on }\, \partial\Omega. \NR > \stopalignedcases > \stopformula > > In this example, it is OK to use \dm inside of \startformula … \stopformula. > I am not sure that it is what Hans and Mikael want. > > Thanks, > > Best regards, > > Dalyoung > > > > > ___ > 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 > ___ Otared Kavian e-mail: ota...@gmail.com Phone: +33 6 88 26 70 95 ___ 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] Bug in math alignment
Dear Otared, > > I think there is an issue with the size of math fonts in \frac when used in > math alignments, as it is is shown in the following example. > I confirm what you said. However, if I use \dm{} instead of \displaystyle as following, then the output is correct. \placeformula \startformula \startalignedcases \NC - \Delta u \NC = 0 \NC \qquad\text{in }\, \Omega \NR \NC \dm{\frac{\partial u}{\partial {\bi n}}} \NC = V u + \phi \NC \qquad\text{on }\, \partial\Omega. \NR \stopalignedcases \stopformula or this (with\type{\displaystyle} added) \placeformula \startformula \startalignedcases \NC - \Delta u \NC = 0 \NC \qquad\text{in }\, \Omega \NR \NC \dm{\frac{\partial u}{\partial {\bi n}}} \NC = V u + \phi \NC \qquad\text{on }\, \partial\Omega. \NR \stopalignedcases \stopformula In this example, it is OK to use \dm inside of \startformula … \stopformula. I am not sure that it is what Hans and Mikael want. Thanks, Best regards, Dalyoung ___ 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] Bug in math alignment
Hi Hans and Mikael, I think there is an issue with the size of math fonts in \frac when used in math alignments, as it is is shown in the following example. %% begin bug-mathalignment.tex \definemathmatrix[alignedcases] [align={1:right,2:left,3:left}, distance=3pt, left={\left\{}, right={\right.}, style=\displaystyle] \starttext Consider this \placeformula \startformula \startalignedcases \NC - \Delta u \NC = 0 \NC \qquad\text{in }\, \Omega \NR \NC \frac{\partial u}{\partial {\bi n}} \NC = V u + \phi \NC \qquad\text{on }\, \partial\Omega. \NR \stopalignedcases \stopformula or this (with\type{\displaystyle} added) \placeformula \startformula \startalignedcases \NC - \Delta u \NC = 0 \NC \qquad\text{in }\, \Omega \NR \NC \displaystyle\frac{\partial u}{\partial {\bi n}} \NC = V u + \phi \NC \qquad\text{on }\, \partial\Omega. \NR \stopalignedcases \stopformula Actually, one should have this \startformula \frac{\partial u}{\partial {\bi n}} = V u + \phi \qquad\text{on }\, \partial\Omega. \stopformula If one adds \type{\displaystyle} both to the numerator and denominator of \type{\frac}, the result is correct: \placeformula \startformula \startalignedcases \NC - \Delta u \NC = 0 \NC \qquad\text{in }\, \Omega \NR \NC \frac{\displaystyle\partial u}{\displaystyle\partial {\bi n}} \NC = V u + \phi \NC \qquad\text{on }\, \partial\Omega. \NR \stopalignedcases \stopformula \stoptext %% end bug-mathalignment.tex ___ 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] Spacing in \unit - SOLVED
Hi Gavin Thank four your effort. I found out, that the following definition of a new unit, i called it SI, results also in a correct spaceing in the math environment: \defineunit[SI][alternative=text] It seems, that the option alternative=text solves the problem with no spaces between value and unit in the math environment. Maybe this can be used to solve it easier in the code. I will have a look at phys-dim to solve it directly, if I find the time. Best regards Oli > Am 12.10.2022 um 23:54 schrieb Gavin via ntg-context - ntg-context at ntg.nl > : > > Hi Max, Alan, Bruce, Hans, et.al > > I solved my four issues with \unit spacing. In the process, I prevented > unwanted line breaks and removed an overzealous backspace before division > symbols. Below is a MWE that shows all of these issues, as well as pictures > of the result with the unmodified phys-dim.mkxl and with my modified > phys-dim.mkxl. The final result is exactly what I wanted. > > If anyone wants my changes, either for their own use or to improve the > distributed phys-dim.mkxl, I’m happy to share. > > Thanks for all of your comments! > Gavin > > > MWE: > > \setuppapersize[A5] > > \starttext > > The \type{\unit} command in text produces \unit{1.23e5 kg m^2/s^2}. > > Inline math \type{$\unit$} produces $\unit{1.23e5 kg m^2/s^2}$. > > Display math produces > \startformula > \unit{1.23e5 kg m^2/s^2} + \unit{8.64e5 newton m} = \unit{987,000 joule} > \stopformula > > Line breaking in math: > > {\hsize=0pt $G = \unit{6.6743e-11 m3 kg-1 s-2}$} > > \blank > Line breaking in text: > > {\hsize=0pt \unit{6.6743e-11 m3 kg-1 s-2}} > > \stoptext > > Output with unmodified phys-dim.mkxl: > > > Output with my modified phys-dim.mkxl: > > > > >> On Oct 10, 2022, at 12:15 AM, Max Chernoff via ntg-context >> wrote: >> >> Hi Alan, >> >>> I would very strongly argue that the space between the number and the >>> following units be UNBREAKABLE. Perhaps a thin space (preference), but >>> most certainly non-breakable. >>> >>> Similarly around the times in scientific notation. >>> >>> I further cannot imagine that a line break be acceptable around a \cdot >>> in composite units. >>> >>> This can possibly lead to overfill and underfill, something that I find >>> *infinitely* more acceptable then breaking numbers and units. >> >> Yes, I agree completely here. >> >>> I do not know or use the \units command. Maybe it uses unbreakable >>> spaces, maybe not. I would never use it unless it could be configured >>> to only use nonbreakable spaces. >> >> The current behaviour doesn't break the unit from the number, but it >> does split the scientific notation. >> >> This test file: >> >> \starttext >> \hsize=0pt Math: $G = \unit{6.6743e-11 m3 kg-1 s-2}$ >> >> \hsize=0pt Text: \unit{6.6743e-11 m3 kg-1 s-2} >> \stoptext >> >> gives: >> >> Math: >> 퐺= >> 6.6743× >> 10–11m3⋅kg–1⋅s–2 >> Text: >> 6.6743 >> × >> 10−11 m3⋅kg−1⋅s−2 >> >> which isn't great. In my opinion, the \unit command should be typeset in an >> \hbox (or similar) since I can't think of any circumstances where breaking >> it would be reasonable. >> >> 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 > ___ signature.asc Description: Message signed with OpenPGP ___ 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] Spacing in \unit - SOLVED
On 2022-10-12 17:54, Gavin via ntg-context wrote: Hi Max, Alan, Bruce, Hans, et.al I solved my four issues with \unit spacing. In the process, I prevented unwanted line breaks and removed an overzealous backspace before division symbols. Below is a MWE that shows all of these issues, as well as pictures of the result with the unmodified phys-dim.mkxl and with my modified phys-dim.mkxl. The final result is exactly what I wanted. If anyone wants my changes, either for their own use or to improve the distributed phys-dim.mkxl, I’m happy to share. Thanks for all of your comments! Gavin MWE: \setuppapersize[A5] \starttext The \type{\unit} command in text produces \unit{1.23e5 kg m^2/s^2}. Inline math \type{$\unit$} produces $\unit{1.23e5 kg m^2/s^2}$. Display math produces \startformula \unit{1.23e5 kg m^2/s^2} + \unit{8.64e5 newton m} = \unit{987,000 joule} \stopformula Line breaking in math: {\hsize=0pt $G = \unit{6.6743e-11 m3 kg-1 s-2}$} \blank Line breaking in text: {\hsize=0pt \unit{6.6743e-11 m3 kg-1 s-2}} \stoptext Output with unmodified phys-dim.mkxl: Output with my modified phys-dim.mkxl: On Oct 10, 2022, at 12:15 AM, Max Chernoff via ntg-context wrote: Hi Alan, I would very strongly argue that the space between the number and the following units be UNBREAKABLE. Perhaps a thin space (preference), but most certainly non-breakable. Similarly around the times in scientific notation. I further cannot imagine that a line break be acceptable around a \cdot in composite units. This can possibly lead to overfill and underfill, something that I find *infinitely* more acceptable then breaking numbers and units. Yes, I agree completely here. I do not know or use the \units command. Maybe it uses unbreakable spaces, maybe not. I would never use it unless it could be configured to only use nonbreakable spaces. The current behaviour doesn't break the unit from the number, but it does split the scientific notation. This test file: \starttext \hsize=0pt Math: $G = \unit{6.6743e-11 m3 kg-1 s-2}$ \hsize=0pt Text: \unit{6.6743e-11 m3 kg-1 s-2} \stoptext gives: Math: 퐺= 6.6743× 10–11m3⋅kg–1⋅s–2 Text: 6.6743 × 10−11 m3⋅kg−1⋅s−2 which isn't great. In my opinion, the \unit command should be typeset in an \hbox (or similar) since I can't think of any circumstances where breaking it would be reasonable. Thanks, -- Max ___ It does look like you have introduced additional space before the solidus. Was that intentional? -- Rik ___ 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] Spacing in \unit - SOLVED
Hi Max, Alan, Bruce, Hans, et.al I solved my four issues with \unit spacing. In the process, I prevented unwanted line breaks and removed an overzealous backspace before division symbols. Below is a MWE that shows all of these issues, as well as pictures of the result with the unmodified phys-dim.mkxl and with my modified phys-dim.mkxl. The final result is exactly what I wanted. If anyone wants my changes, either for their own use or to improve the distributed phys-dim.mkxl, I’m happy to share. Thanks for all of your comments! Gavin MWE: \setuppapersize[A5] \starttext The \type{\unit} command in text produces \unit{1.23e5 kg m^2/s^2}. Inline math \type{$\unit$} produces $\unit{1.23e5 kg m^2/s^2}$. Display math produces \startformula \unit{1.23e5 kg m^2/s^2} + \unit{8.64e5 newton m} = \unit{987,000 joule} \stopformula Line breaking in math: {\hsize=0pt $G = \unit{6.6743e-11 m3 kg-1 s-2}$} \blank Line breaking in text: {\hsize=0pt \unit{6.6743e-11 m3 kg-1 s-2}} \stoptext Output with unmodified phys-dim.mkxl: PastedGraphic-3.pdf Description: Adobe PDF document Output with my modified phys-dim.mkxl: PastedGraphic-2.pdf Description: Adobe PDF document > On Oct 10, 2022, at 12:15 AM, Max Chernoff via ntg-context > wrote: > > Hi Alan, > >> I would very strongly argue that the space between the number and the >> following units be UNBREAKABLE. Perhaps a thin space (preference), but >> most certainly non-breakable. >> >> Similarly around the times in scientific notation. >> >> I further cannot imagine that a line break be acceptable around a \cdot >> in composite units. >> >> This can possibly lead to overfill and underfill, something that I find >> *infinitely* more acceptable then breaking numbers and units. > > Yes, I agree completely here. > >> I do not know or use the \units command. Maybe it uses unbreakable >> spaces, maybe not. I would never use it unless it could be configured >> to only use nonbreakable spaces. > > The current behaviour doesn't break the unit from the number, but it > does split the scientific notation. > > This test file: > > \starttext > \hsize=0pt Math: $G = \unit{6.6743e-11 m3 kg-1 s-2}$ > > \hsize=0pt Text: \unit{6.6743e-11 m3 kg-1 s-2} > \stoptext > > gives: > > Math: > 퐺= > 6.6743× > 10–11m3⋅kg–1⋅s–2 > Text: > 6.6743 > × > 10−11 m3⋅kg−1⋅s−2 > > which isn't great. In my opinion, the \unit command should be typeset in an > \hbox (or similar) since I can't think of any circumstances where breaking > it would be reasonable. > > 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 ___
Re: [NTG-context] Example from Practex Journal
Jeroen via ntg-context schrieb am 08.10.2022 um 13:17: Hello, Could anybody help me out with the setup and a MWE to get a document exactly as the one from Steve Peter in the Practex Journal in 2005 as in https://tug.org/pracjourn/2005-1/peter/peter.pdf The articles used a now out of date module [1] which is MkII only and no longer part of the ConTeXt distribution. The filename of the module is s-ptj-01.mkii when you're looking for the source. I find this one hard to replicate. What is the font type that was used for this document ? The document uses TeX Gyre Pagella as main font which can be loaded with \setupbodyfont[pagella]. What are your problems with the style of the document? [1] https://tug.org/pracjourn/stylefiles.html Wolfgang ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
Re: [NTG-context] Example from Practex Journal
Am 08.10.22 um 13:17 schrieb Jeroen via ntg-context: Could anybody help me out with the setup and a MWE to get a document exactly as the one from Steve Peter in the Practex Journal in 2005 as in https://tug.org/pracjourn/2005-1/peter/peter.pdf I find this one hard to replicate. What is the font type that was used for this document ? His email is at the end of the article ... Herbert ___ 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] Example from Practex Journal
Hello, Could anybody help me out with the setup and a MWE to get a document exactly as the one from Steve Peter in the Practex Journal in 2005 as in https://tug.org/pracjourn/2005-1/peter/peter.pdf I find this one hard to replicate. What is the font type that was used for this document ? Thanks Jeroen ___ 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] Spacing issue with \digits in math mode
Hi list, I have been trying to understand the workings of the \unit command, which is producing strange spacing in math mode. In an effort to be more systematic, I began by investigating the related \digit command. \digit works well in text, but in math mode the comma separators produce unwanted space. \digits {12,345.67} vs.\ $\digits {12,345.67}$ Below is a one page test document, derived from the code in phys-dim.mkxl. I think a simple fix would be to treat the comma as “ord” inside a number, but I don’t know if that is easy or not. I’d also like the space removed from around the “x" in scientific notation, which might be accomplished the same way. Thanks for all the work on spacing in math! Gavin \setuppapersize[A4] \showmakeup[mathglue] %\mathspacingmode=1 \starttext Digits in math mode have problems with comma separators. \startbuffer 10 \setdigitmode {1} \setdigitorder{0} $\digits {12,345.67e89}$ 20 \setdigitmode {2} \setdigitorder{0} $\digits {12,345.67e89}$ 30 \setdigitmode {3} \setdigitorder{0} $\digits {12,345.67e89}$ 40 \setdigitmode {4} \setdigitorder{0} $\digits {12,345.67e89}$ 50 \setdigitmode {5} \setdigitorder{0} $\digits {12,345.67e89}$ 60 \setdigitmode {6} \setdigitorder{0} $\digits {12,345.67e89}$ 11 \setdigitmode {1} \setdigitorder{1} $\digits {12,345.67e89}$ 21 \setdigitmode {2} \setdigitorder{1} $\digits {12,345.67e89}$ 31 \setdigitmode {3} \setdigitorder{1} $\digits {12,345.67e89}$ 41 \setdigitmode {4} \setdigitorder{1} $\digits {12,345.67e89}$ 51 \setdigitmode {5} \setdigitorder{1} $\digits {12,345.67e89}$ 61 \setdigitmode {6} \setdigitorder{1} $\digits {12,345.67e89}$ \stopbuffer \typebuffer This is typeset as: \startlines \getbuffer \stoplines In text, the \type{\digits} command works fine: \setdigitmode {2}\setdigitorder{0}\digits{12,345.67e89}. \blank Suggestion: Within \type{\digits} (and probably \type{\units}) the comma could be an \quotation{ord} rather than a \quotation{pun}. This appears to be how the period is handled. \blank I personally think the space around the \quotation{$\times$} is excessive, especially when the number is in a formula. \startformula \digits {12,345.67e89} + \digits {12,345.67e89} \stopformula I would like the \quotation{$\times$} to also be an \quotation{ord} when used for scientific notation. \stoptext ___ 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] LMTX generates PDFs with non-working fonts on real printers
On 10/4/2022 5:52 PM, Leah Neukirchen via ntg-context wrote: I looked into /StemV 0 (which was different in MKIV) but that works with the TTF files, too. Also should be ignored for Type 3 anyway. Does your test have type 3 fonts? Should be no problem. Hans - Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl - ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
Re: [NTG-context] LMTX generates PDFs with non-working fonts on real printers
Hans Hagen via ntg-context writes: > Hi, > > does (the obsolete) > > \enabledirectives[backend.pdf.forcecidset] > > help No; same blank page. :( (Also MKIV works without CIDSet...) I looked into /StemV 0 (which was different in MKIV) but that works with the TTF files, too. Also should be ignored for Type 3 anyway. Really out of ideas now... -- Leah Neukirchenhttps://leahneukirchen.org/ ___ 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] LMTX generates PDFs with non-working fonts on real printers
On 10/4/2022 12:53 PM, Leah Neukirchen wrote: Hans Hagen via ntg-context writes: On 10/4/2022 4:16 AM, Angel M Alganza via ntg-context wrote: On Mon, Oct 03, 2022 at 07:17:10PM +0200, Leah Neukirchen via ntg-context wrote: When I print this "directly" (i.e. sending the raw PDF to the printer) on a Ricoh MP3053 or on a Samsung CLP-680DW, I just get an empty page. I believe that is the exact same problem I have and that I described a few days ago in my email with subject "Missing letters and numbers in printout". I have some grids on my document, which gets printed out, but nothing else does. Another data point: Brother B205 doesn't print it either. But would all of these use the same licensed PDF renderer... The PDFs render fine on every PDF reader I could find. Same here. PDFs generated directly from Context MKIV from TeXLive 2022 using LuaTeX 1.5 render fine on these printers. I've also printed PDFs from pdfTeX in the past fine. Same here. Any ideas what I should try to help debug this? I was told that this is the default now, that isn't going to change, and that I could always use LuaTeX instead. I could also use LaTeX, I guess, but I'd rather keep using ConTeXt at least while my old 32 bits OpenBSD installation works. what happens if you include the lmtx pdf in a mkiv document as image On above Brother B205, this document: \starttext \externalfigure[foo.mkxl.pdf] \stoptext only prints the page number of the outer document, which is kept in a seperate font: NREXLC+LMRoman12-Regular CID Type 0C Identity-H yes yes yes 5 0 CLLXEY+LMRoman12-Regular CID Type 0C Identity-H yes yes yes 8 0 I tried converting the pdf with pdfjam (which uses pdfTeX internally) before, which probably uses similar mechanisms, and it didn't work either. what is sent to the printer .. maybe not pdf but something the printer driver produces Hans - Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl - ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
Re: [NTG-context] LMTX generates PDFs with non-working fonts on real printers
Hans Hagen via ntg-context writes: > On 10/4/2022 4:16 AM, Angel M Alganza via ntg-context wrote: >> On Mon, Oct 03, 2022 at 07:17:10PM +0200, Leah Neukirchen via >> ntg-context wrote: >> >>> When I print this "directly" (i.e. sending the raw PDF to the printer) >>> on a Ricoh MP3053 or on a Samsung CLP-680DW, I just get an empty page. >> I believe that is the exact same problem I have and that I described >> a >> few days ago in my email with subject "Missing letters and numbers in >> printout". I have some grids on my document, which gets printed out, >> but nothing else does. Another data point: Brother B205 doesn't print it either. But would all of these use the same licensed PDF renderer... >>> The PDFs render fine on every PDF reader I could find. >> Same here. >> >>> PDFs generated directly from Context MKIV from TeXLive 2022 using >>> LuaTeX 1.5 render fine on these printers. >>> I've also printed PDFs from pdfTeX in the past fine. >> Same here. >> >>> Any ideas what I should try to help debug this? >> I was told that this is the default now, that isn't going to change, >> and >> that I could always use LuaTeX instead. I could also use LaTeX, I >> guess, but I'd rather keep using ConTeXt at least while my old 32 bits >> OpenBSD installation works. > what happens if you include the lmtx pdf in a mkiv document as image On above Brother B205, this document: \starttext \externalfigure[foo.mkxl.pdf] \stoptext only prints the page number of the outer document, which is kept in a seperate font: NREXLC+LMRoman12-Regular CID Type 0C Identity-H yes yes yes 5 0 CLLXEY+LMRoman12-Regular CID Type 0C Identity-H yes yes yes 8 0 I tried converting the pdf with pdfjam (which uses pdfTeX internally) before, which probably uses similar mechanisms, and it didn't work either. -- Leah Neukirchenhttps://leahneukirchen.org/ ___ 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] LMTX generates PDFs with non-working fonts on real printers
Hans Hagen via ntg-context writes: > On 10/3/2022 7:17 PM, Leah Neukirchen via ntg-context wrote: >> Hi, >> I use LuaMetaTeX 2.10 20220918 + ConTeXt LMTX 2022.09.11. >> Here's a tiny test document, I disabled PDF compression but it also >> doesn't work with the default settings. >> \setupbackend[level=0,compresslevel=0] >> \starttext >> Just a line of text. >> \stoptext >> When I print this "directly" (i.e. sending the raw PDF to the >> printer) >> on a Ricoh MP3053 or on a Samsung CLP-680DW, I just get an empty page. >> The PDFs render fine on every PDF reader I could find. >> Conversion to PostScript with pstopdf (poppler-22.07.0) and then >> sending the PS renders the document correctly on the printer. >> PDFs generated directly from Context MKIV from TeXLive 2022 using >> LuaTeX 1.5 render fine on these printers. >> I've also printed PDFs from pdfTeX in the past fine. >> I attached the non-working 'foo.pdf.mkix' >> and the working 'foo.pdf.mkiv' file. >> I tried to disable font subsetting to debug this further, but I >> couldn't figure out how to do it. > > subsetting should not be a problem and both files are subsetted (lmxt > a bit different but not fundamentally) Well the idea was to have the same font stream in both files, so we exclude that from the reasons it breaks. Curiously, when I use Deja Vu: \setupbodyfont[dejavu] Then I get a VHOYGZ+DejaVuSansMonoCID TrueType Identity-H yes yes yes 8 0 and the PDF prints fine! So it must be related to how Type 0C fonts are written out, I think. -- Leah Neukirchenhttps://leahneukirchen.org ___ 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] About macro numberstriped ()
Ok, it works very well. Without wanting to insist, how to have the same hatching with two different figures ? Thanks. Fabrice Le dim. 2 oct. 2022 à 13:38, Hans Hagen via ntg-context a écrit : > On 10/2/2022 1:02 PM, Fabrice Couvreur via ntg-context wrote: > > I just tried but I got an empty file... > > Do we agree that I have to replace the two lines with the other two ? > > Regarding what you proposed, how to get the same type of hatching in > > both figures ? > no, we disagree here; add them after the min/max lines > > Hans > > - >Hans Hagen | PRAGMA ADE >Ridderstraat 27 | 8061 GH Hasselt | The Netherlands > tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl > - > > ___ > If your question is of interest to others as well, please add an entry to > the Wiki! > > maillist : ntg-context@ntg.nl / > https://www.ntg.nl/mailman/listinfo/ntg-context > webpage : https://www.pragma-ade.nl / http://context.aanhet.net > archive : https://bitbucket.org/phg/context-mirror/commits/ > wiki : https://contextgarden.net > > ___ > ___ 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] About macro numberstriped ()
On 10/2/2022 1:02 PM, Fabrice Couvreur via ntg-context wrote: I just tried but I got an empty file... Do we agree that I have to replace the two lines with the other two ? Regarding what you proposed, how to get the same type of hatching in both figures ? no, we disagree here; add them after the min/max lines Hans - Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl - ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
Re: [NTG-context] About macro numberstriped ()
I just tried but I got an empty file... Do we agree that I have to replace the two lines with the other two ? Regarding what you proposed, how to get the same type of hatching in both figures ? \startMPcode path p, q, r, b ; p := unitsquare xyscaled (4cm,4cm) ; z[0] = (2cm,0cm) ; z[1] = (2cm,4cm) ; z[2] = (0cm,2cm) ; q := llcorner p--z[0]--z[1]--z[2]--cycle ; r := unitsquare xyscaled (1cm,1cm) shifted(0,3cm) ; b := (0cm,0cm) -- lrcorner r -- lrcorner p -- cycle; draw r withpattern image ( draw (llcorner unitsquare -- urcorner unitsquare) scaled 5mm ; % how to get the corner dots ) withpatternscale 1/4 withpen pencircle scaled 1bp withcolor green ; draw b withpattern image ( draw (llcorner unitsquare -- urcorner unitsquare) scaled 5mm ; % how to get the corner dots ) withpatternscale 1/16 withpen pencircle scaled 1bp withcolor green ; draw b withpen pencircle scaled 1bp withcolor darkgreen; draw r withpen pencircle scaled 1bp withcolor darkgreen; draw p; label.llft("B", p) ; label.lrt("C", p) ; label.ulft("A", p) ; label.urt("D", p) ; label.urt("F", lrcorner r) ; label.lft("E", llcorner r) ; label.top("G", urcorner r) ; \stopMPcode Le dim. 2 oct. 2022 à 11:52, Hans Hagen via ntg-context a écrit : > On 10/2/2022 11:20 AM, Floris van Manen via ntg-context wrote: > > > > > > On 02/10/2022 10:55, Fabrice Couvreur via ntg-context wrote: > >> Initially, there was a bug with maro numberstriped() and Hans > >> suggested another sensible approach to me, but you don't get the same > >> shape of the hatches depending on the dimensions of the squares. > > > > some unexpected side effect show up when the unitsquare is xyscaled to a > > rectangle like (2.5cm,1cm) > > it seems related to the angle chosen > > > > e.g. > > > > > > > > \startMPcode > > > > path p, q, r, b ; > > p := unitsquare xyscaled (4cm,4cm) ; > > q := unitsquare xyscaled (1cm,1cm) shifted(0,3cm) ; > > r := unitsquare xyscaled (2.5cm,1cm) shifted(1cm,3cm) ; > > b := unitsquare xyscaled (3cm,3cm) shifted(1cm,0) ; > > > > draw r anglestriped (1,35,2) withcolor red; > > draw q anglestriped (1,35,2) withcolor green; > > draw b anglestriped (1,35,2) withcolor cyan; > > draw p; > > draw q; > > draw b; > > draw r; > > > > label.llft("D", p) ; > > label.lrt("C", p) ; > > label.ulft("A", p) ; > > label.urt("B", p) ; > > label.urt("P", lrcorner r) ; > > label.lft("Q", llcorner r) ; > > label.top("M", urcorner r) ; > > > > \stopMPcode > > for that you can patch mp-tool.mpxl (l 676): > > maximum := max (xpart llcorner mask, xpart urcorner mask, ypart > llcorner mask, ypart urcorner mask) ; > minimum := min (xpart llcorner mask, xpart urcorner mask, ypart > llcorner mask, ypart urcorner mask) ; > % a hack: > maximum := maximum + max(xpart urcorner shape, ypart urcorner shape); > minimum := minimum - max(xpart urcorner shape, ypart urcorner shape); > > a bit overkill but it seems to work > > Hans > > - >Hans Hagen | PRAGMA ADE >Ridderstraat 27 | 8061 GH Hasselt | The Netherlands > tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl > - > > ___ > If your question is of interest to others as well, please add an entry to > the Wiki! > > maillist : ntg-context@ntg.nl / > https://www.ntg.nl/mailman/listinfo/ntg-context > webpage : https://www.pragma-ade.nl / http://context.aanhet.net > archive : https://bitbucket.org/phg/context-mirror/commits/ > wiki : https://contextgarden.net > > ___ > ___ 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] About macro numberstriped ()
Hi, Initially, there was a bug with maro numberstriped() and Hans suggested another sensible approach to me, but you don't get the same shape of the hatches depending on the dimensions of the squares. Your solution works perfectly but I'm trying to understand the action of the parameters: the first ? the second represents the angle in degrees that the segments make the third represents the gap between two segments Thanks Fabrice Le sam. 1 oct. 2022 à 21:46, Mikael Sundqvist via ntg-context < ntg-context@ntg.nl> a écrit : > Hi, > > Is this what you are looking for? > > On Sat, Oct 1, 2022 at 7:43 PM Fabrice Couvreur via ntg-context > wrote: > > > > Hi Hans, > > When the rectangles are not identical, how to have the same type of > hatching in both ? > > Thanks. > > Fabrice > > > > > > \starttext > > \startlinecorrection[blank] > > \startmidaligned > > \switchtobodyfont[9pt] > > \startMPcode > > path p, q, r, b ; > > p := unitsquare xyscaled (4cm,4cm) ; > > z[0] = (2cm,0cm) ; > > z[1] = (2cm,4cm) ; > > z[2] = (0cm,2cm) ; > > q := llcorner p--z[0]--z[1]--z[2]--cycle ; > > r := unitsquare xyscaled (1cm,1cm) shifted(0,3cm) ; > > b := unitsquare xyscaled (3cm,3cm) shifted(1cm,0) ; > > > > draw r anglestriped (1,45,2) withcolor cyan; > draw b anglestriped (1,45,2) withcolor cyan; > > > > >draw p; > >draw b; > >draw r; > > > > label.llft("D", p) ; > > label.lrt("C", p) ; > > label.ulft("A", p) ; > > label.urt("B", p) ; > > label.urt("P", lrcorner r) ; > > label.lft("Q", llcorner r) ; > > label.top("M", urcorner r) ; > > > > \stopMPcode > > \stopmidaligned > > \stoplinecorrection > > \stoptext > > > > > > /Mikael > > ___ > 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] About macro numberstriped ()
Hi, Is this what you are looking for? On Sat, Oct 1, 2022 at 7:43 PM Fabrice Couvreur via ntg-context wrote: > > Hi Hans, > When the rectangles are not identical, how to have the same type of hatching > in both ? > Thanks. > Fabrice > > > \starttext > \startlinecorrection[blank] > \startmidaligned > \switchtobodyfont[9pt] > \startMPcode > path p, q, r, b ; > p := unitsquare xyscaled (4cm,4cm) ; > z[0] = (2cm,0cm) ; > z[1] = (2cm,4cm) ; > z[2] = (0cm,2cm) ; > q := llcorner p--z[0]--z[1]--z[2]--cycle ; > r := unitsquare xyscaled (1cm,1cm) shifted(0,3cm) ; > b := unitsquare xyscaled (3cm,3cm) shifted(1cm,0) ; > draw r anglestriped (1,45,2) withcolor cyan; draw b anglestriped (1,45,2) withcolor cyan; > >draw p; >draw b; >draw r; > > label.llft("D", p) ; > label.lrt("C", p) ; > label.ulft("A", p) ; > label.urt("B", p) ; > label.urt("P", lrcorner r) ; > label.lft("Q", llcorner r) ; > label.top("M", urcorner r) ; > > \stopMPcode > \stopmidaligned > \stoplinecorrection > \stoptext > > /Mikael ___ 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] About macro numberstriped ()
Hi Hans, When the rectangles are not identical, how to have the same type of hatching in both ? Thanks. Fabrice \starttext \startlinecorrection[blank] \startmidaligned \switchtobodyfont[9pt] \startMPcode path p, q, r, b ; p := unitsquare xyscaled (4cm,4cm) ; z[0] = (2cm,0cm) ; z[1] = (2cm,4cm) ; z[2] = (0cm,2cm) ; q := llcorner p--z[0]--z[1]--z[2]--cycle ; r := unitsquare xyscaled (1cm,1cm) shifted(0,3cm) ; b := unitsquare xyscaled (3cm,3cm) shifted(1cm,0) ; draw r withpattern image ( draw (llcorner unitsquare -- urcorner unitsquare) scaled 5mm ; % how to get the corner dots ) withpatternscale 1/8 withpen pencircle scaled 1pt withcolor cyan; ; draw b withpattern image ( draw (llcorner unitsquare -- urcorner unitsquare) scaled 5mm ; % how to get the corner dots ) withpatternscale 1/16 withpen pencircle scaled 1pt withcolor cyan; ; draw p; draw b; draw r; label.llft("D", p) ; label.lrt("C", p) ; label.ulft("A", p) ; label.urt("B", p) ; label.urt("P", lrcorner r) ; label.lft("Q", llcorner r) ; label.top("M", urcorner r) ; \stopMPcode \stopmidaligned \stoplinecorrection \stoptext Le mer. 28 sept. 2022 à 21:05, Henning Hraban Ramm via ntg-context < ntg-context@ntg.nl> a écrit : > Am 28.09.22 um 15:29 schrieb Hans Hagen via ntg-context: > > On 9/28/2022 3:11 PM, Fabrice Couvreur via ntg-context wrote: > >> PS : What is the exact meaning of the word "blobs" because my English > >> is average ? > > in order to get 'lines' you need to fill the two opposing corners with > > "blobs of ink" > > Otherwise, a BLOB is a “binary large object”, e.g. if you save image > data to a database. > > Hraban > > > ___ > 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] lmtx status
Hi, At the ctx meeting we released luametatex, that is, the source code is now in the context zip (so it grew a few MB). At the same time Mojca set up some contextgarden repositories on github. We're working on a setup for users to generate older snapshots, if needed (for instance because there are platform changes). She's also working on cmake based installation helpers. One of the things we did was pruning the fonts that are part of the installation. With a few exceptions the type one fonts were dropped, which is most noticeable for math. There is no need for px and tx fonts, they served their puspose in the transition from old style t1 fonts to opentype math (when we started with mkiv; we could have dropped them already). We're looking into antykwa math as well as in alternative script and calligraphic math alphabets so eventually virtual math from t1 construction can be dropped completely (in principle if can be integrated in the tweak mechanisms) because it is not wirth the effort to make them better. That means that we will ship some additional companion fonts. There are math times fonts but they are currently not free and there is some effort going on to turn them opentype so we can ditch their setups too (we can't test anyway; to some extend that is also true for minion math). High on the agenda is euler (in combination with pagella). This also relates to upgraded mixed script and calligraphic support in math. It actually means that enabling alternative alphabets will happen a bit differently (more naturally integrated as we introduced dedicated ranges of slots). Again a side effect is that we have more granular math glyph properties (opentype math is too limited but basically frozen so we have to get over that and move on). We (Mikael and me) also try to compensate for the ommissions and weird things in unicode math but it will take some time before we have that all documented. One of the next uploads will have the pruned / upgraded texmf tree (one can always install more in the local tree of course). At some point installing from the garden (or from a git clone) will also be supported (basically anyone can host a lmtx install). For the next texlive we hope to switch to lmtx as default and that also means that luametatex is the runner then. One can (as currently in lmtx) always run luatex with "--luatex". Als-in-all it's a lot of work but we're getting there. Hans - Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl - ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
Re: [NTG-context] Missing letters and numbers in printout
On Mon, Sep 26, 2022 at 07:10:40PM +0200, Pablo Rodriguez via ntg-context wrote: BTW, is TeX Gyre Heros the font with missing chars in the printed version of your PDF document? It doesn't seem to be that: $ pdffonts a6.pdf name type encoding emb sub uni object ID - --- --- --- - KBVQDT+LMRoman8-Regular CID Type 0C Identity-H yes yes yes 2 0 PISBZT+LMRoman6-Regular CID Type 0C Identity-H yes yes yes 3 0 VGDDRM+LMRoman12-Regular CID Type 0C Identity-H yes yes yes 9 0 BBBAHN+LMMono8-Regular CID Type 0C Identity-H yes yes yes 10 0 There might be a workaround (or a way of testing this), compiling the PDF document with LuaTeX instead of with LuaMetaTeX. It seems it is compiled with LuaTeX: $ pdfinfo a6.pdf Title: a6 Creator:LuaMetaTeX 2.09 20220429 + ConTeXt LMTX 2022.05.11 11:36 Producer: LuaMetaTeX-2.09 CreationDate: Tue Sep 20 07:19:29 2022 CEST ModDate:Tue Sep 20 07:19:29 2022 CEST Tagged: no UserProperties: no Suspects: no Form: none JavaScript: no Pages: 1 Encrypted: no Page size: 595.276 x 841.89 pts (A4) Page rot: 0 File size: 25630 bytes Optimized: no PDF version:1.7 If you compile it invoking "context source.tex", use "context --luatex source.tex". When I try that I get: $ context --luatex a6lua.tex mtx-context | redirect luametatex -> luatex: luatex --luaonly "/mnt/tex/tex/texmf-linux-64/bin/mtxrun.lua" --script mtx-context --luatex a6lua.tex --redirected mtxrun | unknown script 'mtx-context.lua' or 'mtx-mtx-context.lua' But the way to know for sure which tools generated your PDF document and whether fonts are embedded, "pdfinfo your-file.pdf" and "pdffonts your-file.pdf" are your friends. I didn't know any of the poppler-utils, thank you! Otherwise, the only option about your documents is guessing. I guess. :-) Ángel ___ 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] Missing letters and numbers in printout
On 9/26/22 16:06, Angel M Alganza via ntg-context wrote: > Hello, Hi Ángel, > [...] > I tried printing the same file (from the same USB drive) into a > different printer, this time connected to a computer, and sending the > file from it, which worked just fine. My guess is that the first > printer in missing the font the document uses, whereas the second > printer received the font from the computer (Devuan Linux), which has > the appropriate font. Could that be correct? From my experience, this is possible, but maybe not highly probable. By default, ConTeXt includes fonts by default, as far as I can remember (I have been using it for over a decade). > In all previous ocasions I used the version of ConTeXt included in > Texlive on Devuan, but a few months ago I decided to install ConTeXt > using the official distribution instead. Could that explain the change > in behaviour I'm seeing? Could it be that the previous versions I used > somehow embeded the fonts into the PDF file but the current one doesn't? Again, I’d very surprised if that were the case. BTW, is TeX Gyre Heros the font with missing chars in the printed version of your PDF document? I think that your printer is having issues with the embedded font in your PDF document. There might be a workaround (or a way of testing this), compiling the PDF document with LuaTeX instead of with LuaMetaTeX. If you compile it invoking "context source.tex", use "context --luatex source.tex". It might be that your printer has problems with the way LuaMetaTeX embeds the fonts in the PDF (while it has none with LuaTeX). But the way to know for sure which tools generated your PDF document and whether fonts are embedded, "pdfinfo your-file.pdf" and "pdffonts your-file.pdf" are your friends. Both infos for the following source: \setupbodyfont[helvetica] \starttext \input zapf \stoptext $ pdffonts a.pdf name type encoding emb sub uni object ID - --- --- --- - TeXGyreHeros-Regular CID Type 0C Identity-H yes yes yes 1 0 $ pdfinfo a.pdf Title: a Creator:LuaMetaTeX 2.10 20220918 + ConTeXt LMTX 2022.09.11 20:44 Producer: LuaMetaTeX-2.10 CreationDate: Mon Sep 26 18:29:02 2022 CEST ModDate:Mon Sep 26 18:29:02 2022 CEST Tagged: no UserProperties: no Suspects: no Form: none JavaScript: no Pages: 1 Encrypted: no Page size: 595.276 x 841.89 pts (A4) Page rot: 0 File size: 7531 bytes Optimized: no PDF version:1.7 Otherwise, the only option about your documents is guessing. Just in case it might help, Pablo ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
Re: [NTG-context] IBM Plex updates
Den mån 26 sep. 2022 09:11Henning Hraban Ramm via ntg-context < ntg-context@ntg.nl> skrev: > Hi, just for information: > There were new releases of the IBM Plex fonts recently: > https://github.com/IBM/plex/releases > > They’re now at version 2.3. Some faces were annoyingly renamed (Semi > Bold and Medium to SmBld and Medm). > > Hraban > Thank you for bringing this interesting type family to my attention! /bpj ___ > 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] Math alignment question
On Fri, Sep 23, 2022 at 8:46 PM Aditya Mahajan via ntg-context wrote: > > On Thu, 22 Sep 2022, Jeong Dal via ntg-context wrote: > > > Dear Mikael and Hans, > > > > Recently, you introdued the new command “\alignhere, \breakhere, \skiphere” > > which works fine. > > > > Since I usually use the following code that is adopted from My > > Way(Mathalign.pdf), I’d like to know that there is a way to use > > “\alignhere, \breakhere, \skiphere” for the case below? > > > > \startformula\startalign > > \NC A \NC = 3 \NR > > \NC B \NC = 5 \NR > > \stopalign\stopformula > > The way I see it is that the current implementation is that it is way to > break a _single_ long equation to multiple lines. For multiple equations, you > still need to use the \startalign method. > Indeed, that is the case. These formulas are done for single chain equations. The example given above consists of two formulas, and the new broken formula type simply does not fit. You can play with more than one \alignhere, but they will only set new align points. I think \startalign ... \stopalign is the way to go there. If it is cumbersome to type all the \NC and \NR one could in principle thing of similar input as for the simple matrices. Your example then would become \startalign A, = 3; B, = 5; \stopalign /Mikael ___ 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] Lato typescripts (MKIV/LMTX)
Hi, With the latest upload (2022-09-16 14:41) I wanted to compare some older projects that I've used with MKIV to the LMTX 2.10.00. In one of which I am using the Lato 2.0 font ( https://packages.debian.org/sid/fonts-lato). With MKIV I get the correct output but LMTX complains about not being able to find the font. There seems to be an issue with the typescript file type-imp-lato.mkiv. MWE: \setupbodyfont[lato,12pt] \starttext Hello World! \stoptext --- ConTeXt ver: 2022.09.11 20:44 MKIV - luatex version: 1.1501, functionality level: 7539: mtxrun --script fonts --list --all --pattern=*lato* identifier familyname fontname filename subfont instances latoblacklato latoblackLato-Bla.ttf latoblackitalic lato latoblackitalic Lato-BlackItalic.ttf latobold lato latobold Lato-Bol.ttf latobolditalic lato latobolditalic Lato-BoldItalic.ttf latoextraboldlato latoheavyLato-Heavy.ttf latoextralight lato latothin Lato-Thin.ttf latohairline lato latohairline Lato-Hai.ttf latohairlineitalic lato latohairlineitalic Lato-HaiIta.ttf latoheavylato latoheavyLato-Heavy.ttf latoheavyitalic lato latoheavyitalic Lato-HeavyItalic.ttf latoitalic lato latoitalic Lato-Italic.ttf latolightlato latolightLato-Lig.ttf latolightitalic lato latolightitalic Lato-LightItalic.ttf latomedium lato latomedium Lato-Medium.ttf latomediumitalic lato latomediumitalic Lato-MediumItalic.ttf latonormal lato latohairline Lato-Hai.ttf latoregular lato latoregular Lato-Reg.ttf latosemibold lato latosemibold Lato-Semibold.ttf latosemibolditalic lato latosemibolditalic Lato-SemiboldItalic.ttf latothin lato latothin Lato-Thin.ttf latothinitalic lato latothinitalic Lato-ThinItalic.ttf fonts > otf loading > loading '/usr/share/texlive/texmf-dist/fonts/truetype/typoland/lato/Lato-Regular.ttf', hash 'lato-regular' mkiv lua stats > loaded fonts: 3 files: xitsmath-bold.otf, xitsmath-regular.otf, lato-regular.ttf --- ConTeXt ver: 2022.09.11 20:44 LMTX - luametatex version: 2.1, functionality level: 20220918: mtxrun --script fonts --list --all --pattern=*lato* identifier familyname fontname filename subfont instances latoblacklato latoblackLato-Bla.ttf latoblackitalic lato latoblackitalic Lato-BlackItalic.ttf latobold lato latobold Lato-Bol.ttf latobolditalic lato latobolditalic Lato-BoldItalic.ttf latoextraboldlato latoheavyLato-Heavy.ttf latoextralight lato latothin Lato-Thin.ttf latohairline lato latohairline Lato-Hai.ttf latohairlineitalic lato latohairlineitalic Lato-HaiIta.ttf latoheavylato latoheavyLato-Heavy.ttf latoheavyitalic lato latoheavyitalic Lato-HeavyItalic.ttf latoitalic lato latoitalic Lato-Italic.ttf latolightlato latolightLato-Lig.ttf latolightitalic lato latolightitalic Lato-LightItalic.ttf latomedium lato latomedium Lato-Medium.ttf latomediumitalic lato latomediumitalic Lato-MediumItalic.ttf latonormal lato latohairline Lato-Hai.ttf latoregular lato latoregular Lato-Reg.ttf latosemibold lato latosemibold Lato-Semibold.ttf latosemibolditalic lato latosemibolditalic Lato-SemiboldItalic.ttf latothin lato latothin Lato-Thin.ttf latothinitalic lato latothinitalic Lato-ThinItalic.ttf close source> level 2, order 6, name '/usr/share/texmf/tex/context/fonts/mkiv/type-imp-lato.mkiv' fonts > defining > font with asked name 'lato-regular' is not found using lookup 'file' fonts > defining > unable to define 'lato-regular' as 'lato-12pt-ss-tf-0--0' --- If I change the file: reference I get it working with both MKIV/LMTX: \starttypescript [\s!sans] [lato] [\s!name] \setups[\s!font:\s!fallback:\s!sans] % \definefontsynonym [\s!Sans] [\s!file:lato-regular] [\s!features=\s!default] % \definefontsynonym [\s!SansBold] [\s!file:lato-bold] [\s!features=\s!default] \definefontsynonym [\s!Sans] [\s!file:lato-reg] [\s!features=\s!default] \definefontsynonym [\s!SansBold]
Re: [NTG-context] Can't no break between a close punctuation and a open punctuation
> > doc for example: > > > > ```lmtx > > \setscript[hanzi] > > \usetypescriptfile[mscore] > > \usebodyfont [mschinese,20pt] > > can you upgrade the chiese section in that file for windows 10+ as the > old fonts are gone > > (i tested with \definedfont[file:mingliu.ttc*chinese @ 10pt]) I adapted type-imp-mscore.mkiv to the situation of the fonts in Win10, and made type-imp-notocjksc.mkiv according to the Notocjksc fonts. I refer to type-imp-ipaex.mkiv, and I don't know if the method in it is outdated. At least, the test results are fine, though the resulting PDF is a bit too large to be included in this email. ___ 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 ___ font_testing.lmtx Description: Binary data type-imp-notocjksc.mkiv Description: Binary data type-imp-mscore.mkiv Description: Binary data ___ 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] setupexternalfigures and resoĺution
Am 02.09.22 um 10:39 schrieb Keith McKay via ntg-context: Thanks for this code Hraban. I tried this last night and it worked really well. I did have one stumbling block when I noticed that those image files with a space in their names were not found, however renaming without a space solved the problem. Is this a bug or a feature? The call to gm convert was lacking quoting of the file names. Fixed in attachment. While the code does some downsampling, the calculation is not always right, because it doesn’t consider scaling (or something like that). Hraban if not modules then modules = { } end modules ['grph-downsample'] = { version = 1.101, comment = "companion to grph-inc.mkiv", author= "Peter Münster", -- adapted to LMTX by Hraban copyright = "PRAGMA ADE / ConTeXt Development Team", license = "see context related readme files" } assert(not figures.getinfo2) figures.getinfo2 = function(name, page) -- [ [NTG-context] Pdf info with Lua/Ctx API ] if type(name) == "string" then name = { name = name, page = page } end if name.name then local data = figures.push(name) local info = figures.identify() if info.status.status ~= 0 then figures.check() -- !Counts pages here! end figures.pop() return --data info end end local format = string.format -- figures.cachepaths.path = "cache" -- should be setup-option local function sample_down(oldname, newname, resolution) print("DOWNSAMPLE sample_down " .. oldname .. " to " .. newname) local request = figures.current().request local width = request.width local height = request.height if resolution == "" then -- or (not width and not height) then print(format("DOWNSAMPLE Nothing to do: %s, %s, %s dpi, %s x %s px", oldname, newname, resolution, width, height)) return end local TEXpt = 65536 local inch = 72.27 -- MkIV: -- local image = img.scan{filename = oldname} -- LMTX: local image = figures.getinfo(oldname,1) image = image.status.private local xy = image.xsize / image.ysize if (not width and not height) then -- no size requested? use default width width = 300 * TEXpt end if not width then height = height / TEXpt width = height * xy end if not height then width = width / TEXpt height = width / xy end width = math.floor(width) height = math.floor(height) print(format("DOWNSAMPLE image size %dx%dpx. requested %dx%d?", image.xsize, image.ysize, width, height)) local xsize = math.floor(resolution * width / inch) local ysize = math.floor(resolution * height / inch) print(format("DOWNSAMPLE size %d x %d to %d x %d", image.xsize, image.ysize, xsize, ysize)) if xsize < image.xsize or ysize < image.ysize then local s = format("gm convert -resize %dx%d -resample %dx%d \"%s\" \"%s\"", xsize, ysize, resolution, resolution, oldname, newname) print("DOWNSAMPLE Conversion: " .. s) os.execute(s) else print(format("DOWNSAMPLE Nothing to do: %s, %s, %s dpi, %d x %d px", oldname, newname, resolution, width, height)) print(format("DOWNSAMPLE xsize = %d, ysize = %d", xsize, ysize)) end end local formats = {"png", "jpg", "gif"} for _, s in ipairs(formats) do figures.converters[s] = figures.converters[s] or {} figures.converters[s]["lowres." .. s] = sample_down end ___ 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] setupexternalfigures and resoĺution
Am 01.09.22 um 10:44 schrieb juh+ntg-context--- via ntg-context: Hi, what is resolution meant to do? Whatever I insert as resolution, I get no change. \setupexternalfigure[location={default,local},resolution=30] \starttext \externalfigure[hacker] \stoptext What am I missing? The resolution parameter is still not used by default ConTeXt, sorry. But you can use it with the attached lua file like: \loadluafile[grph-downsample] \doifmodeelse{print}{% \def\Resolution{300} }{% \def\Resolution{96} }% \setupexternalfigures[ %directory={./Logos,img}, conversion=lowres.jpg, resolution=\Resolution, ] Hraban if not modules then modules = { } end modules ['grph-downsample'] = { version = 1.100, comment = "companion to grph-inc.mkiv", author= "Peter Münster", -- adapted to LMTX by Hraban copyright = "PRAGMA ADE / ConTeXt Development Team", license = "see context related readme files" } assert(not figures.getinfo2) figures.getinfo2 = function(name, page) -- [ [NTG-context] Pdf info with Lua/Ctx API ] if type(name) == "string" then name = { name = name, page = page } end if name.name then local data = figures.push(name) local info = figures.identify() if info.status.status ~= 0 then figures.check() -- !Counts pages here! end figures.pop() return --data info end end local format = string.format -- figures.cachepaths.path = "cache" -- should be setup-option local function sample_down(oldname, newname, resolution) print("DOWNSAMPLE sample_down " .. oldname .. " to " .. newname) local request = figures.current().request local width = request.width local height = request.height if resolution == "" then -- or (not width and not height) then print(format("DOWNSAMPLE Nothing to do: %s, %s, %s dpi, %s x %s px", oldname, newname, resolution, width, height)) return end local TEXpt = 65536 local inch = 72.27 -- MkIV: -- local image = img.scan{filename = oldname} -- LMTX: local image = figures.getinfo(oldname,1) image = image.status.private local xy = image.xsize / image.ysize if (not width and not height) then -- no size requested? use default width width = 300 * TEXpt end if not width then height = height / TEXpt width = height * xy end if not height then width = width / TEXpt height = width / xy end width = math.floor(width) height = math.floor(height) print(format("DOWNSAMPLE image size %dx%dpx. requested %dx%d?", image.xsize, image.ysize, width, height)) local xsize = math.floor(resolution * width / inch) local ysize = math.floor(resolution * height / inch) print(format("DOWNSAMPLE size %d x %d to %d x %d", image.xsize, image.ysize, xsize, ysize)) if xsize < image.xsize or ysize < image.ysize then local s = format("gm convert -resize %dx%d -resample %dx%d %s %s", xsize, ysize, resolution, resolution, oldname, newname) print("DOWNSAMPLE Conversion: " .. s) os.execute(s) else print(format("DOWNSAMPLE Nothing to do: %s, %s, %s dpi, %d x %d px", oldname, newname, resolution, width, height)) print(format("DOWNSAMPLE xsize = %d, ysize = %d", xsize, ysize)) end end local formats = {"png", "jpg", "gif"} for _, s in ipairs(formats) do figures.converters[s] = figures.converters[s] or {} figures.converters[s]["lowres." .. s] = sample_down end ___ 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] String substitution using regular expressions and backreferences
On 8/25/2022 9:44 PM, Thangalin via ntg-context wrote: I've attempted to apply Wolfgang's subtle suggestion of using Lua to parse the input document using a regular expression via lpeg.replacer. The replacement itself works fine; however, in doing so the XML document structure is converted to text, which means that it is no longer possible to "flush" the XML for further processing as XML. The result is that any unresolved XML tags are written verbatim to the PDF: https://i.stack.imgur.com/9ZFND.png There are two other issues with this approach. First is efficiency. Second is that the processing function would have to be called for every XML element to capture the replacement. My original post asked about applying regex word substitution in a ConTeXt way, such as: \definereplacement[SubstMac][ match={Mc([A-Z].*)}, replace={\Mac \\1} ] \definereplacement[SubstPostmeridian][ match={[Pp]\\.[Mm]\\.}, replace={\cap{pm}} ] That seems like the cleanest approach because it would work on top of XML or any other source document. Nevertheless, here is what I tried, which partially works: \startbuffer[main] “Mr. McAnulty, I presume?” Regular text. Irregular text. \stopbuffer \startxmlsetups xml:xhtml \xmlsetsetup{\xmldocument}{*}{-} \xmlsetsetup{\xmldocument}{html|p|em}{xml:*}\stopxmlsetups \startxmlsetups xml:html \startdocument \xmlflush{#1} \stopdocument\stopxmlsetups % Paragraphs are followed by a paragraph break, but only if not nested.\startxmlsetups xml:p \xmlfunction{#1}{p} \par\stopxmlsetups \startxmlsetups xml:em \dontleavehmode{\em\xmlflush{#1}}\stopxmlsetups \startluacode function xml.functions.p( t ) rep = { [1] = { "McAnulty", "\\Mac Anulty" } } x = lpeg.replacer( rep ):match( tostring( xml.text( t ) ) ) buffers.assign( "p", context( x ) ) context.getbuffer{ "p" } end\stopluacode \xmlregistersetup{xml:xhtml} \def\Mac{% % Determine the sizes of 'M' and 'c'. \newbox\MacMBox% \setbox\MacMBox\hbox{M}% \newbox\MacCBox% \setbox\MacCBox\hbox{c}% % % Cheat to dynamically derive the kerning size by putting Mc in a box. % \newbox\MacKernBox% \setbox\MacKernBox\hbox{\inframed[offset=\zeropoint, width=fit]{Mc}}% \def\MacDelta{\dimexpr\wd\MacKernBox-\wd\MacMBox-\wd\MacCBox\relax}% \def\MacUWidth{\dimexpr\wd\MacCBox-.75\MacDelta\relax}% \def\MacRule{\vrule width \MacUWidth height .04em depth \zeropoint \relax}% \def\MacKern{\dimexpr\wd\MacKernBox-\wd\MacMBox-\wd\MacCBox\relax}% \def\MacHeight{\dimexpr\ht\MacMBox-\ht\MacCBox\relax}% % % Write Mc, where c has a macron, to the document. % M{% \dontleavehmode{\raisebox{\MacHeight}\hbox{c}}% \kern-1.04\MacUWidth \MacRule \kern.08\MacUWidth }% }% \xmlprocessbuffer{main}{main}{} As shown in the screen shot, this doesn't correctly handle nested XML elements. Any ideas on what approach to take to perform a string replacement in ConTeXt? Best stay at the xml end ... \startbuffer[main] “Mr. McAnulty, I presume?” Regular text. Irregular text. \stopbuffer \startxmlsetups xml:xhtml \xmlsetsetup{\xmldocument}{*}{-} \xmlsetsetup{\xmldocument}{html|p|em}{xml:*} \stopxmlsetups \startxmlsetups xml:html \xmlflush{#1} \stopxmlsetups \startxmlsetups xml:p \xmlfunction{#1}{p} \xmlcontext{#1} \par \stopxmlsetups \startxmlsetups xml:em \dontleavehmode{\em\xmlflush{#1}} \stopxmlsetups \startluacode local rep = lpeg.replacer { [1] = { "McAnulty", "\\Mac Anulty" } } function xml.functions.p(t) local dt = t.dt for i=1,#dt do local di = dt[i] if type(di) == "string" then dt[i] = lpeg.match(rep,di) end end end \stopluacode \xmlregistersetup{xml:xhtml} \startdocument \xmlprocessbuffer{main}{main}{} \stopdocument But this is more fun and probably also more reliable: \startbuffer[main] “Mr. McAnulty, I presume?” Regular text. Irregular text. \stopbuffer \startxmlsetups xml:xhtml \xmlsetsetup{\xmldocument}{*}{-} \xmlsetsetup{\xmldocument}{html|p|em}{xml:*} \stopxmlsetups \startxmlsetups xml:html \xmlflush{#1} \stopxmlsetups \startxmlsetups xml:p \xmlcontext{#1} \par \stopxmlsetups \startxmlsetups xml:em \dontleavehmode{\em\xmlflush{#1}} \stopxmlsetups \xmlregistersetup{xml:xhtml} \usemodule[gimmicks] % in latest uploads \chardef\MacAnulty = \getprivateglyphslot{MacAnulty} \startsetups [box:mcanulty:\number\MacAnulty] \Mac Anulty \stopsetups \registerboxglyph category {mcanulty} unicode \MacAnulty \relax \startluacode fonts.handlers.otf.addfeature { name= "mcanulty", type= "ligature", nocheck = true, data= { [fonts.constructors.privateslots.MacAnulty] = { "M", "c", "A", "n", &quo
Re: [NTG-context] Is rendering furigana over horizontal or vertical japanese text doable in ConTeXt?
On 8/22/2022 7:21 AM, 黄复雄 via ntg-context wrote: Dear Hans. Thank you very much for so many examples and guidance. In fact, I have read one of the examples in the followingup.pdf, and the https://github.com/Fusyong/vertical-typesetting module I made is based on the example. The examples all worked after I changed the font settings according to my Win10 OS; and surprisingly, the ruby module also worked with \setscript[hanzi] (they don't work together in the example Mr. Wolfgang provided). I noticed an issu ewith multiple glyphs but am not sure why ... (so we need very small examples to figure it out). The only problem is that the offsets of glyphs are a bit inaccurate, which may be related to the font, and I will look into it further. in the vertical feature one can tune a bit. The examples I have adjusted are attached, and the output PDF of them is not attached for being too big to the limit of 100 KB. (Just now I received a reply from the mailing list system asking to adjust a over-length email, I mistakenly thought it was about the one to Mr. Wolfgang, so that one was duplicated and submitted, please deal with it.) there are indeed limits By the way, I've finished checking and adjusting type-imp-mscore.mkiv, scrp-cjk.lua, and char-scr.lua so far, but the changes are a bit much (or maybe you can say a bit reckless), so I'm hesitant to get back to you in order to minimize your troubles. And as mentioned partly in an earlier email, I've made 3 modules that support Chinese (about vertical-typesetting, Jiazhu or inline cutting note and punctuation) and I'd be happy to contribute them to the ConTeXt project repository when they're ripe, if that's in line with the project policy. Your comments and guidance are very welcome. hm, i can have a look at it but we shouldn't break japanese and korean once you finished all we can see how it can either be integrated or become some third party module (has to do with maintainance) can you also make a noto typescript for the different chinese setups (for some reason the CJK noto's failed so i used the non CJK ones as i couldn't locate the right files; one cannot longher download al-of-noto in one zip ) Hans - Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl - ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
Re: [NTG-context] Is rendering furigana over horizontal or vertical japanese text doable in ConTeXt?
Dear Hans. Thank you very much for so many examples and guidance. In fact, I have read one of the examples in the followingup.pdf, and the https://github.com/Fusyong/vertical-typesetting module I made is based on the example. The examples all worked after I changed the font settings according to my Win10 OS; and surprisingly, the ruby module also worked with \setscript[hanzi] (they don't work together in the example Mr. Wolfgang provided). The only problem is that the offsets of glyphs are a bit inaccurate, which may be related to the font, and I will look into it further. The examples I have adjusted are attached, and the output PDF of them is not attached for being too big to the limit of 100 KB. (Just now I received a reply from the mailing list system asking to adjust a over-length email, I mistakenly thought it was about the one to Mr. Wolfgang, so that one was duplicated and submitted, please deal with it.) By the way, I've finished checking and adjusting type-imp-mscore.mkiv, scrp-cjk.lua, and char-scr.lua so far, but the changes are a bit much (or maybe you can say a bit reckless), so I'm hesitant to get back to you in order to minimize your troubles. And as mentioned partly in an earlier email, I've made 3 modules that support Chinese (about vertical-typesetting, Jiazhu or inline cutting note and punctuation) and I'd be happy to contribute them to the ConTeXt project repository when they're ripe, if that's in line with the project policy. Your comments and guidance are very welcome. Best regards, Huang Fusyong(黄复雄) Hans Hagen via ntg-context 于2022年8月22日周一 00:20写道: > > On 8/21/2022 12:10 PM, Wolfgang Schuster via ntg-context wrote: > > 黄复雄 via ntg-context schrieb am 21.08.2022 um 10:24: > >> Currently, the ruby module does not seem to support cjk fonts? I have > >> a preliminary implementation of furigana(pinyin in Chinese) as: > attached a variant (no pdf attached) using wolfgangs font definition > plus some more > > - >Hans Hagen | PRAGMA ADE >Ridderstraat 27 | 8061 GH Hasselt | The Netherlands > tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl > -___ > If your question is of interest to others as well, please add an entry to the > Wiki! > > maillist : ntg-context@ntg.nl / > https://www.ntg.nl/mailman/listinfo/ntg-context > webpage : https://www.pragma-ade.nl / http://context.aanhet.net > archive : https://bitbucket.org/phg/context-mirror/commits/ > wiki : https://contextgarden.net > ___ test-directions-006.lmtx Description: Binary data test-directions-005.lmtx Description: Binary data test-directions-008.lmtx Description: Binary data ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
Re: [NTG-context] Is rendering furigana over horizontal or vertical japanese text doable in ConTeXt?
Dear Wolfgang, thank you very much for your guidance. After changing the font settings according to my computer Win10 OS, the ruby module worked. But there is another problem, when I use `\setscript[hanzi]`, as follows %%%begin example \setscript[hanzi] \usetypescriptfile[mscore] \usebodyfont [mschinese,20pt] \definefont[pinyinfont][name:ahpinying*default at 9pt] \setupruby[color=darkgray, style=\pinyinfont] \starttext \ruby{寖備}{jìn bèi} \ss \ruby{寖備}{jìn bèi} % \tt \ruby{寖備}{jìn bèi} \stoptext %%%end example ruby errors out as follows(that's why I didn't succeed with ruby before): %%%begin error resolvers | formats | executing runner 'run luametatex format': D:/venvs/context-win64/tex/texmf-win64/bin/luametatex --jobname="d:/ah21/TEX/vertical-and-ruby-examples/ruby.lmtx" --fmt=D:/venvs/context-win64/tex/texmf-cache/luametatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/formats/luametatex/cont-en.fmt --lua=D:/venvs/context-win64/tex/texmf-cache/luametatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/formats/luametatex/cont-en.lui --c:currentrun=1 --c:fulljobname="d:/ah21/TEX/vertical-and-ruby-examples/ruby.lmtx" --c:input="d:/ah21/TEX/vertical-and-ruby-examples/ruby.lmtx" --c:kindofrun=1 --c:maxnofruns=9 --c:texmfbinpath="D:/venvs/context-win64/tex/texmf-win64/bin" system > system > ConTeXt ver: 2022.07.27 17:56 LMTX fmt: 2022.8.22 int: english/english system > system > 'cont-new.mkxl' loaded open source > level 1, order 1, name 'D:/venvs/context-win64/tex/texmf-context/tex/context/base/mkxl/cont-new.mkxl' system > beware: some patches loaded from cont-new.mkiv close source> level 1, order 1, name 'D:/venvs/context-win64/tex/texmf-context/tex/context/base/mkxl/cont-new.mkxl' system > files > jobname 'd:/ah21/TEX/vertical-and-ruby-examples/ruby', input 'd:/ah21/TEX/vertical-and-ruby-examples/ruby.lmtx', result 'd:/ah21/TEX/vertical-and-ruby-examples/ruby' fonts > latin modern fonts are not preloaded languages > language 'en' is active open source > level 1, order 2, name 'd:/ah21/TEX/vertical-and-ruby-examples/ruby.lmtx' fonts > bodyfont '20pt' is defined (can better be done global) fonts > bodyfont '24pt' is defined (can better be done global) fonts > bodyfont '16pt' is defined (can better be done global) open source > level 2, order 3, name 'D:/venvs/context-win64/tex/texmf-context/tex/context/fonts/mkiv/type-imp-mscore.mkiv' close source> level 2, order 3, name 'D:/venvs/context-win64/tex/texmf-context/tex/context/fonts/mkiv/type-imp-mscore.mkiv' open source > level 2, order 4, name 'D:/venvs/context-win64/tex/texmf-context/tex/context/fonts/mkiv/type-imp-cambria.mkiv' open source > level 3, order 5, name 'D:/venvs/context-win64/tex/texmf-context/tex/context/fonts/mkiv/type-imp-dejavu.mkiv' close source > level 3, order 5, name 'D:/venvs/context-win64/tex/texmf-context/tex/context/fonts/mkiv/type-imp-dejavu.mkiv' close source> level 2, order 5, name 'D:/venvs/context-win64/tex/texmf-context/tex/context/fonts/mkiv/type-imp-cambria.mkiv' tex error > tex error on line 1 in file d:/ah21/TEX/vertical-and-ruby-examples/ruby.lmtx: lua error: registered function call [209]: ...n64/tex/texmf-context/tex/context/base/mkxl/typo-rub.lmt:268: attempt to index a nil value (local 'ruby') stack traceback: ...n64/tex/texmf-context/tex/context/base/mkxl/typo-rub.lmt:268: in upvalue 'whatever' ...n64/tex/texmf-context/tex/context/base/mkxl/typo-rub.lmt:370: in upvalue 'attach' ...n64/tex/texmf-context/tex/context/base/mkxl/typo-rub.lmt:363: in upvalue 'whatever' ...n64/tex/texmf-context/tex/context/base/mkxl/typo-rub.lmt:370: in upvalue 'attach' ...n64/tex/texmf-context/tex/context/base/mkxl/typo-rub.lmt:363: in upvalue 'whatever' ...n64/tex/texmf-context/tex/context/base/mkxl/typo-rub.lmt:370: in upvalue 'attach' ...n64/tex/texmf-context/tex/context/base/mkxl/typo-rub.lmt:363: in upvalue 'whatever' ...n64/tex/texmf-context/tex/context/base/mkxl/typo-rub.lmt:370: in upvalue 'attach' ...n64/tex/texmf-context/tex/context/base/mkxl/typo-rub.lmt:363: in upvalue 'whatever' ...n64/tex/texmf-context/tex/context/base/mkxl/typo-rub.lmt:370: in upvalue 'attach' ... (skipping 14 levels) ...n64/tex/texmf-context/tex/context/base/mkxl/typo-rub.lmt:370: in upvalue 'attach' ...n64/tex/texmf-context/tex/context/base/mkxl/typo-rub.lmt:363: in upvalue 'whatever' ...n64/tex/texmf-context/tex/context/base/mkxl/typo-rub.lmt:370: in upvalue 'attach' ...n64/tex/texmf-context/tex/context/base/mkxl/typo-rub.lmt:363: in upvalue 'whatever' ...n64/tex/texmf-context/tex/context/base/mkxl/typo-rub.lmt:370: in upvalue 'attach' ...n64/tex/te
Re: [NTG-context] Is rendering furigana over horizontal or vertical japanese text doable in ConTeXt?
Currently, the ruby module does not seem to support cjk fonts? I have a preliminary implementation of furigana(pinyin in Chinese) as: ```lmtx % define the pinyin font \definefont[pinyinfont][name:ahpinying*default at 9pt] % define the pinyin command \define[2]\pinyin{% \setbox1 = \hbox{#1}% \setbox2 = \hbox{\darkgray \pinyinfont #2}% \newdimen\maxwd% \ifdim \wd1>\wd2 \maxwd=\wd1 \else \maxwd=\wd2 \fi% \setbox1 = \hbox to \maxwd{\hfill \box1 \hfill}% \setbox2 = \hbox to \maxwd{\hfill \box2 \hfill}% \hskip0pt plus5pt\vbox{\setupinterlinespace[line=0.5em]\box2\box1}% above line % \hskip0pt plus5pt\vtop{\setupinterlinespace[line=0.5em]\box1\box2}% under line } ``` usage as follows: ```lmtx \pinyin{寖備}{jìn bèi} ``` BTW, I hav made a vertical typesetting module for Chinese in ConTeXt LMTX, vertical_typeset.lua in https://github.com/Fusyong/vertical-typesetting You should modify the set for Japanese characters and punctuations here: ```lua local function chars_to_vertical(c) return c >= 0x04E00 and c <= 0x09FFF end local puncs_to_rotate = { [0x3001] = true, -- 、 [0xFF0C] = true, -- , [0x3002] = true, -- 。 [0xFF0E] = true, -- . [0xFF1F] = true, -- ? [0xFF01] = true, -- ! [0xFF1A] = true, -- : [0xFF1B] = true, -- ; } ``` and there is a doc for example, 大学章句.lmtx, in https://github.com/Fusyong/jiazhu, and jiazhu.lua in same place is a module of Jiazhu (or 夹注, 割注) in ConTeXt LMTX. But all the comments are in Chinese. amano.kenji via ntg-context 于2022年8月16日周二 19:34写道: > > At least, furigana seems covered. > > How do I know which document to consult? There are many PDF files that come > with ConTeXt. > > --- Original Message --- > On Monday, August 15th, 2022 at 3:39 PM, Wolfgang Schuster via ntg-context > wrote: > > > > amano.kenji via ntg-context schrieb am 15.08.2022 um 14:00: > > > > > Is there any documentation about \ruby? > > > > > > You can see all available parameters in setup-en.pdf, the example below > > shows a few of them: > > > > begin example > > \setupinterlinespace[line=4ex] > > > > \setuptype[style=\ttx] > > > > \starttext > > > > \start > > x \ruby{aaa}{bbb} x > > \stop > > > > \start \setupruby[location=left] > > \type{\setupruby[location=left]}\quad x \ruby{aaa}{bbb} x > > \stop > > > > \start \setupruby[location=right] > > \type{\setupruby[location=right]}\quad x \ruby{aaa}{bbb} x > > \stop > > > > \start \setupruby[location=right,left={[},right={]}] > > \type{\setupruby[left={[},right={]}]}\quad x \ruby{aaa}{bbb} > > x > > \stop > > > > \start \setupruby[align=flushleft] > > \type{\setupruby[align=flushleft]}\quad x \ruby{aa}{bbb} > > x > > \stop > > > > \start \setupruby[align=flushright] > > \type{\setupruby[align=flushright]}\quad x \ruby{aa}{bbb} > > x > > \stop > > > > \start \setupruby[style=\itxx] > > \type{\setupruby[style=\itxx]}\quad x \ruby{aaa}{bbb} x > > \stop > > > > \start \setupruby[color=blue] > > \type{\setupruby[color=blue]}\quad x \ruby{aaa}{bbb} x > > \stop > > > > \start \setupruby[voffset=-1.2ex] > > \type{\setupruby[voffset=-1.2ex]}\quad x \ruby{aaa}{bbb} x > > \stop > > > > \stoptext > > end example > > > > > What about vertical text? > > > > > > ConTeXt has a mechanism to produce vertical text but there is nothing > > yet which can > > be used out of the box to produce a complete document with vertical > > paragraphs. > > > > Wolfgang > > > > ___ > > If your question is of interest to others as well, please add an entry to > > the Wiki! > > > > maillist : ntg-context@ntg.nl / > > https://www.ntg.nl/mailman/listinfo/ntg-context > > webpage : https://www.pragma-ade.nl / http://context.aanhet.net > > archive : https://bitbucket.org/phg/context-mirror/commits/ > > wiki : https://contextgarden.net > > ___ > ___ > 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
Re: [NTG-context] Using MathTime Pro 2 fonts in ConTeXt
On 8/18/2022 12:51 AM, Sebastian Leonardo Molina Diaz via ntg-context wrote: Any hints on how to do it? you can look into mathtimes-math.lfg type-imp-mathtimes.mkiv to see how to turn t2 fonts into virtual ot fonts but one never knopws how well that works (depends on the fonts) Hans - Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl - ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
Re: [NTG-context] Is rendering furigana over horizontal or vertical japanese text doable in ConTeXt?
At least, furigana seems covered. How do I know which document to consult? There are many PDF files that come with ConTeXt. --- Original Message --- On Monday, August 15th, 2022 at 3:39 PM, Wolfgang Schuster via ntg-context wrote: > amano.kenji via ntg-context schrieb am 15.08.2022 um 14:00: > > > Is there any documentation about \ruby? > > > You can see all available parameters in setup-en.pdf, the example below > shows a few of them: > > begin example > \setupinterlinespace[line=4ex] > > \setuptype[style=\ttx] > > \starttext > > \start > x \ruby{aaa}{bbb} x > \stop > > \start \setupruby[location=left] > \type{\setupruby[location=left]}\quad x \ruby{aaa}{bbb} x > \stop > > \start \setupruby[location=right] > \type{\setupruby[location=right]}\quad x \ruby{aaa}{bbb} x > \stop > > \start \setupruby[location=right,left={[},right={]}] > \type{\setupruby[left={[},right={]}]}\quad xxxxx \ruby{aaa}{bbb} > x > \stop > > \start \setupruby[align=flushleft] > \type{\setupruby[align=flushleft]}\quad x \ruby{aa}{bbb} > x > \stop > > \start \setupruby[align=flushright] > \type{\setupruby[align=flushright]}\quad x \ruby{aa}{bbb} > x > \stop > > \start \setupruby[style=\itxx] > \type{\setupruby[style=\itxx]}\quad x \ruby{aaa}{bbb} x > \stop > > \start \setupruby[color=blue] > \type{\setupruby[color=blue]}\quad x \ruby{aaa}{bbb} x > \stop > > \start \setupruby[voffset=-1.2ex] > \type{\setupruby[voffset=-1.2ex]}\quad x \ruby{aaa}{bbb} x > \stop > > \stoptext > end example > > > What about vertical text? > > > ConTeXt has a mechanism to produce vertical text but there is nothing > yet which can > be used out of the box to produce a complete document with vertical > paragraphs. > > Wolfgang > > ___ > If your question is of interest to others as well, please add an entry to the > Wiki! > > maillist : ntg-context@ntg.nl / > https://www.ntg.nl/mailman/listinfo/ntg-context > webpage : https://www.pragma-ade.nl / http://context.aanhet.net > archive : https://bitbucket.org/phg/context-mirror/commits/ > wiki : https://contextgarden.net > ___ ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
Re: [NTG-context] How can I make a Gentoo Linux package for ConTeXt LMTX?
http://lmtx.pragma-ade.nl/install-lmtx/texmf-context.zip is not versioned. If the file changes later, linux distributions refuse to use the file. I wish ConTeXt and LuaMetaTex were versioned and provided `offline` build instructions. The vast majority of programs are versioned and can be built easily offline. Even if they were distributed as binary files, if they are versioned, I can still make linux packages out of them. --- Original Message --- On Monday, August 15th, 2022 at 9:56 PM, Max Chernoff wrote: > Okay, I'm seeing a few separate issues here. > > 1. Gentoo expects to compile everything from source. > > This isn't an option here since LuaMetaTeX doesn't have any source > available (yet). So for the time being, you'll need to use the provided > binaries. These support pretty much every architecture, so this > shouldn't really be a problem. > > 2. You want to install ConTeXt LMTX system-wide. > > This is doable with the standard Linux installer script. Just make sure > to run the script as root and install the files in /opt/context. This is > what I've done on my system, and it works quite well. > > $ ls -l $(type -p context) > lrwxrwxrwx. 1 root root 10 Jul 28 00:33 > /opt/context/tex/texmf-linux-64/bin/context -> luametatex* > > > 3. You want to install ConTeXt without any network access. > > The easiest way to do this would be to install on a system with > internet, then just copy over the files. > > If you want to use the "original" installer files, it shouldn't be > impossible, but probably not too easy either. (All steps below are > untested) > > The platform-independent stuff is all in one big zip, located at: > > http://lmtx.pragma-ade.nl/install-lmtx/texmf-context.zip > > Unzip this file as "/tex/texmf-context/". > > > Then you also need to download all of the binaries. You will need to > download all of the paths listed in this file: > > http://lmtx.pragma-ade.nl/install-lmtx/tex/texmf-linux-64.tma > > All of those files need to be placed in "/tex/texmf-linux- > > 64/bin". > > Then to finish installing you'll need to run "mtxrun --generate" and > "context --make". There are probably a bunch of other steps that I'm > missing, but this should get you close. > > Again, probably easier to just use the regular installer. > > 4. ConTeXt is really picky about texmfcnf stuff. > > This is an issue that I've had too: > > https://github.com/latex3/l3build/issues/232 > > Pretty much any modification of anything texmfcnf-related with ConTeXt > will completely prevent it from running. There's a thread discussing the > problem (but with no real solutions) here: > > https://tug.org/pipermail/tex-live/2020-September/046099.html > > And a Wiki page here: > > https://wiki.contextgarden.net/Custom_Configuration > > I agree that this texmfcnf stuff makes it really difficult to install or > use ConTeXt with any kind of custom paths. Does anyone know how to > properly configure a texmfcnf with custom paths? > > Hopefully this is of some help. > -- Max ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
Re: [NTG-context] Accessing inserts from Lua in LuaMetaTeX
Hi Hans, > > First, how do I get an insert's class/type from the "insert" nodes on > > the page? With LuaTeX, the insert's class/type is the same as the > > subtype of the "ins" nodes, but the subtype of the "insert" nodes is > > always zero in LuaMetaTeX, so I'm not sure how to get the class/type. After playing around, I found that this is stored in ".index". I'm able to write to this value just fine, but whenever I read it I get an error. This minimal example: \starttext \setbox999=\vbox{\hrule width 10pt height 10pt} \startluacode local insert = node.new("insert") local rule = tex.box[999].list insert.list = rule insert.index = 4 node.write(insert) \stopluacode \stoptext works perfectly, but this example: \startluacode local insert = node.new "insert" insert.index = 4 print(insert.index) \stopluacode gives this error message: In \insertmode 2 you can't use zero as index. I suspect that this is a bug, but I may just be doing something wrong. > Indeed, we don't use these boxes and registers because we run in > \insertmode=2. This gives us more state info (i kept the old method > around for now). Inserts always felt a little hacky in TeX, so I think that the new methods are a huge improvement. > > Second, how do I get the head of the insert box from Lua? With LuaTeX, > > from TeX you would use "\box" and from Lua you can use > > "tex.box[]". With LuaMetaTeX, you use "\insertbox" from > > TeX, but I'm not sure how to get at the insert box from Lua. > > tex.getinsertdistance > tex.getinsertmultiplier > tex.getinsertlimit > tex.getinsertheight > tex.getinsertdepth > tex.getinsertwidth > tex.getinsertcontent > tex.setinsertdistance > tex.setinsertmultiplier > tex.setinsertlimit > tex.setinsertcontent Perfect! "tex.getinsertcontent" does exactly what I need. Really minor, but I would expect that tex.insertcontent[4] = = tex.insertcontent[4] would be exist and be equivalent to = tex.getinsertcontent(4) tex.setinsertcontent(4, ) > The insert (etc) handler is more clever and flexible. So, for instance > we can bubble up inserts. I think you do a preroll so in that case you > can set the migrations related parameter to not bubble up. > > \starttext > > \holdingmigrations\numexpr1+2+4\relax > > \setbox0\hbox{test \footnote{test} test} > > \setbox2\vbox{\unhcopy0} > > \holdingmigrations0 > > \setbox4\vbox{\unhcopy0} > > \unhbox0 > > \unvbox2 > > \unvbox4 > > \stoptext > > But I have no clue how all that will work out with (lua) code that > manipulates these things. In list nodes you can consult the pre and post > fields to what got migrated. I don't think that that will work in this case. I'm doing most of the work in "pre_output_filter", which is after all of the insert nodes have been removed from the page and put into their respective boxes. And I can't postpone setting any inserts until then because TeX needs to know their height for when it breaks the page. I don't really like how I have to move the footnotes, but I can't find any better way of doing things. If you're curious, most of the insert code is in these two functions: https://github.com/gucci-on-fleek/lua-widow-control/blob/2bca90/source/lua-widow-control.lua#L612-L669 https://github.com/gucci-on-fleek/lua-widow-control/blob/2bca90/source/lua-widow-control.lua#L843-L924 Thanks, -- Max ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
Re: [NTG-context] How can I make a Gentoo Linux package for ConTeXt LMTX?
Okay, I'm seeing a few separate issues here. 1. Gentoo expects to compile everything from source. This isn't an option here since LuaMetaTeX doesn't have any source available (yet). So for the time being, you'll need to use the provided binaries. These support pretty much every architecture, so this shouldn't really be a problem. 2. You want to install ConTeXt LMTX system-wide. This is doable with the standard Linux installer script. Just make sure to run the script as root and install the files in /opt/context. This is what I've done on my system, and it works quite well. $ ls -l $(type -p context) lrwxrwxrwx. 1 root root 10 Jul 28 00:33 /opt/context/tex/texmf-linux-64/bin/context -> luametatex* 3. You want to install ConTeXt without any network access. The easiest way to do this would be to install on a system with internet, then just copy over the files. If you want to use the "original" installer files, it shouldn't be impossible, but probably not too easy either. (All steps below are untested) The platform-independent stuff is all in one big zip, located at: http://lmtx.pragma-ade.nl/install-lmtx/texmf-context.zip Unzip this file as "/tex/texmf-context/". Then you also need to download all of the binaries. You will need to download all of the paths listed in this file: http://lmtx.pragma-ade.nl/install-lmtx/tex/texmf-linux-64.tma All of those files need to be placed in "/tex/texmf-linux- 64/bin". Then to finish installing you'll need to run "mtxrun --generate" and "context --make". There are probably a bunch of other steps that I'm missing, but this should get you close. Again, probably easier to just use the regular installer. 4. ConTeXt is really picky about texmfcnf stuff. This is an issue that I've had too: https://github.com/latex3/l3build/issues/232 Pretty much any modification of anything texmfcnf-related with ConTeXt will completely prevent it from running. There's a thread discussing the problem (but with no real solutions) here: https://tug.org/pipermail/tex-live/2020-September/046099.html And a Wiki page here: https://wiki.contextgarden.net/Custom_Configuration I agree that this texmfcnf stuff makes it really difficult to install or use ConTeXt with any kind of custom paths. Does anyone know how to properly configure a texmfcnf with custom paths? Hopefully this is of some help. -- Max ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
Re: [NTG-context] Is rendering furigana over horizontal or vertical japanese text doable in ConTeXt?
amano.kenji via ntg-context schrieb am 15.08.2022 um 14:00: Is there any documentation about \ruby? You can see all available parameters in setup-en.pdf, the example below shows a few of them: begin example \setupinterlinespace[line=4ex] \setuptype[style=\ttx] \starttext \start x \ruby{aaa}{bbb} x \stop \start \setupruby[location=left] \type{\setupruby[location=left]}\quad x \ruby{aaa}{bbb} x \stop \start \setupruby[location=right] \type{\setupruby[location=right]}\quad x \ruby{aaa}{bbb} x \stop \start \setupruby[location=right,left={[},right={]}] \type{\setupruby[left={[},right={]}]}\quad x \ruby{aaa}{bbb} x \stop \start \setupruby[align=flushleft] \type{\setupruby[align=flushleft]}\quad x \ruby{aa}{bbb} x \stop \start \setupruby[align=flushright] \type{\setupruby[align=flushright]}\quad x \ruby{aa}{bbb} x \stop \start \setupruby[style=\itxx] \type{\setupruby[style=\itxx]}\quad x \ruby{aaa}{bbb} x \stop \start \setupruby[color=blue] \type{\setupruby[color=blue]}\quad x \ruby{aaa}{bbb} x \stop \start \setupruby[voffset=-1.2ex] \type{\setupruby[voffset=-1.2ex]}\quad x \ruby{aaa}{bbb} x \stop \stoptext end example What about vertical text? ConTeXt has a mechanism to produce vertical text but there is nothing yet which can be used out of the box to produce a complete document with vertical paragraphs. Wolfgang ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
Re: [NTG-context] Accessing inserts from Lua in LuaMetaTeX
On 8/15/2022 8:18 AM, Max Chernoff via ntg-context wrote: Hi all, I'm trying to manipulate some inserts from Lua in LuaMetaTeX, and I'm having some problems that I'm not having with LuaTeX. First, how do I get an insert's class/type from the "insert" nodes on the page? With LuaTeX, the insert's class/type is the same as the subtype of the "ins" nodes, but the subtype of the "insert" nodes is always zero in LuaMetaTeX, so I'm not sure how to get the class/type. Indeed, we don't use these boxes and registers because we run in \insertmode=2. This gives us more state info (i kept the old method around for now). Second, how do I get the head of the insert box from Lua? With LuaTeX, from TeX you would use "\box" and from Lua you can use "tex.box[]". With LuaMetaTeX, you use "\insertbox" from TeX, but I'm not sure how to get at the insert box from Lua. tex.getinsertdistance tex.getinsertmultiplier tex.getinsertlimit tex.getinsertheight tex.getinsertdepth tex.getinsertwidth tex.getinsertcontent tex.setinsertdistance tex.setinsertmultiplier tex.setinsertlimit tex.setinsertcontent The context for both of these is that my module lua-widow-control sometimes moves a line containing footnotes to the next page, so I need to do some surgery to make sure that the "footnote marks" stay with the "footnote text". This is tricky but doable with LuaTeX, but I can't seem to get it to work with the new inserts in LuaMetaTeX, hence the above questions. The insert (etc) handler is more clever and flexible. So, for instance we can bubble up inserts. I think you do a preroll so in that case you can set the migrations related parameter to not bubble up. \starttext \holdingmigrations\numexpr1+2+4\relax \setbox0\hbox{test \footnote{test} test} \setbox2\vbox{\unhcopy0} \holdingmigrations0 \setbox4\vbox{\unhcopy0} \unhbox0 \unvbox2 \unvbox4 \stoptext But I have no clue how all that will work out with (lua) code that manipulates these things. In list nodes you can consult the pre and post fields to what got migrated. Hans - Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl - ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
[NTG-context] Accessing inserts from Lua in LuaMetaTeX
Hi all, I'm trying to manipulate some inserts from Lua in LuaMetaTeX, and I'm having some problems that I'm not having with LuaTeX. First, how do I get an insert's class/type from the "insert" nodes on the page? With LuaTeX, the insert's class/type is the same as the subtype of the "ins" nodes, but the subtype of the "insert" nodes is always zero in LuaMetaTeX, so I'm not sure how to get the class/type. Second, how do I get the head of the insert box from Lua? With LuaTeX, from TeX you would use "\box" and from Lua you can use "tex.box[]". With LuaMetaTeX, you use "\insertbox" from TeX, but I'm not sure how to get at the insert box from Lua. The context for both of these is that my module lua-widow-control sometimes moves a line containing footnotes to the next page, so I need to do some surgery to make sure that the "footnote marks" stay with the "footnote text". This is tricky but doable with LuaTeX, but I can't seem to get it to work with the new inserts in LuaMetaTeX, hence the above questions. Thanks, -- Max ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
[NTG-context] How to do code listings & sections from XML (AsciiDoc)
Hi, Hans helped me out with some asciidoc processing a while ago. I played a bit further, but I'm currently facing two minor issues: (a) I don't know how to turn program listing (verbatim code) from xml to (perhaps, vim-based) syntax highlighting (but most importantly, to make sure that line breaks work properly) (b) some section titles are missing Ad (a). The source that looks similar to this: int main() { return 0; } should be converted into some kind of equivalent of % on top \usemodule[vim] \definevimtyping [CPP] [syntax=cpp] \startCPP int main() { return 0; } \stopCPP In the attachment I have the source document (test.adoc), the generated docbook xml that should be further processed, and test.tex that one processes to get the final pdf. Any hints would be greatly appreciated. Mojca test.tex Description: Binary data test.adoc Description: Binary data http://docbook.org/ns/docbook; xmlns:xl="http://www.w3.org/1999/xlink; version="5.0" xml:lang="en"> Document title (completely missing) 2022-08-12 This title seems to be missing Hello code How it works // test.cpp: halfword tex_copy_node(halfword p) { /*tex We really need a stub for copying because mem might move in the meantime due to resizing! */ if (p 0 || p = lmt_node_memory_state.nodes_data.allocated) { return tex_formatted_error("nodes", "attempt to copy an impossible node %d", (int) p); } else if (p lmt_node_memory_state.reserved lmt_node_memory_state.nodesizes[p] == 0) { return tex_formatted_error("nodes", "attempt to copy a free %s node %d", get_node_name(node_type(p)), (int) p); } else { /*tex type of node */ halfword t = node_type(p); int i = get_node_size(t); /*tex current node being fabricated for new list */ halfword r = tex_get_node(i); /*tex this saves work */ memcpy((void *) (lmt_node_memory_state.nodes + r), (void *) (lmt_node_memory_state.nodes + p), (sizeof(memoryword) * (unsigned) i)); if (tex_nodetype_is_complex(i)) { // halfword copy_stub; if (tex_nodetype_has_attributes(t)) { add_attribute_reference(node_attr(p)); node_prev(r) = null; lmt_properties_copy(lmt_lua_state.lua_instance, r, p); } node_next(r) = null; switch (t) { case glue_node: copy_sub_list(glue_leader_ptr(r), glue_leader_ptr(p)); break; m-asciidoc-manual.tex Description: Binary data ___ 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] Can't no break between a close punctuation and a open punctuation
On 8/2/2022 4:08 PM, 黄复雄 via ntg-context wrote: Sorry, when you say ` that file for windows 10+`, which one are you referring to? to scrp-cjk.lua?( yes, I will upgrade it.) or to my lmtx the chinese font .. as defined in type-imp-mscore - Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl - ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
Re: [NTG-context] Can't no break between a close punctuation and a open punctuation
> > > Dear Hans, > > > > I found that ConTeXt injected two infinity penalties between a close > > punctuation and a open punctuation, for example between `”` and `“`, or > > between `:` and `“`, so can not break at these places, as showed in > > following doc. But actually, we may sometimes need to do so. Please note > > that there is no space around full width punctuations in Chinese > document. > > you can try this in scrp-cjk.lua (remake the format) > > local chinese_8 = { > jami_initial = nobreak_shrink_break_stretch, > korean = nobreak_autoshrink_break_stretch, > chinese = stretch_break, -- nobreak_autoshrink_break_stretch, > hiragana = stretch_break, -- nobreak_autoshrink_break_stretch, > katakana = stretch_break, -- nobreak_autoshrink_break_stretch, > half_width_open = > nobreak_autoshrink_break_stretch_nobreak_autoshrink, > half_width_open = stretch_break, > half_width_close = nobreak_autoshrink_nobreak_stretch, > full_width_open = nobreak_autoshrink_break_stretch_nobreak_shrink, > full_width_close = nobreak_autoshrink_nobreak_stretch, > full_width_punct = nobreak_autoshrink_nobreak_stretch, > hyphen = nobreak_autoshrink_break_stretch, > non_starter = nobreak_autoshrink_break_stretch, > other= nobreak_autoshrink_break_stretch, > } > > Thanks to your guidance, I solved the problem. And I would like to look into some other related issues that I have doubts about and get back to you together. So I need some more time. > > doc for example: > > > > ```lmtx > > \setscript[hanzi] > > \usetypescriptfile[mscore] > > \usebodyfont [mschinese,20pt] > > can you upgrade the chiese section in that file for windows 10+ as the > old fonts are gone > > (i tested with \definedfont[file:mingliu.ttc*chinese @ 10pt]) > Sorry, when you say ` that file for windows 10+`, which one are you referring to? to scrp-cjk.lua?( yes, I will upgrade it.) or to my lmtx doc for testing?(It work fine in my Windows 10.) or to type-imp-mscore.mkiv? (It work fine in my Windows 10, and no mingliu.ttc in it.) Thanks. Huang Fusyong(黄复雄) --- 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] font fallbacks
Hi, I have used more than one fallback, but each fallback is for a different character range Denis Von: ntg-context im Auftrag von Henning Hraban Ramm via ntg-context Gesendet: Montag, 1. August 2022 19:42:51 An: Henning Hraban Ramm via ntg-context Cc: Henning Hraban Ramm Betreff: Re: [NTG-context] font fallbacks Nobody? I couldn’t find an example of more than one fallback, so I guess that’s not supported? Hraban Am 30.07.22 um 15:51 schrieb Henning Hraban Ramm via ntg-context: > Hi, > I thought I could use more than one fallback font, but as soon as I list > fallbacks, they stop working. > > In my example, I’d like to take all missing glyphs from Segoe UI > Symbols, and what’s still missing (emojis) from EmojiOneColor, > preferably without specifying the exact range. > > Additionally, I want to replace the tilde ~ of LM Modern: > > """ > \definefontfallback[seguiFB] >[file:seguisym.ttf] >[0x0-0xF] >[check=yes,force=no] > > \definefontfallback[emoneFB] >[name:EmojiOneColor] >[0x0-0xF] >[check=yes,force=no] > > % replace tilde in LM > \definefontfallback[tildeFB] >[file:seguisym.ttf] >[0x0007E-0x0007E] >[force=yes] > > > \starttypescript [start] >\definetypeface [start] [rm] [serif] [cambria] > [default][fallbacks={seguiFB,emoneFB}] >\definetypeface [start] [ss] [sans] [modern] > [default][fallbacks={seguiFB,emoneFB}] >\definetypeface [start] [tt] [mono] [modern] > [default][fallbacks={seguiFB,tildeFB,emoneFB}] >\definetypeface [start] [mm] [math] [modern] > [default][fallbacks={seguiFB,emoneFB}] > \stoptypescript > > > \setupbodyfont[start,rm,12pt] > > \starttext > > \Omega\ (Omega) and \aleph\ (Aleph) > > \startbuffer[example] > start missing characters: lmmono10-regular.otf > 7 U+00327 ̧ COMBINING CEDILLA > 7 U+00335 ̵ COMBINING SHORT STROKE OVERLAY >14 U+003B7 η GREEK SMALL LETTER ETA > 7 U+021A9 ↩ LEFTWARDS ARROW WITH HOOK > 350 U+02500 ─ BOX DRAWINGS LIGHT HORIZONTAL >98 U+02502 │ BOX DRAWINGS LIGHT VERTICAL >42 U+02514 └ BOX DRAWINGS LIGHT UP AND RIGHT > 133 U+0251C ├ BOX DRAWINGS LIGHT VERTICAL AND RIGHT > 154 U+02772 ❲ LIGHT LEFT TORTOISE SHELL BRACKET ORNAMENT > 154 U+02773 ❳ LIGHT RIGHT TORTOISE SHELL BRACKET ORNAMENT >14 U+0278A ➊ DINGBAT NEGATIVE CIRCLED SANS-SERIF DIGIT ONE > stop missing characters > start missing characters: cambria.ttc > 9 U+0278A ➊ DINGBAT NEGATIVE CIRCLED SANS-SERIF DIGIT ONE > 9 U+0FFFD � REPLACEMENT CHARACTER > stop missing characters > start missing characters: cambriai.ttf > 266 U+0276C ❬ MEDIUM LEFT-POINTING ANGLE BRACKET ORNAMENT > 266 U+0276D ❭ MEDIUM RIGHT-POINTING ANGLE BRACKET ORNAMENT > stop missing characters > \stopbuffer > > \typebuffer[example] > > \startlines > \getbuffer[example] > > {\ss\getbuffer[example]} > \stoplines > > \tex{abra}\arg{...} > \type{kadabra} \type{~~~} > > \stoptext > """ > > What’s wrong? > > Hraban > ___ > 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 ___ ___ 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] font fallbacks
Nobody? I couldn’t find an example of more than one fallback, so I guess that’s not supported? Hraban Am 30.07.22 um 15:51 schrieb Henning Hraban Ramm via ntg-context: Hi, I thought I could use more than one fallback font, but as soon as I list fallbacks, they stop working. In my example, I’d like to take all missing glyphs from Segoe UI Symbols, and what’s still missing (emojis) from EmojiOneColor, preferably without specifying the exact range. Additionally, I want to replace the tilde ~ of LM Modern: """ \definefontfallback[seguiFB] [file:seguisym.ttf] [0x0-0xF] [check=yes,force=no] \definefontfallback[emoneFB] [name:EmojiOneColor] [0x0-0xF] [check=yes,force=no] % replace tilde in LM \definefontfallback[tildeFB] [file:seguisym.ttf] [0x0007E-0x0007E] [force=yes] \starttypescript [start] \definetypeface [start] [rm] [serif] [cambria] [default][fallbacks={seguiFB,emoneFB}] \definetypeface [start] [ss] [sans] [modern] [default][fallbacks={seguiFB,emoneFB}] \definetypeface [start] [tt] [mono] [modern] [default][fallbacks={seguiFB,tildeFB,emoneFB}] \definetypeface [start] [mm] [math] [modern] [default][fallbacks={seguiFB,emoneFB}] \stoptypescript \setupbodyfont[start,rm,12pt] \starttext \Omega\ (Omega) and \aleph\ (Aleph) \startbuffer[example] start missing characters: lmmono10-regular.otf 7 U+00327 ̧ COMBINING CEDILLA 7 U+00335 ̵ COMBINING SHORT STROKE OVERLAY 14 U+003B7 η GREEK SMALL LETTER ETA 7 U+021A9 ↩ LEFTWARDS ARROW WITH HOOK 350 U+02500 ─ BOX DRAWINGS LIGHT HORIZONTAL 98 U+02502 │ BOX DRAWINGS LIGHT VERTICAL 42 U+02514 └ BOX DRAWINGS LIGHT UP AND RIGHT 133 U+0251C ├ BOX DRAWINGS LIGHT VERTICAL AND RIGHT 154 U+02772 ❲ LIGHT LEFT TORTOISE SHELL BRACKET ORNAMENT 154 U+02773 ❳ LIGHT RIGHT TORTOISE SHELL BRACKET ORNAMENT 14 U+0278A ➊ DINGBAT NEGATIVE CIRCLED SANS-SERIF DIGIT ONE stop missing characters start missing characters: cambria.ttc 9 U+0278A ➊ DINGBAT NEGATIVE CIRCLED SANS-SERIF DIGIT ONE 9 U+0FFFD � REPLACEMENT CHARACTER stop missing characters start missing characters: cambriai.ttf 266 U+0276C ❬ MEDIUM LEFT-POINTING ANGLE BRACKET ORNAMENT 266 U+0276D ❭ MEDIUM RIGHT-POINTING ANGLE BRACKET ORNAMENT stop missing characters \stopbuffer \typebuffer[example] \startlines \getbuffer[example] {\ss\getbuffer[example]} \stoplines \tex{abra}\arg{...} \type{kadabra} \type{~~~} \stoptext """ What’s wrong? Hraban ___ 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] Set up external figure for particular image type
On 8/1/2022 2:29 AM, Thangalin via ntg-context wrote: Got it working. Complete solution: |\setupexternalfigures[ location={local,global,default}, width=\textwidth ] \defineexternalfigure[svg][width=1cm] \defineexternalfigure[jpg][width=2cm] \defineexternalfigure[png][width=4cm] % Won't be applied because there's no process action. % Default (\textwidth) is used, as defined above. \defineexternalfigure[pdf][width=6cm] \starttexdefinition includegraphics #1 \splitfilename{#1} \processaction[\splitofftype][ jpg=>{\externalfigure[#1][jpg]}, png=>{\externalfigure[#1][png]}, svg=>{\externalfigure[#1][svg][conversion=mp]}, default=>{\externalfigure[#1]}, unknown=>{\externalfigure[#1]} ] \stoptexdefinition \starttext \includegraphics{kitten.jpg} \includegraphics{mill.png} \includegraphics{cow.pdf} \includegraphics{tiger.svg} \stoptext | I've added: \setfigureconversion[svg][mp] So that this works: \starttext \externalfigure[kitten.jpg][width=2cm] \externalfigure[mill.png] [width=4cm] \externalfigure[cow.pdf] [width=6cm] \externalfigure[tiger.svg] [width=1cm] \stoptext But after we release you need to wikify it. Hans - Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl - ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
Re: [NTG-context] Set up external figure for particular image type
Got it working. Complete solution: \setupexternalfigures[ location={local,global,default}, width=\textwidth ]\defineexternalfigure[svg][width=1cm]\defineexternalfigure[jpg][width=2cm]\defineexternalfigure[png][width=4cm] % Won't be applied because there's no process action.% Default (\textwidth) is used, as defined above.\defineexternalfigure[pdf][width=6cm] \starttexdefinition includegraphics #1 \splitfilename{#1} \processaction[\splitofftype][ jpg=>{\externalfigure[#1][jpg]}, png=>{\externalfigure[#1][png]}, svg=>{\externalfigure[#1][svg][conversion=mp]}, default=>{\externalfigure[#1]}, unknown=>{\externalfigure[#1]} ]\stoptexdefinition \starttext \includegraphics{kitten.jpg} \includegraphics{mill.png} \includegraphics{cow.pdf} \includegraphics{tiger.svg}\stoptext Image files attached. Thanks again! <> ___ 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] font fallbacks
Hi, I thought I could use more than one fallback font, but as soon as I list fallbacks, they stop working. In my example, I’d like to take all missing glyphs from Segoe UI Symbols, and what’s still missing (emojis) from EmojiOneColor, preferably without specifying the exact range. Additionally, I want to replace the tilde ~ of LM Modern: """ \definefontfallback[seguiFB] [file:seguisym.ttf] [0x0-0xF] [check=yes,force=no] \definefontfallback[emoneFB] [name:EmojiOneColor] [0x0-0xF] [check=yes,force=no] % replace tilde in LM \definefontfallback[tildeFB] [file:seguisym.ttf] [0x0007E-0x0007E] [force=yes] \starttypescript [start] \definetypeface [start] [rm] [serif] [cambria] [default][fallbacks={seguiFB,emoneFB}] \definetypeface [start] [ss] [sans] [modern] [default][fallbacks={seguiFB,emoneFB}] \definetypeface [start] [tt] [mono] [modern] [default][fallbacks={seguiFB,tildeFB,emoneFB}] \definetypeface [start] [mm] [math] [modern] [default][fallbacks={seguiFB,emoneFB}] \stoptypescript \setupbodyfont[start,rm,12pt] \starttext \Omega\ (Omega) and \aleph\ (Aleph) \startbuffer[example] start missing characters: lmmono10-regular.otf 7 U+00327 ̧ COMBINING CEDILLA 7 U+00335 ̵ COMBINING SHORT STROKE OVERLAY 14 U+003B7 η GREEK SMALL LETTER ETA 7 U+021A9 ↩ LEFTWARDS ARROW WITH HOOK 350 U+02500 ─ BOX DRAWINGS LIGHT HORIZONTAL 98 U+02502 │ BOX DRAWINGS LIGHT VERTICAL 42 U+02514 └ BOX DRAWINGS LIGHT UP AND RIGHT 133 U+0251C ├ BOX DRAWINGS LIGHT VERTICAL AND RIGHT 154 U+02772 ❲ LIGHT LEFT TORTOISE SHELL BRACKET ORNAMENT 154 U+02773 ❳ LIGHT RIGHT TORTOISE SHELL BRACKET ORNAMENT 14 U+0278A ➊ DINGBAT NEGATIVE CIRCLED SANS-SERIF DIGIT ONE stop missing characters start missing characters: cambria.ttc 9 U+0278A ➊ DINGBAT NEGATIVE CIRCLED SANS-SERIF DIGIT ONE 9 U+0FFFD � REPLACEMENT CHARACTER stop missing characters start missing characters: cambriai.ttf 266 U+0276C ❬ MEDIUM LEFT-POINTING ANGLE BRACKET ORNAMENT 266 U+0276D ❭ MEDIUM RIGHT-POINTING ANGLE BRACKET ORNAMENT stop missing characters \stopbuffer \typebuffer[example] \startlines \getbuffer[example] {\ss\getbuffer[example]} \stoplines \tex{abra}\arg{...} \type{kadabra} \type{~~~} \stoptext """ What’s wrong? Hraban ___ 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] debugging lmtx and firefox (was: TeXGyre Heros on Firefox)
> the firefox pdf viewer has problems with at least two sans serif > fonts. > > Using this mwe I get a bad display in ff with Gyre font and Alegreya > Font. > What do you mean by "bad display"? Are the fonts blurry, or are the shapes all slightly distorted? Your test file displays fine on my system. > But there are many Firefox users out there who never use a real > pdf-viewer. I would like to show them a good result. I've been using Firefox (and pdf.js) as my PDF viewer almost exclusively for the past ~2 years, and I've been using ConTeXt LMTX for about the same amount of time. I haven't noticed any font issues, so I suspect that this issue is system-dependant. I've mostly been on Windows for the past few years, but I'm now on Linux, and I haven't noticed any issues with either. > I have no idea if the difference is the cause of the bad display. > > Luckily chrome based browsers shows the fonts without any flaws. Ok, random guess time (so I may be waay off here): I think that this is a hinting problem. The TeX Gyre fonts are all professionally hinted, so what might be happening be that when ConTeXt is subsetting the fonts, it is removing all of the hinting information, while LibreOffice is keeping all of the hints. I've opened PDFs from ConTeXt and LibreOffice in FontForge and the hints are still there, so I don't think that this is the case, but maybe? The hinting format is also wildly different between Type 1 and CFF/OTF, so maybe there is just a bug in one of the font renderers. Chrome uses an internal backend to render all of its text, but Firefox uses system-dependant backends (I think). Most renderers these days will autohint unhinted fonts using an embedded FreeType so that they still display somewhat-well. You can adjust the "hinting strength" in FreeType, which I would guess would usually be set to the maximum. So LibreOffice includes the font hints and things display fine, and Chrome uses a bundled FreeType with maximum hinting so things display fine. Firefox on Windows would need to bundle its own FreeType since there isn't a system one, and it renders fine in my experience. But Firefox on Linux would just use the system FreeType. I think that you are on Linux (?) and the default in Linux is for minimal/no hinting. Now, I've specifically enabled maximum hinting on my system, and I'm not seeing any problems with rendering. If you're using Gnome, can you try enabling "full" hinting in Gnome Tweaks, reboot, then test again? No idea how to configure this with other DEs, but I'm sure that it's possible. Another related guess is that older versions of FreeType maybe had a bug with parsing/displaying hints. I think that Chrome bundles its own FreeType which would be recent, but if you're using Firefox on Linux, it is probably using the system FreeType library. If you're on an older LTS distro, then the system FreeType may be really old and buggy. If you're using macOS, I can't really help you too much except for to say that text rendering on macOS is usually pretty bad unless you have a really high resolution screen. So those are my random guesses. Maybe one of them is helpful somehow. -- 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] debugging lmtx and firefox (was: TeXGyre Heros on Firefox)
On 7/22/22 12:37, juh+ntg-context--- via ntg-context wrote: > Dear all, > > the firefox pdf viewer has problems with at least two sans serif fonts. > [...] > > Where Libreoffice has type "Type 1", lmtx has "CID Type 0C". > > Where Libreoffice has encoding "Builtin", lmtx has "Identity-H". > > I have no idea if the difference is the cause of the bad display. Dear Jan Ulrich, it may be the font type, the enconding (or who knows what). > Any ideas how I can achieve this? I’d rather report the issue (attaching both PDF documents and both outputs from pdffonts) at https://github.com/mozilla/pdf.js/issues/new. I reported an issue with PDF.js not displaying the cover of http://www.pragma-ade.com/general/manuals/xml-mkiv.pdf. The day after my report the fix was merged. Just in case it may help, Pablo ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
[NTG-context] debugging lmtx and firefox (was: TeXGyre Heros on Firefox)
Dear all, the firefox pdf viewer has problems with at least two sans serif fonts. Using this mwe I get a bad display in ff with Gyre font and Alegreya Font. %\definefontfamily[mainfont][sans][AlegreyaSans] \definefontfamily[mainfont][sans][texgyreheros] \setupbodyfont [mainfont,12pt] \startdocument \starttext \input lorem \stoptext \stopdocument When I create a pdf from LibreOffice with these fonts I have a good display. pdffonts shows different font inclusion: pdffonts libreoffice.pdf name type encoding emb sub uni object ID - --- --- --- - BA+TeXGyreHeros-Regular Type 1Builtin yes yes yes 9 0 pdffonts mwe.pdf name type encoding emb sub uni object ID - --- --- --- - SOVKKO+TeXGyreHeros-Regular CID Type 0C Identity-H yes yes yes 1 0 Where Libreoffice has type "Type 1", lmtx has "CID Type 0C". Where Libreoffice has encoding "Builtin", lmtx has "Identity-H". I have no idea if the difference is the cause of the bad display. Luckily chrome based browsers shows the fonts without any flaws. But there are many Firefox users out there who never use a real pdf-viewer. I would like to show them a good result. Any ideas how I can achieve this? juh ___ 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 ___