[NTG-context] Re: missing metadata in LMTX

2024-03-03 Thread Pablo Rodriguez via ntg-context
On 3/4/24 01:18, Wolfgang Schuster wrote:
> Pablo Rodriguez via ntg-context schrieb am 03.03.2024 um 20:02:
>> [...]
>> With LuaTeX, I get PDF metadata. With LuaMetaTeX, I cannot get them.
>> [...]
> I can confirm the issue and it happens because Hans changed they way
> how the values of the \setupinteraction commands are passed to Lua
> side of ConTeXt to be written to the PDF file.

Many thanks for your reply and your explanation, Wolfgang.

> I can provide at the moment solutions which ensure the information
> appear in the PDF but none of the is very elegant and I hope Hans
> can help with a clean solution.

The first one avoids the issue until Hans provides a final fix.

Many thanks for your help,

Pablo
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Re: Local alternative to \input

2024-03-03 Thread Jeroen
With a single environment it seems to work, though when I expand it to
multiple, it does not seem to work anymore

\starttext

SomeText \\
\environment aaa \\
SomeText \\
\environment bbb \\
SomeText \\

\startenvironment aaa
\samplefile{lorem}
\stopenvironment

\startenvironment bbb
\samplefile{tufte}
\stopenvironment

\stoptext

Op do 4 jan 2024 om 20:14 schreef Henning Hraban Ramm :

> Am 04.01.24 um 18:00 schrieb Jeroen:
> > I just would like to have a lot of mark-up for combined figures and
> > tables etc moved out of the way, similar to this. I am loosing the
> > general documetn flow because of all this markup. Would there be a
> > construction similar to this:
> >
> > \starttext
> >
> > \environment foo
> > \environment bar
> >
> > \startenvironment foo
> > this is a lot of text
> > \stopenvironment
> >
> > \startenvironment bar
> > and this is another piece of text
> > \stopenvironment
> >
> > \stoptext
>
> An environment is a separate file.
> \environment is like \input with a few more checks, e.g. it loads the
> file only once.
>
> e.g.
>
> -- file "env_foo.tex" --
> \startenvironment env_foo
> % settings
> \stopenvironment
> --
>
>
> -- file document.tex --
> \environment env_foo
>
> \starttext
> % whatever
> \stoptext
> --
>
> Instead of the call within your document, you can also call
>
> context --environment=env_foo.tex document
>
> (Usually that makes only sense in XML workflows.)
>
> Hraban
>
> ___
> If your question is of interest to others as well, please add an entry to
> the Wiki!
>
> maillist : ntg-context@ntg.nl /
> https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
> webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
> archive  : https://github.com/contextgarden/context
> wiki : https://wiki.contextgarden.net
>
> ___
>
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Re: missing metadata in LMTX

2024-03-03 Thread Wolfgang Schuster

Pablo Rodriguez via ntg-context schrieb am 03.03.2024 um 20:02:

Dear list,

this issue has been bugging me for some time:

[...]

With LuaTeX, I get PDF metadata. With LuaMetaTeX, I cannot get them.

For both, I’m using current latest (from 2024.02.27 09:21).

Could anyone confirm the issue or explain me what I am missing


I can confirm the issue and it happens because Hans changed they way
how the values of the \setupinteraction commands are passed to Lua
side of ConTeXt to be written to the PDF file.

I can provide at the moment solutions which ensure the information
appear in the PDF but none of the is very elegant and I hope Hans
can help with a clean solution.

The first solution works around the grouping issue of the xmlsetups
environment and pushes the setting beyond the limit of it.

\startxmlsetups xml:meta
  \aftergrouped{\setupinteraction
[author={\xmltext{#1}{/author}},
 title={\xmltext{#1}{/title}}]}
\stopxmlsetups

The second solution makes the assignment to the \setupinteraction
command global to ensure they are kept even the environment ends,
int old MkII days ConTeXt provided a \startglobal environment to
do this but now I have rely on the primitives.

\startxmlsetups xml:meta
  \globaldefs\plusone
  \setupinteraction
[author={\xmltext{#1}{/author}},
 title={\xmltext{#1}{/title}}]
  \globaldefs\zerocount
\stopxmlsetups

Wolfgang
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] missing metadata in LMTX

2024-03-03 Thread Pablo Rodriguez via ntg-context
Dear list,

this issue has been bugging me for some time:

  \startbuffer[demo]
  

   author
   title


  text

  
  \stopbuffer

  \starttext

  \startxmlsetups xml:initialize
\xmlsetsetup{#1}{code|meta|text}{xml:*}
  \stopxmlsetups

  \xmlregistersetup{xml:initialize}

  \startxmlsetups xml:doc
\xmlflush{#1}
  \stopxmlsetups

  \startxmlsetups xml:meta
\setupinteraction
  [author={\xmltext{#1}{/author}},
   title={\xmltext{#1}{/title}}]
  \stopxmlsetups

  \startxmlsetups xml:text
 \xmlflush{#1}
  \stopxmlsetups

  \setupinteraction[state=start]
  \xmlprocessbuffer{main}{demo}{}
  \stoptext

With LuaTeX, I get PDF metadata. With LuaMetaTeX, I cannot get them.

For both, I’m using current latest (from 2024.02.27 09:21).

Could anyone confirm the issue or explain me what I am missing?

Many thanks for your help,

Pablo
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] issue mixing font features (LMTX & MkIV)

2024-03-03 Thread Pablo Rodriguez via ntg-context
Dear list,

I have the following sample:

  \definefontfeature[wider][extend=2]

  \definefontfamily[mainface][rm][TeX Gyre Pagella]
[features={default, quality, wider},
 it={style: regular, features:{default, slanted, quality}},
 bf={style: regular, features:{default, boldened-30}},
 bi={style: regular, features:{default, boldened-30, slanted}}]

  \setupbodyfont
[mainface, 30pt]

  \starttext
  \startTEXpage[offset=1ex]
  a
  {\it a}\\
  {\bf a}
  {\bi a}
  \stopTEXpage
  \stoptext

With current latest (2024.02.27 09:21), LuaTeX gets boldened and slanted
for regular (but the other fonts cannot inherit the wider feature and
wider will not mix with boldened-30 [even when specified]).

For some reason, LMTX from current latest cannot get slanted and
boldened-30 (but it mixes the inherited wider feature in all fonts).

This began to behave differently in latest from 2024.01.08 11:23 (which
is my next version after the one from 2023.09.26 18:19).

Could anyone confirm the issue?

Many thanks for your help,

Pablo
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___