[NTG-context] Re: output filename with SHA256

2024-02-23 Thread mf
Il 23/02/24 14:32, Pablo Rodriguez via ntg-context ha scritto: Dear list, I have the following sample file: \starttext whatever \startluacode luatex.wrapup( function() local t = {} local pdf_file_name = tex.jobname..".pdf" local sha_pdf =

[NTG-context] Re: conversion from realpage to pagenumber

2024-01-14 Thread mf
berdata"]=1,   ["prefixdata"]=2,   ["state"]="start",  },  {   ["block"]="bodypart",   ["number"]=2,   ["numberdata"]=1,   ["prefixdata"]=2,   ["state"]="start",  }, ... So your answer was not the solution

[NTG-context] Re: conversion from realpage to pagenumber

2024-01-12 Thread mf
Il 12/01/24 10:39, Henning Hraban Ramm ha scritto: Am 12.01.24 um 10:18 schrieb mf: Hello list, how do I convert the realpage number to a page number? Suppose you have a document with a frontmatter of 20 pages in roman numerals, followed by the main text starting from page 1 in arabic

[NTG-context] conversion from realpage to pagenumber

2024-01-12 Thread mf
Hello list, how do I convert the realpage number to a page number? Suppose you have a document with a frontmatter of 20 pages in roman numerals, followed by the main text starting from page 1 in arabic numerals. So the twelfth page is 'XII', while the twenty-second is '2'. How do I get

Re: [NTG-context] Software upgrade for ntg and contextgarden server 6 April

2023-04-14 Thread mf via ntg-context
Hello, the github repo at https://github.com/contextgarden/context-mirror is not updated since March 20th. I don't know whether it's related to the server update, but maybe you know. BTW thank you Taco, Jules and Robbert for your work. Massi Il 11/04/23 22:42, Taco Hoekwater via ntg-context

Re: [NTG-context] \setupparagraphs - can they run over two pages?

2023-02-27 Thread mf via ntg-context
I would try \setuptabulate, \starttabulate ... \stoptabulate. It has some limitations (though Hans added some features recently), but it should work. Massi Il 24/02/23 06:41, jbf via ntg-context ha scritto: I have the following setup for side-by-side paras. \defineparagraphs[Two][n=2]

Re: [NTG-context] Can ConTeXt display a simple itemized list as a comma-separated list?

2023-02-27 Thread mf via ntg-context
\setupitemgroup [fooditems] [each] [none,text] [textseparator={,}] Comma is used to separate options; if you don't use braces, it means that the textseparator is set to the empty string. Massi Il 27/02/23 12:33, Jan-Erik Hägglöf via ntg-context ha scritto: I tested the code

Re: [NTG-context] bottlenecks

2022-12-18 Thread mf via ntg-context
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, fi

Re: [NTG-context] bottlenecks

2022-12-18 Thread mf via ntg-context
The old version is 2020.04.26 19:53, not 2020-04-22 ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl /

Re: [NTG-context] bottlenecks

2022-12-18 Thread mf via ntg-context
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)

Re: [NTG-context] Xml filtering in Lua

2022-11-16 Thread mf via ntg-context
This works: local metadata = xml.filter (t, '../../topics/topic[@t:id=="' .. ch_id .. '"]') also this: local lpath = string.format('../../topics/topic[@t:id=="%s"]', ch_id) local metadata = xml.filter (t, lpath) It looks like xml.filter supports only 2 arguments (see lxml-tex.lua), and

Re: [NTG-context] Xml filtering in Lua

2022-11-16 Thread mf via ntg-context
Il 16/11/22 18:33, Thomas A. Schmitz via ntg-context ha scritto: \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.

Re: [NTG-context] Can I just put a footnote without marking in the main text?

2022-05-18 Thread mf via ntg-context
Is this what you mean? \starttext Hello\footnotetext{Footnote without mark}. \stoptext Kind regards, Massi Il 18/05/22 07:55, Zhichu Chen via ntg-context ha scritto: Hi everybody, After some attempts to put footnotes in a mixed 1&2 columns layout, I decide to put marks in the one-column

Re: [NTG-context] ignore not closed tags in XML input

2022-05-16 Thread mf via ntg-context
See HTML-tidy, https://www.html-tidy.org/ it could help you pre-processing your HTML files. Massi Il 16/05/22 17:08, Pablo Rodriguez via ntg-context ha scritto: Dear list, I would like to feed https://seumasjeltzz.github.io/LinguaeGraecaePerSeIllustrata/001.html as XML input for ConTeXt.

Re: [NTG-context] upload

2022-05-09 Thread mf via ntg-context
I'm downloading it and I see a lot of mkii files and even some Ruby files. It looks like some old material got into the update. Is everything right? Massi Il 09/05/22 17:41, Hans Hagen via ntg-context ha scritto: Hi, I uploaded a new version of lmtx (also because some users have to test

[NTG-context] Wiki update: create a .vsix extension package for VisualStudio Code (or VSCodium)

2022-05-05 Thread mf via ntg-context
Hello list, I just added some instructions to the WIKI to build an extension file for VSCode, starting from the code you find in the LMTX installation at tex/texmf-context/context/data/vscode/extensions/context You find them at https://wiki.contextgarden.net/VSCode Massi

Re: [NTG-context] modify kern between two glyphs

2022-04-05 Thread mf via ntg-context
There's a problem with oldstyle glyphs, because they have different codes inside a font. I used fontforge to find the "four.oldstyle" glyph, whose code is 0xf734. But then I discovered that the 'four.oldstyle' key works the same in the lua table. This is the updated MWE, suitable for

Re: [NTG-context] modify kern between two glyphs

2022-04-05 Thread mf via ntg-context
Il 05/04/22 13:54, Hans Hagen via ntg-context ha scritto: On 4/5/2022 1:45 PM, mf via ntg-context wrote: It's defined in typo-fkr.lua, but I can't understand what parameters to pass and whether it's the right macro. It looks like it's not. look at the extension examples in the test suite: you

Re: [NTG-context] modify kern between two glyphs

2022-04-05 Thread mf via ntg-context
Il 05/04/22 13:15, Thomas A. Schmitz via ntg-context ha scritto: On 5. Apr 2022, at 13:02, mf via ntg-context wrote: Is it possible to solve it globally and only for a single font? Thanks, Massi Have you looked at chapter 5.4 “Goodies” of fonts-mkiv.pdf? That should get you started

[NTG-context] modify kern between two glyphs

2022-04-05 Thread mf via ntg-context
Hello list, I need to modify the kern between two glyphs. This is a MWE where the problem is solved manually: -- \mainlanguage[it] \starttext Default: «Questo è successo nel ’48». Desired: «Questo è successo nel ’\kern-.1em 48». \stoptext

Re: [NTG-context] embedding tex and lua code in

2022-03-24 Thread mf via ntg-context
run by ConTeXt - redefine xmlsetups from the HTML document itself Massi Il 22/03/22 17:07, mf via ntg-context ha scritto: </pre><blockquote style="border-left: #EE solid 0.2em; margin: 0em; padding-left: 0.85em"><pre style="margin: 0em;"> I've added a <scr

Re: [NTG-context] redefining xmlsetups inside a XML document

2022-03-22 Thread mf via ntg-context
-- I prefer this one: -- \startxmlsetups myHtml:i {\it\blue\xmlflush{#1}}\relax \stopxmlsetups -- You need to end the line with a macro eating up all the trailing spaces (newlines included). Massi Il 22/03/22 15:23, mf via ntg-

Re: [NTG-context] redefining xmlsetups inside a XML document

2022-03-22 Thread mf via ntg-context
le="margin: 0em;"> \xmlsetsetup{\xmlfirst{\xmldocument}{body}}{p|i}{myHtml:*} </pre><tt>but it doesn't work, since \xmldocument seems to be the actual document </tt><tt>instead of an id pointing to its root element. </tt><pre style="margin

[NTG-context] redefining xmlsetups inside a XML document

2022-03-10 Thread mf via ntg-context
Hello, I'm trying to add new templates (xmlsetups) from the XML document itself. See the attached MWE. - the XML document is a simple XHTML file - in the "head" element there's a "script" element with the "type" attribute set to "text/vnd.context", whose contents are then passed to

Re: [NTG-context] definedfont vs switchtobodyfont (was "shrink inter-line space")

2021-12-20 Thread mf via ntg-context
Il 18/12/21 13:00, Wolfgang Schuster ha scritto: \definefontfeature [tightlines] [dimensions={*,0,0}] \starttext \samplefile{ward}\par \blank \start     \setupinterlinespace[line=5pt]     \definedfont[Normal*default,tightlines]     \samplefile{ward}\par \stop \stoptext Thanks

Re: [NTG-context] shrink inter-line space

2021-12-18 Thread mf via ntg-context
Il 17/12/21 20:17, Wolfgang Schuster ha scritto:> \starttext > > \samplefile{ward}\par > > \blank > > \start \setupinterlinespace[line=12pt] > \samplefile{ward}\par > \stop > > \stoptext Yes, but you can't say \setupinterlinespace[line=6pt] and make lines overlap. At a certain point baselines

[NTG-context] shrink inter-line space

2021-12-17 Thread mf via ntg-context
Hello list, here's a MWE to shrink the distance between two lines: \starttext \samplefile{ward}\par \blank \bgroup \baselineskip=0pt \samplefile{ward}\par \egroup \stoptext How can I get lines closer, even overlapping? Massi

Re: [NTG-context] Indentation inside \framed won't go away

2021-10-21 Thread mf via ntg-context
\definepapersize[a4-portrait][A4][A4] \setuppapersize[a4-portrait] \setuplayout[topspace=10mm,backspace=15mm,header=50pt,footer=50pt,textwidth=165mm,height=middle,width=middle] \starttext \offset[x=\dimexpr11mm\relax,y=\dimexpr23mm\relax] {\framed[frame=on,offset=none,align=flushleft] {%

Re: [NTG-context] SVG not rendering correctly with LMTX and conversion=mp

2021-10-18 Thread mf via ntg-context
Il 18/10/21 18:30, Hans Hagen via ntg-context ha scritto: On 10/18/2021 6:06 PM, mf via ntg-context wrote: Il 18/10/21 17:15, Jason Ross via ntg-context ha scritto: The following MWE fails to render the text in the attached SVG properly: \starttext \externalfigure[test.svg][conversion=mp

Re: [NTG-context] SVG not rendering correctly with LMTX and conversion=mp

2021-10-18 Thread mf via ntg-context
Here it's wrong. See attachment. Massimiliano Il 18/10/21 18:30, Hans Hagen via ntg-context ha scritto: On 10/18/2021 6:06 PM, mf via ntg-context wrote: Il 18/10/21 17:15, Jason Ross via ntg-context ha scritto: The following MWE fails to render the text in the attached SVG properly

Re: [NTG-context] SVG not rendering correctly with LMTX and conversion=mp

2021-10-18 Thread mf via ntg-context
Il 18/10/21 17:15, Jason Ross via ntg-context ha scritto: The following MWE fails to render the text in the attached SVG properly: \starttext \externalfigure[test.svg][conversion=mp] \stoptext The axis labels, tick labels, and title are all incorrect. This file was generated with Matplotlib.

Re: [NTG-context] undefined command in current latest

2021-10-11 Thread mf via ntg-context
It looks like the argument of \getmarking is not expanded, since you get "\it knuth" instead of an italicized "knuth" in the headers of this MWE: \definemarking[myheader] \setupheadertexts[{\getmarking[myheader][last]}] \starttext \dorecurse{10}{\samplefile{knuth}\marking[myheader]{\it

Re: [NTG-context] Addition of authortitle sorttype for bibliographies

2021-10-05 Thread mf via ntg-context
probably got lost when my mail address was in transition I sent you some mails during that period that were not answered. I thought it was a retaliation for not presenting anything at the meeting :) Anyway I'll prepare an article on running ConTeXt inside a container that could eventually

Re: [NTG-context] new upload

2021-08-31 Thread mf via ntg-context
The problem on lowlevel-alignments.pdf is solved too. Now the update process is OK again. Thanks. Massi Il 30/08/21 20:01, Hans Hagen via ntg-context ha scritto: On 8/30/2021 7:27 PM, Rik Kabel via ntg-context wrote: The corrected upload (2021.08.30 16:23) still has an issue. The --autopdf

Re: [NTG-context] new upload

2021-08-30 Thread mf via ntg-context
There's a problem downloading lowlevel-alignments.pdf. Here's a slice of the log of install.sh: mtx-install | updating tex/texmf, 1530 files mtx-install | updating tex/texmf-context, 4130 files mtx-install | changed : 0 % :27550 :

Re: [NTG-context] error in mtxrun.lua line 4548 in August 24th update

2021-08-25 Thread mf via ntg-context
Il 25/08/21 14:06, Hans Hagen ha scritto: On 8/25/2021 1:20 PM, mf via ntg-context wrote: Il 25/08/21 13:06, Hans Hagen ha scritto: On 8/25/2021 11:18 AM, mf via ntg-context wrote: Hello, here's the error I get: lua error : function call: ...si/context/lmtx-latest/tex/texmf-linux-64/bin

Re: [NTG-context] error in mtxrun.lua line 4548 in August 24th update

2021-08-25 Thread mf via ntg-context
Il 25/08/21 13:06, Hans Hagen ha scritto: On 8/25/2021 11:18 AM, mf via ntg-context wrote: Hello, here's the error I get: lua error : function call: ...si/context/lmtx-latest/tex/texmf-linux-64/bin/mtxrun.lua:4548: bad argument #2 to 'lpegmatch' (string expected, got nil) BTW I was trying

[NTG-context] error in mtxrun.lua line 4548 in August 24th update

2021-08-25 Thread mf via ntg-context
Hello, here's the error I get: lua error : function call: ...si/context/lmtx-latest/tex/texmf-linux-64/bin/mtxrun.lua:4548: bad argument #2 to 'lpegmatch' (string expected, got nil) BTW I was trying to compile lowlevel-expansion.tex in

Re: [NTG-context] new upload

2021-05-27 Thread mf
Il 25/05/21 18:20, Hans Hagen ha scritto: Inserts are somewhat complex (and interwoven) and are also somewhat fuzzy when one wants to do checking when making progress on a page.  We already deal with that in context in a reasonable way but I get the feeling that we can do better. This and

Re: [NTG-context] Stack size for arguments too small in LMTX

2021-05-25 Thread mf
Il 25/05/21 17:25, Henri Menke ha scritto: Dear list, For some reason pgfplots has a \pgfkeys invocation where the argument has more than 4000 lines. This crashes LuaMetaTeX with the message tex error > tex error on line 4045 in file pgfplots.code.tex: TeX capacity exceeded, sorry [token

Re: [NTG-context] custom zig zag sidebars

2021-04-29 Thread mf
Il 28/04/21 17:53, Hans Hagen ha scritto: On 4/28/2021 5:27 PM, mf wrote: Hello, I made an experiment to add alternatives to sidebars (see attachment). I discovered the sidebar is drawn by anch_sidebars_draw in metapost/context/base/mpiv/mp-apos.mpiv. I've redefined it locally to add

[NTG-context] custom zig zag sidebars

2021-04-28 Thread mf
Hello, I made an experiment to add alternatives to sidebars (see attachment). I discovered the sidebar is drawn by anch_sidebars_draw in metapost/context/base/mpiv/mp-apos.mpiv. I've redefined it locally to add alternatives. To make fancy, zig zag bars I defined a macro, draw_pattern_bar,

Re: [NTG-context] clubs and widows in columns

2021-04-26 Thread mf
Il 25/04/21 22:19, Jano Kula ha scritto: Dear list, is there a way to avoid clubs and widows in columns? I don't know, how it would be implemented, if the task is splitting typeset vertical list. \setuppapersize[A7] \starttext \startcolumns[separator=rule,              

Re: [NTG-context] nbsp in XML (S01E01)

2021-04-21 Thread mf
Try this: %\xmltexentity{nbsp}{\nobreakspace} \xmlsetentity{nbsp}{ } % U+00A0 NBSP between braces %\xmlsetentity{nbsp}{ } % U+0020 normal space between braces \startbuffer[doc] Temperature 20 °C 20 °C 20 °C 20 °C average. Altitude 6000m 6000m 6000m 6000m average.

Re: [NTG-context] metafun / patterns

2021-03-25 Thread mf
Sorry for the noise, my fault: Thunderbird replaced some semicolon combinations with emojis, so they were missing when I copied and pasted them in a source file. Massi Il 25/03/21 15:14, mf ha scritto: Il 25/03/21 14:11, Hans Hagen ha scritto: \startMPpage[offset=1cm] draw (fullcircle

Re: [NTG-context] metafun / patterns

2021-03-25 Thread mf
Il 25/03/21 14:11, Hans Hagen ha scritto: \startMPpage[offset=1cm]     draw (fullcircle scaled 5cm shifted (0cm,0cm))     withpattern image (fill fullcircle scaled 1cm withcolor "darkblue" ;)     withpatternscale (1/10,1/10)     ;     draw (fullcircle scaled 5cm shifted

Re: [NTG-context] lmtx update / teaser

2021-03-02 Thread mf
Il 01/03/21 15:44, Hans Hagen ha scritto: \starttext \startuseMPgraphic{circle}     lmt_parshape [     path   = fullcircle scaled 136mm,     offset = 2mm,     bottomskip = - 1.5LineHeight,     ] ; \stopuseMPgraphic \start

[NTG-context] verify if you are already postponing notes

2021-02-15 Thread mf
Dear list, I'm typesetting XHTML and there is a couple of cases (tables and math), where I use \postponenotes ... \flushnotes in both their XML setups. The problem arises when I have math inside the cell of a table, so I get those commands nested: \postponenotes % element \postponenotes %

Re: [NTG-context] Centered list of authors in ToC

2021-02-09 Thread mf
Il 09/02/21 10:49, jbf ha scritto: I wonder if someone can assist me with the final step in a complicated Table of Contents where all items in the ToC are centred (except page numbers which continue to be on the right). Beneath each chapter title is a list of authors (Yes, there can be up to

Re: [NTG-context] new font trickery

2020-12-23 Thread mf
When I started using ConTeXt, font management gave me headaches because I expected fonts to be indefinitely scalable and not to be designed in advance at fixed sizes. That came from using software like Word, where fonts are scalable at any size. Since I had no background in typesetting, I

Re: [NTG-context] Inkscape 1 without gui

2020-12-12 Thread mf
See here: https://www.mail-archive.com/ntg-context@ntg.nl/msg94431.html and here: https://wiki.contextgarden.net/SVG#ConTeXt_and_Inkscape Massi Il 12/12/20 12:00, Martin Hasoň ha scritto: Hi all, Inkscape version detection doesn't work for Inkscape 1 and non-gui environments (eg docker).

Re: [NTG-context] Piecewise margin line

2020-11-19 Thread mf
Il 20/11/20 02:06, Johann Birnick ha scritto: On Thu, 2020-11-19 at 11:25 +0100, mf wrote: Il 19/11/20 10:39, Johann Birnick ha scritto: Hello, I want to setup some fancy theorem style for my math notes. For this I want to have a colored margin line next to my theorems. It should look like

Re: [NTG-context] new upload

2020-11-19 Thread mf
Il 19/11/20 12:00, mf ha scritto: Tested. It works. - download the binaries from http://lmtx.pragma-ade.nl/install-lmtx/context-linux-64.zip - unzip it in your context directory - make install.sh and bin/mtxrun executable - run install.sh and you can see the upgrade progression again

Re: [NTG-context] new upload

2020-11-19 Thread mf
Tested. It works. - download the binaries from http://lmtx.pragma-ade.nl/install-lmtx/context-linux-64.zip - make install.sh and bin/mtxrun executable - run install.sh and you can see the upgrade progression again. Thanks Hans, Massi Il 19/11/20 11:35, Hans Hagen ha scritto: Hi, A new

Re: [NTG-context] Piecewise margin line

2020-11-19 Thread mf
Il 19/11/20 10:39, Johann Birnick ha scritto: Hello, I want to setup some fancy theorem style for my math notes. For this I want to have a colored margin line next to my theorems. It should look like this: https://i.ibb.co/F6L59pD/idea.png The line should stretch over the whole theorem, not

Re: [NTG-context] Indentation after \placefigure

2020-11-10 Thread mf
Il 10/11/20 09:42, Sylvain Hubert ha scritto: Dear List, Does anyone know how to indent the paragraph beneath \placefigure in the following example?     \indenting[2em]     \setupindenting[yes]     \starttext     \dorecurse{50}{a b c }     \placefigure[here,none][indentnext=yes]{}{  

Re: [NTG-context] new upload

2020-11-06 Thread mf
Il 06/11/20 22:03, Pablo Rodriguez ha scritto: I’m afraid that I cannot update unless I remove tex/texmf*.tma. I’m on Linux-64bit and I wonder whether I’m the only user affected by this issue. I can confirm that on my Debian 10 64bit: no update until I removed texmf-context.tma

Re: [NTG-context] \blank[] doesn't work when nothing precedes it

2020-11-05 Thread mf
Il 05/11/20 13:26, Sylvain Hubert ha scritto: Dear List, I'm trying to put the document title at around .25\paperheight by inserting a \blank:     \setuplayout[topspace=0cm, header=0cm, height=\paperheight]     \starttext \blank[.25\paperheight] foo \stoptext

Re: [NTG-context] content of xml node (element) in lua

2020-10-16 Thread mf
(sorry, I sent it before refining it) Il 16/10/20 20:57, Jano Kula ha scritto: Hello! Processing XML I want to manipulate content of XML elements inside Lua. I can define the Lua function xml.functions.name (t), where processing happens, and use the command

Re: [NTG-context] force index entries without page number

2020-09-04 Thread mf
Il 04/09/20 11:01, Henning Hraban Ramm ha scritto: Am 03.09.2020 um 13:32 schrieb mf : Use check=yes But I need check=no, because my author has several entries like Miller, Carolyne, born Princess of Sayn-Wittgenstein 123–125 Sayn-Wittgenstein, Carolyne of see Miller, Carolyne i.e

Re: [NTG-context] force index entries without page number

2020-09-03 Thread mf
Il 03/09/20 11:38, Henning Hraban Ramm ha scritto: Hi Massi, thank you! Am 03.09.2020 um 11:09 schrieb mf : This should be exactly what you asked for: \defineprocessor[passim][right=\quad{\it passim}] I didn’t think to use processors. You need them to get the "passim"; if y

Re: [NTG-context] force index entries without page number

2020-09-03 Thread mf
Useful references I consulted to find a solution: https://www.mail-archive.com/ntg-context@ntg.nl/msg88118.html https://wiki.contextgarden.net/Registers#Processors Massi ___ If your question is of interest to others

Re: [NTG-context] force index entries without page number

2020-09-03 Thread mf
This should be exactly what you asked for: \defineprocessor[passim][right=\quad{\it passim}] \starttext \samplefile{ward}\index{Ward, Peter} \samplefile{sapolsky}\index{Sapolsky, Robert} \seeindex{passim->Ramm, Hraban}{} \seeindex{Hraban}{Ramm, Hraban} \page \placeindex[check=yes] \page

Re: [NTG-context] force index entries without page number

2020-09-03 Thread mf
Il 03/09/20 10:17, Henning Hraban Ramm ha scritto: Hi, I’d like to have an (person) index entry like Ramm, Hraban passim i.e. without actual page number. How can I force that? I also need to be able to refer to it like \seeindex{Hraban}{Ramm, Hraban) \starttext

Re: [NTG-context] strange behavior with \groupedcommand in recent versions of LMTX

2020-09-02 Thread mf
Thanks Hans, this solves the problem I had with the new implementation of \wordright. It's not exactly a problem of \wordright, but the combination with \groupedcommand. Is \nextbox a new entry of latest versions? I've seen also \nextboxwd, \nextboxht, etc. So you can measure the next box to

[NTG-context] strange behavior with \groupedcommand in recent versions of LMTX

2020-09-01 Thread mf
Hello list, this is a MWE that worked right in MkIV and in LMTX versions (at least) until April 22nd, 2020. There's a macro, \wordorparagraphright, that takes one argument, makes a hbox with it and measures its width - if its width is less than \hsize, then it calls \wordright - if its

[NTG-context] pagecolumns: get the current column

2020-06-26 Thread mf
Hello list, I'm using a 2-columns layout and I'd like to put some information in the margin. I should put that information in the left margin when I'm in the left column, and in the right margin when I'm in the right column, to prevent the extra information overlapping the main text in the

Re: [NTG-context] \startplacefigure and \startframedtext in lmtx

2020-06-10 Thread mf
Il 10/06/20 17:30, Hans Hagen ha scritto: On 6/9/2020 11:04 AM, Otared Kavian wrote: Hi all, I just noticed that in lmtx, the commands \startplacefigure and \startframedtext, when used together, do not behave in the same way as they do in mkiv. I wonder whether this is a permanent change or

Re: [NTG-context] accessing xml element attributes in lua, how, if you do not want to use the .at scheme?

2020-06-09 Thread mf
Il 09/06/20 15:31, Gerben Wierda ha scritto: I’ve been trying to find out how I can access XML node properties/attributes in lua other than via the .at syntactic scheme but using the property/attribute name as a string. E.g., currently I do: someVar = someNode.at.someProperty but I would

Re: [NTG-context] Inkscape command line arguments have changed

2020-05-19 Thread mf
Il 19/05/20 20:50, Thangalin ha scritto: Minor correction: \startluacode figures.programs.inkscape={ command="inkscape", pdfargument=[[ "%oldname%" --export-dpi=600 --export-type=pdf --export-filename="%newname%" ]], pngargument=[[ "%oldname%"

Re: [NTG-context] Problem including svg files with Inkscape 1.0~rc1-4

2020-04-30 Thread mf
Il 30/04/20 17:21, Hans Hagen ha scritto: On 4/30/2020 3:15 PM, mf wrote: Il 30/04/20 14:09, Romain Diss ha scritto: Hi, The last release candidat of Inkscape (1.0~rc1-4 on my Debian sid) doesn't provide the `--export-pdf=` option anymore. So context can not convert svg files

Re: [NTG-context] Problem including svg files with Inkscape 1.0~rc1-4

2020-04-30 Thread mf
Il 30/04/20 14:09, Romain Diss ha scritto: Hi, The last release candidat of Inkscape (1.0~rc1-4 on my Debian sid) doesn't provide the `--export-pdf=` option anymore. So context can not convert svg files into the corresponding `m_k_i_v_*` pdf. It seems that the `--export-filename=` option does

Re: [NTG-context] offset for background overlay

2020-04-13 Thread mf
Or maybe a method in MP to set the bounding box of the resulting overlay? setbounds in combination with leftenlarged, topenlarged etc. Thanks Wolfgang, this is the kind of solution I was looking for: \startuseMPgraphic{cell:triangle} path p ; p := unittriangle rotated 90 xscaled 2.5

Re: [NTG-context] offset for background overlay

2020-04-11 Thread mf
(an offset that is both horizontal and vertical) - a "frame": what does it mean? (I looked into pack-rul.mkiv, with no results) Massi Il 11/04/20 20:11, Wolfgang Schuster ha scritto: Hans Hagen schrieb am 11.04.2020 um 19:41: On 4/11/2020 4:15 PM, mf wrote: Hello list

[NTG-context] offset for background overlay

2020-04-11 Thread mf
Hello list, this MWE is a simplified version of a real case: \startuseMPgraphic{cell:triangle} path p ; p := unittriangle rotated 90 xscaled 2.5 OverlayWidth yscaled 2.5 OverlayHeight ; draw p withcolor red ; \stopuseMPgraphic \defineoverlay[triangle][{\uniqueMPgraphic{cell:triangle}}]

Re: [NTG-context] Using Lua files in project structure

2020-04-05 Thread mf
Il 05/04/20 15:00, Jairo A. del Rio ha scritto: I'm writing a project in ConTeXt MKIV and I want to load some (pure) Lua libraries and bindings (defining \ctxlua and the like). For instance, I have the file foo.lua with some macros and I want to use them in my project. Something like this:

Re: [NTG-context] Bug (Lua) ?

2020-03-19 Thread mf
Il 19/03/20 11:20, Fabrice Couvreur ha scritto: Hi, this file did not pose any problems but today yes. Thank you. Fabrice \starttext \startluacode local letters_1 = { "A", "B", "C", "D", "E", "F", "G", "H", "I", "J" } local letters_2 = { "1", "Année", "1998", "1999", "2000", "2001", "2002",

Re: [NTG-context] Issue with rendering arrows in lmtx

2020-03-17 Thread mf
Il 17/03/20 15:51, Jan-Erik Hägglöf ha scritto: Hi All! When I invoke this command \startMPcode picture p ; p := lmt_svg [ filename ="pil.svg" ]; draw p; \stopMPcode I get weird results, the arrowhead points in wrong direction and is very tiny compared to the size it was meant to have.

Re: [NTG-context] Need help processing XML in luacode

2020-03-10 Thread mf
In your tex file, try this: \startluacode settings = {} docstruktur = {} doclistfile = "doclist.xml" local striplines = utilities.strings.striplines local xmltext= xml.text cropstring = function(s) -- return striplines(s, "prune and collapse") return striplines(s) end doc =

Re: [NTG-context] Up-to-date documentation / tutorials. Where?

2020-02-29 Thread mf
Is there not a simple place to get all the up-to-date documentation? If you install ConTeXt from http://www.pragma-ade.nl/install.htm in the installation tree you'll find docs under tex/texmf-context/doc/context/documents/ There you'll always find the docs at their last revision. Massi

Re: [NTG-context] metapost: remapping colors of an SVG picture

2020-02-18 Thread mf
Il 18/02/20 19:07, Jan U. Hasecke ha scritto: Am 18.02.20 um 14:53 schrieb Hans Hagen: \setupcolors[rgb=no] \startMPcode     draw lmt_svg [ filename = "sample.svg" ] ; \stopMPcode I get this error. ! Not implemented: (unknown numeric)=(string). ] <*> ... ; p := lmt_svg [ filename =

[NTG-context] metapost: remapping colors of an SVG picture

2020-02-18 Thread mf
Hello list, I tried this: \starttext \startMPcode picture p ; p := lmt_svg [ filename = "sample.svg" ] ; draw p ; color black_rgb ; black_rgb := ( 0, 0, 0 ) ; color red_rgb ; red_rgb := ( 1, 0, 0 ) ; remapcolor( black_rgb, red_rgb ) ; recolor p ; draw p shifted ( bbwidth(p) + 5mm, 0) ;

Re: [NTG-context] upload

2020-02-17 Thread mf
if you fetch from the web site you need to use /latest as we no longer have lpha, beta current ... maybe somthing got messed up in the git sync, i don't know The git mirror is in sync again. Thanks to anybody working on it. Best wishes, Massi

Re: [NTG-context] upload

2020-02-13 Thread mf
Il 11/02/20 17:00, Hans Hagen ha scritto: Hi, I uploaded a fresh lmtx. There is some new stuff in there: I'm a little bit confused about versions. 1) GIT MIRROR The last commit in the branch "beta" is 2020-01-26 18:37:00. I've seen no update since your "upload" message (the one i'm

Re: [NTG-context] Adjust kern for one character

2019-12-22 Thread mf
Il 22/12/19 22:19, Rik Kabel ha scritto: List, Is there a way in ConTeXt to adjust the left-side kern for one character? The cap J in the font I am using is being set too close to the preceding characters and I would rather not insert a thinspace before each. (Inserting a thinspace is

Re: [NTG-context] blank[\lineheight] works with LMTX, fails with MkIV

2019-12-21 Thread mf
Il 20/12/19 20:04, Rik Kabel ha scritto: MkIV fails with tex error > tex error on line 3 in file c://Users/micro/Desktop/fail.tex: ! Missing \endcsname inserted given the following mwe: \starttext a \blank[\lineheight] z \stoptext Not critical as there are

Re: [NTG-context] setting the color of cropmarks

2019-12-20 Thread mf
This is a dirty hack to change the color of the crop marks and the page number at the corner of a page when \setuplayout[marking=on]. Edit the file: tex/texmf-context/metapost/context/base/mpiv/mp-crop.mpiv in the distribution, changing two lines: - (here i'm reproducing only the last

Re: [NTG-context] setting the color of cropmarks

2019-12-19 Thread mf
There is no option to change the color for the rules and the only option you have is to use color conversion. \setupcolors[cmyk=yes,rgb=no] I do have this setup, but it produces grayscale crop marks. I was told by two different printshops that grayscale raises problems with recent versions

Re: [NTG-context] setting the color of cropmarks

2019-12-19 Thread mf
Il 19/12/19 18:07, Henning Hraban Ramm ha scritto: Am 2019-12-19 um 16:41 schrieb mf : Hello list, \setuplayout[marking=on] typesets crop marks that are in grayscale black. Can I change their color, in particular into a CMYK black (0,0,0,1.0)? There’s no parameter, and I don’t understand

[NTG-context] setting the color of cropmarks

2019-12-19 Thread mf
Hello list, \setuplayout[marking=on] typesets crop marks that are in grayscale black. Can I change their color, in particular into a CMYK black (0,0,0,1.0)? Thanks, Massi ___ If your question is of interest to

Re: [NTG-context] changing alignment inside a paragraph

2019-12-12 Thread mf
Il 11/12/19 21:25, Wolfgang Schuster ha scritto: \starttext \startbuffer This is the text of an index term, that is normally justified, but I'd like the page numbers to be flushed to the right from their second line\par \startalignment[flushright]

Re: [NTG-context] changing alignment inside a paragraph

2019-12-11 Thread mf
This is a good-enough solution to my problem: \setupalign[stretch] \starttext \def\Text{This is the text of an index term, that is normally justified, but I'd like the page numbers to be flushed to the right from their second line} \def\Pages{34, 57, 101-104, 276, 345, 401, 403, 512.}

[NTG-context] changing alignment inside a paragraph

2019-12-10 Thread mf
Hello list, is there a way to achieve this? \def\FlushRightFromNextLine{\relax} \setupnarrower[left=0cm,right=11cm] \setupalign[stretch] \starttext This is what I'd like to type in my source:\par \blank \type{This is the text of an index term, that is normally justified, but I'd like the page

Re: [NTG-context] ConTeXt as a service

2019-11-23 Thread mf
Il 22/11/19 08:43, Jan U. Hasecke ha scritto: Am 20.11.19 um 18:10 schrieb Henning Hraban Ramm: Hi! I’m running ConTeXt on my web server e.g. to generate shipping forms for a customer. As Hans said, it makes sense to use an asynchronous setup; in my case it’s celery/RabbitMQ behind Django.

Re: [NTG-context] ConTeXt as a service

2019-11-23 Thread mf
Il 23/11/19 13:02, Henning Hraban Ramm ha scritto: Am 2019-11-23 um 08:12 schrieb Mojca Miklavec : Then you can use one of the online JS editors like CKeditor.\ Only if you spend an enormous amount of effort making sure that the code is properly cleaned up rather than containing a

Re: [NTG-context] ConTeXt as a service

2019-11-23 Thread mf
Il 23/11/19 14:18, Henning Hraban Ramm ha scritto: Am 2019-11-23 um 13:18 schrieb luigi scarso : another link: https://coko.foundation/ https://coko.foundation/product-suite/ or merely https://pubsweet.coko.foundation Thank you for the hint, sounds interesting and like the thing I always

[NTG-context] interlaced overbrace and underbrace

2019-10-25 Thread mf
Hello list, is there a better way to interlace overbraces and underbraces like this? \starttext These are the expressions to combine: $$\overbrace{a+b+c}+d \quad a+\underbrace{b+c+d}$$ This is the desired result: $$\overbrace{a+b+c}+d \kern-16mm\underbrace{\hbox to 15mm{ }}$$ \blank

[NTG-context] place single entry of a register, or filtering the terms of a register

2019-10-25 Thread mf
Hello list, is there a way to place only one single entry of a register, or a selection of entries? I looked into strc-reg.mkiv and strc-reg.lua and i would answer "no, it's not possible". I could hack strc-reg.lua and define a command to do that, but maybe a better solution is already

Re: [NTG-context] changing an XML node and reprocess it (or xmlflushing a string)

2019-10-08 Thread mf
l:b {\bf \xmlflush{#1}} \stopxmlsetups \startxmlsetups xml:fraction \xmlfunction{#1}{textfraction} \stopxmlsetups \starttext \xmlprocessbuffer{main}{text}{} \stoptext Il 07/10/19 18:26, mf ha scritto: Hello, i'm using XML and i find useful specifying a fraction made of text this way: t

[NTG-context] changing an XML node and reprocess it (or xmlflushing a string)

2019-10-07 Thread mf
Hello, i'm using XML and i find useful specifying a fraction made of text this way: text for numerator/text for denominator With some lua, i can transform it into \frac{\text{text for numerator}}{\text{text for denominator}} which typesets something like this: text for numerator

  1   2   3   >