[NTG-context] \autoinsertedspace fails following \nbsp under LMTX

2022-11-16 Thread Rik Kabel via ntg-context

ConTeXt  ver: 2022.11.14 22:58 LMTX on W11 x64

I have been testing the recently added \autoinsertedspace, and I found 
an odd failure.


The following compiles with \nbsp commented as shown, but once that line 
is active, the compilation fails:


   lua error:
    callback error:
   ...MTX/tex/texmf-context/tex/context/base/mkxl/font-hsh.lmt:151:
   table index is nil

It fails differently in MkIV (but it is nice to see that the new command 
has been backported):


   luatex warning  > node filter: error:
   ...MTX/tex/texmf-context/tex/context/base/mkiv/node-nut.lua:380:
   Attempt to node.direct.remove() a non-existing node

   %<--

   \starttexdefinition unexpanded New
  \dodoublegroupempty
  \doNew
   \stoptexdefinition
   \starttexdefinition doNew #1#2
   \removeunwantedspaces
   \ (#1|–|#2)
   \autoinsertedspace
   \stoptexdefinition

   \starttext

  ABC 0\New{123}{456} 789

  ABC
   % \nbsp
  0\New{123}{456} 789

   \stoptext

Am I doing something wrong here? \nbsp is needed to prevent improper 
line breaks.


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

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


Re: [NTG-context] Xml filtering in Lua

2022-11-16 Thread Hans Hagen via ntg-context

On 11/16/2022 10:09 PM, Thomas A. Schmitz via ntg-context wrote:

On 11/16/22 21:51, Denis Maier via ntg-context wrote:

Just a quick question regarding this?
Is xml.filter equivalent to \xmlfilter? If so, how do you pass the 
match to a command as you'd do with \xmlfilter?


I'm still digesting and playing with Massi's reply; will probably be 
back with more questions :-)


Anyway:

If you've filtered something out like this

local tree = xml.filter (t, "../chapter[@title='mytitle'")


always keep in mind that some expressions return a list of matches, that 
can be looped over and some commands just process the first


anyway, it can sometimes help to add

print(tstring(tree))

so see what you got

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


Re: [NTG-context] Xml filtering in Lua

2022-11-16 Thread Thomas A. Schmitz via ntg-context

On 11/16/22 21:51, Denis Maier via ntg-context wrote:

Just a quick question regarding this?
Is xml.filter equivalent to \xmlfilter? If so, how do you pass the match to a 
command as you'd do with \xmlfilter?


I'm still digesting and playing with Massi's reply; will probably be 
back with more questions :-)


Anyway:

If you've filtered something out like this

local tree = xml.filter (t, "../chapter[@title='mytitle'")

you can then apply a command to it

lxml.command(lxml.id(tree), ".", "xml:chapter:command")

and have to define the command as

\startxmlsetups xml:chapter:command
\xmltext {#1} {content}
\stopxmlsetups

for example.

Thomas

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

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


Re: [NTG-context] Xml filtering in Lua

2022-11-16 Thread Denis Maier via ntg-context
Just a quick question regarding this?
Is xml.filter equivalent to \xmlfilter? If so, how do you pass the match to a 
command as you'd do with \xmlfilter?

Best,
Denis

> -Ursprüngliche Nachricht-
> Von: ntg-context  Im Auftrag von mf via ntg-
> context
> Gesendet: Mittwoch, 16. November 2022 20:56
> An: ntg-context@ntg.nl
> Cc: mf 
> Betreff: Re: [NTG-context] Xml filtering in Lua
> 
> This works:
> 
> local metadata = xml.filter (t, '../../topics/topic[@t:id=="' .. ch_id .. 
> '"]')
> 
> also this:
> 
> local lpath = string.format('../../topics/topic[@t:id=="%s"]', ch_id)
> 
> local metadata = xml.filter (t, lpath)
> 
> 
> It looks like xml.filter supports only 2 arguments (see lxml-tex.lua), and so 
> it
> doesn't let you use string formatting patterns like the "context" command
> does.
> 
> You can write:
> 
> context('the value of @t:id is "%s"', ch_id)
> 
> but you can't write:
> 
> xml.filter (t, '../../topics/topic[@t:id=="%s"]', ch_id)
> 
> 
> Best wishes,
> 
> Massi
> 
> __
> _
> If your question is of interest to others as well, please add an entry to the
> Wiki!
> 
> maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-
> context
> webpage  : https://www.pragma-ade.nl / http://context.aanhet.net archive
> : https://bitbucket.org/phg/context-mirror/commits/
> wiki : https://contextgarden.net
> __
> _

> -Ursprüngliche Nachricht-
> Von: ntg-context  Im Auftrag von Thomas A.
> Schmitz via ntg-context
> Gesendet: Mittwoch, 16. November 2022 20:56
> An: mailing list for ConTeXt users 
> Cc: Thomas A. Schmitz 
> Betreff: Re: [NTG-context] Xml filtering in Lua
> 
> On 11/16/22 19:56, mf via ntg-context wrote:
> > local ch_id = t.at["ch:id"]
> 
> You're right, of course, using a colon was a stupid idea. When I replace it 
> with
> an underscore, you can see that both are in fact identical:
> 
> \startbuffer[test]
> 
>
>   
>   This is the first test
>   22/11/16
>   
>   
>   This is the second test
>   22/11/17
>   
>
>
>   
>   
> This will be the content of the first chapter.
>   
>   
>   
>
> This will be the content of the second chapter.
>
>   
>
> 
> \stopbuffer
> 
> \startxmlsetups xml:testsetups
> \xmlsetsetup{#1}{*}{-}
>   \xmlsetsetup{#1}{document|chapters|chapter|content|emph}{xml:
> *}
> \stopxmlsetups
> 
> \xmlregistersetup{xml:testsetups}
> 
> \startxmlsetups xml:document
>   \xmlflush{#1}
> \stopxmlsetups
> 
> \startxmlsetups xml:chapters
>   \xmlflush{#1}
> \stopxmlsetups
> 
> \startxmlsetups xml:chapter
>   \xmlfunction {#1} {chapter}
> %  \xmlflush {#1}
> \stopxmlsetups
> 
> \startxmlsetups xml:chapter:content
>   \xmltext {#1} {content}
> \stopxmlsetups
> 
> \startxmlsetups xml:emph
>{\em \xmlflush {#1}}
> \stopxmlsetups
> 
> \startluacode
> function xml.functions.chapter (t)
>local chapter_id = t.at.ch_id
>local other_chapter_id = t.at["ch_id"]
>context (chapter_id)
>context.par ()
>context (other_chapter_id)
>context.par ()
>   local metadata = xml.filter (t, 
> '../../topics/topic[@t:id=="%s"]',
> ch_id)
>   print (inspect(metadata))
>   lxml.command(t, ".", "xml:chapter:content")
>   context.par ()
> end
> \stopluacode
> 
> \starttext
>   \xmlprocessbuffer{main}{test}{}
> \stoptext
> 
> __
> _
> If your question is of interest to others as well, please add an entry to the
> Wiki!
> 
> maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-
> context
> webpage  : https://www.pragma-ade.nl / http://context.aanhet.net archive
> : https://bitbucket.org/phg/context-mirror/commits/
> wiki : https://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://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___


Re: [NTG-context] Xml filtering in Lua

2022-11-16 Thread mf via ntg-context

This works:

local metadata = xml.filter (t, '../../topics/topic[@t:id=="' .. ch_id 
.. '"]')


also this:

local lpath = string.format('../../topics/topic[@t:id=="%s"]', ch_id)

local metadata = xml.filter (t, lpath)


It looks like xml.filter supports only 2 arguments (see lxml-tex.lua), 
and so it doesn't let you use string formatting patterns like the 
"context" command does.


You can write:

context('the value of @t:id is "%s"', ch_id)

but you can't write:

xml.filter (t, '../../topics/topic[@t:id=="%s"]', ch_id)


Best wishes,

Massi

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

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


Re: [NTG-context] Xml filtering in Lua

2022-11-16 Thread Thomas A. Schmitz via ntg-context

On 11/16/22 19:56, mf via ntg-context wrote:

local ch_id = t.at["ch:id"]


You're right, of course, using a colon was a stupid idea. When I replace 
it with an underscore, you can see that both are in fact identical:


\startbuffer[test]

  
 
This is the first test
22/11/16
 
 
This is the second test
22/11/17
 
  
  
 

  This will be the content of the first chapter.

 
 
 
  This will be the content of the second chapter.
 
 
  

\stopbuffer

\startxmlsetups xml:testsetups
   \xmlsetsetup{#1}{*}{-}
\xmlsetsetup{#1}{document|chapters|chapter|content|emph}{xml:*}
\stopxmlsetups

\xmlregistersetup{xml:testsetups}

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

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

\startxmlsetups xml:chapter
\xmlfunction {#1} {chapter}
%\xmlflush {#1} 
\stopxmlsetups

\startxmlsetups xml:chapter:content
\xmltext {#1} {content}
\stopxmlsetups

\startxmlsetups xml:emph
  {\em \xmlflush {#1}}
\stopxmlsetups

\startluacode
function xml.functions.chapter (t)
 local chapter_id = t.at.ch_id
 local other_chapter_id = t.at["ch_id"]
 context (chapter_id)
 context.par ()
 context (other_chapter_id)
 context.par ()
local metadata = xml.filter (t, 
'../../topics/topic[@t:id=="%s"]', ch_id)
print (inspect(metadata))
lxml.command(t, ".", "xml:chapter:content")
context.par ()
end
\stopluacode

\starttext
\xmlprocessbuffer{main}{test}{}
\stoptext

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

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


Re: [NTG-context] Xml filtering in Lua

2022-11-16 Thread mf via ntg-context

Il 16/11/22 18:33, Thomas A. Schmitz via ntg-context ha scritto:

\startbuffer[test]

   
  
This is the first test
22/11/16
  
  
This is the second test
22/11/17
  
   
   
  

  This will be the content of the first chapter.

  
  
 
  This will be the content of the second chapter.
 
  
   

\stopbuffer

\startxmlsetups xml:testsetups
\xmlsetsetup{#1}{*}{-}
\xmlsetsetup{#1}{document|chapters|chapter|content|emph}{xml:*}
\stopxmlsetups

\xmlregistersetup{xml:testsetups}

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

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

\startxmlsetups xml:chapter
\xmlfunction {#1} {chapter}
 \xmlflush {#1} 
\stopxmlsetups

\startxmlsetups xml:chapter:content
\xmltext {#1} {content}
\stopxmlsetups

\startxmlsetups xml:emph
   {\em \xmlflush {#1}}
\stopxmlsetups

\startluacode
function xml.functions.chapter (t)
 local ch_id = t.at.ch:id



local ch_id = t.at["ch:id"]



local metadata = xml.filter (t, 
'../../topics/topic[@t:id=="%s"]', ch_id)
print (inspect(metadata))
lxml.command(t, ".", "xml:chapter:content")
context.par ()
context (ch_id)
context.par ()
end
\stopluacode


Best wishes,

Massi

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

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


Re: [NTG-context] Do environment files add implicit \starttext ... \stopttext

2022-11-16 Thread Wolfgang Schuster via ntg-context

Denis Maier via ntg-context schrieb am 15.11.2022 um 13:22:


Hi,

if I process an XML buffer, I’ve noticed I need to wrap the 
\xmlprocessbuffer in a \starttext ... \stoptext pair.


[...]

However, if I have the XML and the setups in dedicated files, there 
seems to be no need for \starttext ... \stoptext.


[...]

Running

context text.xml –environment=setups.tex

gives me a proper PDF without errors.

Therefore my question:

Does the use –environment automatically wrap the processed file in 
\starttext ... stoptext ?


If not, what’s the reason for this behaviour? Am I missing something?



ConTeXt uses the file extension to decide who it should handle document,
in your case the extension is xml and the file is processed as

\starttext
\xmlprocess{main}{...}{}
\stoptext

The same thing happens when you have CLD document and use cld as file 
extension.


For more details you can look at the processjob function in cont-run.lmt.

Wolfgang

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

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


Re: [NTG-context] Xml filtering in Lua

2022-11-16 Thread Thomas A. Schmitz via ntg-context
Hi Duncan,

Thank you for pointing this out! I knew this was true inside the xmlns 
namespace, so you can’t have identical xml:id tags, but you’re probably right 
that it’s better to avoid this confusion altogether. Alas, this doesn’t help 
with my problem. Since there was a type in my minimal example from my 
experimentations, I include a corrected version, avoiding the identical tags

All best

Thomas

\startbuffer[test]

  
 
This is the first test
22/11/16
 
 
This is the second test
22/11/17
 
  
  
 

  This will be the content of the first chapter.

 
 
 
  This will be the content of the second chapter.
 
 
  

\stopbuffer

\startxmlsetups xml:testsetups
   \xmlsetsetup{#1}{*}{-}
\xmlsetsetup{#1}{document|chapters|chapter|content|emph}{xml:*}
\stopxmlsetups

\xmlregistersetup{xml:testsetups}

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

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

\startxmlsetups xml:chapter
\xmlfunction {#1} {chapter}
 \xmlflush {#1} 
\stopxmlsetups

\startxmlsetups xml:chapter:content
\xmltext {#1} {content}
\stopxmlsetups

\startxmlsetups xml:emph
  {\em \xmlflush {#1}}
\stopxmlsetups

\startluacode
function xml.functions.chapter (t)
 local ch_id = t.at.ch:id
local metadata = xml.filter (t, 
'../../topics/topic[@t:id=="%s"]', ch_id)
print (inspect(metadata))
lxml.command(t, ".", "xml:chapter:content")
context.par ()
context (ch_id)
context.par ()
end
\stopluacode


> On 16. Nov 2022, at 17:18, Duncan Hothersall via ntg-context 
>  wrote:
> 
> I'm not sure about the code, sorry, but I do know that an XML document can't 
> have two IDs of the same value. Typically you would use a linkend attribute 
> on the element which is referencing an id (in this case the topics, I think).
> 
> Probably doesn't help with your problem, but it's likely a prerequisite for 
> it to work.
> 
> Bests,
> 
> Duncan


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

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


Re: [NTG-context] How to break margin notes across page breaks?

2022-11-16 Thread Henning Hraban Ramm via ntg-context

Am 16.11.22 um 03:52 schrieb Joel via ntg-context:

How can I allow margin text to break across the page breaks?


AFAIK this is not supported. But Hans might surprise us.

Hraban

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

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


Re: [NTG-context] Xml filtering in Lua

2022-11-16 Thread Duncan Hothersall via ntg-context
Hi Thomas.

I'm not sure about the code, sorry, but I do know that an XML document
can't have two IDs of the same value. Typically you would use a linkend
attribute on the element which is referencing an id (in this case the
topics, I think).

Probably doesn't help with your problem, but it's likely a prerequisite for
it to work.

Bests,

Duncan

On Wed, 16 Nov 2022 at 16:11, Thomas A. Schmitz via ntg-context <
ntg-context@ntg.nl> wrote:

> Hi all,
>
> I thought this was easy, but I overestimated my competence… I want to
> filter xml elements via their attributes and retrieve and typeset parts
> belonging together. Here is a small test file that explains what I’m trying:
>
> \startbuffer[test]
> 
>
>   
> This is the first test
> 22/11/16
>   
>   
> This is the second test
> 22/11/17
>   
>
>
>   
> 
>   This will be the content of the first chapter.
> 
>   
>   
>  
>   This will be the content of the second chapter.
>  
>   
>
> 
> \stopbuffer
>
> \startxmlsetups xml:testsetups
> \xmlsetsetup{#1}{*}{-}
> \xmlsetsetup{#1}{document|chapters|chapter|content|emph}{xml:*}
> \stopxmlsetups
>
> \xmlregistersetup{xml:testsetups}
>
> \startxmlsetups xml:document
> \xmlflush{#1}
> \stopxmlsetups
>
> \startxmlsetups xml:chapters
> \xmlflush{#1}
> \stopxmlsetups
>
> \startxmlsetups xml:chapter
> \xmlfunction {#1} {chapter}
>  \xmlflush {#1}
> \stopxmlsetups
>
> \startxmlsetups xml:chapter:content
> \xmltext {#1} {content}
> \stopxmlsetups
>
> \startxmlsetups xml:emph
>{\em \xmlflush {#1}}
> \stopxmlsetups
>
> \startluacode
> function xml.functions.chapter (t)
>  local ch_id = t.at.id
> local metadata = xml.filter (root,
> '../../topics/topic[@id=="%s"]', ch_id)
> print (inspect(metadata))
> lxml.command(t, ".", "xml:chapter:content")
> context.par ()
> context (ch_id)
> context.par ()
> end
> \stopluacode
>
> \starttext
> \xmlprocessbuffer{main}{test}{}
> \stoptext
>
> The line with xml.filter does not work as I expected. How can I walk the
> tree, find the “topic” element with the same “id” attribute as the chapter
> I’m currently in, and then typeset the different children of the topic
> element?
>
> Thanks a lot and all best
>
> Thomas
>
>
> ___
> If your question is of interest to others as well, please add an entry to
> the Wiki!
>
> maillist : ntg-context@ntg.nl /
> https://www.ntg.nl/mailman/listinfo/ntg-context
> webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
> archive  : https://bitbucket.org/phg/context-mirror/commits/
> wiki : https://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://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___


[NTG-context] Xml filtering in Lua

2022-11-16 Thread Thomas A. Schmitz via ntg-context
Hi all,

I thought this was easy, but I overestimated my competence… I want to filter 
xml elements via their attributes and retrieve and typeset parts belonging 
together. Here is a small test file that explains what I’m trying:

\startbuffer[test]

   
  
This is the first test
22/11/16
  
  
This is the second test
22/11/17
  
   
   
  

  This will be the content of the first chapter.

  
  
 
  This will be the content of the second chapter.
 
  
   

\stopbuffer

\startxmlsetups xml:testsetups
\xmlsetsetup{#1}{*}{-}
\xmlsetsetup{#1}{document|chapters|chapter|content|emph}{xml:*}
\stopxmlsetups

\xmlregistersetup{xml:testsetups}

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

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

\startxmlsetups xml:chapter
\xmlfunction {#1} {chapter}
 \xmlflush {#1} 
\stopxmlsetups

\startxmlsetups xml:chapter:content
\xmltext {#1} {content}
\stopxmlsetups

\startxmlsetups xml:emph
   {\em \xmlflush {#1}}
\stopxmlsetups

\startluacode
function xml.functions.chapter (t)
 local ch_id = t.at.id
local metadata = xml.filter (root, 
'../../topics/topic[@id=="%s"]', ch_id)
print (inspect(metadata))
lxml.command(t, ".", "xml:chapter:content")
context.par ()
context (ch_id)
context.par ()
end
\stopluacode

\starttext
\xmlprocessbuffer{main}{test}{}
\stoptext

The line with xml.filter does not work as I expected. How can I walk the tree, 
find the “topic” element with the same “id” attribute as the chapter I’m 
currently in, and then typeset the different children of the topic element? 

Thanks a lot and all best

Thomas

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

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


Re: [NTG-context] Page break with placement of a figure at the bottom of the page

2022-11-16 Thread Fabrice Couvreur via ntg-context
Hi Bruce and Pablo,
I'm sorry for the late reply but I'm running out of time right now. Thanks
for trying to solve the problem. I think the problem comes from the
pyramid.png file.
Fabrice

Le mer. 16 nov. 2022 à 14:55, Fabrice Couvreur 
a écrit :

> Hi Bruce and Pablo,
> I'm sorry for the late reply but I'm running out of time right now. Thanks
> for trying to solve the problem. I think the problem comes from the
> pyramid.png file.
> Fabrice
>
> Le dim. 13 nov. 2022 à 14:37, Pablo Rodriguez via ntg-context <
> ntg-context@ntg.nl> a écrit :
>
>> On 11/13/22 11:32, Fabrice Couvreur via ntg-context wrote:
>> > Hi Pablo,
>> > Indeed but I posted these two files in a previous post.
>>
>> Hi Fabrice,
>>
>> the output from your ie_3.tex is too big for the list, so
>> https://pdf.ousia.tk/ie_3.pdf contains it.
>>
>> I see no problem there, but I think that the output from
>> https://mailman.ntg.nl/pipermail/ntg-context/2022/107191.html may come
>> from a different source.
>>
>> BTW, I couldn’t find "ie_3.tex" in
>> https://mailman.ntg.nl/pipermail/ntg-context/2022.txt.gz (which seems to
>> be generated with messages previous to current date).
>>
>> If you sent the files before, it is fine to include a link to the
>> relevant message in the list (such as the first link included in this
>> message).
>>
>> BTW, it might be worth considering a GitHub or GitLab repository for not
>> minimal samples. There files may be stored (and the whole repository
>> might be deleted when not needed).
>>
>> I hope it helps,
>>
>> Pablo
>>
>> ___
>> If your question is of interest to others as well, please add an entry to
>> the Wiki!
>>
>> maillist : ntg-context@ntg.nl /
>> https://www.ntg.nl/mailman/listinfo/ntg-context
>> webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
>> archive  : https://bitbucket.org/phg/context-mirror/commits/
>> wiki : https://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://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___


Re: [NTG-context] Do environment files add implicit \starttext ... \stopttext

2022-11-16 Thread Denis Maier via ntg-context
> -Ursprüngliche Nachricht-
> Von: ntg-context  Im Auftrag von Pablo
> Rodriguez via ntg-context
> Gesendet: Dienstag, 15. November 2022 16:07
> An: Denis Maier via ntg-context 
> Cc: Pablo Rodriguez 
> Betreff: Re: [NTG-context] Do environment files add implicit \starttext ...
> \stopttext
> 
> On 11/15/22 13:22, Denis Maier via ntg-context wrote:
> > Hi,
> >
> > if I process an XML buffer, I’ve noticed I need to wrap the
> > \xmlprocessbuffer in a \starttext ... \stoptext pair.
> > []
> > However, if I have the XML and the setups in dedicated files, there
> > seems to be no need for \starttext ... \stoptext.
> > []
> > Therefore my question:
> >
> > Does the use –environment automatically wrap the processed file in
> > \starttext ... stoptext ?
> 
> Hi Denis,
> 
> try a source file with this contents:
> 
>   \ConTeXt\ is great.
> 
> with the following environment:
> 
>   \setuppapersize[A6]
>   \setupbodyfont[pagella]
> 
> It looks like when --environment is used, ConTeXt assumes that the main
> source only contains text. Which makes sense (at least, to me).
> 

Thanks, Pablo. Yes, that makes sense.

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

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