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

Re: [NTG-context] Access current element in xmlsetsetup via xml.expressions

2019-10-02 Thread mf
The answer is in lxml-lpt.lua, where built-in expressions are defined. You need a good knowledge of LPEG that i miss. Some built-in expressions get the current element as first argument, like count() or child() (lines 1300-1307 of lxml-lpt.lua): expressions.child = function(e,pattern)

Re: [NTG-context] passing variables/data between context and lua

2019-09-27 Thread mf
\starttext \define\question{44} \startluacode -- see "ConTeXt Lua Documents" manual, §7.4 Looking inside local question = tokens.getters.macro("question") -- it's up to you to verify that \question contains a number -- better using the userdata table for your data userdata.points = tonumber(

Re: [NTG-context] standardmakeup and pages

2019-08-29 Thread mf
\setuppagenumbering[ alternative=doublesided, ] % use pagestate=start on both makeups only if you want the title page % to be the page 1 of the book \definemakeup[title-page][align=middle,doublesided=no] \definemakeup[imprint][align=top,page=no] \starttext \startmakeup[title-page] bastard

Re: [NTG-context] standardmakeup and pages

2019-08-29 Thread mf
Il 29/08/19 16:33, Henning Hraban Ramm ha scritto: \setuppagenumbering[ alternative=doublesided, ] \starttext \startstandardmakeup[align=center] bastard title \stopstandardmakeup \startstandardmakeup[page=left] \vfill imprint \stopstandardmakeup \stoptext \setuppagenumbering[

[NTG-context] an object representation of the node list of a paragraph: a lua table or a JSON

2019-07-10 Thread mf
Hello list, i'd like having an object representation of a typeset paragraph or even a page, preferably as a JSON object, but a Lua table is equally good. My reference is section "4.4 Node lists" of the CLD manual. Before writing an iterator over the list of nodes of a paragraph, figuring out

[NTG-context] interfaces.definecommand fails with brackets inside string arguments

2019-07-08 Thread mf
Hello list, i've played a bit with interfaces.definecommand, that lets you define TeX macros from lua (see the "ConTeXt Lua Documents", 7.3 User interfacing). I found that the commands defined by interfaces.definecommand fail when you pass string arguments that contain brackets. I think

Re: [NTG-context] context standalone installation broken

2019-05-14 Thread mf
Now it works again. Thanks! Massimiliano Il 14/05/19 12:29, Mojca Miklavec ha scritto: Something broke with svn updates of TeX Live. I'm looking into it. Mojca ___ If your question is of interest to others as

Re: [NTG-context] context standalone installation broken

2019-05-14 Thread mf
find tex -name plain.tex finds nothing; there's no "plain" dir under ./tex/texmf/tex/ Massimiliano Il 14/05/19 11:39, Henning Hraban Ramm ha scritto: Am 2019-05-14 um 11:34 schrieb mf : ./first-setup.sh --engine=luatex --modules=all downloads ok, but then .../tex/setuptex gives

[NTG-context] context standalone installation broken

2019-05-14 Thread mf
./first-setup.sh --engine=luatex --modules=all downloads ok, but then .../tex/setuptex gives this error: "/home/massi/context/latest/tex" is not a valid TEXROOT path. (There is no file "/home/massi/context/latest/tex/texmf/tex/plain/base/plain.tex") provide a proper tex root (like '.

[NTG-context] vertical justification of mixedcolumns

2019-04-30 Thread mf
Hello list, in this MWE the columns are not aligned at the bottom, and they are not at the bottom of the page: \definevspacingamount[myBlank][5pt plus 5pt minus 2pt][5pt plus 5pt minus 2pt] \starttext \showgrid \startmixedcolumns[n=2,balance=yes] \dorecurse{2}{\input knuth \blank[myBlank]}

[NTG-context] registers: setting pageleft parameter by index term

2019-04-29 Thread mf
Hello list, please consider this MWE: \definenumber[p] \setnumber[p][1] \def\PageLeft{ p.~} \def\TextCommand#1{\getnumber[p] #1\doif{\rawcountervalue[p]}{2}{\def\PageLeft{ P.~}}\incrementnumber[p]} \setupindex[n=1,pageleft=\PageLeft,pageright=,textcommand=\TextCommand] \starttext

Re: [NTG-context] externalfigure broken with 20190222 beta

2019-02-23 Thread mf
BTW \startsidebar ... \stopsidebar stopped working too. Massimiliano Il 23/02/19 21:58, Hans Hagen ha scritto: On 2/23/2019 5:10 PM, Rik Kabel wrote: With the following example, I get: ...eXt/tex/texmf-context/tex/context/base/mkiv/grph-inc.lua:238: attempt to call upvalue 'imgwrap' (a nil

[NTG-context] current values of \lefthyphenmin and \righthyphenmin

2019-02-11 Thread mf
Dear list, how can i read the current values of \lefthyphenmin and \righthyphenmin? TIA, Massimiliano ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist :

Re: [NTG-context] New logo proposal

2019-01-30 Thread mf
I agree with Willi. Kind regards, Massimiliano Il 30/01/19 13:50, Willi Egger ha scritto: Hi, here my humble personal thoughts: I would say, that the multicolor version is dissecting the word ConTeXT to unidentifiable crumbles. It is to my taste to less connected to typesetting, herewith

Re: [NTG-context] modifying kerning breaks opentype ligatures (and other features)

2018-12-11 Thread mf
did you play with \definefontfeature[whatever][keepligatures=auto] \definecharacterkerning [extrakerning] [factor=0.125,features=whatever] \starttext     \setcharacterkerning[extrakerning]     effe fietsen \stoptext Great! Thanks! This now works: \definefontfeature[frac][frac=yes]

Re: [NTG-context] modifying kerning breaks opentype ligatures (and other features)

2018-12-11 Thread mf
But i should consider all the text parts with a modified kerning and disable kerning around character sequences like "ff", "ffi", "fl" and so on. Luckily, the XHTML markup "knows" where the kerning is modified: A paragraph with a modified kerning should become A paragraph with a modified

Re: [NTG-context] modifying kerning breaks opentype ligatures (and other features)

2018-12-10 Thread mf
character kerning is bad anyway ... I'm using it to get a paragraph one line shorter or longer, or to tune what in TeX is set with \parfillskip. I'm using ConTeXt with a mindset developed on other typesetting softwares. That's not right, i know, but for now i'm finding easier to work with

Re: [NTG-context] modifying kerning breaks opentype ligatures (and other features)

2018-12-10 Thread mf
An example of local correction, but it's not automatic: \definecharacterkerning[narrow][factor=-.02] \definecharacterkerning[wide][factor=.02] \definefontfeature[frac][frac=yes] \def\Narrow#1{\bgroup\setcharacterkerning[narrow]#1\egroup} \def\Wide#1{\bgroup\setcharacterkerning[wide]#1\egroup}

[NTG-context] modifying kerning breaks opentype ligatures (and other features)

2018-12-10 Thread mf
Hello list, i noticed that setting a different kerning breaks some features of opentype fonts; that is true, for example, for ligatures and fractions (frac feature). It looks like a modified kerning inserts something between two adjacent character, making them no more adjacent. That way the

[NTG-context] commands manual (setup-en.pdf) organized by topic

2018-12-05 Thread mf
Hello list, i always use the "Commands" manual a lot to retrieve information about the parameters and options of ConTeXt commands. The manual is built from the .xml files in the tex/texmf-context/tex/context/interface directory. Since those files are organized by topic, is it possible to

[NTG-context] can \REGISTER[key]{term} modify typesetting (adding space)?

2018-11-27 Thread mf
In my setup, i have an index of names: \defineregister[Nome][...] The indexing of names can be toggled with a mode: --mode=AddNames The setup is something like this: \startmode[AddNames] \Name[key]{term}\xmlflush{#1} \stopmode \startnotmode[AddNames] \xmlflush{#1} \stopnotmode I noticed

Re: [NTG-context] latest beta (November 18th): likely bug in \mirror

2018-11-23 Thread mf
Sorry for the mistake in the subject: the bug is in the latest beta of November, 18th. ___ 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] latest beta (october 18th): likely bug in \mirror

2018-11-23 Thread mf
A much simpler example: \starttext \ConTeXt\ version: \contextversion. A paragraph with a mirrored \mirror{word} inside. Another paragraph. \stoptext mirror-not-ok.pdf Description: Adobe PDF document mirror-ok.pdf Description: Adobe PDF document

[NTG-context] latest beta (october 18th): likely bug in \mirror

2018-11-23 Thread mf
Hello list, the effect of \mirror in latest beta looks extended to the following content in the page. It seems a bug in the \mirror macro or another bug that is reflected in \mirror (forgive the pun). Massimiliano % (the following brace is a modified version of one posted by Wolfgang)

Re: [NTG-context] ConTeXt git mirror

2018-10-11 Thread mf
The git mirror is now synchronized again. Many thanks to the people who fixed it. Massimiliano ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl

[NTG-context] ConTeXt git mirror

2018-10-10 Thread mf
Hello list, the ConTeXt git mirror at https://github.com/contextgarden/context-mirror is out of sync. Does anybody know why? Thanks in advance, best wishes, Massimiliano ___ If your question is of interest to

[NTG-context] moving the first line of a page to the previous page

2018-10-09 Thread mf
Hello list, sometimes ConTeXt moves the (would-be) last line of a page to the next page, even when there's room for it at the bottom of a page, before the footnotes. Sometimes i understand why it does so: when the line contains a footnote that would increase the footnotes' height, for

Re: [NTG-context] faking smallcaps font with font features and fallbacks

2018-10-04 Thread mf
In Debian, evince has the same problem (ugly preview); instead qpdfview preview is OK. maybe some aliasing option? evince (ugly) uses cairo, qpdfview (good) uses qt. Zooming out the preview becomes uglier, but - evince emboldens too much - qpdfview shifts the emboldened glyphs downward

Re: [NTG-context] faking smallcaps font with font features and fallbacks

2018-10-04 Thread mf
Il 04/10/18 14:11, Hans Hagen ha scritto: On 10/4/2018 1:44 PM, Taco Hoekwater wrote: Hi, ok, even nicer:     \definefontfallback[FakeSansCaps]   [SansEmboldened] [0x-0x] [rscale=.8,method=uppercase] which will remap all lowercase in the font so that you also get accented

Re: [NTG-context] faking smallcaps font with font features and fallbacks

2018-10-03 Thread mf
\starttypescriptcollection [myriadpro] \definefontfeature[emboldened][effect={width=0.18,delta=0.4,factor=0.3}] \starttypescript [sans] [myriadpro] \definefontsynonym [Sans] [file:MyriadPro-Regular.otf] [features=default] \definefontsynonym [SansItalic]

Re: [NTG-context] faking smallcaps font with font features and fallbacks

2018-10-03 Thread mf
Il 03/10/18 16:02, Hans Hagen ha scritto: ok, even nicer:     \definefontfallback[FakeSansCaps]   [SansEmboldened] [0x-0x] [rscale=.8,method=uppercase] which will remap all lowercase in the font so that you also get accented characters Yes, for this case it makes more sense

[NTG-context] faking smallcaps font with font features and fallbacks

2018-10-03 Thread mf
Hello list, i'm trying to add a smallcaps variant to the MyriadPro font, since it does not implement the smcp opentype feature. My strategy: - "transplant" the uppercase letters of the MyriadPro-Regular into the lowercase letters of the same font with a font fallback that scales down the

[NTG-context] startpar and startparagraph

2018-09-27 Thread mf
What is the difference between \startpar and \startparagraph? Are these two equivalent? Blah blah blah.\par \startpar Blah blah blah.\stoppar Is \startpar ... \stoppar only more XML-like and TaggedPDF oriented? Thanks in advance, Massimiliano

  1   2   >