[NTG-context] Re: Key distance with enumeration

2023-07-27 Thread Wolfgang Schuster

Fabrice Couvreur schrieb am 27.07.2023 um 20:56:


Hi,
I don't understand why the distance between the dot and the first 
letter of the text is not always the same (see with theorem).


Add

        stretch=0,
        shrink=0,

to your enumeration setup.

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
___

[NTG-context] Cron /var/www/aanhet.net/context/bin/cron/context-mirror

2023-07-27 Thread Cron Daemon
receiving incremental file list
 ./
 ctan.lsr
 document-2.htm
 download-1.htm
 download-2.htm
 logo-ade.png
 logo-cts.png
 logo-pod.png
 rss.xml
 show-fil.pdf
 context/latest/
 context/latest/cont-lmt.zip
 context/latest/cont-mpd.zip
 context/latest/cont-ppc.zip
 context/latest/cont-sci.zip
 context/latest/cont-tmf.zip
 context/latest/cont-tst.7z
 context/latest/cont-tst.tar.xz
 context/latest/cont-tst.zip
 
 sent 175,427 bytes  received 38,664,834 bytes  3,699,072.48 bytes/sec
 total size is 562,228,260  speedup is 14.48


Running archiver:

New dir: /var/www/aanhet.net/context//htdocs/archives/context-2023-07-27.19
233578386   
/var/www/aanhet.net/context//htdocs/archives/context-2023-07-27.19/latest
126745317   
/var/www/aanhet.net/context//htdocs/archives/context-2023-07-27.19/current
360327799   
/var/www/aanhet.net/context//htdocs/archives/context-2023-07-27.19
360327799   total
___
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] Key distance with enumeration

2023-07-27 Thread Fabrice Couvreur
Hi,
I don't understand why the distance between the dot and the first letter of
the text is not always the same (see with theorem).
Thanks
Fabrice

\setupenumerations
  [before={\blank},
   after={\blank},
   alternative=serried,
   distance=1cm,
   title=yes,
   titleleft=,
   titleright=,
   titlestyle=normal,
   prefix=no,
   prefixsegments=chapter,
   way=bychapter,
   prefixconversionset=digit,
   counter=,
   headcommand=\groupedcommand{}{.},
   numbercommand=\groupedcommand{}{},
   titlecommand=\groupedcommand{(}{)},
   width=broad]

\defineenumeration
   [definition]
   [text=Définition,
number=yes,
style=italic]

\defineenumeration
   [theorem]
   [text=Théorème,
number=yes,
style=italic]


\starttext
 \startdefinition
 Un polynôme est une application de R dans R somme d'un nombre fini de
monômes.
\stopdefinition
\starttheorem
  La forme réduite d'un polynôme est unique à l'ordre près des monômes
qui le constituent.
\stoptheorem
\startdefinition
  Le degré d'un polynôme {\bi non nul} est le degré du monôme de plus
haut degré figurant dans son écriture réduite.
\stopdefinition
\startdefinition
  Le terme constant d'un polynôme est le coefficient (éventuellement
nul) de son monôme de degré 0.
\stopdefinition

\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
___

[NTG-context] Re: Link from a PDF to a reference of an embedded PDF

2023-07-27 Thread Pablo Rodriguez
On 7/26/23 19:47, Pablo Rodriguez wrote:
> [...]
> The real issue is that I couldn’t make it work with any PDF viewer I
> have on Linux.
> [...]
> I take for granted that Acrobat will deal fine with this, since
> destinations in links (GoToR) seem to be fine.
Gerion, I was wrong, since I forgot enabling interaction in the main PDF
document to generate the targets (or named destinations).

  \setupinteraction[state=start, focus=standard]
  \starttext
  \dorecurse{15}
{\chapter[chap\recurselevel]{Chapter}}
  \stoptext

The first line was missing yesterday.

After that (and with the ouput from the second sample from my previous
message
[https://mailman.ntg.nl/archives/list/ntg-context@ntg.nl/message/IEEGSAL636X32C3WWMO2KWKXMTIARRGZ/]),
Xpdf/Evince/Okular solve remote links fine.

MuPDF-GL cannot solve the file (even when full path is provided) and
PDF.js doesn’t even seem to care there might be a link.

I’m totally ignorant about what Acrobat and Edge/Chrome might do.

I hope this 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
___

[NTG-context] Re: xml: matches always child of other element

2023-07-27 Thread denis.maier
Ok, after a bit of more testing I can now come up with another example.

The version using startstop works, but with the normal command, I'm always 
getting back the content of the first element. I thought it might be an 
expansion issue, but \expanded and also expansion=yes or expansion=xml on 
\definedescription have no effect. Perhaps most interestingly, adding using the 
startstop variant together with the command variant gives correct results for 
the command as well (xml:index-entry-term-3).

I have now found a way to proceed with my project (I'll just use the startstop 
variant), but I'd still be interested in understanding what is happening here. 
Does anyone know? Or is there anything I'm doing wrong here?

Best,
Denis

%%
\startxmlsetups xml:test
  \xmlsetsetup{#1}{*}{-}
  \xmlsetsetup{#1}{index}{xml:*}
  \xmlsetsetup{#1}{index-entry}{xml:index-entry}
  %\xmlsetsetup{#1}{term}{xml:index-entry-term}
  \xmlsetsetup{#1}{term}{xml:index-entry-term-2}
  \xmlsetsetup{#1}{term}{xml:index-entry-term-3}
\stopxmlsetups

\xmlregisterdocumentsetup{test}{xml:test}

% Index

\startxmlsetups xml:book-back
  \xmlflush{#1}
\stopxmlsetups

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

\definedescription[indexentry][]
%\definedescription[indexentry][expansion=yes] % has no effect
%\definedescription[indexentry][expansion=xml] % has no effect


\startxmlsetups xml:index-entry
  \xmlflush{#1}
\stopxmlsetups

\startxmlsetups xml:index-entry-term % does not work
  \expanded{\indexentry{\xmlflush{#1}}}
  \indexentry{\xmlflush{#1}}
  \xmlflush{#1}
\stopxmlsetups

\startxmlsetups xml:index-entry-term-2 % works
\startindexentry{\xmlflush{#1}}
\xmlflush{#1}
\stopindexentry
\stopxmlsetups

\startxmlsetups xml:index-entry-term-3 % works
\expanded{\indexentry{\xmlflush{#1}}}
\indexentry{\xmlflush{#1}}
\startindexentry{\xmlflush{#1}}
\xmlflush{#1}
\stopindexentry
\stopxmlsetups


\startbuffer[test]



One


Two


Three


\stopbuffer

\starttext

\xmlprocessbuffer{test}{test}{}

\stoptext
%%

Von: denis.ma...@unibe.ch 
Gesendet: Montag, 24. Juli 2023 15:57
An: ntg-context@ntg.nl
Betreff: [NTG-context] Re: xml: matches always child of other element

Interestingly, we should be in the right subtree as this modified example is 
supposed to demonstrate (we're getting the correct numbers under each 
index-entry-term, just the terms are incorrect in all but the first case):

\startxmlsetups xml:test
\xmlsetsetup{#1}{*}{-}
\xmlsetsetup{#1}{index}{xml:*}
\xmlsetsetup{#1}{index-entry}{xml:index-entry}
%\xmlsetsetup{#1}{index-entry}{xml:index-entry-2}
\xmlsetsetup{#1}{term}{xml:index-entry-term}
\xmlsetsetup{#1}{nav-pointer-group}{xml:*}
\xmlsetsetup{#1}{nav-pointer}{xml:nav-pointer}
\xmlsetsetup{#1}{nav-pointer/ext-link}{xml:nav-pointer-link}
\stopxmlsetups

\xmlregisterdocumentsetup{test}{xml:test}

% Index

\startxmlsetups xml:book-back
\xmlflush{#1}
\stopxmlsetups

\startxmlsetups xml:index
  
\startsectionlevel[title={\xmlfilter{#1}{/index-title-group/title/command(xml:index-title)}},]
\xmlflush{#1}
  \stopsectionlevel
\stopxmlsetups

\startxmlsetups xml:index-title
\xmlflush{#1}
\stopxmlsetups

\definedescription[indexentry]
[alternative=top,
headstyle=normal,
headcommand=\hskip-1cm,
margin=1cm,
inbetween=,
]

\startxmlsetups xml:index-entry
\xmlflush{#1}
\stopxmlsetups

\startxmlsetups xml:index-entry-2
\xmlfilter{#1}{/term/command(xml:index-entry-term)}%
\xmlverbatim{#1}
\stopxmlsetups

\startxmlsetups xml:index-entry-term
\indexentry{\xmlflush{#1}}
\stopxmlsetups

\startxmlsetups xml:nav-pointer-group
\xmlconcat{#1}{/nav-pointer}{, }
\stopxmlsetups

\startxmlsetups xml:nav-pointer
\xmlflush{#1}
\stopxmlsetups

\startxmlsetups xml:nav-pointer-link
\xmlflush{#1}
\stopxmlsetups

\startbuffer[test]


  
Index
  
  
First

  
1
  
  
2
  
  
3
  

  
  
Second

  
4
  

  
  
Third

  
5
  
  
6
  
  
7
  

  

\stopbuffer


\starttext

\xmlprocessbuffer{test}{test}{}

\stoptext

Von: denis.ma...@unibe.ch 
mailto:denis.ma...@unibe.ch>>
Gesendet: Montag, 24. Juli 2023 13:38
An: ntg-context@ntg.nl
Betreff: 

[NTG-context] Problems with luametatex and texlive on OpenBSD

2023-07-27 Thread Edd Barrett
Hi everyone,

I'm finalising packaging TeX Live 2023 for OpenBSD and have an issue with
context using the new luametatex engine.

I'm getting various Lua errors when running `context --make`, like:

  node-ini.lmt:54: attempt to call a nil value (local 'getvalues')

and:

  node-nut.lmt:22: attempt to index a nil value (local 'nodecodes')

(full log below)

As far as I can see, I've set up the system in the same way as the other
downstream packagers have (according to
https://github.com/contextgarden/luametatex/issues/1 and
https://wiki.contextgarden.net/Building_LuaMetaTeX_for_TeX_Live):

 - make symlinks
  * /usr/local/bin/context.lua -> 
../share/texmf-dist/scripts/context/lua/context.lua
  * /usr/local/bin/mtx-context.lua -> 
../share/texmf-dist/scripts/context/lua/mtx-context.lua
  * /usr/local/bin/mtxrun.lua -> 
../share/texmf-dist/scripts/context/lua/mtxrun.lua
  * /usr/local/bin/context -> luametatex
  * /usr/local/bin/mtxrun -> luametatex

 - patch resolvers
   * 
https://github.com/jasperla/openbsd-wip/blob/master/print/texlive/texmf/patches/patch-texmf-dist_scripts_context_lua_mtxrun_lua
   * 
https://github.com/jasperla/openbsd-wip/blob/master/print/texlive/texmf/patches/patch-texmf-dist_tex_context_base_mkiv_data-res_lua
   * 
https://github.com/jasperla/openbsd-wip/blob/master/print/texlive/texmf/patches/patch-texmf-dist_web2c_texmf_cnf

In OpenBSD, we install the trees in /usr/local/share/texmf* (a hangover from
teTeX), so in these patches, TRUEPREFIX resolves to /usr/local. This does mean
selfauto doesn't work, but in the past I've always just patched in absolute
paths and it's been fine.

Does anyone know what may cause these errors? I've prodded around inside the
lua and luametatex sources, but I don't really know what's going on. I tend to
agree with Lua that the variables in question are not defined, so using them
causes a `nil` to appear which can't be indexed or called. Something else must
be expected to set up the undefined variables somewhere...

Any help would be greatly appreciated.

Full output of `context --make`:

```
resolvers   | resolving | configuration files already identified
resolvers   | resolving | loading configuration file 
'/usr/local/share/texmf-dist/web2c/texmfcnf.lua'
resolvers   | resolving |
resolvers   | resolving | locating list of 'home:.texlive2023/texmf-config' 
(runtime) (tree:///home:.texlive2023/texmf-config)
resolvers   | methods | resolving, method 'locators', how 'uri', handler 
'tree', argument 'tree:///home:.texlive2023/texmf-config'
resolvers   | trees | locator 'home:.texlive2023/texmf-config' not found
resolvers   | resolving | locating list of 'home:texmf' (runtime) 
(tree:///home:texmf)
resolvers   | methods | resolving, method 'locators', how 'uri', handler 
'tree', argument 'tree:///home:texmf'
resolvers   | trees | locator 'home:texmf' not found
resolvers   | resolving | locating list of '/usr/local/share/texmf-config' 
(cached)
resolvers   | methods | resolving, method 'locators', how 'uri', handler 
'file', argument '/usr/local/share/texmf-config'
resolvers   | files | file locator '/usr/local/share/texmf-config' not found
resolvers   | resolving | locating list of '/usr/local/share/texmf-var' 
(cached)
resolvers   | methods | resolving, method 'locators', how 'uri', handler 
'file', argument '/usr/local/share/texmf-var'
resolvers   | files | file locator '/usr/local/share/texmf-var' found as 
'/usr/local/share/texmf-var'
resolvers   | resolving | locating list of '/usr/local/share/texmf-project' 
(cached)
resolvers   | methods | resolving, method 'locators', how 'uri', handler 
'file', argument '/usr/local/share/texmf-project'
resolvers   | files | file locator '/usr/local/share/texmf-project' not 
found
resolvers   | resolving | locating list of '/usr/local/share/texmf-fonts' 
(cached)
resolvers   | methods | resolving, method 'locators', how 'uri', handler 
'file', argument '/usr/local/share/texmf-fonts'
resolvers   | files | file locator '/usr/local/share/texmf-fonts' not found
resolvers   | resolving | locating list of '/usr/local/share/texmf-local' 
(cached)
resolvers   | methods | resolving, method 'locators', how 'uri', handler 
'file', argument '/usr/local/share/texmf-local'
resolvers   | files | file locator '/usr/local/share/texmf-local' found as 
'/usr/local/share/texmf-local'
resolvers   | resolving | locating list of '/usr/local/share/texmf-dist' 
(cached)
resolvers   | methods | resolving, method 'locators', how 'uri', handler 
'file', argument '/usr/local/share/texmf-dist'
resolvers   | files | file locator '/usr/local/share/texmf-dist' found as 
'/usr/local/share/texmf-dist'
resolvers   | resolving |
resolvers   | methods | resolving, method 'generators', how 'uri', handler 
'file', argument '/usr/local/share/texmf-var'
resolvers   | expansions | scanning path '/usr/local/share/texmf-var', 
branch