Re: [NTG-context] bottlenecks

2022-12-16 Thread Hans Hagen via ntg-context

On 12/16/2022 10:08 PM, Rik Kabel via ntg-context wrote:

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 


ok, not the fastest i7 out there, more the tablet one, right?

and acronyms, and such, nothing complex. No graphics. Compact fonts are 
enabled.


can you check compact mode .. when compact fonts are not enabled, do you 
get the same


> 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,

i wonder why so many instances


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


this is suspicious ... i fixed a dir leak recently but having 3K boxes 
dangling ...


In neither case do the sum of the times listed in the stats come close 
to the total runtime (in the second example, 14.774 seconds of 23.057 
are accounted), so there are other unidentified processes involved.


these stats are an indication because below a threshold (time accuracy) 
nothing is measured


In any case, the processing time has been improving greatly over the 
last couple of years, and LMTX is significantly faster that MkIV in all 
of my work.
sure, that is to be expected although it depends a bit on the use case, 
for instance the backend is slower (but does much more) so initially 
lmtx was actually slower but at some point we started gaining (and i can 
probably gain a little more)


i wonder why directions bump time because much of what tex does is sort 
of agnostic for directions (the backend needs more time but i don't see 
that in your stats)


when you run with --profile you get a much slower run but might get some 
info from the extra log


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] bottlenecks

2022-12-16 Thread Rik Kabel via ntg-context

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 memory usage: 6869 attribute, 4608 dir, 4612
   glue, 84 gluespec, 2304 glyph, 3072 hlist, 3 kern, 647 mathspec, 5
   penalty, 2 

Re: [NTG-context] bottlenecks

2022-12-16 Thread Hans Hagen via ntg-context

On 12/16/2022 8:36 PM, Henning Hraban Ramm via ntg-context wrote:

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  > runtime: 30.592 seconds, 366 processed pages, 366 
shipped pages, 11.964 pages/second



(2)
This is a 720 page novel (first run with this LMTX version, some fonts 
were still uncached):




mkiv lua stats  > runtime: 19.275 seconds, 720 processed pages, 720 
shipped pages, 37.355 pages/second

so what if you add to the top

\enableexperiments[fonts.compact]

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] bottlenecks

2022-12-16 Thread Henning Hraban Ramm via ntg-context

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 memory usage: 217 MB
mkiv lua stats  > lua properties: engine: lua 5.4, used memory: 800 MB, 
ctx: 767 MB, max: 767 MB, 

Re: [NTG-context] Structure: multi-volume products

2022-12-16 Thread Richard Mahoney | Indica et Buddhica via ntg-context
Alan,

I'm attaching the two master files used for the following (also ran
cross refs between
each vol.):

Murugaiyan, Appasamy & Parlier-Renault, Édith (2021) (Eds) Whispering
of Inscriptions:
South Indian Epigraphy and Art History: Papers from an International
Symposium in
memory of Professor Noboru Karashima (Paris, 12–13 October 2017).
Oxford: Indica et
Buddhica. (2 vols)

https://indica-et-buddhica.com/publications/murugaiyan-appasamy-parlier-renault-edith/whispering-of-inscriptions-south-indian-epigraphy-and-art-history


Best, Richard


-- 
T +6433121699  M +64210640216
rmaho...@indica-et-buddhica.org
https://indica-et-buddhica.com/

Indica et Buddhica
Littledene  Bay Road  Oxford  NZ
NZBN: 9429041761809


-Original Message-
From: Alan Braslau via ntg-context 
Reply-To: mailing list for ConTeXt users 
To: mailing list for ConTeXt users 
Cc: Alan Braslau 
Subject: [NTG-context] Structure: multi-volume products
Date: Thu, 15 Dec 2022 20:23:36 -0700
Mailer: Claws Mail 3.19.0 (GTK+ 2.24.33; amd64-portbld-freebsd13.1)
X-Spam-Score: 0.0

Hello,

I have a book project that is being cut into two volumes (because it
is
too long and will be sold as a boxed set).

Each volume is presently a separate *product* in the project
structure.
I presently set the counters in the second volume using:

\setupheadnumber
  [part] [2]

\setupheadnumber
  [chapter] [5]

(I have multiple [5] parts in the project, and the first volume ends
with part 2 and chapter 5.)


1) Is this the right way to be handling this?

2) Any suggestions on how I can put a Table of Contents for the first
volume in the second volume?

Thanks!

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
__
_

% master000.tex – ConTeXt MkIV Module

\startproduct master000

\project iebpmonographs

\environment ieb-c-layout-000

\environment monograph-local-layout

\usemodule[statistical-charts]

% \enabletrackers[typesetters.suspects]

% \showbodyfont

% \showbodyfontenvironment

\useexternaldocument[m001][master001][Whispering of Inscriptions,
Vol.~{\sc ii}]


\startfrontmatter

\component tlpg000

{

\setupheadtext[content=Contents of Vol.~i.]

\setupheadertexts[Contents of
Vol.~i.][pagenumber][pagenumber][Contents of Vol.~i.]

\noheaderandfooterlines

\completecontent

\PY

\PB

}

{

\setupheadtext[tables=Tables of Vol.~i.]

\setupheadertexts[Tables of Vol.~i.][pagenumber][pagenumber][Tables
of Vol.~i.]

\noheaderandfooterlines

\completelistoftables

\PY

\PB

}

{

\setupheadtext[figures=Figures of Vol.~i.]

\setupheadertexts[Figures of Vol.~i.][pagenumber][pagenumber][Figures
of Vol.~i.]

\noheaderandfooterlines

\completelistoffigures

\PY

}

\component ackn % A. Murugaiyan & E. Parlier-Renault

\component pref % A. Murugaiyan & E. Parlier-Renault

\component intr % Y. Subbarayalu

\stopfrontmatter


\startbodymatter

\setcounter[userpage][1]

\component chp02 % Y. Subbarayalu

\component chp01 % V. Gillet

\component chp03 % G. Vijayavenugopal

\component chp04 % E. Francis

\component chp05 % N. Athiyaman

\component chp06 % V. Selvakumar

\component chp07 % S. Rajavelu

\component chp08 % A. Murugaiyan

\component chp09 % S. Brocquet

\stopbodymatter


% \startbackmatter

% \component indx

% \stopbackmatter


\stopproduct
% master001.tex – ConTeXt MkIV Module

\startproduct master001

\project iebpmonographs

\environment ieb-c-layout-001

\environment monograph-local-layout

% \enabletrackers[typesetters.suspects]

% \showbodyfont

% \showbodyfontenvironment

\useexternaldocument[m000][master000][Whispering of Inscriptions,
Vol.~{\sc i}]


\startfrontmatter

\component tlpg001

{

\setupheadtext[content=Contents of Vol.~ii.]

\setupheadertexts[Contents of
Vol.~ii.][pagenumber][pagenumber][Contents of Vol.~ii.]

\noheaderandfooterlines

\completecontent

\PY

\PB

}

{

\setupheadtext[tables=Tables of Vol.~ii.]

\setupheadertexts[Tables of Vol.~ii.][pagenumber][pagenumber][Tables
of Vol.~ii.]

\noheaderandfooterlines

\completelistoftables

\PY

\PB

}

{

\setupheadtext[figures=Figures of Vol.~ii.]

\setupheadertexts[Figures of
Vol.~ii.][pagenumber][pagenumber][Figures of Vol.~ii.]

\noheaderandfooterlines

\completelistoffigures

\PY

}

\stopfrontmatter


\startbodymatter

\setcounter[userpage][1]

\component chp10 % P. Estienne

\component chp11 % V. Renganathan

\component chp12 % C. Schmid

\component chp13 % K. Rajan

\component chp14 % A. Davrinche

\component chp15 % M. Le Sauce-Carnis

\component chp16 % V. Olivier

\component chp17 % K. Ladrech

\component chp18 % E. Parlier-Renault


[NTG-context] bottlenecks

2022-12-16 Thread Hans Hagen via ntg-context

Hi,

I'm (occasionally) trying to 'minimize' bottlenecks in the context / 
luametatex code. This is kind of hard because both are rather efficient 
already. On regular runs performance is probably okay but there are 
cases when one has a large complex document (e.g. with many tables) or 
has many runs (e.g. thousands of documents in one go). In that case even 
minor speedups can accumulate and become measurable (esp on vms and runs 
over a network). It can safe time and also energy (which can matter 
todays KWh pricing).


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?


Hans

ps. Much runtime is spent in Lua and there is not that much we can do 
about making that faster.


-
  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] Mathematical MetaFun Mania

2022-12-16 Thread Hans Hagen via ntg-context

On 12/15/2022 10:54 PM, Otared Kavian via ntg-context wrote:

Hi Hans,

Thanks for the new release and the nice anchoring features.

I played a little bit with these, and noticed some issues: in the following 
example, linking the bottom bounds of the integral signs is fine (as long as 
numbers are put there), but for the upper bounds, the \infty and \pi/2 are not 
accepted (nor is any letter or greek symbol), but if one replaces \infty and 
\pi/2 with numbers, then the link between the upper bounds is shown. (In this 
example the links are invading the text, but probably this is due to the fact 
that I just copied the Metapost snippet you sent to Gavin).

you can pick up a binary with a safeguard from

https://build.contextgarden.net/#/waterfall?tags=c.luametatex

(or compile one yourself from 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
___


Re: [NTG-context] Command line arguments on context project

2022-12-16 Thread Wolfgang Schuster via ntg-context

Jethro Djan via ntg-context schrieb am 16.12.2022 um 17:14:

Dear list,

I am using the project structure to typeset my thesis. This is how the 
directory looks like:


chapters/chapter1.tex
chapters/chapter2.tex
…

output/
env_thesis.tex
prd_main.tex
ref.bib

I didn’t use the project.

1. How do I specify output directory?


context --runpath=output ...


I have already seen the following thread:

https://www.mail-archive.com/ntg-context@ntg.nl/msg101654.html

It doesn’t seem to work on a project. So for example when I run mtxrun 
—path=output --script context ../prd_main, I get this error:


tex error on line 5 in file 
/usr/local/texlive/2022/texmf-dist/doc/latex/buctthesis/chapter1.tex: 
! Undefined control sequence


How do you load the chapter file in your product file?

The error message above appears because ConTeXt can't find the chapter 
file of your document and uses one with the same name from a 
documentation of a LaTeX class which has the same name.


2. How do I get CoTeXt to recognise the ref.bib file when I run the 
components not the product?


For context, I don’t want the references printed at the end of each 
chapter but I would like the in-text citation to work (if that is 
possible). If not, is it possible compile the whole product but only 
output a certain page range?


You need a reference to the environment file from within the component 
file, otherwise ConTeXt has no knowledge of the bib file.


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] Mathematical MetaFun Mania

2022-12-16 Thread Hans Hagen via ntg-context

On 12/15/2022 10:54 PM, Otared Kavian via ntg-context wrote:

Hi Hans,

Thanks for the new release and the nice anchoring features.

I played a little bit with these, and noticed some issues: in the following 
example, linking the bottom bounds of the integral signs is fine (as long as 
numbers are put there), but for the upper bounds, the \infty and \pi/2 are not 
accepted (nor is any letter or greek symbol), but if one replaces \infty and 
\pi/2 with numbers, then the link between the upper bounds is shown. (In this 
example the links are invading the text, but probably this is due to the fact 
that I just copied the Metapost snippet you sent to Gavin).

temp solution:

\setmathoptions\mathordinarycode\numexpr
\noitaliccorrectionclassoptioncode
   +\checkkernpairclassoptioncode
 % +\flattenclassoptioncode
\relax

something MS and i need to discuss probably (read: if this old school 
tex math feature is still needed in context)


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] Command line arguments on context project

2022-12-16 Thread Jethro Djan via ntg-context
Dear list,

I am using the project structure to typeset my thesis. This is how the 
directory looks like:

chapters/chapter1.tex
chapters/chapter2.tex
…

output/
env_thesis.tex
prd_main.tex
ref.bib

I didn’t use the project.

1. How do I specify output directory?

I have already seen the following thread:

https://www.mail-archive.com/ntg-context@ntg.nl/msg101654.html 


It doesn’t seem to work on a project. So for example when I run mtxrun 
—path=output --script context ../prd_main, I get this error: 

tex error on line 5 in file 
/usr/local/texlive/2022/texmf-dist/doc/latex/buctthesis/chapter1.tex: ! 
Undefined control sequence

2. How do I get CoTeXt to recognise the ref.bib file when I run the components 
not the product?

For context, I don’t want the references printed at the end of each chapter but 
I would like the in-text citation to work (if that is possible). If not, is it 
possible compile the whole product but only output a certain page range?

Jethro___
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] Structure: multi-volume products

2022-12-16 Thread Alan Braslau via ntg-context
On Fri, 16 Dec 2022 22:31:59 +1300
Richard Mahoney | Indica et Buddhica 
wrote:

> Alan,
> 
> I'm attaching the two master files used for the following (also ran
> cross refs between
> each vol.):
> 
> Murugaiyan, Appasamy & Parlier-Renault, Édith (2021) (Eds) Whispering
> of Inscriptions:
> South Indian Epigraphy and Art History: Papers from an International
> Symposium in
> memory of Professor Noboru Karashima (Paris, 12–13 October 2017).
> Oxford: Indica et
> Buddhica. (2 vols)
> 
> https://indica-et-buddhica.com/publications/murugaiyan-appasamy-parlier-renault-edith/whispering-of-inscriptions-south-indian-epigraphy-and-art-history
> 
> 
> Best, Richard
> 
> 

Shared to the list, without the attached files. Based on the command:

\useexternaldocument
https://wiki.contextgarden.net/Command/useexternaldocument

I'll make a solution Wiki page on the garden once I learn how this
works.

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] Structure: multi-volume products

2022-12-16 Thread Denis Maier via ntg-context
Oh, that's bad. Because apparently it never came through : 
https://www.mail-archive.com/ntg-context@ntg.nl/msg103661.html



(Maybe the two mentioned files are to large?)







> -Ursprüngliche Nachricht-

> Von: Alan Braslau 

> Gesendet: Freitag, 16. Dezember 2022 15:02

> An: Maier, Denis Christian (UB) 

> Cc: ntg-context@ntg.nl

> Betreff: Re: [NTG-context] Structure: multi-volume products

>

> On Fri, 16 Dec 2022 13:59:20 +

> mailto:denis.ma...@unibe.ch>> wrote:

>

> > What was his approach? Did he probably send it off-list?

> >

> It was sent on the list:

>

> To: ntg-context@ntg.nl

> Subject: Re: [NTG-context] Structure: multi-volume products

> Date: Fri, 16 Dec 2022 22:31:59 +1300

>

> 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] Structure: multi-volume products

2022-12-16 Thread Alan Braslau via ntg-context
On Fri, 16 Dec 2022 13:59:20 +
 wrote:

> What was his approach? Did he probably send it off-list?
> 
It was sent on the list:

To: ntg-context@ntg.nl
Subject: Re: [NTG-context] Structure: multi-volume products
Date: Fri, 16 Dec 2022 22:31:59 +1300

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] Project structure with nested subfolders and shared environments.

2022-12-16 Thread Wolfgang Schuster via ntg-context

Pawel Urbanski via ntg-context schrieb am 16.12.2022 um 10:09:



Hi,

To address the first question:
\usepath[{Metadata}] % Is the actual code - I put spaces for 
readability reasons, which was a bad idea.


When I compile a document I switch to the SubSubFolder for the 
document file is in there.


I will appriciate any further hints. Obvious htings are usually 
obvious for people more experenced than I am with Context at this time.


You need

\usepath[../../Metadata]

because the search path is relative to the location of your document.

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] Structure: multi-volume products

2022-12-16 Thread Alan Braslau via ntg-context
Thank you,

This looks like a good solution!
I will try it later, as soon as I can.

Alan


On Fri, 16 Dec 2022 22:31:59 +1300
Richard Mahoney | Indica et Buddhica 
wrote:

> Alan,
> 
> I'm attaching the two master files used for the following (also ran
> cross refs between
> each vol.):
> 
> Murugaiyan, Appasamy & Parlier-Renault, Édith (2021) (Eds) Whispering
> of Inscriptions:
> South Indian Epigraphy and Art History: Papers from an International
> Symposium in
> memory of Professor Noboru Karashima (Paris, 12–13 October 2017).
> Oxford: Indica et
> Buddhica. (2 vols)
> 
> https://indica-et-buddhica.com/publications/murugaiyan-appasamy-parlier-renault-edith/whispering-of-inscriptions-south-indian-epigraphy-and-art-history
> 
> 
> Best, Richard

___
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] Structure: multi-volume products

2022-12-16 Thread Denis Maier via ntg-context
What was his approach? Did he probably send it off-list?

> -Ursprüngliche Nachricht-
> Von: Alan Braslau 
> Gesendet: Freitag, 16. Dezember 2022 14:58
> An: Maier, Denis Christian (UB) 
> Cc: ntg-context@ntg.nl
> Betreff: Re: [NTG-context] Structure: multi-volume products
> 
> On Fri, 16 Dec 2022 09:08:47 +
>  wrote:
> 
> > Last time I had to do something like this I've kept both books in one
> > master file (actually one master file for part 1, one for part 2, one
> > for both together). With that I could easiliy have a table of contents
> > for both volumes.
> 
> Thank you. This was my initial approach, although I know that ConTeXt can do
> better!
> 
> I will look into the suggestion sent by Richard Mahoney, as it looks like a 
> good
> solution to the problem.
> 
> Alan
> 
> --
> Alan Braslau
> 816 West Mountain Avenue
> Fort Collins, CO 80521 USA
> mobile: (970) 237-0957
> 
> Conserve energy! ;-)
___
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] Structure: multi-volume products

2022-12-16 Thread Alan Braslau via ntg-context
On Fri, 16 Dec 2022 09:08:47 +
 wrote:

> Last time I had to do something like this I've kept both books in one
> master file (actually one master file for part 1, one for part 2, one
> for both together). With that I could easiliy have a table of
> contents for both volumes.

Thank you. This was my initial approach, although I know that ConTeXt
can do better!

I will look into the suggestion sent by Richard Mahoney, as it looks
like a good solution to the problem.

Alan

-- 
Alan Braslau
816 West Mountain Avenue
Fort Collins, CO 80521 USA
mobile: (970) 237-0957

Conserve energy! ;-)
___
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] Project structure with nested subfolders and shared environments.

2022-12-16 Thread Denis Maier via ntg-context
Another think you might want to consider: automatic local overrides. So, I’d 
copy everthing to a build folder, copy the environment from somewhere above 
unless the current folder contains a file with the same name.

Denis

Von: ntg-context  Im Auftrag von Pawel Urbanski via 
ntg-context
Gesendet: Freitag, 16. Dezember 2022 11:01
An: mailing list for ConTeXt users 
Cc: Pawel Urbanski 
Betreff: Re: [NTG-context] Project structure with nested subfolders and shared 
environments.

Thank you for responses. While the ability to sort of inherit setups would be 
very useful it looks like as of time of posting this message in December 2022 
it is not possible.
As a workaround I will create a shead environment file and just bulk copy it to 
subfolders. In case when I'll need to globally change some configuration I can 
just replace the file.
I keep all my documents in GIT so the ability to reverte hte change is just a 
command away.

Thanks for help.

Best,
Pawel

On Fri, Dec 16, 2022 at 10:55 AM Henning Hraban Ramm via ntg-context 
mailto:ntg-context@ntg.nl>> wrote:
Am 16.12.22 um 10:09 schrieb Pawel Urbanski via ntg-context:
> When I compile a document I switch to the SubSubFolder for the document
> file is in there.

In my experience this won’t work. ConTeXt searches from the current
folder (you can configure search paths, but I gave up on that, and you’d
have to do it in the called file).

It should be enough to call the environment from the project, but either
the project or the environment isn’t found if the path doesn’t fit the
call location.

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] Project structure with nested subfolders and shared environments.

2022-12-16 Thread Pawel Urbanski via ntg-context
Thank you for responses. While the ability to sort of inherit setups would
be very useful it looks like as of time of posting this message in December
2022 it is not possible.
As a workaround I will create a shead environment file and just bulk copy
it to subfolders. In case when I'll need to globally change some
configuration I can just replace the file.
I keep all my documents in GIT so the ability to reverte hte change is just
a command away.

Thanks for help.

Best,
Pawel

On Fri, Dec 16, 2022 at 10:55 AM Henning Hraban Ramm via ntg-context <
ntg-context@ntg.nl> wrote:

> Am 16.12.22 um 10:09 schrieb Pawel Urbanski via ntg-context:
> > When I compile a document I switch to the SubSubFolder for the document
> > file is in there.
>
> In my experience this won’t work. ConTeXt searches from the current
> folder (you can configure search paths, but I gave up on that, and you’d
> have to do it in the called file).
>
> It should be enough to call the environment from the project, but either
> the project or the environment isn’t found if the path doesn’t fit the
> call location.
>
> 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] Project structure with nested subfolders and shared environments.

2022-12-16 Thread Henning Hraban Ramm via ntg-context

Am 16.12.22 um 10:09 schrieb Pawel Urbanski via ntg-context:
When I compile a document I switch to the SubSubFolder for the document 
file is in there.


In my experience this won’t work. ConTeXt searches from the current 
folder (you can configure search paths, but I gave up on that, and you’d 
have to do it in the called file).


It should be enough to call the environment from the project, but either 
the project or the environment isn’t found if the path doesn’t fit the 
call location.


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] Project structure with nested subfolders and shared environments.

2022-12-16 Thread Denis Maier via ntg-context
Also, I think you'll need to load the environment in your products as well. I 
don't think linking to the project is enough. (Check the mailing list, I have 
also asked similar questions already...)

Best,
Denis

> -Ursprüngliche Nachricht-
> Von: ntg-context  Im Auftrag von Henning
> Hraban Ramm via ntg-context
> Gesendet: Freitag, 16. Dezember 2022 07:52
> An: Pawel Urbanski via ntg-context 
> Cc: Henning Hraban Ramm 
> Betreff: Re: [NTG-context] Project structure with nested subfolders and
> shared environments.
> 
> Am 15.12.22 um 22:52 schrieb Pawel Urbanski via ntg-context:
> > \usepath [{ Metadata }]
> 
> Did you try without the spaces? I’d assume ConTeXt will look for a folder "
> Metadata " and not "Metadata".
> If this is just a template variable, you didn’t tell us about templating.
> 
> And then it matters from where you call your files (MainFolder, SubFolder or
> whereever).
> 
> 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] Project structure with nested subfolders and shared environments.

2022-12-16 Thread Pawel Urbanski via ntg-context
>
>
> Hi,

To address the first question:
\usepath[{Metadata}] % Is the actual code - I put spaces for readability
reasons, which was a bad idea.

When I compile a document I switch to the SubSubFolder for the document
file is in there.

I will appriciate any further hints. Obvious htings are usually obvious for
people more experenced than I am with Context at this time.

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
___


Re: [NTG-context] Structure: multi-volume products

2022-12-16 Thread Denis Maier via ntg-context
Last time I had to do something like this I've kept both books in one master 
file (actually one master file for part 1, one for part 2, one for both 
together). With that I could easiliy have a table of contents for both volumes.

I've made some experiments with writing stuff to the logs or tuc file 
(\writestatus{SPLITPOINT}{\the\realpageno}) at the end of part 1, which I then 
wanted to process with a script (e.g., read the page number, use pdftk to split 
the complete PDF at this point to get PDFs for the individual volumes). 
However, at the end I've just had to send the PDF containing both volumes to 
the publisher as they performed the splitting up themselves.

Best,
Denis

> -Ursprüngliche Nachricht-
> Von: ntg-context  Im Auftrag von Alan Braslau
> via ntg-context
> Gesendet: Freitag, 16. Dezember 2022 04:24
> An: mailing list for ConTeXt users 
> Cc: Alan Braslau 
> Betreff: [NTG-context] Structure: multi-volume products
> 
> Hello,
> 
> I have a book project that is being cut into two volumes (because it is too
> long and will be sold as a boxed set).
> 
> Each volume is presently a separate *product* in the project structure.
> I presently set the counters in the second volume using:
> 
> \setupheadnumber
>   [part] [2]
> 
> \setupheadnumber
>   [chapter] [5]
> 
> (I have multiple [5] parts in the project, and the first volume ends with 
> part 2
> and chapter 5.)
> 
> 
> 1) Is this the right way to be handling this?
> 
> 2) Any suggestions on how I can put a Table of Contents for the first volume
> in the second volume?
> 
> Thanks!
> 
> 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
> 
> ___
___
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
___