[NTG-context] footnotes missing in heads

2020-09-02 Thread Pablo Rodriguez
Dear list,

the following minimal sample:

\starttext
\chapter{Chapter\footnote{Note}}
\section{Section\footnote{Note}}
\stoptext

Using current latest (from 2020.09.02 20:37) doesn’t display the footnotes.

I’m afraid this may be a bug. Could anyone confirm this?

Many thanks for your help,

Pablo
--
http://www.ousia.tk
___
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  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] \setupuserpagenumber not working as expected

2020-09-02 Thread Wolfgang Schuster

jbf schrieb am 03.09.2020 um 06:04:
Am seeking to have frontmatter pages in roman numerals and from Chapter 
1 onwards in arabic numerals. I have achieved something of the kind, but 
page 1 (arabic) is appearing on the last page of the frontmatter and not 
the first page of Chapter 1. I do not know why this is happening. My 
setup for page numbering is as follows (something I found somewhere - 
wiki? elsewhere? Not sure. I didn't make it up!):


\definestructureconversionset[frontpart:pagenumber][][romannumerals]
\definestructureconversionset[bodypart:pagenumber] [][numbers]
\startsectionblockenvironment[frontpart]
\setupuserpagenumber[numberconversion=romannumerals]
\setuplist[chapter][pageconversionset=pagenumber]
\setuppagenumber[number=1]
\stopsectionblockenvironment

\startsectionblockenvironment[bodypart]
\setuppagenumber[number=1]
\stopsectionblockenvironment

The frontmatter is some 16 pages worth (ends on a verso page but that 
verso carries the arabic number 1 instead of page xvi which it should 
be, since the final paragraph on that page ends with \stopfrontmatter. 
That means Chapter 1 (immediately after \startbodymatter) is now page 2 
instead of page 1!


I tried a slightly simpler version of the above which I found on 
Stackexchange:


|\definestructureconversionset[frontpart:pagenumber][][romannumerals]||
|

|\startsectionblockenvironment[bodypart]|

|\setcounter[userpage][1]\stopsectionblockenvironment|

but it gave me the same result. Any idea how I can get the correct result?


Do you have these settings in your document?

\setupsectionblock [frontpart] [page=]
\setupsectionblock [bodypart]  [page=]

When this is the case change them to

\setupsectionblock [frontpart] [page=yes]
\setupsectionblock [bodypart]  [page=yes]

or add

\page

before \stopfrontmatter.

Wolfgang
___
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  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


[NTG-context] \setupuserpagenumber not working as expected

2020-09-02 Thread jbf
Am seeking to have frontmatter pages in roman numerals and from Chapter 
1 onwards in arabic numerals. I have achieved something of the kind, but 
page 1 (arabic) is appearing on the last page of the frontmatter and not 
the first page of Chapter 1. I do not know why this is happening. My 
setup for page numbering is as follows (something I found somewhere - 
wiki? elsewhere? Not sure. I didn't make it up!):


\definestructureconversionset[frontpart:pagenumber][][romannumerals]
\definestructureconversionset[bodypart:pagenumber] [][numbers]
\startsectionblockenvironment[frontpart]
\setupuserpagenumber[numberconversion=romannumerals]
\setuplist[chapter][pageconversionset=pagenumber]
\setuppagenumber[number=1]
\stopsectionblockenvironment

\startsectionblockenvironment[bodypart]
\setuppagenumber[number=1]
\stopsectionblockenvironment

The frontmatter is some 16 pages worth (ends on a verso page but that 
verso carries the arabic number 1 instead of page xvi which it should 
be, since the final paragraph on that page ends with \stopfrontmatter. 
That means Chapter 1 (immediately after \startbodymatter) is now page 2 
instead of page 1!


I tried a slightly simpler version of the above which I found on 
Stackexchange:


|\definestructureconversionset[frontpart:pagenumber][][romannumerals]||
|

|\startsectionblockenvironment[bodypart]|

|\setcounter[userpage][1]\stopsectionblockenvironment|

but it gave me the same result. Any idea how I can get the correct result?

Julian

___
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  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] MKIV - LMTX difference: stripping of leading white space in verbatim text

2020-09-02 Thread Wolfgang Schuster

Christoph Reller schrieb am 03.09.2020 um 05:29:

Dear List,

I am using ConTeXt LMTX 2018.05.19 21:46. Consider the following MWE:

\starttext
\startLUA
     whatever
\stopLUA
\stoptext

In contrast to ConTeXt MKIV, the leading four spaces in front of 
"whatever" are not removed when processing the verbatim text:


MKIV output:
whatever

LMTX output:
     whatever

Is there a way to get the old MKIV behavior back?


\setuptyping[LUA][strip=yes]

Wolfgang
___
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  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


[NTG-context] MKIV - LMTX difference: stripping of leading white space in verbatim text

2020-09-02 Thread Christoph Reller
Dear List,

I am using ConTeXt LMTX 2018.05.19 21:46. Consider the following MWE:

\starttext
\startLUA
whatever
\stopLUA
\stoptext

In contrast to ConTeXt MKIV, the leading four spaces in front of "whatever"
are not removed when processing the verbatim text:

MKIV output:
whatever

LMTX output:
whatever

Is there a way to get the old MKIV behavior back?

Cheers,

Christoph
___
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  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] PNG image inclusion resolution

2020-09-02 Thread Christoph Reller
On Wed, Sep 2, 2020 at 4:36 PM Hans Hagen  wrote:

> On 9/2/2020 3:35 PM, Christoph Reller wrote:
> > Dear List,
> >
> > I am using ConTeXt LMTX 2020.08.31 22:16. Consider the following MWE:
> >
> >\starttext
> >\externalfigure[resolutionTest.png]
> >\stoptext
> >
> > When comparing the output with ConTeXt MKIV, then the image size is
> > extremely small. gimp reports the resolution of resolutionTest.png as
> > 71.984 DPI. Is this a bug? (I cannot reproduce the shrinkage with
> > hacker.png.)
>
> it's an image that has its resolution internally specified in meters and
> that bit is commented (i probably had a good reason for that but for now
> i'll uncomment it and add some safeguards for zero conversion values)
>

Thank you, Hans!
___
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  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


[NTG-context] \pdfextension obj stream file

2020-09-02 Thread Alexander Grahn
Hello,

\pdfextension obj stream file {...}

stopped working in ConTeXt (TeXLive-2020). Here is a minimal example:

\starttext
test \immediate\pdfextension obj stream file {duck.mp3}
\stoptext

It produces an error:

mtx-context | fatal error: return code: 256
...4a3076dc514ba966a1fac9/formats/luatex/lpdf-ini-macro.lua:892: pdf.obj(): no 
"string" or "file" given

1 \starttext
2 >>  test \immediate\pdfextension obj stream file {duck.mp3}
3 \stoptext

mtx-context | fatal error: return code: 256


On the other hand, the LuaTeX versions compiles:

test \immediate\pdfextension obj stream file {duck.mp3}
\bye


Kind regards, Alexander
___
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  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] Tagged PDFs from Context

2020-09-02 Thread Arthur Rosendahl
On Fri, Aug 28, 2020 at 04:41:32PM -0400, Aditya Mahajan wrote:
> From what I understand, the current implementation assumes that the same tag 
> will be used for all section levels. So, changing the tag at each section 
> level will require a rewrite of the internal logic. 

  If the current structure confuses some screen readers, as mentioned on
the GitHub tracker, that may be worth it?  Something to discuss in
Sibřina next week ...

Best,

Arthur
___
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  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] PNG image inclusion resolution

2020-09-02 Thread Hans Hagen

On 9/2/2020 3:35 PM, Christoph Reller wrote:

Dear List,

I am using ConTeXt LMTX 2020.08.31 22:16. Consider the following MWE:

   \starttext
   \externalfigure[resolutionTest.png]
   \stoptext

When comparing the output with ConTeXt MKIV, then the image size is 
extremely small. gimp reports the resolution of resolutionTest.png as 
71.984 DPI. Is this a bug? (I cannot reproduce the shrinkage with 
hacker.png.)


it's an image that has its resolution internally specified in meters and 
that bit is commented (i probably had a good reason for that but for now 
i'll uncomment it and add some safeguards for zero conversion values)



Also, I noticed that the "resolution" key when applied as:

   \externalfigure[resolutionTest.png][resolution=150]

has no effect. What is the meaning of this key?

used in conversion features

-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
   tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
-
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


[NTG-context] PNG image inclusion resolution

2020-09-02 Thread Christoph Reller
Dear List,

I am using ConTeXt LMTX 2020.08.31 22:16. Consider the following MWE:

  \starttext
  \externalfigure[resolutionTest.png]
  \stoptext

When comparing the output with ConTeXt MKIV, then the image size is
extremely small. gimp reports the resolution of resolutionTest.png as
71.984 DPI. Is this a bug? (I cannot reproduce the shrinkage with
hacker.png.)

Also, I noticed that the "resolution" key when applied as:

  \externalfigure[resolutionTest.png][resolution=150]

has no effect. What is the meaning of this key?

Cheers,
Christoph
___
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  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] Import a metapost extension

2020-09-02 Thread Fabrice Couvreur
Hello,
That's okay, I'll compile the files with mpost and do an image insert. Thanks
for your help.
Fabrice

Le mar. 1 sept. 2020 à 19:32, Wolfgang Schuster <
wolfgang.schuster.li...@gmail.com> a écrit :

> Taco Hoekwater schrieb am 01.09.2020 um 19:12:
>
> Hi,
>
>
> On 1 Sep 2020, at 16:46, Hans Hagen   
> wrote:
>
> On 9/1/2020 3:04 PM, Fabrice Couvreur wrote:
>
> Hi Taco,
> Thank you for your help. I specify that this extension works perfectly by 
> compiling the following file.
>
> A logfile of a failed run would have been more helpful in trying to track 
> down the problem. But I did notice that there is a LaTeX file loaded in your 
> succesful run. So perhaps the extension depends on LaTeX
>
>
> I looked for the file online [1] and it uses LaTeX commands (even
> begin/end blocks) for all text boxes.
>
> [1] https://melusine.eu.org/syracuse/poulecl/mp-scratch/
>
> Wolfgang
>
>
> ___
> 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  : http://www.pragma-ade.nl / http://context.aanhet.net
> archive  : https://bitbucket.org/phg/context-mirror/commits/
> wiki : http://contextgarden.net
>
> ___
>
___
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  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


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

2020-09-02 Thread Hans Hagen

On 9/2/2020 11:10 AM, mf wrote:

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.


that is always tricky as what happens is postponing till the group ends

but wordright now kind of hooks into the par construction


Is \nextbox a new entry of latest versions?


no, actually one of the oldest things


I've seen also \nextboxwd, \nextboxht, etc.
So you can measure the next box to come in advance. Is it like that?

Is it a vbox when you're in vertical mode and a hbox when you are in 
horizontal mode?


you just pass the box


Is this interpretation of \dowithnextbox in \dowhatever right?

\dowithnextbox {.1.} \.2. {.3.}
1 COMMAND = {\ifdim\wd\nextbox<\hsize...}
2 CSNAME  = \hbox or \vbox 
3 CONTENT = {#1}

yes

Hans

-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
   tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
-
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


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 come in advance. Is it like that?

Is it a vbox when you're in vertical mode and a hbox when you are in 
horizontal mode?


Is this interpretation of \dowithnextbox in \dowhatever right?

\dowithnextbox {.1.} \.2. {.3.}
1 COMMAND = {\ifdim\wd\nextbox<\hsize...}
2 CSNAME  = \hbox
3 CONTENT = {#1}

Massi

Il 01/09/20 19:22, Hans Hagen ha scritto:
>
> fortunately there is a solution that takes less code:
>
> \unexpanded\def\whatever
>{\dosingleempty\dowhatever}
>
> \def\dowhatever[#1]%
>{\dowithnextbox
>   {\ifdim\wd\nextbox<\hsize
>  \wordright{\box\nextbox}%
>  \par
>\else
>  \par
>  \penalty1
>  \startalignment[flushright]\unhbox\nextbox\stopalignment
>\fi}\hbox}
>
> \starttext
>
>\input ward \whatever{same line, right}
>
>\blank
>
>\input ward \whatever{\input tufte }
>
> \stoptext
>
___
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  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] special chapter label

2020-09-02 Thread Hans Hagen

On 9/2/2020 7:56 AM, jbf wrote:
Am working on a book where most chapters are simply labeled Chapter One, 
Chapter Two etc., and this has been achieved easily enough with 
\setuplabeltext[chapter=Chapter ]  (also including 
\setupheads[conversion=Words] to get One, Two instead of 1 2).


But several chapter labels need to have a date range after them, e.g. 
*Chapter Three: 1820-1880*.


I have tried introducing a new \setuplabeltext[chapter=Chapter: 
1820-1880 ] just before the \startchapter command, but this results in*:**

*

*Chapter: 1820-1880 Three* (and I also hope that introducing this does 
not also affect Chapter Four since that will have a different set of 
dates).


How can I get a specific labeltext set up so that the result is *Chapter 
Three: 1820-1880*, and also ensure that other chapters either return to 
just the chapter number or, if needs be, can also indicate different 
date ranges? I have looked everywhere on the wiki for ideas to help me, 
but so far no luck.


\setuplabeltext[chapter={{Chapter },{:}}]
\setupheads[chapter][conversion=Words,distance=.25em]

\chapter{1880}
\chapter{1881}

or

\setuplabeltext[chapter={{Chapter },{: }}]
\setupheads[chapter][conversion=Words,distance=0pt]


-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
   tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
-
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___