Re: [NTG-context] inline footnotes

2015-01-30 Thread mf
Hi Massi, Could you possibly provide a small pdf sample that illustrates exactly what you are looking for? Thanks and Best wishes Idris Thanks for your reply, Idris. Here's an example: *** traditional (stacked) footnotes *** *** 1. This is the text

[NTG-context] paragraph footnotes line height

2015-03-06 Thread mf
Hello, I'd like to know how I can set the line height of paragraph footnotes. They get the line height set with \setupinterlinespace, whether I use the grid or not. Here's my configuration: \setupnotation[footnote][ alternative=serried, numbercommand=, numberstopper=, numbercommand=\high,

[NTG-context] page breaks before titles

2015-03-06 Thread mf
Hello, I'm trying to typeset a book made of letters with ConTeXt. Every letter has a title a subtitle and a date, before it starts with Dear ... Like this: - Title subtitle where, when Dear ..., the rest of the letter ...

Re: [NTG-context] page breaks before titles

2015-03-07 Thread mf
You can use the \testpage command where you can set how many lines should remain on the page before a page breaks happens. \setuphead[LetterTitle][before={\testpage[8]\blank[2*line]}] If this doesn’t help you should make a *working* minimal example. Wolfgang Thanks Wolfgang (and

Re: [NTG-context] paragraph footnotes line height

2015-03-07 Thread mf
Am 07.03.2015 um 00:08 schrieb mf mass...@fastwebnet.it: Hello, I'd like to know how I can set the line height of paragraph footnotes. They get the line height set with \setupinterlinespace, whether I use the grid or not. Here's my configuration: \setupnotation[footnote

[NTG-context] setup for paragraph styles

2015-03-12 Thread mf
Hello, I'd like to kwnow the commands I should use in ConTeXt to define styles for paragraphs of text that are not headers/titles nor normal text. With titles I know I must use: \definehead[MyTitle][title] \setuphead[MyTitle][...] What should I use for texts like subtitles, dates of letters,

Re: [NTG-context] paragraph footnotes line height

2015-03-10 Thread mf
Il giorno sab, 07/03/2015 alle 10.59 +0100, Wolfgang Schuster ha scritto: Am 07.03.2015 um 00:08 schrieb mf mass...@fastwebnet.it: Hello, I'd like to know how I can set the line height of paragraph footnotes. They get the line height set with \setupinterlinespace, whether I use

[NTG-context] line break between number and footnote text in paragraph footnotes

2015-03-31 Thread mf
Hello, I have a problem with paragraph footnotes. I don't know how to prevent a line break occurring between the footnote number and the footnote text. Sometimes a thing like this happens: ... [main text] ... -- 1. text of the first footnote --- 2. text of the second one --- 3. text

Re: [NTG-context] line break between number and footnote text in paragraph footnotes

2015-04-02 Thread mf
Il giorno ven, 03/04/2015 alle 00.36 +0200, Hans Hagen ha scritto: On 4/3/2015 12:31 AM, mf wrote: Hello, I have a problem with paragraph footnotes. I don't know how to prevent a line break occurring between the footnote number and the footnote text. Sometimes a thing like this happens

Re: [NTG-context] line break between number and footnote text in paragraph footnotes

2015-04-02 Thread mf
Hello, I have a problem with paragraph footnotes. I don't know how to prevent a line break occurring between the footnote number and the footnote text. Sometimes a thing like this happens: ... [main text] ... -- 1. text of the first footnote --- 2. text of the second one ---

[NTG-context] Testing the value of a number defined with \definenumber

2015-06-27 Thread mf
I'd like to test the value of a number (\definenumber). \starttext \definenumber[numero][] \setnumber[numero][42] The value of {\tt numero} is \getnumber[numero]. \doifelse{\getnumber[numero]}{42}{ Ok, the test worked. }{ Why does not it work? } \stoptext ConTeXt types Why does not it

Re: [NTG-context] Testing the value of a number defined with \definenumber

2015-06-27 Thread mf
Thanks Otared, I've added this example to http://wiki.contextgarden.net/Counters Best regards, MF Hi MF, You should use \rawcountervalue instead of \getnumber, as in the following: \starttext \definenumber[numero][] \setnumber[numero][42] The value of {\tt numero} is \getnumber

[NTG-context] Counter[way=bypage] bug in latest beta?

2015-06-29 Thread mf
Hello list, consider this example, involving a number (counter) to be reset at each page: \starttext \definenumber[MyNumber][way=bypage] % MyNumber=0 \incrementnumber[MyNumber] % MyNumber=1 \incrementnumber[MyNumber] % MyNumber=2 mynumber is \rawcountervalue[MyNumber]. % prints 2 \page %

[NTG-context] \footnote and \note with \setupnotation[way=bypage], but it does not work with XML processing

2015-07-02 Thread mf
}} \stopxmlsetups \startxmlsetups xml:span:footnote:idref \mynote{\xmlatt{#1}{idref}}{\xmlflush{#1}} \stopxmlsetups Used in XML processing, the counters go crazy and I get ?? instead of the right footnote numbers in the text. Any hints? Thanks in advance, MF

Re: [NTG-context] Counter[way=bypage] bug in latest beta?

2015-06-30 Thread mf
BTW: The names for the counter commands are \...counter, e.g. \definecounter[testcounter][way=bypage] \define\TestCounter {\incrementcounter[testcounter] %\convertedcounter[testcounter] \rawcountervalue [testcounter]} \starttext \dorecurse{3}{\TestCounter\page} \stoptext

Re: [NTG-context] flushing the last hbox of a paragraph to the right

2015-11-16 Thread mf
Thank you Rik, \wordright is exactly what I was looking for. Best regards, Massi Il giorno lun, 16/11/2015 alle 09.34 -0500, Rik Kabel ha scritto: > On 2015-11-16 07:40, mass...@fastwebnet.it wrote: > > Sorry, there was a typo in my previous email. > > The last example should look like this: > >  

Re: [NTG-context] use of preceding-sibling in xmlsetsetup

2015-10-17 Thread mf
Thank you for your answer, Thomas. I tried something similar (putting a \noindentation at the end of the "incipit" paragraph, but it failed if I put a \blank after that). The sibling part In the book of the history of luatex (v 0.50) it is said that the sibling functions would not be implemented

Re: [NTG-context] Garamond Premier Pro font goodies file

2016-05-03 Thread mf
al-sizes-ws.pdf Description: Adobe PDF document %D \module %D [ file=type-imp-ebgaramond, %Dversion=2016.05.02, %D title=\CONTEXT\ Typescript Macros, %D subtitle=Garamond Premier Pro, %D author=MF, %D date=\currentdate, %D copyright={PRAGMA ADE

[NTG-context] frac opentype feature broken by \setbreakpoints[compound]

2017-02-13 Thread MF
Hello list, I found an interference between the "frac" opentype feature and \setbreakpoints[compound], which make the former fail when you have a numerator more than 2 digit wide. I found it with Adobe Garamond Premier Pro: with \setbreakpoints[compound], when the fraction had a 3-digit (or more)

[NTG-context] annotated text: main text in narrower text, annotations on the right

2016-09-29 Thread MF
Hello list, I need a feature like the one described in http://www.pragma-ade.nl/gen eral/magazines/mag-1102-mkiv.pdf for annotated verbatim, but for normal text. Think about the main text flowing in a narrower text, with the annotations (like unnumbered sidenotes) in a widened right margin. Or

[NTG-context] page range reference (how to compare references)

2016-09-23 Thread MF
Hello list, I'm trying to reference a page range (think of a long quote spanning on 2 pages). I need to discriminate ranges collapsing to one page from "real" ranges (2 or more pages): "1-1" should become "1", while "1-2" should stay like that. Here's a not working snippet: \starttext Tufte

Re: [NTG-context] page range reference (how to compare references)

2016-09-23 Thread MF
I found a solution, but it's tricky (and there's no check on reference existence in structures.references.collected). \directlua{   function userdata.printrange(singular, plural, label) local coll_ref = structures.references.collected[""] local pagestart = coll_ref[label ..

Re: [NTG-context] Footnotes inside and outside a framed text

2016-10-02 Thread mf
You should set the footnote text before the frame, with \footnotetext[id]{text}. In case you need to set more footnotes, set them in the order they will be called in your frame (or float, like tables or formulas). In case you define your own footnotes, use  \setnotetext[yourfootnote][id]{text}.

Re: [NTG-context] annotated text: main text in narrower text, annotations on the right

2016-10-02 Thread MF
> > mf > > 30.  > > September 2016 um 00:09 > > > > > > > >    > > Thanks > >  for the answer, Wolfgang. > > > > That's not style and color, it's a  > > sort of two-column layout with the > > mai

Re: [NTG-context] annotated text: main text in narrower text, annotations on the right

2016-09-29 Thread mf
>  Which feature from verbatim annotations do you need because style > and color > changes can be applied in normal text without problems. > > Wolfgang Thanks for the answer, Wolfgang. That's not style and color, it's a sort of two-column layout with the main text in the left column and

[NTG-context] index(register) from an XML source

2017-01-13 Thread MF
Hello list, please see this: \startbuffer[test]   In this page there is a cat,   a dog  and a horse.     In this page there's only a fox terrier.     In this page you find a persian cat  and a horse.     Cat Dog

Re: [NTG-context] index(register) from an XML source

2017-01-14 Thread MF
Thank you, Hans. I had found a solution, then I saw your e-mail. Anyway I've learned a lot from it. My solution was something like this: function xml.functions.indexEntry(e)  local animal = animals[e.at.idref]  if animal then  --[[  context.Animal (  { animal.key

Re: [NTG-context] align natural tables left and right

2016-12-30 Thread MF
> On 2016-12-29 11:31, MF wrote: > > > > >   Hello list, > > please take a look at this: > > > > \setupbackgrounds[text][frame=on] > > > > \starttext > > > > Preceding text. > > > > \startplacetable[loc

[NTG-context] align natural tables left and right

2016-12-29 Thread MF
Hello list, please take a look at this: \setupbackgrounds[text][frame=on] \starttext Preceding text. \startplacetable[location={none,fit,force,here,middle}] \bTABLE   \bTR  \bTD $a_{11}$ \eTD \bTD $a_{12}$ \eTD   \eTR   \bTR  \bTD $a_{21}$ \eTD \bTD $a_{22}$ \eTD   \eTR \eTABLE

Re: [NTG-context] index(register) from an XML source

2017-01-14 Thread MF
> > Now an alternative approach I thought, because the index I'm > > working on > > is a biographical index, I mean a index of cited people, with a > > biographical profile. So every entry is a few lines long. > > That's why I thought to index only the ids in the text and use a > > textcommand in

[NTG-context] get current fontstyle with lua

2017-04-07 Thread MF
.. end Thanks, best greetings MF ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : h

Re: [NTG-context] a string xmlpath in Lua

2017-07-10 Thread MF
> Hello list, > is there a Lua function to get the XML path of an element as a > string? > Found. I adapted a function from lxml-tex.lua (chainpath): function xmlpath( e, nonamespace )   if e then local t = { } while e do   local tg = e.tg   local rt = e.__p__   local ns =

[NTG-context] a string xmlpath in Lua

2017-07-10 Thread MF
Hello list, is there a Lua function to get the XML path of an element as a string? \xmlpath typesets the path, I need a similar function for Lua, but the path should be a string to be worked on in Lua. This is the problem originating that question: i must name (give an id to) some anonymous XML

Re: [NTG-context] Problem with lucida fonts (again)

2017-06-29 Thread MF
> i fixed something in the next beta for these type 1 fonts (with > slightly  > weird encodings) > I'm getting some weird errors with the most recent versions of ConTeXt too. Currently I can't send you a sample to reproduce the problem but I can only describe what happens with a big XML file of

[NTG-context] italian index: "I" and "J" under "I", "U" and "V" under "V"

2017-06-26 Thread MF
Hello list, there's a bug in the way ConTeXt groups the items of a register when "indicator=yes" and mainlanguage is "it": - items starting with the J letter are grouped under the I letter - items starting with the V letter are grouped under the U letter This is not what one would expect from an

Re: [NTG-context] italian index: "I" and "J" under "I", "U" and "V" under "V"

2017-06-26 Thread mf
> in sort-lan.lua you can fix the table: > > definitions["it"] = { >  entries = { > > (not sure which italian is responsible for it) > > Hans > > Thank you, Hans. Looking at the code, there's a revealing comment before the definitions for the Latin language:  -- Treating the

Re: [NTG-context] Modes in Lua

2017-05-31 Thread MF
if tex.modes['specialmode'] then context('I’m special.') end   Best greetings, Massi > Hi, this should be easy: > > How can I access ConTeXt’s modes in Lua? Is it any different with > language modes (*en)? > > e.g. > > \startluacode > > if context.modes['specialmode'] then >

[NTG-context] SciTE under GNU/Debian Linux - lpeg not loaded

2017-09-22 Thread mf
Hello list, I'm trying to use SciTE under Debian GNU/Linux stable (64 bit) to edit my ConTeXt files. I've installed scite 3.7.2 from the Debian repository. Downloaded Scintillua and copied its "lexers" folder under /usr/share/scite. Created a symbolic link from /etc/scite/lexers to that folder:

Re: [NTG-context] SciTE under GNU/Debian Linux - lpeg not loaded

2017-09-23 Thread mf
Il giorno sab, 23/09/2017 alle 10.47 +0200, Hans Hagen ha scritto: > On 9/22/2017 10:24 PM, mf wrote: > > Hello list, > > I'm trying to use SciTE under Debian GNU/Linux stable (64 bit) to > > edit > > my ConTeXt files. > > > > I've installed

[NTG-context] Risposta: Risposta: installing ConTeXt on ARM linux

2017-10-06 Thread MF
Il giorno ven, 06/10/2017 alle 16.06 +0200, Floris van Manen ha scritto: > > On 6 Oct 2017, at 13:42, MF <mass...@fastwebnet.it> wrote: > > > > Once they get to support it, you could download the texlive context > > package that comes with Debian. > >

[NTG-context] compiling the mkiv-publications manual

2017-10-04 Thread MF
Hello list, I'm trying to compile the mkiv-publications manual from the ConTeXt distribution. Running context mkiv-publications stops with the error: ... tex error > tex error on line 58 in file publications- database.tex: ! Undefined control sequence l.58 \startBTX ... 55

[NTG-context] Risposta: compiling the mkiv-publications manual

2017-10-04 Thread MF
Thanks Luigi! This works: context --mode=atpragma mkiv-publications Il giorno mer, 04/10/2017 alle 12.29 +0200, luigi scarso ha scritto: > On Wed, Oct 4, 2017 at 12:09 PM, MF <mass...@fastwebnet.it> wrote: > > Hello list, > > > > I'm trying to compile the mk

[NTG-context] Risposta: installing ConTeXt on ARM linux

2017-10-06 Thread MF
Il giorno ven, 06/10/2017 alle 12.37 +0200, Floris van Manen ha scritto: > i have this snazzy little €30 quad core ARM board with 8GB eMMC. > It runs my python3 scripts at 1/3 the speed of my MacBookPro mid > 2009. > > http://wiki.friendlyarm.com/wiki/index.php/NanoPi_NEO_Plus2 > > To me it

Re: [NTG-context] line correction

2017-09-28 Thread mf
-28 at 16:21 +0200, MF wrote: > > Hello list,  > > I would like ConTeXt to snap normal text to grid after a quotation. > > This example does not work: > > > > -- > > \setupquotation[before={\switchtobodyfont[9pt]}] > > >

Re: [NTG-context] line correction

2017-09-28 Thread mf
: > On Thu, 2017-09-28 at 23:30 +0200, mf wrote: > > Thank you Henri. > > > > Now consider this: > > --- > > \setuplayout[grid=both] > > \setupquotation[before={\switchtobodyfont[9pt]}] > > > > \starttext > > \sho

[NTG-context] Risposta: line correction

2017-09-29 Thread MF
Il giorno gio, 28/09/2017 alle 23.19 -0400, Rik Kabel ha scritto: > Massi and list, > > There is one issue with \startlinecorrection of which you should be > aware. The text is set in a vbox. If the block quotation it encloses > (or > whatever text it encloses) does not fit on the current

[NTG-context] Risposta: line correction

2017-09-29 Thread MF
> > In general, I'm ok without grid snapping, because the default > > typesetting of taller formulas inside text is good enough for my > > goals. > > for a bit more complex doc with many different unpredictable > elements > snapping seldom works ... we never use it (in production it often >

[NTG-context] line correction

2017-09-28 Thread MF
Hello list, I would like ConTeXt to snap normal text to grid after a quotation. This example does not work: -- \setupquotation[before={\switchtobodyfont[9pt]}] \starttext \showgrid \input knuth \startlinecorrection[halfline] \startquotation \input sapolsky \stopquotation

[NTG-context] extreme tables cell spanning interference: a bug?

2017-11-25 Thread mf
Dear list, i've found that a cell spanning across multiple rows in extreme tables interferes with a cell spanning across multiple columns on a common row. Ok, if that is not so clear, try this: \starttext The first cell spans across 3 rows. The cell in the last row

Re: [NTG-context] issue with css selector in lpath

2017-12-13 Thread MF
Il giorno mar, 12/12/2017 alle 22.36 +0100, Pablo Rodriguez ha scritto: > On 12/11/2017 11:51 PM, mf wrote: > > I think it's the "#header" without the name of an element before. > > Try specifying an element you find in your document (i.e. > > "{{hea

Re: [NTG-context] issue with css selector in lpath

2017-12-11 Thread mf
I think it's the "#header" without the name of an element before. Try specifying an element you find in your document (i.e. "{{header, tag#header}}"), just to see if it compiles. If it compiles, it's likely you found a bug. Best wishes, Massi Il giorno lun, 11/12/2017 alle 21.51 +0100, Pablo

[NTG-context] horizontal alignment of table cells when the content is a \framed

2018-05-04 Thread MF
Hello list, i have a problem of alignment of cell tables that contain a \framed: the horizontal alignment is ignored by table cells in natural and extreme tables. Instead a \framed inside a \framed looks ok: \starttext Framed:

[NTG-context] registers: how can I place a command around the whole of the page numbers of an index term?

2018-05-09 Thread MF
Hello list, i'd like moving the page numbers in my index to the right, with a \wordright. \setupregister[index][n=1,alternative=A] \starttext \CONTEXT\index{\ConTeXt} \page \LATEX\index{\LaTeX} \page \CONTEXT\index{\ConTeXt} \page \placeindex \stoptext The index is at page 4. I want to move the

Re: [NTG-context] registers: how can I place a command around the whole of the page numbers of an index term?

2018-05-10 Thread MF
This is a more polite version, that lets you restore the original macros. \let\origstartregisterpages=\startregisterpages% \let\origstopregisterpages=\stopregisterpages% \def\setupregisterpagescommand#1{% \unexpanded\def\startregisterpages{\origstartregisterpages#1\bgroup }

Re: [NTG-context] registers: how can I place a command around the whole of the page numbers of an index term?

2018-05-10 Thread MF
Thanks Wolfgang and sorry if i reply to my mail, since i've downloaded yours on another PC. I've found these macros in strc-reg.mkiv, that are called right before and after the page numbers: \unexpanded\def\startregisterpages {\begingroup \dostarttagged\t!registerpages\empty

Re: [NTG-context] registers: how can I place a command around the whole of the page numbers of an index term?

2018-05-10 Thread MF
\wordright is ok until the numbers don't exceed the text width. It manages these two cases right: Index term, and some text 21, 34, 45, 72 Index term, and some text 21, 34, 45, 72, 89 When the numbers exceed the text width, it fails: Index term, and some text 21, 34, 45, 72, 89, 101, 103,

Re: [NTG-context] registers: how can I place a command around the whole of the page numbers of an index term?

2018-05-10 Thread MF
> This would be a solution: > > Index term, and some > text > 21, 34, 45, 72, 89, >101, 103, 109 > > where the rule is: when the numbers exceed the text width, close the > paragraph, then start a new, right aligned one. > > So i wrote this: > >

Re: [NTG-context] roadmap

2018-05-15 Thread MF
> > * References: see Massimiliano’s question, apparently there are > > options missing for code before/after the list of pages > > These hooks were added; adding a few more hooks is normally no big > deal > ... the main problem with such additions is that they seldom get > documented (in fact

Re: [NTG-context] \vfrac (math mode)

2018-05-22 Thread MF
Hi Alan, try this: \def\vFrac#1#2{#1 \Uskewed / #2} \starttext $\frac{2_1}{m}$ ${2_1 \Uskewed / m}$ $\vFrac{2_1}{m}$ \stoptext See "5.7 Skewed fractions", in the manual still.pdf. Hope it helps, greetings, Massi > Is there a version of the vulgarfraction that works in math mode? > > MWE: >

Re: [NTG-context] beta

2018-06-22 Thread MF
> > > Do you get the same error message with the following minimal example: > > \starttext > \externalfigure[figure] > \stoptext > Yes, of course, same error; BTW, the pdf i'm using is not password protected. ___

Re: [NTG-context] beta

2018-06-22 Thread MF
Tested with my setup, which -- you know -- is quite complex. This is the only error: lua error > lua error on line 6 in file /home/massi/context/latest/tex/texmf- context/tex/context/base/mkiv/cont-yes.mkiv: ...est/tex/texmf-context/tex/context/base/mkiv/grph-inc.lua:1398:

Re: [NTG-context] CSS selector for elements strictly preceded by other elements

2018-08-03 Thread MF
> make a (real) minimal example and we'll see what can be done > Here it is: \startbuffer[test] In this paragraphfirst footnoteendnote strictly following a footnote (no other XML nodes between them) a footnote marker and an endnote marker are at the same point in the text; in the XML

[NTG-context] CSS selector for elements strictly preceded by other elements

2018-08-02 Thread MF
Hello list, please consider these XML snippets: some text some textblah blahsome other text now apply these CSS selectors to them: e ~ f matches all e + f matches the first and the third There's no CSS selector to match ONLY the third. But i have a use case for that: sometimes i have

Re: [NTG-context] parent of xml-node

2018-08-28 Thread mf
> With \xmltag{#1} one can find the identity of the current node. But > how can I find the tag of the parent node? > > dr. Hans van der Meer > \xmltext{#1}{../tag()} ___ If your question is of interest to others as

[NTG-context] \blank shrinks when forced; why \blank[line,disable] and \blank[line]\blank[disable] are different?

2018-04-07 Thread mf
Hello list, i'm trying to understand the \blank command. The following example leaves a blank line between the two lines of text. \showgrid \starttext A line.\par \blank[line] Another line.\par \stoptext When you add "force" to the blank, the vertical space between the two lines shrinks. You can

Re: [NTG-context] Installing fonts in a ConTeXt Docker (texfont tool missing?)

2018-04-13 Thread MF
> After setting ConTeXt root everything works fine and as expected. > However, the texfont tool seems to be missing which means I cannot > install new fonts in my container. This seems kind of odd to me since > I thought texfont is available automatically after ConTeXt is > installed. > > I

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

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

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]

[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

[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

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

[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

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] xml in lua advice ?

2018-09-19 Thread mf
My 2 cents: local xmlflush = lxml.flush local function text_or_xml(...) for i,v in ipairs(arg) do if "table" == type(v) then xmlflush(v) else context(v) end end end function xml.functions.heading(t) text_or_xml( "\\section{" , t , "}" ) end Massimiliano Il giorno

[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

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

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

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}

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

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 /

[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)

[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] 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] 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 '.

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

[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

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

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

[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

  1   2   3   >