[NTG-context] Re: Is TIFF image no longer supported?

2024-04-14 Thread Denis Maier via ntg-context


 
 
  
    
   
   
   
Thomas A. Schmitz  hat am 14.04.2024 22:18 CEST geschrieben:

   
 

   
 

   
On 4/14/24 22:11, Joel via ntg-context wrote:



 I have a document with PNG, JPG, and TIFF. When I try using
 

 \externalfigure[filename][frame=on, width=.\textwidth] it displays
 

 JPG and PNG fine, but the TIFF files don't render. Is TIFF not supported
 

 in ConTeXt anymore? --Joel
 

   
I don't think tiff has ever be supported?

   
 

   
Thomas

   
  
    
   
  
   At least, this is what 
   
  
   https://wiki.contextgarden.net/Using_Graphics says.
   
  
   But you can do implicit conversion of TIFF to PDF if you have the converter installed. (Maybe you've had that installed before?)
   
  
   Best,
   
  
   Denis
   
   
   
___

   
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: unknown script 'mtx-context.lua' or 'mtx-mtx-context.lua

2024-04-11 Thread Denis Maier via ntg-context
> -Ursprüngliche Nachricht-
> Von: Pablo Rodriguez via ntg-context 
> Gesendet: Donnerstag, 11. April 2024 17:26
> An: 'mailing list for ConTeXt users' 
> Cc: Pablo Rodriguez 
> Betreff: [NTG-context] Re: unknown script 'mtx-context.lua' or 'mtx-mtx-
> context.lua
> 
> On 4/10/24 22:28, Denis Maier wrote:
> >> [...]
> >>   context --luatex --generate
> >
> > Thanks, Pablo.
> > I've tried it, but it doesn't seem to work...
> 
> I get the same result on Win64 when I move the luatex binary from the
> tex/texmf-win64/bin/ directory.
> 
> This may sound stupid, but could you check whether the bin directory
contain
> the required binary?
> 
> Sorry, "luatex --version" and even "whereis luatex" should give the same
result
> (but on Windows, it seems to be https://ss64.com/nt/where.html).
> 
> I hope it may help,
> 
> Pablo

Ok. It wasn't there. I have now copied it from my Miktex installation, but
it still does not work. (Looks like some path issue. The luatex binary from
the miktex installation seems to take priority over the one now in the
ConTeXt installation. Looks like I'm getting somewhere...)

Thanks for your help,
Denis

___
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: unknown script 'mtx-context.lua' or 'mtx-mtx-context.lua

2024-04-10 Thread Denis Maier via ntg-context
> -Ursprüngliche Nachricht-
> Von: Pablo Rodriguez via ntg-context 
> Gesendet: Mittwoch, 10. April 2024 19:35
> An: ntg-context@ntg.nl
> Cc: Pablo Rodriguez 
> Betreff: [NTG-context] Re: unknown script 'mtx-context.lua' or 'mtx-mtx-
> context.lua
> 
> On 4/10/24 13:59, Denis Maier via ntg-context wrote:
> > Hi,
> > I wanted to test my earlier example (float placement) also with MKIV,
> > but context ---luatex … give me this error message :
> > unknown script 'mtx-context.lua' or 'mtx-mtx-context.lua How can I
> > make it work?
> 
> Hi Denis,
> 
> as far as I know, this is required first:
> 
>   context --luatex --generate

Thanks, Pablo. 
I've tried it, but it doesn't seem to work...

I'm getting this:

resolvers   | resolving |
resolvers   | resolving | warning: no lua configuration files found
resolvers   | resolving | no texmf paths are defined (using TEXMF)
resolvers   | resolving |
mtxrun  | the resolver databases are not present or outdated

And again:

mtxrun  | unknown script 'mtx-context.lua' or 'mtx-mtx-context.lua'

Any ideas?

Best,
Denis

___
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] unknown script 'mtx-context.lua' or 'mtx-mtx-context.lua

2024-04-10 Thread Denis Maier via ntg-context
Hi,

 

I wanted to test my earlier example (float placement) also with MKIV, but

context ---luatex .

give me this error message :

unknown script 'mtx-context.lua' or 'mtx-mtx-context.lua

 

How can I make it work?

 

Best,

Denis

___
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] Weird (?) float placement for specific widths of image

2024-04-10 Thread Denis Maier via ntg-context
Hi, 

 

another graphics/floats question: consider the following example

 

%

 

\setupexternalfigures

[location={local,global,default}]

 

\starttext

 

\placefigure{A Cow}{\externalfigure[cow][

height=.5\textheight,

]}

 

\placefigure{A Cow}{\externalfigure[cow][

height=.3\textheight,

%height=.4\textheight,

]}

 

 

\placefigure{A Cow}{\externalfigure[cow][

width=3cm,

%width=2cm,

]}

 

\placefigure{A Cow}{\externalfigure[cow][width=2cm]}

 

\placefigure{A Cow}{\externalfigure[cow][width=2cm]}

 

\stoptext%

 

On the first page, the images appear stacked above each other while on the
second page they appear next to each other.

 

It took me some time to reproduce this behaviour, and I can't claim to
understand what is happening. But it seems to be related to the specific
widths of the images. When I change them to other values the behaviour
disappears. Is this a bug? Anything I can do about this?

 

Best

Denis

___
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-04 Thread Denis Maier via ntg-context
Hi,

Aren’t environments used for setups (and not for textual content). Maybe a 
buffer may be what you want ?

https://wiki.contextgarden.net/Command/startbuffer

 

Best,

Denis

 

 

Von: Jeroen  
Gesendet: Montag, 4. März 2024 06:15
An: mailing list for ConTeXt users 
Betreff: [NTG-context] Re: Local alternative to \input

 

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 mailto:te...@fiee.net> >:

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: Issue with italics

2024-02-26 Thread Denis Maier via ntg-context
Nevermind, I just found this: 
https://mirror.init7.net/ctan/fonts/greek/gfs/gfsdidot/doc/DidotSpecimen.pdf
So there should be italics...
Sorry for the noise.

> -Ursprüngliche Nachricht-
> Von: Denis Maier via ntg-context 
> Gesendet: Montag, 26. Februar 2024 14:04
> An: 'mailing list for ConTeXt users' 
> Cc: denisma...@mailbox.org
> Betreff: [NTG-context] Re: Issue with italics
> 
> I don't know, but maybe GFS Didot has not italic shape?
> At least, that's what I'd guess after looking at this
> https://fonts.google.com/specimen/GFS+Didot (maybe your version has
> italics...)
> 
> Best,
> Denis
> 
> > -Ursprüngliche Nachricht-
> > Von: Jean-Pierre Delange 
> > Gesendet: Montag, 26. Februar 2024 13:32
> > An: mailing list for ConTeXt users 
> > Betreff: [NTG-context] Issue with italics
> >
> > Dear list,
> >
> > When handling the preamble to a document in which I would like to
> > treat the text in French, with sometimes italics text and phrases in
> > ancient Greek, I encounter the following difficulty:
> > if I use TeX Gyre Pagella as the main font, everything works fine,
> > except for the Ancient Greek text, which I don't like the look of. But
> > the Greek text is displayed, as are the French italics. On the other
> > hand, if I use GFS Didot as the main font and Theano Didot for the
> > Greek, the italics disappear and the Greek text looks better. The CTX 
> > version I
> use is: mtx-context | current version:
> > 2024.01.24 22:39.
> >
> > Herewith are two MWE attachments (*.tex + *.pdf) with different fonts.
> > What am I missing ? Thanks for your answers.
> >
> > JP
> 
> ___
> 
> 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: Issue with italics

2024-02-26 Thread Denis Maier via ntg-context
I don't know, but maybe GFS Didot has not italic shape?
At least, that's what I'd guess after looking at this 
https://fonts.google.com/specimen/GFS+Didot (maybe your version has italics...)

Best,
Denis

> -Ursprüngliche Nachricht-
> Von: Jean-Pierre Delange 
> Gesendet: Montag, 26. Februar 2024 13:32
> An: mailing list for ConTeXt users 
> Betreff: [NTG-context] Issue with italics
> 
> Dear list,
> 
> When handling the preamble to a document in which I would like to treat the
> text in French, with sometimes italics text and phrases in ancient Greek, I
> encounter the following difficulty:
> if I use TeX Gyre Pagella as the main font, everything works fine, except for 
> the
> Ancient Greek text, which I don't like the look of. But the Greek text is
> displayed, as are the French italics. On the other hand, if I use GFS Didot 
> as the
> main font and Theano Didot for the Greek, the italics disappear and the Greek
> text looks better. The CTX version I use is: mtx-context | current version:
> 2024.01.24 22:39.
> 
> Herewith are two MWE attachments (*.tex + *.pdf) with different fonts. What
> am I missing ? Thanks for your answers.
> 
> JP

___
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: new context option

2024-02-24 Thread Denis Maier via ntg-context


 
 
  
   Hi Otared
   
  
   Shouldn't the version be 2024? 
   
  
   Best
   
  
   Denis
   
  
    
   
   
   
Otared Kavian  hat am 24.02.2024 10:40 CET geschrieben:

   
 

   
 
Hi Hans, 
   
 

   
Thanks for this nice option: it comes handy for many situations.

   
 

   
I added a page for it:

   
https://wiki.contextgarden.net/find

   
 

   
Best regards: Otared
 

  
  
  
   On 22 Feb 2024, at 18:40, Hans Hagen  wrote:
   
   
   
Hi,

As I needed to check some commands i added this:

  context --find="%\starttabulate"

which will (should) give a list of lines/files in the documentation where this command is used.

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://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
___

   
  
 
 
 
  
  
   Otared Kavian
   
  
   e-mail: ota...@gmail.com
   
  
   Phone: +33 6 88 26 70 95
   
  
    
   
  
 
___
   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: upload

2024-01-19 Thread Denis Maier via ntg-context


 
 
  
    
   
   
   
Pablo Rodriguez via ntg-context <ntg-context@ntg.nl> hat am 19.01.2024 18:34 CET geschrieben:

   
 

   
 

   
On 1/18/24 20:43, Denis Maier via ntg-context wrote:

   
>> *Von:*Alain Delmotte <alain.delmo...@leliseron.org>

   
>> *Gesendet:* Donnerstag, 18. Januar 2024 20:04

   
>> *An:* ntg-context@ntg.nl

   
>> *Betreff:* [NTG-context] Re: upload

   
>> [...]

   
>> When I go to https://www.pragma-ade.nl, I get an 404 Not Found

   
>> message, so I can't download the new upload !!


 
 
  Works here.
  
 

   
Hi Denis,

   
 

   
I get a 404 error for both https://www.pragma-ade.nl/install.htm and

   
https://www.pragma-ade.com/install.htm.

   
 

   
I can update my existing installed version, but I wouldn’t be able to

   
install a brand new distribution.

   
 

   
Do you reach any of the urls included in my first paragraph?

   
  
    
   
  
   No. 404 here as well.
   
  
   Best,
   
  
   Denis
   
  
    
  
 

___
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: upload

2024-01-18 Thread Denis Maier via ntg-context
Works here.

Best,

Denis

 

Von: Alain Delmotte  
Gesendet: Donnerstag, 18. Januar 2024 20:04
An: ntg-context@ntg.nl
Betreff: [NTG-context] Re: upload

 

Hi,

When I go to https://www.pragma-ade.nl/ I get an 404 Not Found message, so I 
can't download the new upload !!

Any reason?

Alain

Le 18-01-24 à 00:13, Hans Hagen a écrit :

Hi, 

I uploaded a new version (there is some work in progress but it probably 
doesn't affect anyone). 

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://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
___


Re: [NTG-context] Tabulate: Change cell orienation for individual cells?

2023-06-27 Thread Denis Maier via ntg-context
Ok, if you use p for the column definition you can just use \setupalign on 
individual cells...

%%%
\starttext
\starttabulate[|pA{verytolerant,extremestretch}|pA{verytolerant,extremestretch}|]
\NC Heading flushleft \NC \setupalign[flushright] Heading flushright \NC \NR
\NC \input ward  \NC \input ward \NC \NR
\stoptabulate
\stoptext
%%%

Best,
Denis

Von: ntg-context  Im Auftrag von Denis Maier via 
ntg-context
Gesendet: Dienstag, 27. Juni 2023 10:56
An: ntg-context@ntg.nl
Cc: Maier, Denis Christian (UB) 
Betreff: [NTG-context] Tabulate: Change cell orienation for individual cells?

Sie erhalten nicht oft eine E-Mail von 
ntg-context@ntg.nl<mailto:ntg-context@ntg.nl>. Erfahren Sie, warum dies wichtig 
ist<https://aka.ms/LearnAboutSenderIdentification>
Hi,

is it possible to override the defined orienatation for a given cell ?

Take this example from the wiki:
%%
\starttext
\starttabulate[|l|c|r|]
\NC this and that \NC left and right \NC here and there \NC \NR
\NC such and so \NC up and down \NC on and on \NC \NR
\stoptabulate
\stoptext
%%

How can I change the alignment for a particular cell?

Best,
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
___


[NTG-context] Tabulate: Change cell orienation for individual cells?

2023-06-27 Thread Denis Maier via ntg-context
Hi,

is it possible to override the defined orienatation for a given cell ?

Take this example from the wiki:
%%
\starttext
\starttabulate[|l|c|r|]
\NC this and that \NC left and right \NC here and there \NC \NR
\NC such and so \NC up and down \NC on and on \NC \NR
\stoptabulate
\stoptext
%%

How can I change the alignment for a particular cell?

Best,
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
___


Re: [NTG-context] Can ConTeXt write its pdf to a different directory?

2023-05-27 Thread Denis Maier via ntg-context
I usually use a makefile for this.
There I have build rule that first cds into the target directory, then calls 
context from there.

Best
Denis

Von: ntg-context  im Auftrag von peter.hopcroft--- 
via ntg-context 
Gesendet: Samstag, 27. Mai 2023 03:52:42
An: ntg-context@ntg.nl
Cc: peter.hopcr...@icloud.com
Betreff: [NTG-context] Can ConTeXt write its pdf to a different directory?

My .tex file is in a directory within my working directory. I would like 
ConTeXt to write its output in the same directory as my .tex file. But it 
writes to the working directory.

This was asked 10 years ago:
`tex.stackexchange.com/questions/67928/how-to-set-output-directory-in-context-command`

The answer given then was to use:
`context filename --result=output-directory/filename`

But this doesn't work now. When I compile my .tex file, I get a message:
`results are to be on the running path, not on 'output-directory', ignoring 
--result`

I've looked in the wiki:
`https://wiki.contextgarden.net/Context`

Thank you,
Peter

___
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] module installer: unknown script 'install-modules.lua' or 'mtx-install-modules.lua'

2023-05-24 Thread Denis Maier via ntg-context



> -Ursprüngliche Nachricht-
> Von: Aditya Mahajan 
> Gesendet: Mittwoch, 24. Mai 2023 14:49
> An: Denis Maier via ntg-context 
> Cc: Maier, Denis Christian (UB) 
> Betreff: Re: [NTG-context] module installer: unknown script 'install-
> modules.lua' or 'mtx-install-modules.lua'
> 
> On Wed, 24 May 2023, Denis Maier via ntg-context wrote:
> 
> > I've just tested with a couple of other scripts...
> >
> > Doesn't matter which one I try to call:
> > Mtxrun --script XYZ
> >
> > will always results in the equivalent error message, e.g.:
> > mtxrun  | unknown script 'interface.lua' or 'mtx-interface.lua'
> >
> > I have
> > ..\context\tex\texmf-win64\bin
> > ..\context\bin
> > In my path.
> >
> > Do I need to add something else to the Path?
> 
> I would remove context/bin from the PATH.

Thanks - that was it. Apparently, it used the executable in the wrong path. 
Just out of interest, why do we have mtxrun in both locations?

Best,
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
___


Re: [NTG-context] module installer: unknown script 'install-modules.lua' or 'mtx-install-modules.lua'

2023-05-24 Thread Denis Maier via ntg-context
I've just tested with a couple of other scripts...

Doesn't matter which one I try to call:
Mtxrun --script XYZ

will always results in the equivalent error message, e.g.:
mtxrun  | unknown script 'interface.lua' or 'mtx-interface.lua'

I have 
..\context\tex\texmf-win64\bin
..\context\bin
In my path.

Do I need to add something else to the Path?

Best,
Denis

> -Ursprüngliche Nachricht-
> Von: ntg-context  Im Auftrag von Hans Hagen
> via ntg-context
> Gesendet: Mittwoch, 24. Mai 2023 09:00
> An: Denis Maier via ntg-context 
> Cc: Hans Hagen 
> Betreff: Re: [NTG-context] module installer: unknown script 'install-
> modules.lua' or 'mtx-install-modules.lua'
> 
> On 5/24/2023 8:51 AM, Denis Maier via ntg-context wrote:
> > Hi,
> >
> > I’m setting up a new computer, and I’ve wanted to benefit from the new
> > module installer. However, the commands I should use gives me the
> > following error message :
> >
> > mtxrun --script install-modules --list
> >
> > mtxrun | unknown script 'install-modules.lua' or 'mtx-install-modules.lua'
> >
> > I’m using a fresh context installation (2023.05.08 17:39) on Windows.
> > I’ve see a couple of others had/have( ?) the same issue. It does not
> > matter from where I run the command (i.e., I’m getting the same error
> > message also from inside context\tex)
> >
> > Is there anything I should do to make this work?
> just wait till the next update because the module installer is work in 
> progress
> 
> -
>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
> ___
> 
___
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] module installer: unknown script 'install-modules.lua' or 'mtx-install-modules.lua'

2023-05-24 Thread Denis Maier via ntg-context
Hi,

I'm setting up a new computer, and I've wanted to benefit from the new module 
installer. However, the commands I should use gives me the following error 
message :

mtxrun --script install-modules --list

mtxrun | unknown script 'install-modules.lua' or 'mtx-install-modules.lua'

I'm using a fresh context installation (2023.05.08 17:39) on Windows. I've see 
a couple of others had/have( ?) the same issue. It does not matter from where I 
run the command (i.e., I'm getting the same error message also from inside 
context\tex)

Is there anything I should do to make this work?

Best,
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
___


Re: [NTG-context] Two columns of footnotes

2023-05-16 Thread Denis Maier via ntg-context
Technically it should be possible:
https://wiki.contextgarden.net/Footnotes
(see under footnote formatting).
However, the example is not particularly pretty and the explanatory text states 
there is a bug.

Don’t know if that is the current behavior or if this bug has been fixed.

Best,
Denis


Von: ntg-context  Im Auftrag von lynx--- via 
ntg-context
Gesendet: Dienstag, 16. Mai 2023 08:37
An: ntg-context@ntg.nl
Cc: l...@polarcom.com
Betreff: [NTG-context] Two columns of footnotes


I own a commercially published book that has makes effective use of footnotes 
that are arranged in two columns on each page. Does anybody know how this can 
be set up within ConTeXt?

MG
___
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] Help with typesetting footnotes in an HTML document

2023-04-12 Thread Denis Maier via ntg-context
Depending on how complex your files are, you might want to have a look at 
pandoc. It does a decent job when converting docx to other formats (HTML, 
Markdown or even ConTeXt).

Best & good luck
Denis

> -Ursprüngliche Nachricht-
> Von: Keith McKay 
> Gesendet: Mittwoch, 12. April 2023 12:22
> An: Maier, Denis Christian (UB) ; ntg-
> cont...@ntg.nl
> Betreff: Re: AW: AW: [NTG-context] Help with typesetting footnotes in an
> HTML document
> 
> Hi Denis,
> 
> Thanks for the code, I shall give this a try.
> 
> To get the html file I convert a docx file using a wordpress multisite app 
> called
> Pressbooks, a book content management system for book publishing in
> various formats such as the web, pdf, epub and various xml flavours (see
> pressbooks.com). My interest was that docx files could be imported into
> pressbooks, edited and then exported as html which I then used in ConTeXt
> to produce pdf. Pressbooks has an open source option and they give
> instructions on how to self-host on a local web server, which is what I have
> done (see pressbooks.org). It is, I suppose, like using a sledgehammer to
> crack a nut, and the html files produced are quite complicated. I'm still in 
> the
> experimental stage with it.
> 
> Before trying out Pressbooks, I had previously produced two
> books(novels) by converting docx files to epub using an epub extension to
> Libre Office, then edit/clean-up the epub using Sigil epub editor.
> Finally I extract the individual xhtml files and input into ConTeXt.
> That was much easier and the files much less complicated, however those
> books did not have footnotes so I shall have to check that out in Sigil.
> I'm still experimenting to get a simple workflow for the conversion of docx
> files to simple (x)html files.
> 
> Thanks again for the code.
> 
> Best Wishes
> 
> Keith
> 
> On 12/04/2023 09:05, denis.ma...@unibe.ch wrote:
> > Hey Keith,
> >
> > the code below should get you started. Obviously, the links in the
> footnotes don't appear as there are no setups for the  elements yet.
> >
> > By the way, where is the HTML coming from? The dual structure for
> footnotes looks a bit odd and a bit too complicated for me.
> >
> > ==
> > \startxmlsetups xml:initialize
> > \xmlsetsetup{\xmldocument}{*}{-}
> > \xmlsetsetup{\xmldocument}{html|body|p|}{xml:*}
> >
> > %\xmlsetsetup{#1}{span[@class="data-fnref"]}{xml:footnote} % data-
> fnref is not a class; also -> the element won't be seen if the parent span is
> not treated in some way.
> > \xmlsetsetup{#1}{span[@class="footnote"]}{xml:footnote-wrapper}
> > \xmlsetsetup{#1}{span[@class="footnote-indirect"]}{xml:footnote}
> > \xmlsetsetup{#1}{div[@class="footnotes"]}{xml:nothing}
> >
> > \stopxmlsetups
> > \xmlregistersetup{xml:initialize}
> >
> > \startxmlsetups xml:html
> > \xmlflush{#1}
> > \stopxmlsetups
> >
> > \startxmlsetups xml:body
> > \xmlflush{#1}
> > \stopxmlsetups
> >
> > \startxmlsetups xml:p
> > \xmlflush{#1}\par
> > \stopxmlsetups
> >
> > \startxmlsetups xml:footnote-wrapper
> > \xmlflush{#1}
> > \stopxmlsetups
> >
> > \startxmlsetups xml:footnote
> > \footnote
> > %
> > {\xmlfirst{test}{div[@class="footnotes"]/div/div[@id="\xmlatt{#1}{id}"
> > ]}} -> test is not the document name nor the name of the node to be
> > processed>; div/div nesting was wrong; for some reason I can't get it
> > to work with xmlfirst. But \xmlfilter works
> > {\xmlfilter{\xmldocument}{div[@id='\xmlrefatt{#1}{data-fnref}']/comman
> > d(xml:test)}}
> > \stopxmlsetups
> >
> > \startxmlsetups xml:test
> > \xmlflush{#1}
> > \stopxmlsetups
> >
> >
> > \starttext
> >
> > \xmlprocessfile{initialise}{footnoteTest.html}{}
> >
> > \stoptext
> >
> ==
> ===
> >
> >> -Ursprüngliche Nachricht-
> >> Von: Keith McKay 
> >> Gesendet: Dienstag, 11. April 2023 17:53
> >> An: Maier, Denis Christian (UB) ; ntg-
> >> cont...@ntg.nl
> >> Betreff: Re: AW: [NTG-context] Help with typesetting footnotes in an
> >> HTML document
> >>
> >> Fair comment Denis.
> >>
> >> I decided to try the lookup based approach on pages 85 - 86 of the
> >> xml manual and my setups are based on those pages. I have to admit
> >> that I find the xml manual a wee bit difficult in places since xml is 
> >> outside
> my expertise.
> >> I attach my tex and html files which should save some copy and pasting.
> >>
> >> Thanks
> >>
> >> Keith McKay
> >>
> >> On 11/04/2023 14:51, denis.ma...@unibe.ch wrote:
> >>> Hard to tell, if you don't show us what you've tried so far.
> >>> In one of my setups I use the lua based approach described on page
> 86/87.
> >> But again, we'll probably need more information to figure it out.
>  -Ursprüngliche Nachricht-
>  Von: ntg-context  Im Auftrag von Keith
>  McKay via ntg-context
>  Gesendet: Montag, 10. April 2023 17:30
>  An: mailing list for ConTeXt users 
>  Cc: Keith McKay 
>  Betreff: [NTG-context] Help with 

Re: [NTG-context] Help with typesetting footnotes in an HTML document

2023-04-12 Thread Denis Maier via ntg-context
Hey Keith,

the code below should get you started. Obviously, the links in the footnotes 
don't appear as there are no setups for the  elements yet.

By the way, where is the HTML coming from? The dual structure for footnotes 
looks a bit odd and a bit too complicated for me.

==
\startxmlsetups xml:initialize
\xmlsetsetup{\xmldocument}{*}{-}
\xmlsetsetup{\xmldocument}{html|body|p|}{xml:*}

%\xmlsetsetup{#1}{span[@class="data-fnref"]}{xml:footnote} % data-fnref is not 
a class; also -> the element won't be seen if the parent span is not treated in 
some way.
\xmlsetsetup{#1}{span[@class="footnote"]}{xml:footnote-wrapper}
\xmlsetsetup{#1}{span[@class="footnote-indirect"]}{xml:footnote}
\xmlsetsetup{#1}{div[@class="footnotes"]}{xml:nothing}

\stopxmlsetups
\xmlregistersetup{xml:initialize}

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

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

\startxmlsetups xml:p
\xmlflush{#1}\par
\stopxmlsetups

\startxmlsetups xml:footnote-wrapper
\xmlflush{#1}
\stopxmlsetups

\startxmlsetups xml:footnote
\footnote
% {\xmlfirst{test}{div[@class="footnotes"]/div/div[@id="\xmlatt{#1}{id}"]}} -> 
test is not the document name nor the name of the node to be processed>; 
div/div nesting was wrong; for some reason I can't get it to work with 
xmlfirst. But \xmlfilter works
{\xmlfilter{\xmldocument}{div[@id='\xmlrefatt{#1}{data-fnref}']/command(xml:test)}}
\stopxmlsetups

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


\starttext

\xmlprocessfile{initialise}{footnoteTest.html}{}

\stoptext
=

> -Ursprüngliche Nachricht-
> Von: Keith McKay 
> Gesendet: Dienstag, 11. April 2023 17:53
> An: Maier, Denis Christian (UB) ; ntg-
> cont...@ntg.nl
> Betreff: Re: AW: [NTG-context] Help with typesetting footnotes in an HTML
> document
> 
> Fair comment Denis.
> 
> I decided to try the lookup based approach on pages 85 - 86 of the xml
> manual and my setups are based on those pages. I have to admit that I find
> the xml manual a wee bit difficult in places since xml is outside my 
> expertise.
> I attach my tex and html files which should save some copy and pasting.
> 
> Thanks
> 
> Keith McKay
> 
> On 11/04/2023 14:51, denis.ma...@unibe.ch wrote:
> > Hard to tell, if you don't show us what you've tried so far.
> > In one of my setups I use the lua based approach described on page 86/87.
> But again, we'll probably need more information to figure it out.
> >
> >> -Ursprüngliche Nachricht-
> >> Von: ntg-context  Im Auftrag von Keith
> >> McKay via ntg-context
> >> Gesendet: Montag, 10. April 2023 17:30
> >> An: mailing list for ConTeXt users 
> >> Cc: Keith McKay 
> >> Betreff: [NTG-context] Help with typesetting footnotes in an HTML
> >> document
> >>
> >> Hi,
> >>
> >> I have been puzzling over how to typeset footnotes in a HTML
> >> document, most elements have been relatively easy to typeset but I'm
> >> stumped with footnotes.  I have been studying the the xml manual in
> >> particular Chapter  7.4 Cross Referencing, but I'm still struggling
> >> to get xmlsetups which come anywhere near working. Any hints  to a
> >> solution would be greatly appreciated.
> >>
> >> Best Wishes
> >>
> >> Keith McKay
> >>
> >> %%%
> >>
> >> Here is a snippet of the HTML document with footnotes
> >>
> >>   >> "-//W3C//DTD XHTML 1.1//EN"
> >>     "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd;>
> >> http://www.w3.org/1999/xhtml; xml:lang="en"> 
> >>     
> >> 
> >> 
> >>     ‘What is a weed? A plant whose virtues
> >> have not been discovered,’ wrote Ralph Waldo Emerson >> class="footnote"> >> data-fnref="53-1">. Those delicate crucifers with their
> >> manifold faces of four pink or lilac petals striated with veins of
> >> deeper lavender are the perfect introduction to flowers for children.
> >> So delicate and yet hardy.
> >>     I spend some of April abroad, travelling
> >> by road from an unseasonably snowy Austria (‘dieses Wetter ist
> >> verrückt!’ >> data-fnref="53-2"> as an elderly lady exclaimed to me)
> >> to northern France, and when I come home, it’s to a landscape
> >> responding to substantially increased light levels and temperatures.
> >>     This was the early sixties. Like many
> >> thousands, we were rehoused from Maryhill in the heart of urban
> >> Glasgow to this peripheral housing scheme which completely changed
> >> the character of what had been a village. Within a decade those
> >> glasshouses were abandoned, glass broken in the frames, and a row of
> >> shops that included a chippy and a betting shop soon replaced them,
> >> betting ‘off’ licensed race-tracks having become legal in 1961. >> class="footnote">
> >>     
> >>       
> >>       
> >>     Emerson, R.W. (1878) Fortune of the Republic, p.3
> >> quoted in Oxford Dictionary of Quotations, Rev Fourth
> Edition (1996).
> >>       
> >>       
> >>     ‘Crazy weather!’
> >>  

Re: [NTG-context] Help with typesetting footnotes in an HTML document

2023-04-11 Thread Denis Maier via ntg-context
Hard to tell, if you don't show us what you've tried so far.
In one of my setups I use the lua based approach described on page 86/87. But 
again, we'll probably need more information to figure it out.

> -Ursprüngliche Nachricht-
> Von: ntg-context  Im Auftrag von Keith
> McKay via ntg-context
> Gesendet: Montag, 10. April 2023 17:30
> An: mailing list for ConTeXt users 
> Cc: Keith McKay 
> Betreff: [NTG-context] Help with typesetting footnotes in an HTML
> document
> 
> Hi,
> 
> I have been puzzling over how to typeset footnotes in a HTML document,
> most elements have been relatively easy to typeset but I'm stumped with
> footnotes.  I have been studying the the xml manual in particular Chapter  7.4
> Cross Referencing, but I'm still struggling to get xmlsetups which come
> anywhere near working. Any hints  to a solution would be greatly
> appreciated.
> 
> Best Wishes
> 
> Keith McKay
> 
> %%%
> 
> Here is a snippet of the HTML document with footnotes
> 
> 
>     "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd;>
> http://www.w3.org/1999/xhtml; xml:lang="en"> 
>    
> 
> 
>    ‘What is a weed? A plant whose virtues have
> not been discovered,’ wrote Ralph Waldo Emerson class="footnote"> data-fnref="53-1">. Those delicate crucifers with their
> manifold faces of four pink or lilac petals striated with veins of deeper
> lavender are the perfect introduction to flowers for children. So delicate and
> yet hardy.
>    I spend some of April abroad, travelling by road
> from an unseasonably snowy Austria (‘dieses Wetter ist verrückt!’ class="footnote"> data-fnref="53-2"> as an elderly lady exclaimed to me) to
> northern France, and when I come home, it’s to a landscape responding to
> substantially increased light levels and temperatures.
>    This was the early sixties. Like many thousands,
> we were rehoused from Maryhill in the heart of urban Glasgow to this
> peripheral housing scheme which completely changed the character of what
> had been a village. Within a decade those glasshouses were abandoned,
> glass broken in the frames, and a row of shops that included a chippy and a
> betting shop soon replaced them, betting ‘off’ licensed race-tracks having
> become legal in 1961.
>    
>      
>      
>    Emerson, R.W. (1878) Fortune of the Republic, p.3 quoted in
> Oxford Dictionary of Quotations, Rev Fourth Edition (1996).
>      
>      
>    ‘Crazy weather!’
>      
>      
>     href="http://www.independent.co.uk/sport/racing/our-national-love-affair-
> a-history-of-the-betting-shop-804966.html"
> data-url="http://www.independent.co.uk/sport/racing/our-national-love-
> affair-a-history-of-the-betting-shop-804966.html"> class="import-Hyperlink">http://www.independent.co.uk/sport/racing/our-
> national-love-affair-a-history-of-the-betting-shop-804966.html
> [accessed 11 Dec 2017]
>      
>    
> 
> 
> 
> %%
> 
> __
> _
> 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] Bug with \startnarrow?

2023-03-03 Thread Denis Maier via ntg-context
> -Ursprüngliche Nachricht-
> Von: peter.hopcr...@icloud.com 
> Gesendet: Donnerstag, 23. Februar 2023 21:15
> An: mailing list for ConTeXt users 
> Cc: Maier, Denis Christian (UB) 
> Betreff: Re: [NTG-context] Bug with \startnarrow?
> 
> It's the documentation that has the bug. With \startnarrow, you need two
> sets of square brackets, 1 for the \setupnarrower data and 1 for the
> \startnarrower data. Like this:
> 
> \starttext
> Some text before
> \startnarrow[left=5cm,right=1cm,before={\blank[2*line]},after={\blank[halfli
> ne]}][left, right] narrower text \stopnarrow some text after \stoptext

Thanks, good to know. I'll update the documentation.

Best,
Denis
> 
> > On 23/02/2023, at 11:14 PM, Denis Maier via ntg-context  cont...@ntg.nl> wrote:
> >
> > Hi,
> >  While doing some more tests with my example from yesterday (tables in
> \startnarrow), I’ve realized that the example from the wiki doesn’t seem to
> quite work as expected:
> >  %%
> > \starttext
> > Some text before
> > \startnarrow[left=2cm,right=1cm,before={\blank[2*line]},after={\blank[
> > halfline]}]
> > narrower text
> > \stopnarrow
> > some text after
> > \stoptext
> > %%
> >  Already here, the extra margins on both sides seem to be equal. Changing
> the size of the left extra margin has no effect at all.
> >  %%
> > \starttext
> > \startnarrow[left=10cm,right=2cm]
> > \input ward
> > \stopnarrow
> >  but:
> >  \setupnarrower[left=5cm, right=2cm]
> > \startnarrower[left,right]
> > \input ward
> > \stopnarrower
> > \stoptext
> > %%
> >  Is this a bug or intended behaviour ?
> >  Best,
> > 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
> >
> 
> __
> > _
> 

___
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] Float control

2023-03-02 Thread Denis Maier via ntg-context
Thanks everyone for your responses. That's quite a bit to digest. I'll have a 
look, read and play around.
Thanks again and all the best,
Denis

> -Ursprüngliche Nachricht-
> Von: ntg-context  Im Auftrag von Alan
> Braslau via ntg-context
> Gesendet: Donnerstag, 2. März 2023 03:35
> An: Hans Hagen via ntg-context 
> Cc: Alan Braslau 
> Betreff: Re: [NTG-context] Float control
> 
> On Thu, 2 Mar 2023 00:12:53 +0100
> Hans Hagen via ntg-context  wrote:
> 
> > On 2/28/2023 11:45 AM, Denis Maier via ntg-context wrote:
> > > Hi everyone,
> > >
> > > I’ve recently had to typeset a document that gave me some headaches
> > > with the floats. The floats where jumping around, appearing in a
> > > different order than in the source file, tables ended up split up at
> > > weird points, some positioning keys had not the intended effect
> > > (e.g. top), «page» moved the float more than seemed necessary for
> > > me... I know, TeX’s float positioning algorithm should be rather
> > > reliable and stable, and it’s quite possible that I’m messing things
> > > up in my setups–especially since my source files are XML.
> > >
> > > Anyway, I’d like to learn more about the whole float issue. Is there
> > > anything particular I could read to learn more about the whole
> > > thing? Maybe I’m missing out on something fundamental...
> > Basically floats are output in order when they fit. You can use force
> > to really do that. When there is no room they will migrate. Some
> > options like top and bottom might also change the order. Normally you
> > start with just placing ('here') and see how that works out. Side
> > floats are special and anchored to the text.
> >
> > The more complex and confliuctign the demands, the harder it gets for
> > ConTeXt to fulfill all requirements. In that case shifting around the
> > text or places where you ask for a float helps. It's one of the areas
> > where 'fully automated and perfect' are complex as everything can
> > interfere.
> >
> > Btw, Mikael S is working on a tutorial that explains some neat
> > trickery with specific placements (which also triggered some
> > additional features).
> 
> A few (important) observations on floats:
> 
>   \startplacefloat
>   \stopplacefloat
> triggers a paragraph break.
> 
> I therefore locate them always at the beginning or at the end of a paragraph
> of text.
>   (A trick is to enclose them in a named buffer within a
>   paragraph, typically where a figure call -
>   \in{figure}[figureReference] - is to be located. Then to place
>   the \getbuffer at the beginning or end of a paragraph. See
>   example below.)
> 
> The keys location=top/bottom will place the float at the top or bottom of the
> page IF IT FITS, otherwise it is pushed to the following page.
> Thus, a bottom can become a top.
> 
> The key location=force will place the figure there, perhaps generating a page
> break if it does not fit.
> 
> The key location=page will put the figure on a following page. This situation
> can sometimes push figures to appear "out of order", if another figure can
> somehow fit before the figure pushed to the following page. This happens if
> another floating figure "comes too soon".
> 
> The keys location=left and location=right will also generate a page break if
> the figure does not fit.
> 
> In the end, one needs to tweak a document in final form especially if it
> contains many figures, unfortunately. This is done by moving the
> \startfigure...\stopfigure. Here, the use of buffers:
> 
> Paragraph text ...
> (see \in{figure}[myfigure]).
> \startbuffer[myfigure]
>   \startfigure[reference=myfigure,
>location=top,
>title=Title]
> \externalfigure[myfigure][width=\textwidth]
>   \stopfigure
> \stopbuffer
> More text ...\par
> \getbuffer[myfigure]
> 
> can make life easier, moving the \getbuffer[myfigure] to an optimal
> paragraph beginning or end.
> 
> Alan
> 
> P.S. It might be nice to be able to anchor a figure not to text but to a page
> location, like location=nexttop or location=nextbottom, or even
> location={nexttop,right} etc. This gets really complicated (but anything is 
> do-
> able).
> 
> P.P.S. I'm certain to learn some neat trickery from Mikael's tutorial!
> __
> _
> 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-
> co

Re: [NTG-context] Disappearing footnote in figure / tabulate

2023-03-02 Thread Denis Maier via ntg-context
Ok, I've somehow managed to isolate the issue in my real document. There, the 
issue happens only when a new paragraph starts after the tabulate. If there's 
nothing after the tabulate, the footnotes appears... Also, if I'm using 
location=page, the footnote will also appear. That's what I'm using now, so 
there's no urgency for me now. (But does that maybe already indicate the source 
of the issue ?)

Anyway, I still find the behaviour somewhat weird. I'll try to come up with a 
MWE. Any hints how to best proceed are still highly appreciated.

Best,
Denis

Von: ntg-context  Im Auftrag von Denis Maier via 
ntg-context
Gesendet: Donnerstag, 2. März 2023 09:21
An: ntg-context@ntg.nl
Cc: Maier, Denis Christian (UB) 
Betreff: [NTG-context] Disappearing footnote in figure / tabulate

Hi,

I have a strange case where a footnote in a tabulate disappears. Strangely, I 
*cannot* reproduce the behaviour in the MWE below. At first, I thought it must 
have something to do with \startpostponingnotes, but it seems that this 
currently isnt't necessary anymore, or at least only for extreme tables. Is 
that correct?

I'll try to narrow it down. Any hints how I could debug that issue?

As I'm again working with XML files: Is it possible that this behaviour is 
caused by some sort of nested setups which makes the footnotes not bubble up?

Best,
Denis

\startbuffer[test]


  

  
a2
b
  

  



  
a2
b
  


  

\stopbuffer

\startxmlsetups xml:test
\xmlsetsetup{\xmldocument}{document|table-wrap|table|figure|p|footnote}{xml:*}
\stopxmlsetups

\xmlregistersetup{xml:test}

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

\startxmlsetups xml:p
  \xmlflush{#1}\par
\stopxmlsetups

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

\startxmlsetups xml:figure
  \startplacefigure[title={Test},location={force,split}]
\xmlflush{#1}
  \stopplacefigure
\stopxmlsetups

\startxmlsetups xml:table-wrap
  \startpostponingnotes
\xmlflush{#1}
  \stoppostponingnotes
\stopxmlsetups

\startxmlsetups xml:table
  \startpostponingnotes
\starttabulate[|p|p|]
  \xmlfilter{#1}{/tr/command(xml:table:tr)}
\stoptabulate
  \stoppostponingnotes
\stopxmlsetups

\startxmlsetups xml:table:tr
\xmlfilter{#1}{/td/command(xml:table:tr:td)}\NC\NR
\stopxmlsetups

\startxmlsetups xml:table:tr:td
\NC \xmlflush{#1}
\stopxmlsetups


\starttext
\xmlprocessbuffer{test}{test}{}

\startplacetable
\starttabulate[|p|p|]
\NC a\footnote{3}\NC b\NC\NR
\stoptabulate
\stopplacetable


\startplacetable
\bTABLE
\bTR \bTD One\footnote{4} \eTD \bTD two \eTD \eTR
\bTR \bTD One \eTD \bTD two \eTD \eTR
\eTABLE
\stopplacetable


% \startpostponingnotes
\startplacetable
\startxtable
\startxrow
\startxcell a\footnote{5}\stopxcell
\startxcell b\footnote{6}\stopxcell
\stopxrow
\stopxtable
\stopplacetable
% \stoppostponingnotes

\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] Disappearing footnote in figure / tabulate

2023-03-02 Thread Denis Maier via ntg-context
Hi,

I have a strange case where a footnote in a tabulate disappears. Strangely, I 
*cannot* reproduce the behaviour in the MWE below. At first, I thought it must 
have something to do with \startpostponingnotes, but it seems that this 
currently isnt't necessary anymore, or at least only for extreme tables. Is 
that correct?

I'll try to narrow it down. Any hints how I could debug that issue?

As I'm again working with XML files: Is it possible that this behaviour is 
caused by some sort of nested setups which makes the footnotes not bubble up?

Best,
Denis

\startbuffer[test]


  

  
a2
b
  

  



  
a2
b
  


  

\stopbuffer

\startxmlsetups xml:test
\xmlsetsetup{\xmldocument}{document|table-wrap|table|figure|p|footnote}{xml:*}
\stopxmlsetups

\xmlregistersetup{xml:test}

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

\startxmlsetups xml:p
  \xmlflush{#1}\par
\stopxmlsetups

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

\startxmlsetups xml:figure
  \startplacefigure[title={Test},location={force,split}]
\xmlflush{#1}
  \stopplacefigure
\stopxmlsetups

\startxmlsetups xml:table-wrap
  \startpostponingnotes
\xmlflush{#1}
  \stoppostponingnotes
\stopxmlsetups

\startxmlsetups xml:table
  \startpostponingnotes
\starttabulate[|p|p|]
  \xmlfilter{#1}{/tr/command(xml:table:tr)}
\stoptabulate
  \stoppostponingnotes
\stopxmlsetups

\startxmlsetups xml:table:tr
\xmlfilter{#1}{/td/command(xml:table:tr:td)}\NC\NR
\stopxmlsetups

\startxmlsetups xml:table:tr:td
\NC \xmlflush{#1}
\stopxmlsetups


\starttext
\xmlprocessbuffer{test}{test}{}

\startplacetable
\starttabulate[|p|p|]
\NC a\footnote{3}\NC b\NC\NR
\stoptabulate
\stopplacetable


\startplacetable
\bTABLE
\bTR \bTD One\footnote{4} \eTD \bTD two \eTD \eTR
\bTR \bTD One \eTD \bTD two \eTD \eTR
\eTABLE
\stopplacetable


% \startpostponingnotes
\startplacetable
\startxtable
\startxrow
\startxcell a\footnote{5}\stopxcell
\startxcell b\footnote{6}\stopxcell
\stopxrow
\stopxtable
\stopplacetable
% \stoppostponingnotes

\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] Float control

2023-02-28 Thread Denis Maier via ntg-context
Hi everyone,

I've recently had to typeset a document that gave me some headaches with the 
floats. The floats where jumping around, appearing in a different order than in 
the source file, tables ended up split up at weird points, some positioning 
keys had not the intended effect (e.g. top),  moved the float more than 
seemed necessary for me... I know, TeX's float positioning algorithm should be 
rather reliable and stable, and it's quite possible that I'm messing things up 
in my setups-especially since my source files are XML.

Anyway, I'd like to learn more about the whole float issue. Is there anything 
particular I could read to learn more about the whole thing? Maybe I'm missing 
out on something fundamental...

Best,
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
___


Re: [NTG-context] \setupparagraphs - can they run over two pages?

2023-02-27 Thread Denis Maier via ntg-context
No, I don’t think that’s possible, at least it wasn’t last time I’ve checked : 
https://www.mail-archive.com/ntg-context@ntg.nl/msg102871.html

Best,
Denis

Von: ntg-context  Im Auftrag von jbf via ntg-context
Gesendet: Freitag, 24. Februar 2023 06:42
An: mailing list for ConTeXt users 
Cc: jbf 
Betreff: [NTG-context] \setupparagraphs - can they run over two pages?


I have the following setup for side-by-side paras.
\defineparagraphs[Two][n=2]

\setupparagraphs[Two][1][width=.1\textwidth,style=\bfx,align=tolerant]

\setupparagraphs[Two][2][width=.9\textwidth,style=normal,align=tolerant]

My difficulty is that while there is only ever just a couple of numbers in the 
left-hand 'column', the right-hand 'column' may have several lengthy 
paragraphs. If I have one relatively short \startTwo followed by one that is 
much longer, it will be forced to start on the next page, leaving too much 
empty space on the previous page.

It is probable that getting this environment to split across pages is not 
possible. I can try very different approaches (columns, tables) to solve my 
problem, but I thought I would at least ask first.

Julian
___
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] Bug with \startnarrow?

2023-02-23 Thread Denis Maier via ntg-context
Hi,

While doing some more tests with my example from yesterday (tables in 
\startnarrow), I've realized that the example from the wiki doesn't seem to 
quite work as expected:

%%
\starttext
Some text before
\startnarrow[left=2cm,right=1cm,before={\blank[2*line]},after={\blank[halfline]}]
narrower text
\stopnarrow
some text after
\stoptext
%%

Already here, the extra margins on both sides seem to be equal. Changing the 
size of the left extra margin has no effect at all.

%%
\starttext
\startnarrow[left=10cm,right=2cm]
\input ward
\stopnarrow

but:

\setupnarrower[left=5cm, right=2cm]
\startnarrower[left,right]
\input ward
\stopnarrower
\stoptext
%%

Is this a bug or intended behaviour ?

Best,
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
___


[NTG-context] Spacing between headings

2023-02-23 Thread Denis Maier via ntg-context
Hi,

I want to make the spacing before headings conditional. Like, apply the spacing 
if the a heading follows some text, but not if it immediately follows a 
previous heading. This has been requested before : 
https://www.mail-archive.com/ntg-context@ntg.nl/msg63950.html

Does there exist a way now, to achieve this?

Best,
Denis

\setuphead
[section, subsection]
[number=yes]

\setuphead
[section]
[before={\blank[2*big]},
after={\blank[big]}]

\setuphead
[subsection]
[before={\blank[2*big]},
after={\blank[big]}]

\starttext

\section{A}
\input knuth

\subsection{B} % regular spacing here
\input knuth

\section{C}
\subsection{D} % less spacing here
\input knuth

\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] \startnarrow seems to have no effect for tabulate

2023-02-22 Thread Denis Maier via ntg-context
Hi,

I need to have a table set with tabulate centered and a bit narrower. But it 
seems that \startnarrow has no effect on the tabulate. Am I missing something ? 
Is there a better way to achieve the same thing?

Best,
Denis

\starttext

\showframe
\startplacefigure[location=force,number=no]
\startnarrow[left=5cm,right=5cm]
\starttabulate
[|p|p|]
\NC Das ist ein Text
\NC Das ist noch ein Text
\NC\NR
\NC Das ist ein Text
\NC Das ist noch ein Text
\NC\NR
\NC Das ist ein Text
\NC Das ist noch ein Text
\NC\NR
\stoptabulate
\stopnarrow
\stopplacefigure


\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] \xmlmap errors when returning key-value

2023-02-22 Thread Denis Maier via ntg-context
I maybe should have mentioned the error message I'm getting:

error in line 9, namespace '1CB>:', key 'align=lefttoright,'

Maybe that's helpful for tracking this down...

Best,
Denis

> -Ursprüngliche Nachricht-
> Von: ntg-context  Im Auftrag von Denis Maier
> via ntg-context
> Gesendet: Montag, 20. Februar 2023 15:32
> An: ntg-context@ntg.nl
> Cc: Maier, Denis Christian (UB) 
> Betreff: [NTG-context] \xmlmap errors when returning key-value
> 
> > -Ursprüngliche Nachricht-
> > Von: ntg-context  Im Auftrag von Hans
> > Hagen via ntg-context
> > Gesendet: Donnerstag, 16. Februar 2023 23:45
> > An: Denis Maier via ntg-context 
> > Cc: Hans Hagen 
> > Betreff: Re: [NTG-context] Unexpected results with \xmlpos
> >
> > On 2/16/2023 10:16 AM, Denis Maier via ntg-context wrote:
> > > Hi,
> > >
> > > I’m getting unexpected results for \xmlpos
> > >
> > > With the example below, I was expecting to get the following positions:
> > >
> > > 1 2 3 4
> > >
> > > However the result is: 2 4 6 8, i.e. each time it’s exactly the double.
> > >
> > > What am I missing?
> >
> > that there are spaces between elements .. you can try:
> >
> > \xmlmatch {#1}
> >
> > instead
> >
> > Hans
> 
> Thanks, that does the trick.
> 
> However, now I get an error when I try to return a key-value setting via
> xmlmap, see below. Any hints why this does not work
> 
> \xmlmapvalue{colgroupalign}{dir: rtl}{align=righttoleft}
> \xmlmapvalue{colgroupalign}{dir: ltr}{align=lefttoright}
> 
> as opposed to:
> 
> \xmlmapvalue{colgroupalignvar}{dir: rtl}{righttoleft}
> \xmlmapvalue{colgroupalignvar}{dir: ltr}{lefttoright}
> 
> ?
> 
> Best,
> Denis
> 
> \startbuffer[test]
> 
> 
> 
>   
>  
> 
> 
> 
> 
>  
>  
> 
>asdf
>bsdf
>csdf
>dsdf
> 
>  
>  
> 
>a
>b
>c
>d
> 
>  
>   
> 
> 
> \stopbuffer
> 
> \startxmlsetups xml:test
> \xmlsetsetup{\xmldocument}{document}{xml:*}
> \xmlsetsetup{#1}{table-wrap}{xml:table-wrap}
> \xmlsetsetup{#1}{table}{xml:table}
> \stopxmlsetups
> 
> \xmlregistersetup{xml:test}
> 
> \xmlmapvalue{colgroupalign}{dir: rtl}{align=righttoleft}
> \xmlmapvalue{colgroupalign}{dir: ltr}{align=lefttoright}
> 
> \xmlmapvalue{colgroupalignvar}{dir: rtl}{righttoleft}
> \xmlmapvalue{colgroupalignvar}{dir: ltr}{lefttoright}
> 
> \startxmlsetups xml:table:colgroup
>   \xmlfilter {#1} {/col/command(xml:table:colgroup:col)} % gives errors
>   %\xmlfilter {#1} {/col/command(xml:table:colgroup:colvar)} % works
> \stopxmlsetups
> 
> \startxmlsetups xml:table:colgroup:colvar
>   \setupTABLE[c][\xmlmatch
> {#1}][align=\xmlvalue{colgroupalignvar}{\xmlatt{#1}{style}}{lefttoright}]
> \stopxmlsetups
> 
> \startxmlsetups xml:table:colgroup:col
>   \setupTABLE[c][\xmlmatch
> {#1}][\xmlvalue{colgroupalign}{\xmlatt{#1}{style}}{align=lefttoright}]
> \stopxmlsetups
> 
> \startxmlsetups xml:document
>   \xmlflush{#1}
> \stopxmlsetups
> 
> \startxmlsetups xml:table-wrap
>   \startplacetable
>   \xmlflush{#1}
> \stopplacetable
> \stopxmlsetups
> 
> \startxmlsetups xml:table
>   \xmlfilter {#1} {/colgroup/command(xml:table:colgroup)}
>   \bTABLE
>   \xmlfilter{#1}{/thead/command(xml:table:thead)}
>   \xmlfilter{#1}{/tbody/command(xml:table:tbody)}
>   \eTABLE
> \stopxmlsetups
> 
> \startxmlsetups xml:table:thead
>   \bTABLEhead
>   \xmlfilter{#1}{/tr/command(xml:table:thead:tr)}
>   \eTABLEhead
> \stopxmlsetups
> 
> \startxmlsetups xml:table:thead:tr
>   \bTR
>   \xmlfilter{#1}{/th/command(xml:table:thead:tr:th)}
>   \eTR
> \stopxmlsetups
> 
> \startxmlsetups xml:table:thead:tr:th
>   \bTH
>   \xmlflush{#1}
>   \eTH
> \stopxmlsetups
> 
> \startxmlsetups xml:table:tbody
> \bTABLEbody\xmlfilter{#1}{/tr/command(xml:table:tbody:tr)}\eTABLEbody
> \stopxmlsetups
> 
> \startxmlsetups xml:table:tbody:tr
> \bTR\xmlfilter{#1}{/td/command(xml:table:tbody:tr:td)}\eTR
> \stopxm

[NTG-context] \xmlmap errors when returning key-value

2023-02-20 Thread Denis Maier via ntg-context
> -Ursprüngliche Nachricht-
> Von: ntg-context  Im Auftrag von Hans Hagen
> via ntg-context
> Gesendet: Donnerstag, 16. Februar 2023 23:45
> An: Denis Maier via ntg-context 
> Cc: Hans Hagen 
> Betreff: Re: [NTG-context] Unexpected results with \xmlpos
> 
> On 2/16/2023 10:16 AM, Denis Maier via ntg-context wrote:
> > Hi,
> >
> > I’m getting unexpected results for \xmlpos
> >
> > With the example below, I was expecting to get the following positions:
> >
> > 1 2 3 4
> >
> > However the result is: 2 4 6 8, i.e. each time it’s exactly the double.
> >
> > What am I missing?
> 
> that there are spaces between elements .. you can try:
> 
> \xmlmatch {#1}
> 
> instead
> 
> Hans

Thanks, that does the trick.

However, now I get an error when I try to return a key-value setting via 
xmlmap, see below. Any hints why this does not work

\xmlmapvalue{colgroupalign}{dir: rtl}{align=righttoleft}
\xmlmapvalue{colgroupalign}{dir: ltr}{align=lefttoright}

as opposed to:

\xmlmapvalue{colgroupalignvar}{dir: rtl}{righttoleft}
\xmlmapvalue{colgroupalignvar}{dir: ltr}{lefttoright}

?

Best,
Denis

\startbuffer[test]




   
  
  
  
  
   
   
  
 asdf
 bsdf
 csdf
 dsdf
  
   
   
  
 a
 b
 c
 d
  
   



\stopbuffer

\startxmlsetups xml:test
\xmlsetsetup{\xmldocument}{document}{xml:*}
\xmlsetsetup{#1}{table-wrap}{xml:table-wrap}
\xmlsetsetup{#1}{table}{xml:table}
\stopxmlsetups

\xmlregistersetup{xml:test}

\xmlmapvalue{colgroupalign}{dir: rtl}{align=righttoleft}
\xmlmapvalue{colgroupalign}{dir: ltr}{align=lefttoright}

\xmlmapvalue{colgroupalignvar}{dir: rtl}{righttoleft}
\xmlmapvalue{colgroupalignvar}{dir: ltr}{lefttoright}

\startxmlsetups xml:table:colgroup
\xmlfilter {#1} {/col/command(xml:table:colgroup:col)} % gives errors
%\xmlfilter {#1} {/col/command(xml:table:colgroup:colvar)} % works
\stopxmlsetups

\startxmlsetups xml:table:colgroup:colvar
  \setupTABLE[c][\xmlmatch 
{#1}][align=\xmlvalue{colgroupalignvar}{\xmlatt{#1}{style}}{lefttoright}]
\stopxmlsetups

\startxmlsetups xml:table:colgroup:col
  \setupTABLE[c][\xmlmatch 
{#1}][\xmlvalue{colgroupalign}{\xmlatt{#1}{style}}{align=lefttoright}]
\stopxmlsetups

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

\startxmlsetups xml:table-wrap
\startplacetable
\xmlflush{#1}
\stopplacetable
\stopxmlsetups

\startxmlsetups xml:table
  \xmlfilter {#1} {/colgroup/command(xml:table:colgroup)}
  \bTABLE
\xmlfilter{#1}{/thead/command(xml:table:thead)}
\xmlfilter{#1}{/tbody/command(xml:table:tbody)}
  \eTABLE
\stopxmlsetups

\startxmlsetups xml:table:thead
\bTABLEhead
\xmlfilter{#1}{/tr/command(xml:table:thead:tr)}
\eTABLEhead
\stopxmlsetups

\startxmlsetups xml:table:thead:tr
\bTR
\xmlfilter{#1}{/th/command(xml:table:thead:tr:th)}
\eTR
\stopxmlsetups

\startxmlsetups xml:table:thead:tr:th
\bTH
\xmlflush{#1}
\eTH
\stopxmlsetups

\startxmlsetups xml:table:tbody 
\bTABLEbody\xmlfilter{#1}{/tr/command(xml:table:tbody:tr)}\eTABLEbody
\stopxmlsetups

\startxmlsetups xml:table:tbody:tr
\bTR\xmlfilter{#1}{/td/command(xml:table:tbody:tr:td)}\eTR
\stopxmlsetups

\startxmlsetups xml:table:tbody:tr:td
\bTC \xmlflush{#1} \eTC 
\stopxmlsetups


\starttext
  \xmlprocessbuffer{test}{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
___


[NTG-context] Unexpected results with \xmlpos

2023-02-16 Thread Denis Maier via ntg-context
Hi,

I'm getting unexpected results for \xmlpos
With the example below, I was expecting to get the following positions:
1 2 3 4
However the result is: 2 4 6 8, i.e. each time it's exactly the double.

What am I missing?

Background: I need to define column alignment based on the value of the  
element inside the colgroup, so I was thinking about something like this :

\xmlmapvalue{colstyle}{dir: rtl}{align=righttolef }
\xmlmapvalue{colstyle}{dir: ltr}{align=lefttoright}

\startxmlsetups xml:table:colgroup:col
  \setupTABLE[c][\xmlpos{#1}][\xmlvalue{colstyle}{\xmlatt{#1}{style}}{}]
\stopxmlsetups

Best,
Denis

\startbuffer[test]




   
 
 
 
 
   
   
 
   a
   b
   c
   d
 
   
   
 
   a
   b
   c
   d
 
   



\stopbuffer

\startxmlsetups xml:test
\xmlsetsetup{\xmldocument}{document}{xml:*}
\xmlsetsetup{#1}{table-wrap}{xml:table-wrap}
\xmlsetsetup{#1}{table}{xml:table}
\stopxmlsetups

\xmlregistersetup{xml:test}

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

\startxmlsetups xml:table-wrap
\startplacetable
\xmlflush{#1}
\stopplacetable
\stopxmlsetups

\startxmlsetups xml:table:colgroup
%\xmlvalue{colstyle}{\xmlatt{#1}{style}}{}
\xmlfilter {#1} {/col/command(xml:table:colgroup:col)}
\stopxmlsetups

\startxmlsetups xml:table:colgroup:col
%\xmlvalue{colstyle}{\xmlatt{#1}{style}}{}
\xmlpos {#1}
\stopxmlsetups

\startxmlsetups xml:table
  \xmlfilter {#1} {/colgroup/command(xml:table:colgroup)}
  \bTABLE
\xmlfilter{#1}{/thead/command(xml:table:thead)}
\xmlfilter{#1}{/tbody/command(xml:table:tbody)}
  \eTABLE
\stopxmlsetups

\startxmlsetups xml:table:thead
\bTABLEhead
   \xmlfilter{#1}{/tr/command(xml:table:thead:tr)}
\eTABLEhead
\stopxmlsetups

\startxmlsetups xml:table:thead:tr
\bTR
   
\xmlfilter{#1}{/th/command(xml:table:thead:tr:th)}
\eTR
\stopxmlsetups

\startxmlsetups xml:table:thead:tr:th
\bTH
   \xmlflush{#1}
\eTH
\stopxmlsetups

\startxmlsetups xml:table:tbody
\bTABLEbody\xmlfilter{#1}{/tr/command(xml:table:tbody:tr)}\eTABLEbody
\stopxmlsetups

\startxmlsetups xml:table:tbody:tr
\bTR\xmlfilter{#1}{/td/command(xml:table:tbody:tr:td)}\eTR
\stopxmlsetups

\startxmlsetups xml:table:tbody:tr:td
\bTC \xmlflush{#1} \eTC
\stopxmlsetups


\starttext
  \xmlprocessbuffer{test}{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] Structure: multi-volume products

2022-12-16 Thread Denis Maier via ntg-context
Oh, that's bad. Because apparently it never came through : 
https://www.mail-archive.com/ntg-context@ntg.nl/msg103661.html



(Maybe the two mentioned files are to large?)







> -Ursprüngliche Nachricht-

> Von: Alan Braslau 

> Gesendet: Freitag, 16. Dezember 2022 15:02

> An: Maier, Denis Christian (UB) 

> Cc: ntg-context@ntg.nl

> Betreff: Re: [NTG-context] Structure: multi-volume products

>

> On Fri, 16 Dec 2022 13:59:20 +

> mailto:denis.ma...@unibe.ch>> wrote:

>

> > What was his approach? Did he probably send it off-list?

> >

> It was sent on the list:

>

> To: ntg-context@ntg.nl

> Subject: Re: [NTG-context] Structure: multi-volume products

> Date: Fri, 16 Dec 2022 22:31:59 +1300

>

> Alan
___
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] Structure: multi-volume products

2022-12-16 Thread Denis Maier via ntg-context
What was his approach? Did he probably send it off-list?

> -Ursprüngliche Nachricht-
> Von: Alan Braslau 
> Gesendet: Freitag, 16. Dezember 2022 14:58
> An: Maier, Denis Christian (UB) 
> Cc: ntg-context@ntg.nl
> Betreff: Re: [NTG-context] Structure: multi-volume products
> 
> On Fri, 16 Dec 2022 09:08:47 +
>  wrote:
> 
> > Last time I had to do something like this I've kept both books in one
> > master file (actually one master file for part 1, one for part 2, one
> > for both together). With that I could easiliy have a table of contents
> > for both volumes.
> 
> Thank you. This was my initial approach, although I know that ConTeXt can do
> better!
> 
> I will look into the suggestion sent by Richard Mahoney, as it looks like a 
> good
> solution to the problem.
> 
> Alan
> 
> --
> Alan Braslau
> 816 West Mountain Avenue
> Fort Collins, CO 80521 USA
> mobile: (970) 237-0957
> 
> Conserve energy! ;-)
___
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] Project structure with nested subfolders and shared environments.

2022-12-16 Thread Denis Maier via ntg-context
Another think you might want to consider: automatic local overrides. So, I’d 
copy everthing to a build folder, copy the environment from somewhere above 
unless the current folder contains a file with the same name.

Denis

Von: ntg-context  Im Auftrag von Pawel Urbanski via 
ntg-context
Gesendet: Freitag, 16. Dezember 2022 11:01
An: mailing list for ConTeXt users 
Cc: Pawel Urbanski 
Betreff: Re: [NTG-context] Project structure with nested subfolders and shared 
environments.

Thank you for responses. While the ability to sort of inherit setups would be 
very useful it looks like as of time of posting this message in December 2022 
it is not possible.
As a workaround I will create a shead environment file and just bulk copy it to 
subfolders. In case when I'll need to globally change some configuration I can 
just replace the file.
I keep all my documents in GIT so the ability to reverte hte change is just a 
command away.

Thanks for help.

Best,
Pawel

On Fri, Dec 16, 2022 at 10:55 AM Henning Hraban Ramm via ntg-context 
mailto:ntg-context@ntg.nl>> wrote:
Am 16.12.22 um 10:09 schrieb Pawel Urbanski via ntg-context:
> When I compile a document I switch to the SubSubFolder for the document
> file is in there.

In my experience this won’t work. ConTeXt searches from the current
folder (you can configure search paths, but I gave up on that, and you’d
have to do it in the called file).

It should be enough to call the environment from the project, but either
the project or the environment isn’t found if the path doesn’t fit the
call location.

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
___
___
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] Project structure with nested subfolders and shared environments.

2022-12-16 Thread Denis Maier via ntg-context
Also, I think you'll need to load the environment in your products as well. I 
don't think linking to the project is enough. (Check the mailing list, I have 
also asked similar questions already...)

Best,
Denis

> -Ursprüngliche Nachricht-
> Von: ntg-context  Im Auftrag von Henning
> Hraban Ramm via ntg-context
> Gesendet: Freitag, 16. Dezember 2022 07:52
> An: Pawel Urbanski via ntg-context 
> Cc: Henning Hraban Ramm 
> Betreff: Re: [NTG-context] Project structure with nested subfolders and
> shared environments.
> 
> Am 15.12.22 um 22:52 schrieb Pawel Urbanski via ntg-context:
> > \usepath [{ Metadata }]
> 
> Did you try without the spaces? I’d assume ConTeXt will look for a folder "
> Metadata " and not "Metadata".
> If this is just a template variable, you didn’t tell us about templating.
> 
> And then it matters from where you call your files (MainFolder, SubFolder or
> whereever).
> 
> 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
> 
> ___
___
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] Structure: multi-volume products

2022-12-16 Thread Denis Maier via ntg-context
Last time I had to do something like this I've kept both books in one master 
file (actually one master file for part 1, one for part 2, one for both 
together). With that I could easiliy have a table of contents for both volumes.

I've made some experiments with writing stuff to the logs or tuc file 
(\writestatus{SPLITPOINT}{\the\realpageno}) at the end of part 1, which I then 
wanted to process with a script (e.g., read the page number, use pdftk to split 
the complete PDF at this point to get PDFs for the individual volumes). 
However, at the end I've just had to send the PDF containing both volumes to 
the publisher as they performed the splitting up themselves.

Best,
Denis

> -Ursprüngliche Nachricht-
> Von: ntg-context  Im Auftrag von Alan Braslau
> via ntg-context
> Gesendet: Freitag, 16. Dezember 2022 04:24
> An: mailing list for ConTeXt users 
> Cc: Alan Braslau 
> Betreff: [NTG-context] Structure: multi-volume products
> 
> Hello,
> 
> I have a book project that is being cut into two volumes (because it is too
> long and will be sold as a boxed set).
> 
> Each volume is presently a separate *product* in the project structure.
> I presently set the counters in the second volume using:
> 
> \setupheadnumber
>   [part] [2]
> 
> \setupheadnumber
>   [chapter] [5]
> 
> (I have multiple [5] parts in the project, and the first volume ends with 
> part 2
> and chapter 5.)
> 
> 
> 1) Is this the right way to be handling this?
> 
> 2) Any suggestions on how I can put a Table of Contents for the first volume
> in the second volume?
> 
> Thanks!
> 
> Alan
> 
> ___
> 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] How to display the pages of a particular section in another PDF?

2022-12-05 Thread Denis Maier via ntg-context
Don’t know about ConTeXt. But maybe you might want to have a look at pdftk. You 
could try to produce per-section pdfs and include those.

Best,
Denis

Von: ntg-context  Im Auftrag von Joel via 
ntg-context
Gesendet: Sonntag, 4. Dezember 2022 23:31
An: Mailing List for ConTeXt Users 
Cc: Joel 
Betreff: [NTG-context] How to display the pages of a particular section in 
another PDF?

I can use this code to display page 5 from a PDF:

\externalfigure[filename.pdf][page=5]
I am making a teacher's guide for a workbook (workbook.pdf). I need to be able 
to display on the page all pages of a particular section.

The teacher's guide uses the same section titles as the workbook, e.g.:

17-A: Title
17-B: Title

In other words, there is 1:1 pairing of section titles in the teacher's guide 
and the workbook.

Is there any way to tell ConTeXt to display all of the pages for a particular 
section?


\externalfigure[filename.pdf][section=17A]

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


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

2022-11-15 Thread Denis Maier via ntg-context
Hi,

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

%%%
\startbuffer[test]


a paragraph of text
another paragraph of text

\stopbuffer

\startxmlsetups xml:demo
\xmlsetsetup{\xmldocument}{document|p}{xml:*}
\stopxmlsetups

\xmlregistersetup{xml:demo}

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

\startxmlsetups xml:p
  \xmlflush{#1}\endgraf
\stopxmlsetups

\starttext
  \xmlprocessbuffer{test}{test}{}
\stoptext
%%%

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

%%% text.xml


a paragraph of text
another paragraph of text

%%%

%%% setups.tex
\startxmlsetups xml:demo
\xmlsetsetup{\xmldocument}{document|p}{xml:*}
\stopxmlsetups

\xmlregistersetup{xml:demo}

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

\startxmlsetups xml:p
  \xmlflush{#1}\endgraf
\stopxmlsetups
%%%

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?

Best,
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
___


[NTG-context] \xmldocument vs #1 in \xmlsetsetup

2022-11-14 Thread Denis Maier via ntg-context
Hi,
most examples in the mkiv-xml manual use #1 with \xmlsetsetup, e.g.

\startxmlsetups xml:demo:base
  \xmlsetsetup{#1}{document|section|p}{xml:demo:*}
\stopxmlsetups

However, in quite a few occasions I've noticed the usage of \xmldocument 
instead of #1.

What exactly is the difference ?

When should you prefer one over the other?

Best,
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
___


Re: [NTG-context] New VSCode extenstion using ConTeXt Language server

2022-11-09 Thread Denis Maier via ntg-context
Thanks. I’ve had a quick look.
One thing I’ve found is that it supports \start... commands, yet in some cases 
the corresponding \stop... commands seem to be missing.
[cid:image001.png@01D8F440.4954AD00]

Am I missing something ?

Best,
Denis

Von: ntg-context  Im Auftrag von Ramkumar KB via 
ntg-context
Gesendet: Dienstag, 8. November 2022 15:20
An: mailing list for ConTeXt users 
Cc: Ramkumar KB 
Betreff: [NTG-context] New VSCode extenstion using ConTeXt Language server

Hello All,

I have published the new VSCode Extension for ConTeXt, that I presented during 
the 2022 ConTeXt meeting -

https://wiki.contextgarden.net/VSCode

You can install it manually in the VSCode (using the "Install from VSIX..." 
option).
Documentation (for now) - 
https://meeting.contextgarden.net/2022/talks/ramkumar/ramkumar-talk.pdf

This supports ConTeXt markup and for any Lua code (within \startluacode & 
\stopluacode) it re-directs to the Lua Language Server (from Sumneko - 
https://github.com/sumneko/lua-language-server )

To Do -

  1.  Make the source code open-source
  2.  Add new features (like Hover & Tooltip)
  3.  Work with Taco to add MetaPost Language Server (this could be challenging 
and interesting)
Do give this a try and give your feedback. Note that this does not contain 
*all* the macros but covers the vast majority of the ConTeXt commands.

Thank you,

best regards
Ramkumar

___
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] Suboptimal German hyphenation

2022-10-31 Thread Denis Maier via ntg-context
> -Ursprüngliche Nachricht-
> Von: ntg-context  Im Auftrag von Pablo
> Rodriguez via ntg-context
> Gesendet: Mittwoch, 19. Oktober 2022 20:02
> An: Leah Neukirchen via ntg-context 
> Cc: Pablo Rodriguez 
> Betreff: Re: [NTG-context] Suboptimal German hyphenation
> 
> Hans added hyphenmin some time ago:
> 
>   \setuplanguage[de][lefthyphenmin=2, righthyphenmin=3, hyphenmin=6]
>   \setuplanguage[deo][lefthyphenmin=2, righthyphenmin=3, hyphenmin=5]
>   \mainlanguage[de]
>   \starttext
>   \startTEXpage[offset=1em]
>   \hyphenatedword{davon}
>   \deo\hyphenatedword{davon}
>   \stopTEXpage
>   \stoptext
> 
> It is technically on the wiki, but it lacks proper “wikification”.

I just wanted to add it to the hyphenation page on the wiki, but I've seen that 
you have just added it a couple of days ago. Thanks!

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
___


Re: [NTG-context] \quotation, protrusion and linebreaking

2022-10-12 Thread Denis Maier via ntg-context
> -Ursprüngliche Nachricht-
> Von: ntg-context  Im Auftrag von Hans Hagen
> via ntg-context
> Gesendet: Mittwoch, 12. Oktober 2022 21:12
> An: Denis Maier via ntg-context 
> Cc: Hans Hagen 
> Betreff: Re: [NTG-context] \quotation, protrusion and linebreaking
> 
> On 10/12/2022 8:49 PM, Denis Maier via ntg-context wrote:
> >> -Ursprüngliche Nachricht-
> >> Von: ntg-context  Im Auftrag von Henning
> >> Hraban Ramm via ntg-context
> >> Gesendet: Mittwoch, 12. Oktober 2022 10:15
> >> An: ntg-context@ntg.nl
> >> Cc: Henning Hraban Ramm 
> >> Betreff: Re: [NTG-context] \quotation, protrusion and linebreaking
> >>
> >> Am 11.10.22 um 21:06 schrieb Leah Neukirchen:
> >>> Henning Hraban Ramm via ntg-context  writes:
> >>>> \setupdelimitedtext[quotation][method=font]
> >>>
> >
> > Just a quick request for clarification: What does that actually do?
> uses glyph in font instead (most opentype have them)

Instead of what?
___
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] \quotation, protrusion and linebreaking

2022-10-12 Thread Denis Maier via ntg-context
> -Ursprüngliche Nachricht-
> Von: ntg-context  Im Auftrag von Henning
> Hraban Ramm via ntg-context
> Gesendet: Mittwoch, 12. Oktober 2022 10:15
> An: ntg-context@ntg.nl
> Cc: Henning Hraban Ramm 
> Betreff: Re: [NTG-context] \quotation, protrusion and linebreaking
> 
> Am 11.10.22 um 21:06 schrieb Leah Neukirchen:
> > Henning Hraban Ramm via ntg-context  writes:
> >> \setupdelimitedtext[quotation][method=font]
> >

Just a quick request for clarification: What does that actually do?

Best,
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
___


Re: [NTG-context] meeting not online

2022-09-16 Thread Denis Maier via ntg-context
Thank you so much for all your efforts!
Best,
Denis

> -Ursprüngliche Nachricht-
> Von: ntg-context  Im Auftrag von Henning
> Hraban Ramm via ntg-context
> Gesendet: Freitag, 16. September 2022 09:38
> An: Henning Hraban Ramm via ntg-context 
> Cc: Henning Hraban Ramm 
> Betreff: Re: [NTG-context] meeting not online
> 
> We actually managed to stream most talks and still do using mobile phone
> connections.
> 
> Hraban
> 
> 
> Am 14.09.22 um 10:11 schrieb Henning Hraban Ramm via ntg-context:
> > At the moment, audio is working. Won't promise for how long.
> >
> > Who's interested, just stay logged in to BBB, and we'll see.
> >
> > 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
> __
> _
___
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] Hyphenation in multi-language projects

2022-09-14 Thread Denis Maier via ntg-context
> -Ursprüngliche Nachricht-
> Von: ntg-context  Im Auftrag von Steffen
> Wolfrum via ntg-context
> Gesendet: Mittwoch, 14. September 2022 16:45
> An: mailing list for ConTeXt users 
> Cc: Steffen Wolfrum ; Hans Hagen
> 
> Betreff: Re: [NTG-context] Hyphenation in multi-language projects
> 
> Isn’t there a way to list exceptions that will work in *all* languages?

I thought that \hyphenation would work like that, or \startexceptions without a 
language code. Apparently that's not the case.

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
___


Re: [NTG-context] meeting not online

2022-09-14 Thread Denis Maier via ntg-context
Too bad, but thanks for letting us know. Have a nice meeting!
Best,
Denis

> -Ursprüngliche Nachricht-
> Von: ntg-context  Im Auftrag von Henning
> Hraban Ramm via ntg-context
> Gesendet: Mittwoch, 14. September 2022 09:23
> An: jbf via ntg-context 
> Cc: Henning Hraban Ramm 
> Betreff: [NTG-context] meeting not online
> 
> Hi everyone who was interested in participating in the meeting remotely,
> 
> I just recognized I forgot to include some addresses in the participants
> address, thus some information didn’t reach the adressees.
> 
> The DSL connection here in Dreifelden is very weak and unreliable – even if
> streaming works sometimes, usually it’s just enough for email.
> 
> Yesterday we streamed for one guy via mobile connections, but those who
> offered their phones for it have now mostly used up their data volume and
> need the rest for themselves.
> 
> We suspected the Wifi to be the bottleneck, but when I bought and installed
> an ethernet cable, it wouldn’t get better.
> 
> I’m very sorry, but we can’t keep that up.
> 
> 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
> __
> _
___
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] Hyphenation in multi-language projects

2022-09-14 Thread Denis Maier via ntg-context
> -Ursprüngliche Nachricht-
> Von: ntg-context  Im Auftrag von Max
> Chernoff via ntg-context
> Gesendet: Mittwoch, 14. September 2022 08:51
> An: ntg-context@ntg.nl
> Cc: Max Chernoff ; cont...@st.estfiles.de
> Betreff: Re: [NTG-context] Hyphenation in multi-language projects
> 
> Hi Steffen,
> 
> > … \replaceword should be the correct way for proper hyphenation??
> 
> Well I'm not sure if it's "correct", but it seems to work. Based on my 
> testing,
> having three subsequent sets of groups ({A}{B}{C}) is converted to a
> discretionary. The discretionary hyphen "\-" is equivalent to the Plain TeX
> command "\discretionary{-}{}{}", so
> 
>\replaceword[hyphenations][steffen][steff{-}{}{}en]
> 
> acts just like "steff\-en". TeX won't otherwise hyphenate a word with
> discretionaries, so this means that "steff-en" will be the only allowable
> hyphenation.

Just one caveat though. IIRC, Hans has mentioned that this kind of stuff is 
slower than using the hyphenation engine directly. (That's why he has 
reimplemented the ligature suppression mechanism on the hyphenation level, 
rather than acting on the node list.) 

Best,
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
___


Re: [NTG-context] Hyphenation in multi-language projects

2022-09-12 Thread Denis Maier via ntg-context
Untested: try specifying the exceptions first, load mainlanguage later?

Or, use \hyphenation?

Have you tested any if these?

Or, you could use multiple exception blocks...
\startexceptions[it]
Steff-en
\stopexceptions

\startexceptions[en]
Steff-en
\stopexceptions





Von: ntg-context  im Auftrag von Steffen Wolfrum 
via ntg-context 
Gesendet: Montag, 12. September 2022 17:11:55
An: mailing list for ConTeXt users
Cc: Steffen Wolfrum
Betreff: [NTG-context] Hyphenation in multi-language projects

Hi,

please have a look at this minimal example.

The idea is to set the hyphenation for certain words regardless of the language 
that is used in the surrounding paragraphs.

In this example it should stay: «steff-en»

How do i set this to all non-english paragraphs (without using \hyphenation on 
each language-switch)?

Best,
Steffen

—

\starttext

\setuppapersize[A6][A6]

\mainlanguage[en]

\startexceptions
steff-en
\stopexceptions

english text english text english teste: steffen

\start\language[it]
italian text italian text italian teste: steffen
\stop

\start\language[it]\hyphenation{steff-en}
italian text italian text italian teste: steffen
\stop

\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] Hebrew punctuation with SBL Hebrew

2022-08-31 Thread Denis Maier via ntg-context

Von: Joey McCollum 
Gesendet: Mittwoch, 31. August 2022 12:25
An: mailing list for ConTeXt users 
Cc: Maier, Denis Christian (UB) 
Betreff: Re: [NTG-context] Hebrew punctuation with SBL Hebrew

In your "broken" example, the patah below the het is being moved to the right 
rather than staying under the middle of the het? But the shift to the right is 
the correct behavior for furtive patah and should be expected.



Thanks, Joey. I did some more investigations on this : According to the Hebrew 
Wikipedia 
(https://he.wikipedia.org/wiki/%D7%A4%D7%AA%D7%97_%D7%92%D7%A0%D7%95%D7%91%D7%94
 and 
https://he.wikipedia.org/wiki/%D7%A4%D7%AA%D7%97_(%D7%A0%D7%99%D7%A7%D7%95%D7%93))
 today it’s mainly a stilistic choice. Historically, printing (or writing) the 
furtive patah not centered was the usual way, today it is often printed in the 
center of the letter, just like the other vowel points. SBL Hebrew apparently 
makes a deliberate choice by adhering to the «traditional» way. And that’s also 
how it appears in the Biblia Hebraica Stuttgartensia. However, in my Modern 
Hebrew verb tables they just center the patah.

Best,
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
___


[NTG-context] Hebrew punctuation with SBL Hebrew

2022-08-31 Thread Denis Maier via ntg-context
Hi,

I’m running into something weird with Hebrew punctuation. Consider the example 
below. SBL Hebrew gives me incorrect results when there’s a vaw with a holam = 
וֹ  just before a chet with a patach = חַ => the patach below the chet ist 
misplaced.
If I remove the holam from the vaw, everything looks ok. Oddly, in Linux 
Libertine I get the correct results in both cases. Does anyone know what the 
problem is here? User error? A bug in SBL Hebrew (which would be very odd since 
that font should be designed specifically for that kind of stuff). A missing 
seeting?

Best,
Denis

\definefontfamily[notok][rm][SBL Hebrew][features=hebrew]
\definefontfamily[ok][rm][Linux Libertine O][features=hebrew]

\setupdirections[bidi=global,method=unicode]


\starttext

Ok:
{\switchtobodyfont[notok]
חִיוּחוחַ
}

Broken:
{\switchtobodyfont[notok]
חִיוּחוֹחַ
}

Linux Libertine works in both cases:

Ok:
{\switchtobodyfont[ok]
חִיוּחוחַ
}

Ok:
{\switchtobodyfont[ok]
חִיוּחוֹחַ
}


\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] Parallel texts: verse with blanks between stanzas via tabulate

2022-08-30 Thread Denis Maier via ntg-context
> -Ursprüngliche Nachricht-
> Von: Hans Hagen 
> Gesendet: Dienstag, 30. August 2022 14:31
> An: Maier, Denis Christian (UB) ; mailing list for
> ConTeXt users 
> Betreff: Re: AW: [NTG-context] Parallel texts: verse with blanks between
> stanzas via tabulate
> 
> On 8/30/2022 1:40 PM, denis.ma...@unibe.ch wrote:
> 
> > Thanks for the updated version. So, that means the basic restriction
> > is that blanks will need to be inserted between rows, right? We cannot
> > have to two completely independent formatted poems, right? (For
> > reference, see the attached PNG. This was done with paragraphs, and
> > works as longs as this stays on a single page. One is one long stanza,
> > the other one consists of multiple smaller stanzas.)
> You need to be more prececise in defining what you want .. this example is not
> a parallel obe right? Just two columns.
> 

Sorry for not being precise enough.

I'm not sure I understand. This example shows two poems side by side. Both are 
totally different in structure. One has a heading, and consists of multiple 
paragraphs. The other is just one long stanza. Until now, I've used tabulate 
for these kind of sidebyside texts. Usually there are not poems, just regular 
paragraphs, but with poems I've realized that blanks seem not be supported in 
individual table cells.

Denis

\startbuffer[lines1]
\startlines[inbetween={\blank}]
this
is
a
poem
with
one 
longer 
stanza
\stoplines
\stopbuffer

\startbuffer[lines2]
\startlines[inbetween={\blank}]
this
is
a
poem

with
some
stanzas

here is 
another one

and another one
\stoplines
\stopbuffer

\starttext

Just the buffers.

One:

\getbuffer[lines1]

Two:

\getbuffer[lines2]


Via paragraphs

\defineparagraphs[paraverse][n=2 ]
\setupparagraphs[paraverse][1][
   width=.45\textwidth, distance=2em,
   align={verytolerant,stretch}]

\startparaverse
\getbuffer[lines1]
\nextparaverse
\getbuffer[lines2]
\stopparaverse

Via tabulate
\starttabulate[|p|p|]
\NC \getbuffer[lines1]
\NC \getbuffer[lines2]
\NC\NR
\stoptabulate

\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] Parallel texts: verse with blanks between stanzas via tabulate

2022-08-30 Thread Denis Maier via ntg-context
> -Ursprüngliche Nachricht-

> Von: ntg-context 
> mailto:ntg-context-boun...@ntg.nl>> Im Auftrag 
> von Hans Hagen

> via ntg-context

> Gesendet: Montag, 29. August 2022 13:58

> An: ntg-context@ntg.nl<mailto:ntg-context@ntg.nl>

> Cc: Hans Hagen mailto:j.ha...@xs4all.nl>>

> Betreff: Re: [NTG-context] Parallel texts: verse with blanks between stanzas

> via tabulate

>

> On 8/29/2022 1:31 PM, Denis Maier via ntg-context wrote:

> >> -Ursprüngliche Nachricht-

> >> Von: Hans Hagen mailto:j.ha...@freedom.nl>>

> >> Gesendet: Sonntag, 28. August 2022 10:41

> >> An: mailing list for ConTeXt users 
> >> mailto:ntg-context@ntg.nl>>

> >> Cc: Maier, Denis Christian (UB) 
> >> mailto:denis.ma...@unibe.ch>>

> >> Betreff: Re: [NTG-context] Parallel texts: verse with blanks between

> >> stanzas via tabulate

> >>

> >> On 8/27/2022 11:25 PM, Denis Maier via ntg-context wrote:

> >>> Thanks, Wolfgang. That gives me a blank between the verses. However

> >>> the

> >> blank is rather huge and I don't see how I could make it smaller? Is

> >> it possible to do this?

> >> morning exercise attached (you can run the file)

> >>

> >> Hans

> >

> > Another, more general question on this: why is the function

> poetry.sidebyside defined twice? If I understand correctly, depending on the

> input one or the other will be used, but I don't see where that happens...

> the first can be commented as it is the first simple variant

>



I see.



Thanks for the updated version. So, that means the basic restriction is that 
blanks will need to be inserted between rows, right? We cannot have to two 
completely independent formatted poems, right? (For reference, see the attached 
PNG. This was done with paragraphs, and works as longs as this stays on a 
single page. One is one long stanza, the other one consists of multiple smaller 
stanzas.)



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
___


Re: [NTG-context] Parallel texts: verse with blanks between stanzas via tabulate

2022-08-29 Thread Denis Maier via ntg-context
> -Ursprüngliche Nachricht-
> Von: Hans Hagen 
> Gesendet: Sonntag, 28. August 2022 10:41
> An: mailing list for ConTeXt users 
> Cc: Maier, Denis Christian (UB) 
> Betreff: Re: [NTG-context] Parallel texts: verse with blanks between stanzas
> via tabulate
> 
> On 8/27/2022 11:25 PM, Denis Maier via ntg-context wrote:
> > Thanks, Wolfgang. That gives me a blank between the verses. However the
> blank is rather huge and I don't see how I could make it smaller? Is it 
> possible
> to do this?
> morning exercise attached (you can run the file)
> 
> Hans

Another, more general question on this: why is the function poetry.sidebyside 
defined twice? If I understand correctly, depending on the input one or the 
other will be used, but I don't see where that happens...

Best,
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
___


Re: [NTG-context] Parallel texts: verse with blanks between stanzas via tabulate

2022-08-29 Thread Denis Maier via ntg-context
Thanks Hans, that's very nice indeed. Looks like I really need to dive into 
CLD. There seem to be so many possibilies...

However, the major pitfall seems to be that this assumes stanzas of equal 
length (as it relies on \TB to produce the blanks), which does not apply to my 
situation. (Modfied version attached.)
Do you see any way to support this kind of situation?

Best,
Denis



> -Ursprüngliche Nachricht-
> Von: Hans Hagen 
> Gesendet: Sonntag, 28. August 2022 10:41
> An: mailing list for ConTeXt users 
> Cc: Maier, Denis Christian (UB) 
> Betreff: Re: [NTG-context] Parallel texts: verse with blanks between stanzas
> via tabulate
> 
> On 8/27/2022 11:25 PM, Denis Maier via ntg-context wrote:
> > Thanks, Wolfgang. That gives me a blank between the verses. However the
> blank is rather huge and I don't see how I could make it smaller? Is it 
> possible
> to do this?
> morning exercise attached (you can run the file)
> 
> 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
> -


m-poetry.mkxl
Description: m-poetry.mkxl
___
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] Parallel texts: verse with blanks between stanzas via tabulate

2022-08-27 Thread Denis Maier via ntg-context
Thanks, Wolfgang. That gives me a blank between the verses. However the blank 
is rather huge and I don't see how I could make it smaller? Is it possible to 
do this?

Denis

> -Ursprüngliche Nachricht-
> Von: ntg-context  Im Auftrag von Wolfgang
> Schuster via ntg-context
> Gesendet: Samstag, 27. August 2022 09:27
> An: mailing list for ConTeXt users 
> Cc: Wolfgang Schuster 
> Betreff: Re: [NTG-context] Parallel texts: verse with blanks between stanzas
> via tabulate
> 
> Denis Maier via ntg-context schrieb am 27.08.2022 um 09:17:
> > Thanks. I'll try that. But, iirc, these had some other drawbacks I'll 
> > check
> if it works for my use case.
> >
> > Is there a way to have blanks in the tabulate?
> 
> \startlines[inbetween={\dontleavehmode\crlf}]
> ...
> 
> 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
> __
> _
___
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] Parallel texts: verse with blanks between stanzas via tabulate

2022-08-27 Thread Denis Maier via ntg-context
> -Ursprüngliche Nachricht-
> Von: ntg-context  Im Auftrag von Henning
> Hraban Ramm via ntg-context
> Gesendet: Freitag, 26. August 2022 23:27
> An: Denis Maier via ntg-context 
> Cc: Henning Hraban Ramm 
> Betreff: Re: [NTG-context] Parallel texts: verse with blanks between stanzas
> via tabulate
> 
> Am 26.08.22 um 22:00 schrieb Denis Maier via ntg-context:
> > Hi,
> >
> > I need to typeset two poems side by side. Usually, I use the tabulate
> > environment for typesetting parallel texts. However, for poems this
> > does not quite work as tabulate does not seem to allow blanks between
> > the stanzas. See MWE below. Am I missing someting? Is there a better
> > way to achieve this?
> 
> How about columnsets or paragraphs?
> 
> \definecolumnset[Zwei][n=2]
> \startcolumnset[Zwei]
> \startlines
> Starlight, star bright,
> first star I see tonight;
> \stoplines
> \column
> \startlines
> I wish I may, I wish I might
> have the wish I wish tonight.
> \stoplines
> \stopcolumnset
> 
> 
> \defineparagraphs[Zwei][n=2]
> \setupparagraphs[Zwei][1][
>width=.45\textwidth, distance=2em,
>align={verytolerant,stretch}]
> % width of 2nd column is calculated automatically
> 
> \startZwei
> ...
> \nextZwei
> ...
> \stopZwei
> 
> 

Ok, I've had a chance to look into this. Maybe I'm missing something, but 
paragraphs cannot be split across pages. Is that correct? That's a bit of a 
problem.

As for columnsets, they seem to change the output routine for the entire page. 
Also not ideal in this case.

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
___


Re: [NTG-context] Parallel texts: verse with blanks between stanzas via tabulate

2022-08-27 Thread Denis Maier via ntg-context
Thanks. I'll try that. But, iirc, these had some other drawbacks I'll check 
if it works for my use case.

Is there a way to have blanks in the tabulate?
Denis




Von: ntg-context  im Auftrag von Henning Hraban 
Ramm via ntg-context 
Gesendet: Freitag, 26. August 2022 23:26:56
An: Denis Maier via ntg-context
Cc: Henning Hraban Ramm
Betreff: Re: [NTG-context] Parallel texts: verse with blanks between stanzas 
via tabulate

Am 26.08.22 um 22:00 schrieb Denis Maier via ntg-context:
> Hi,
>
> I need to typeset two poems side by side. Usually, I use the tabulate
> environment for typesetting parallel texts. However, for poems this does
> not quite work as tabulate does not seem to allow blanks between the
> stanzas. See MWE below. Am I missing someting? Is there a better way to
> achieve this?

How about columnsets or paragraphs?

\definecolumnset[Zwei][n=2]
\startcolumnset[Zwei]
\startlines
Starlight, star bright,
first star I see tonight;
\stoplines
\column
\startlines
I wish I may, I wish I might
have the wish I wish tonight.
\stoplines
\stopcolumnset


\defineparagraphs[Zwei][n=2]
\setupparagraphs[Zwei][1][
   width=.45\textwidth, distance=2em,
   align={verytolerant,stretch}]
% width of 2nd column is calculated automatically

\startZwei
...
\nextZwei
...
\stopZwei


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
___
___
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] Understanding font errors

2022-08-26 Thread Denis Maier via ntg-context
> -Ursprüngliche Nachricht-
> Von: ntg-context  Im Auftrag von Hans Hagen
> via ntg-context
> Gesendet: Freitag, 26. August 2022 22:11
> An: ntg-context@ntg.nl
> Cc: Hans Hagen 
> Betreff: Re: [NTG-context] Understanding font errors
> 
> On 8/26/2022 10:07 PM, Denis Maier via ntg-context wrote:
> > Hi,
> > I've just noticed I'm getting error messages related to fonts:
> >
> > %%
> > fonts   > checking > char G (U+00047) in font '' with id 0: missing
> > fonts   > checking > char r (U+00072) in font '' with id 0: missing
> > fonts   > checking > char a (U+00061) in font '' with id 0: missing
> > fonts   > checking > char f (U+00066) in font '' with id 0: missing
> > fonts   > checking > char i (U+00069) in font '' with id 0: missing
> > fonts   > checking > char k (U+0006B) in font '' with id 0: missing
> > fonts   > checking > char [space] in font '' with id 0: missing
> > fonts   > checking > char m (U+0006D) in font '' with id 0: missing
> > fonts   > checking > char t (U+00074) in font '' with id 0: missing
> > fonts   > checking > char L (U+0004C) in font '' with id 0: missing
> > fonts   > checking > char b (U+00062) in font '' with id 0: missing
> > fonts   > checking > char e (U+00065) in font '' with id 0: missing
> > fonts   > checking > char l (U+0006C) in font '' with id 0: missing
> > %%
> >
> > What exactly is that supposed to mean? There does not seem to be a
> problem in the resulting PDFs. What should I do to debug this?
> you probably have that text before you load a font (so it's nullfont)
> 
> search for that text ... "grafik "

Thanks. I've done that already ... but apparently in the wrong file. "grafik" 
does not appear in file containing the text, which is why I was confused. But 
it appears in the environment file in a line that should be a comment.

Thanks again,
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
___


[NTG-context] Understanding font errors

2022-08-26 Thread Denis Maier via ntg-context
Hi,
I've just noticed I'm getting error messages related to fonts:

%%
fonts   > checking > char G (U+00047) in font '' with id 0: missing
fonts   > checking > char r (U+00072) in font '' with id 0: missing
fonts   > checking > char a (U+00061) in font '' with id 0: missing
fonts   > checking > char f (U+00066) in font '' with id 0: missing
fonts   > checking > char i (U+00069) in font '' with id 0: missing
fonts   > checking > char k (U+0006B) in font '' with id 0: missing
fonts   > checking > char [space] in font '' with id 0: missing
fonts   > checking > char m (U+0006D) in font '' with id 0: missing
fonts   > checking > char t (U+00074) in font '' with id 0: missing
fonts   > checking > char L (U+0004C) in font '' with id 0: missing
fonts   > checking > char b (U+00062) in font '' with id 0: missing
fonts   > checking > char e (U+00065) in font '' with id 0: missing
fonts   > checking > char l (U+0006C) in font '' with id 0: missing
%%

What exactly is that supposed to mean? There does not seem to be a problem in 
the resulting PDFs. What should I do to debug this?

Best,
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
___


[NTG-context] Parallel texts: verse with blanks between stanzas via tabulate

2022-08-26 Thread Denis Maier via ntg-context
Hi,

I need to typeset two poems side by side. Usually, I use the tabulate 
environment for typesetting parallel texts. However, for poems this does not 
quite work as tabulate does not seem to allow blanks between the stanzas. See 
MWE below. Am I missing someting? Is there a better way to achieve this?

Best,
Denis

%%%
\startbuffer[lines]
\startlines[after={\blank}]
this
is
a
poem

with
two
stanzas
\stoplines
\stopbuffer

\starttext

With a blank between the stanzas:
\getbuffer[lines]

Without a blank between the stanzas:
\starttabulate[|p|p|]
\NC \getbuffer[lines]
\NC \getbuffer[lines]
\NC\NR
\stoptabulate
\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] Suggestions for project structures, environment inheritance, local overrides

2022-08-17 Thread Denis Maier via ntg-context
Hi everyone

One of my current main projects where I use ConTeXt is typesetting journal 
articles from xml sources. As the journal appears only online, we've decided to 
publish each article individually. I have a working setup, but I occasionally 
ponder whether I could make things more smootly. Currently, my folder structure 
looks roughly like this :

2022
-- _assets
-- article1
 source
 md
 xml
 pdf
 html
-- article2
etc.

Usually, I receive Word files that get transformed via pandoc to markdown, 
polished, and from there to XML. HTML is produced via XSLT, PDF via ConTeXt. 
Transformations are performed with the help of a makefile.

The _assets folder contains a bunch of helper files, scripts, and two 
environment files used by ConTeXt :
jats.tex -> contains the setup for JATS XML
layout.tex -> contains layout settings

Now, this mostly works, but I sometimes struggle with things like 
overrides/additions for specific articles. Say, I have the global definitions, 
but I need to make small changes for one specific article? Or, I need to add 
something to one specific article, but I don't want to add this to the  
 files. I guess my question is something like this :

- How could a painless solution for such a scenario look like?
- Should you just load multiple environment files and override earlier 
settings? (How would that work with xml setups?)

Best,
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
___


Re: [NTG-context] Keep the right margin in [nothyphenated, flushleft] columns

2022-08-12 Thread Denis Maier via ntg-context
Also stretch might be useful as an additional option for align.

Denis


Von: ntg-context  im Auftrag von Aditya Mahajan via 
ntg-context 
Gesendet: Freitag, 12. August 2022 23:11:21
An: Marcin Ciura via ntg-context
Cc: Aditya Mahajan
Betreff: Re: [NTG-context] Keep the right margin in [nothyphenated, flushleft] 
columns

On Fri, 12 Aug 2022, Marcin Ciura via ntg-context wrote:

> Dear list,
>
> I am typesetting [nothyphenated,flushleft] text in two columns. Some words
> stick through the right margin of the left column, sometimes even
> overlapping the right column. How can I make Context obey the right margin?

(Untested): Try adding 'tolerant' or 'verytolerant' to the align options.

Aditya
___
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] What exactly is lpath?

2022-08-03 Thread Denis Maier via ntg-context
> -Ursprüngliche Nachricht-
> Von: ntg-context  Im Auftrag von Hans Hagen
> via ntg-context
> Gesendet: Mittwoch, 3. August 2022 10:35
> An: Denis Maier via ntg-context 
> Cc: Hans Hagen 
> Betreff: Re: [NTG-context] What exactly is lpath?
> 
> On 8/3/2022 9:46 AM, Denis Maier via ntg-context wrote:
> > Hi everyone
> > Just a question I've been thinking about from time to time: What exactly is
> lpath? Is that ConTeXt-specific? Or something more general from Lua? I've of
> course asked Google, but Lpath seems to a Python-inspired path library for
> Lua unrelated to XML...
> it's a bit like xpath ... a way to access arbitrary nodes in a xml tree with 
> lokup
> and access 'patterns'

Thanks. That I do know. I was more wondering where that is coming. (My question 
was probably not that clear.) 
As I couldn't find more about it I guess it's ConTeXt-specific, not something 
coming from the Lua ecosystem...
Just like Pablo, I'm from time to time reading through the xml-mkiv manual, and 
I was just wondering if there other places where I can other examples or 
explanations. (If it were a more general Lua thing for example...)

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
___


[NTG-context] What exactly is lpath?

2022-08-03 Thread Denis Maier via ntg-context
Hi everyone
Just a question I've been thinking about from time to time: What exactly is 
lpath? Is that ConTeXt-specific? Or something more general from Lua? I've of 
course asked Google, but Lpath seems to a Python-inspired path library for Lua 
unrelated to XML...
Best,
Denis


> -Ursprüngliche Nachricht-
> Von: ntg-context  Im Auftrag von Taco
> Hoekwater via ntg-context
> Gesendet: Mittwoch, 3. August 2022 09:09
> An: mailing list for ConTeXt users 
> Cc: Taco Hoekwater ; Pablo Rodriguez 
> Betreff: Re: [NTG-context] issue with lpath
> 
> 
> 
> > On 2 Aug 2022, at 21:14, Pablo Rodriguez via ntg-context  cont...@ntg.nl> wrote:
> >
> > Dear list,
> >
> >
> > I need an lpath to select the h3 node above, but only the one with "h3
> > + blockquote" as a CSS selector (which could be added the lpath "../h3"
> > after).
> 
> Lpath supports CSS selectors between curly braces as parts, so simply:
> 
>   \xmlsetsetup{#1}{{h3 + blockquote}/../h3} {xml:section}
> 
> should do. The xml-mkiv.pdf manual has lots of other lpath examples as well.
> 
> Best wishes,
> Taco
> 
> —
> Taco Hoekwater  E: t...@bittext.nl
> genderfluid (all pronouns)
> 
> 
> 
> __
> _
> 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] font fallbacks

2022-08-01 Thread Denis Maier via ntg-context
Hi,
I have used more than one fallback, but each fallback is for a different 
character range
Denis

Von: ntg-context  im Auftrag von Henning Hraban 
Ramm via ntg-context 
Gesendet: Montag, 1. August 2022 19:42:51
An: Henning Hraban Ramm via ntg-context
Cc: Henning Hraban Ramm
Betreff: Re: [NTG-context] font fallbacks

Nobody?
I couldn’t find an example of more than one fallback, so I guess that’s
not supported?

Hraban

Am 30.07.22 um 15:51 schrieb Henning Hraban Ramm via ntg-context:
> Hi,
> I thought I could use more than one fallback font, but as soon as I list
> fallbacks, they stop working.
>
> In my example, I’d like to take all missing glyphs from Segoe UI
> Symbols, and what’s still missing (emojis) from EmojiOneColor,
> preferably without specifying the exact range.
>
> Additionally, I want to replace the tilde ~ of LM Modern:
>
> """
> \definefontfallback[seguiFB]
>[file:seguisym.ttf]
>[0x0-0xF]
>[check=yes,force=no]
>
> \definefontfallback[emoneFB]
>[name:EmojiOneColor]
>[0x0-0xF]
>[check=yes,force=no]
>
> % replace tilde in LM
> \definefontfallback[tildeFB]
>[file:seguisym.ttf]
>[0x0007E-0x0007E]
>[force=yes]
>
>
> \starttypescript [start]
>\definetypeface [start] [rm] [serif] [cambria]
> [default][fallbacks={seguiFB,emoneFB}]
>\definetypeface [start] [ss] [sans]  [modern]
> [default][fallbacks={seguiFB,emoneFB}]
>\definetypeface [start] [tt] [mono]  [modern]
> [default][fallbacks={seguiFB,tildeFB,emoneFB}]
>\definetypeface [start] [mm] [math]  [modern]
> [default][fallbacks={seguiFB,emoneFB}]
> \stoptypescript
>
>
> \setupbodyfont[start,rm,12pt]
>
> \starttext
>
> \Omega\ (Omega) and \aleph\ (Aleph)
>
> \startbuffer[example]
> start missing characters: lmmono10-regular.otf
> 7  U+00327  ̧  COMBINING CEDILLA
> 7  U+00335  ̵  COMBINING SHORT STROKE OVERLAY
>14  U+003B7  η  GREEK SMALL LETTER ETA
> 7  U+021A9  ↩  LEFTWARDS ARROW WITH HOOK
>   350  U+02500  ─  BOX DRAWINGS LIGHT HORIZONTAL
>98  U+02502  │  BOX DRAWINGS LIGHT VERTICAL
>42  U+02514  └  BOX DRAWINGS LIGHT UP AND RIGHT
>   133  U+0251C  ├  BOX DRAWINGS LIGHT VERTICAL AND RIGHT
>   154  U+02772  ❲  LIGHT LEFT TORTOISE SHELL BRACKET ORNAMENT
>   154  U+02773  ❳  LIGHT RIGHT TORTOISE SHELL BRACKET ORNAMENT
>14  U+0278A  ➊  DINGBAT NEGATIVE CIRCLED SANS-SERIF DIGIT ONE
> stop missing characters
> start missing characters: cambria.ttc
> 9  U+0278A  ➊  DINGBAT NEGATIVE CIRCLED SANS-SERIF DIGIT ONE
> 9  U+0FFFD  �  REPLACEMENT CHARACTER
> stop missing characters
> start missing characters: cambriai.ttf
>   266  U+0276C  ❬  MEDIUM LEFT-POINTING ANGLE BRACKET ORNAMENT
>   266  U+0276D  ❭  MEDIUM RIGHT-POINTING ANGLE BRACKET ORNAMENT
> stop missing characters
> \stopbuffer
>
> \typebuffer[example]
>
> \startlines
> \getbuffer[example]
>
> {\ss\getbuffer[example]}
> \stoplines
>
> \tex{abra}\arg{...}
> \type{kadabra} \type{~~~}
>
> \stoptext
> """
>
> What’s wrong?
>
> 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
> ___

___
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] french quotation marks

2022-07-26 Thread Denis Maier via ntg-context
Here is what the french Wikipedia page says:


Méthode avec doubles guillemets-apostrophes : « L’ouvreuse m’a dit : 
“Donnez-moi votre ticket.” Je le lui ai donné. »

Recommandée en français canadien[19],[20] et utilisée par de nombreuses 
publications françaises tel que le journal Le Monde[21].

Méthode avec doubles guillemets répétés : « L’ouvreuse m’a dit : « 
Donnez-moi votre ticket. » Je le lui ai donné. »

Recommandée par l'Imprimerie nationale et aussi sur Wikipédia en français, 
conformément à ses conventions typographiques. Noter que l’Imprimerie nationale 
recommande l’omission de l’un des guillemets fermants en cas de cumul de 
guillemets quand une citation se termine sur une citation incluse[22].

Méthode avec simples guillemets : « L’ouvreuse m’a dit : ‹ Donnez-moi votre 
ticket. › Je le lui ai donné. »

Recommandée en typographie suisse, avec des espaces fines insécables[23].



Von: ntg-context  im Auftrag von Alan via 
ntg-context 
Gesendet: Dienstag, 26. Juli 2022 20:13:43
An: Henning Hraban Ramm via ntg-context
Cc: Alan
Betreff: Re: [NTG-context] french quotation marks

On Tue, 26 Jul 2022 13:38:34 +0200
Henning Hraban Ramm via ntg-context  wrote:

> Am 26.07.22 um 11:48 schrieb Arthur Rosendahl:
> > On Tue, Jul 12, 2022 at 09:51:35PM +0200, Henning Hraban Ramm via
> > ntg-context wrote:
> >> Hi, according to my knowledge (and also Wikipedia), French uses «
> >> … » as double (\quotation) and ‹ … › as single (\quote) quotation
> >> marks.
> >>
> >> The current setting in ConTeXt however is « … » for both, just
> >> with less spacing for \quote.
> >> If no francophone user objects I’d suggest to fix this.
> >
> >I object :-)  Single chevrons are not used at all in typography
> > from France.  I read however on
> > https://fr.wikipedia.org/wiki/Guillemet that they are in
> > Switzerland, hence if that can be confirmed there could be an
> > option for Swiss French; but in the mean time I think that the
> > current setup should stay as it is.
>
> Ok, thank you!
> So the German Wikipedia as well as “DUDEN Satz und Korrektur“ are
> wrong.

I agree with Arthur. The use of < > would be an anglicism.

Alan
___
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] local footnotes and captions

2022-06-16 Thread Denis Maier via ntg-context
I'm not quite I understand:
Are you saying I should leave the caption in "global scope"?

Regarding the second version: Shouldn't that be:
\startlocalfootnotes
\footnotetext[asdf]{asdf} % this
%\footnotetext[asdf]{\footnote{asdf}} % instead of this
\startplacetable[title={A breakfast table.\note[asdf]}]
 \placelegend
 {\starttable[|l|r|]
 \HL
 \VL Spam \footnote {lovely}\VL Bacon \footnote 
{wonderful} \VL\FR
 \VL Eggs \footnote {wonderful} \VL Spam  \footnote {lovely} 
\VL\LR
 \HL
 \stoptable}
 {\placelocalfootnotes}
\stopplacetable
\stoplocalfootnotes

?

Best,
Denis

> -Ursprüngliche Nachricht-
> Von: ntg-context  Im Auftrag von Hans Hagen
> via ntg-context
> Gesendet: Donnerstag, 16. Juni 2022 14:13
> An: Denis Maier via ntg-context 
> Cc: Hans Hagen 
> Betreff: Re: [NTG-context] local footnotes and captions
> 
> On 6/16/2022 12:43 PM, Denis Maier via ntg-context wrote:
> > Hi,
> >
> > another experiment with footnotes in captions, this time local footnotes :
> >
> > %%%
> >
> > \setupcaptions[location=top]
> >
> > \starttext
> >
> >      \startlocalfootnotes
> >
> >      \placetable
> >
> >      % The caption
> >
> >      {A breakfast table.\footnote{asdf}}
> >
> >      % the table
> >
> >      \placelegend
> >
> >      {\starttable[|l|r|]
> >
> >      \HL
> >
> >      \VL Spam \footnote {lovely} \VL Bacon \footnote
> > {wonderful} \VL\FR
> >
> >      \VL Eggs \footnote {wonderful} \VL Spam \footnote
> > {lovely} \VL\LR
> >
> >      \HL
> >
> >      \stoptable}
> >
> >      % the footnotes
> >
> >      {\placelocalfootnotes}
> >
> > \stoplocalfootnotes
> >
> > \stoptext
> >
> > %%%
> >
> > Two observations :
> >
> > 1. the footnote numbering is a bit odd, shouldn’t the footnote in the
> > caption be numbered with 1?
> >
> > 2. The footnote in the caption is not included in the local footnotes.
> > Why is that?
> \starttext
> 
> \startplacetable[title={A breakfast table.\footnote{asdf}}]
>  \startlocalfootnotes
>  \placelegend
>  {\starttable[|l|r|]
>  \HL
>  \VL Spam \footnote {lovely}\VL Bacon \footnote
> {wonderful} \VL\FR
>  \VL Eggs \footnote {wonderful} \VL Spam  \footnote {lovely}
> \VL\LR
>  \HL
>  \stoptable}
>  {\placelocalfootnotes}
>  \stoplocalfootnotes
> \stopplacetable
> 
> \startlocalfootnotes
> \footnotetext[asdf]{\footnote{asdf}}
> \startplacetable[title={A breakfast table.\note[asdf]}]
>  \placelegend
>  {\starttable[|l|r|]
>  \HL
>  \VL Spam \footnote {lovely}\VL Bacon \footnote
> {wonderful} \VL\FR
>  \VL Eggs \footnote {wonderful} \VL Spam  \footnote {lovely}
> \VL\LR
>  \HL
>  \stoptable}
>  {\placelocalfootnotes}
> \stopplacetable
> \stoplocalfootnotes
> 
> \stoptext
> 
> 
> -
>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
> __
> _
___
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] Foonotes in Captions ... again

2022-06-16 Thread Denis Maier via ntg-context
Hmmm, I probably was to quick. Does not really work in my real document...

I'll try to solve the issue now by integrating the notes into the caption. 
Let's see if the authors accept it.

Anyway, maybe that would be a nice topic for the monthly context chat?

> -Ursprüngliche Nachricht-
> Von: ntg-context  Im Auftrag von Denis Maier
> via ntg-context
> Gesendet: Donnerstag, 16. Juni 2022 11:16
> An: mse...@telus.net; ntg-context@ntg.nl
> Cc: Maier, Denis Christian (UB) 
> Betreff: Re: [NTG-context] Foonotes in Captions ... again
> 
> Thanks, Max! That's very neat, and it indeed works in my use case.
> 
> Can anyone see any drawbacks here?
> 
> Best,
> Denis
> 
> > -Ursprüngliche Nachricht-
> > Von: Max Chernoff 
> > Gesendet: Donnerstag, 16. Juni 2022 01:32
> > An: ntg-context@ntg.nl
> > Cc: Maier, Denis Christian (UB) 
> > Betreff: Re: [NTG-context] Foonotes in Captions ... again
> >
> > > What's the current state of affairs regarding footnotes in floats?
> > > Both
> > version in the example below don't quite work...
> > > (Ideally, the note should be on the page with the float and the
> > > caption, but the numbering should also be adjusted.)
> >
> > We can completely abuse a bunch of different ConTeXt features to
> > ensure that the footnote numbers are always in the page order.
> >
> >  % New Code
> >  \unprotect
> >
> >  \startluacode
> >  userdata.visual_order = 0
> >  userdata.input_order = 0
> >  userdata.save_data = job.passes.define("saved_footnotes")
> >  userdata.previous_data =
> > job.passes.getcollected("saved_footnotes")
> >
> >  interfaces.implement {
> >  name = "set_footnote_number",
> >  actions = function ()
> >  userdata.input_order = userdata.input_order + 1
> >
> >  local input_index = userdata.input_order
> >  local page_index =
> > userdata.previous_data[input_index]
> >
> >  if page_index then
> >  structures.counters.set("footnote", 1, page_index - 1)
> >  end
> >  end
> >  }
> >  \stopluacode
> >
> >  \def\save_footnote_data#1{%
> >  \latelua{
> >  userdata.visual_order = userdata.visual_order + 1
> >  userdata.save_data[#1] = userdata.visual_order
> >  }%
> >  }
> >
> >  \let\old_footnote=\footnote
> >
> >  \starttexdefinition protected footnote #1
> >  \begingroup
> >  \clf_set_footnote_number
> >
> >  \def\insert##1\bgroup##2\egroup{
> >  \normalexpanded{
> >  \noexpand\save_footnote_data
> >  {\cldcontext{userdata.input_order}}
> >  }
> >  \normalinsert##1{##2}
> >  }
> >
> >  \old_footnote{#1}
> >  \endgroup
> >  \stoptexdefinition
> >
> >  \protect
> >
> >  % Original Example
> >
> >  \starttext
> >
> >  \footnote{asdf} \footnote{asdf} \footnote{asdf}
> >
> >  \input ward
> >
> >  \startplacefigure[title={asdfasdf\footnote{test 1}}]
> >  \externalfigure[cow.pdf]
> >  \stopplacefigure
> >
> >  \footnote{asdf} \footnote{asdf} \footnote{asdf}
> >
> >  \startplacefigure[title={asdfasdf\footnote{test 2}}]
> >  \externalfigure[cow.pdf][height=10cm]
> >  \stopplacefigure
> >
> >  \footnote{asdf} \footnote{asdf} \footnote{asdf}
> >
> >
> >  \page
> >  \footnote{asdf} \footnote{asdf} \footnote{asdf}
> >
> >  \input ward
> >
> >  \startplacefigure[title={asdfasdf\footnote{test 1}}]
> >  \externalfigure[cow.pdf]
> >  \stopplacefigure
> >
> >  \footnote{asdf} \footnote{asdf} \footnote{asdf}
> >
> >  % (Can't use postponingnotes)
> >  % \startpostponingnotes
> >  \startplacefigure[title={asdfasdf\footnote{test 2}}]
> >  \externalfigure[cow.pdf][height=10cm]
> >  \stopplacefigure
> >  % \stoppostponingnotes
> >
> >  \footnote{asdf} \footnote{asdf} \footnote{asdf}
> >  \stoptext
> >
> > Here, we save a mapping between each footnote's index in the input and
> > its index in the output to the .tu

[NTG-context] local footnotes and captions

2022-06-16 Thread Denis Maier via ntg-context
Hi,
another experiment with footnotes in captions, this time local footnotes :

%%%
\setupcaptions[location=top]
\starttext
\startlocalfootnotes
\placetable
% The caption
{A breakfast table.\footnote{asdf}}
% the table
\placelegend
{\starttable[|l|r|]
\HL
\VL Spam \footnote {lovely} \VL Bacon \footnote {wonderful} \VL\FR
\VL Eggs \footnote {wonderful} \VL Spam \footnote {lovely} \VL\LR
\HL
\stoptable}
% the footnotes
{\placelocalfootnotes}
\stoplocalfootnotes
\stoptext
%%%

Two observations :
1. the footnote numbering is a bit odd, shouldn't the footnote in the caption 
be numbered with 1?
2. The footnote in the caption is not included in the local footnotes. Why is 
that?

Denis

___
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] Footnotes in captions -> "inherit" textwidth from floatntg

2022-06-16 Thread Denis Maier via ntg-context
Anyway, it’s possibly related to this question : 
https://www.mail-archive.com/ntg-context@ntg.nl/msg100815.html

Von: Maier, Denis Christian (UB)
Gesendet: Donnerstag, 16. Juni 2022 11:57
An: 'mailing list for ConTeXt users' 
Cc: jbf 
Betreff: AW: [NTG-context] Footnotes in captions -> "inherit" textwidth from 
floatntg

Yes, that works. But it’s still strange, isn’t it?

Denis

Von: ntg-context 
mailto:ntg-context-boun...@ntg.nl>> Im Auftrag von 
jbf via ntg-context
Gesendet: Donnerstag, 16. Juni 2022 11:49
An: Denis Maier via ntg-context mailto:ntg-context@ntg.nl>>
Cc: jbf mailto:roma83...@gmail.com>>; mailing list for 
ConTeXt users mailto:ntg-context@ntg.nl>>
Betreff: Re: [NTG-context] Footnotes in captions -> "inherit" textwidth from 
floatntg


Maybe \setupnote[footnote][width=\textwidth]?

Julian
On 16/6/22 18:56, Denis Maier via ntg-context wrote:
Hi,
I think I’ve ran into a somewhat strange behaviour. If you have a footnote in a 
float caption, the footnote won’t use the full textwidth, but only the width of 
the corresponding caption. Is that on purpose, a context bug or a user bug?

Best,
Denis


\starttext

asdf

\startplacefigure[title={My caption with a long footnote.\footnote{\input 
ward}}]
\externalfigure[cow.pdf]
\stopplacefigure

\stoptext


___

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



maillist : ntg-context@ntg.nl<mailto: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] Footnotes in captions -> "inherit" textwidth from floatntg

2022-06-16 Thread Denis Maier via ntg-context
Yes, that works. But it’s still strange, isn’t it?

Denis

Von: ntg-context  Im Auftrag von jbf via ntg-context
Gesendet: Donnerstag, 16. Juni 2022 11:49
An: Denis Maier via ntg-context 
Cc: jbf ; mailing list for ConTeXt users 

Betreff: Re: [NTG-context] Footnotes in captions -> "inherit" textwidth from 
floatntg


Maybe \setupnote[footnote][width=\textwidth]?

Julian

On 16/6/22 18:56, Denis Maier via ntg-context wrote:
Hi,
I think I’ve ran into a somewhat strange behaviour. If you have a footnote in a 
float caption, the footnote won’t use the full textwidth, but only the width of 
the corresponding caption. Is that on purpose, a context bug or a user bug?

Best,
Denis


\starttext

asdf

\startplacefigure[title={My caption with a long footnote.\footnote{\input 
ward}}]
\externalfigure[cow.pdf]
\stopplacefigure

\stoptext



___

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



maillist : ntg-context@ntg.nl<mailto: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] Foonotes in Captions ... again

2022-06-16 Thread Denis Maier via ntg-context
Thanks, Max! That's very neat, and it indeed works in my use case.

Can anyone see any drawbacks here?

Best,
Denis

> -Ursprüngliche Nachricht-
> Von: Max Chernoff 
> Gesendet: Donnerstag, 16. Juni 2022 01:32
> An: ntg-context@ntg.nl
> Cc: Maier, Denis Christian (UB) 
> Betreff: Re: [NTG-context] Foonotes in Captions ... again
> 
> > What's the current state of affairs regarding footnotes in floats? Both
> version in the example below don't quite work...
> > (Ideally, the note should be on the page with the float and the
> > caption, but the numbering should also be adjusted.)
> 
> We can completely abuse a bunch of different ConTeXt features to ensure
> that the footnote numbers are always in the page order.
> 
>  % New Code
>  \unprotect
> 
>  \startluacode
>  userdata.visual_order = 0
>  userdata.input_order = 0
>  userdata.save_data = job.passes.define("saved_footnotes")
>  userdata.previous_data = job.passes.getcollected("saved_footnotes")
> 
>  interfaces.implement {
>  name = "set_footnote_number",
>  actions = function ()
>  userdata.input_order = userdata.input_order + 1
> 
>  local input_index = userdata.input_order
>  local page_index = userdata.previous_data[input_index]
> 
>  if page_index then
>  structures.counters.set("footnote", 1, page_index - 1)
>  end
>  end
>  }
>  \stopluacode
> 
>  \def\save_footnote_data#1{%
>  \latelua{
>  userdata.visual_order = userdata.visual_order + 1
>  userdata.save_data[#1] = userdata.visual_order
>  }%
>  }
> 
>  \let\old_footnote=\footnote
> 
>  \starttexdefinition protected footnote #1
>  \begingroup
>  \clf_set_footnote_number
> 
>  \def\insert##1\bgroup##2\egroup{
>  \normalexpanded{
>  \noexpand\save_footnote_data
>  {\cldcontext{userdata.input_order}}
>  }
>  \normalinsert##1{##2}
>  }
> 
>  \old_footnote{#1}
>  \endgroup
>  \stoptexdefinition
> 
>  \protect
> 
>  % Original Example
> 
>  \starttext
> 
>  \footnote{asdf} \footnote{asdf} \footnote{asdf}
> 
>  \input ward
> 
>  \startplacefigure[title={asdfasdf\footnote{test 1}}]
>  \externalfigure[cow.pdf]
>  \stopplacefigure
> 
>  \footnote{asdf} \footnote{asdf} \footnote{asdf}
> 
>  \startplacefigure[title={asdfasdf\footnote{test 2}}]
>  \externalfigure[cow.pdf][height=10cm]
>  \stopplacefigure
> 
>  \footnote{asdf} \footnote{asdf} \footnote{asdf}
> 
> 
>  \page
>  \footnote{asdf} \footnote{asdf} \footnote{asdf}
> 
>  \input ward
> 
>  \startplacefigure[title={asdfasdf\footnote{test 1}}]
>  \externalfigure[cow.pdf]
>  \stopplacefigure
> 
>  \footnote{asdf} \footnote{asdf} \footnote{asdf}
> 
>  % (Can't use postponingnotes)
>  % \startpostponingnotes
>  \startplacefigure[title={asdfasdf\footnote{test 2}}]
>  \externalfigure[cow.pdf][height=10cm]
>  \stopplacefigure
>  % \stoppostponingnotes
> 
>  \footnote{asdf} \footnote{asdf} \footnote{asdf}
>  \stoptext
> 
> Here, we save a mapping between each footnote's index in the input and its
> index in the output to the .tuc file. The code is definitely not pretty, but
> works well enough for the sample file provided.
> 
> -- Max
___
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] Footnotes in captions -> "inherit" textwidth from float

2022-06-16 Thread Denis Maier via ntg-context
Hi,
I think I've ran into a somewhat strange behaviour. If you have a footnote in a 
float caption, the footnote won't use the full textwidth, but only the width of 
the corresponding caption. Is that on purpose, a context bug or a user bug?

Best,
Denis


\starttext

asdf

\startplacefigure[title={My caption with a long footnote.\footnote{\input 
ward}}]
\externalfigure[cow.pdf]
\stopplacefigure

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


[NTG-context] Foonotes in Captions ... again

2022-06-15 Thread Denis Maier via ntg-context
Hi everyone

What's the current state of affairs regarding footnotes in floats? Both version 
in the example below don't quite work...
(Ideally, the note should be on the page with the float and the caption, but 
the numbering should also be adjusted.)

Best,
Denis

\starttext

\footnote{asdf} \footnote{asdf} \footnote{asdf}

\input ward

\startplacefigure[title={asdfasdf\footnote{test 1}}]
\externalfigure[cow.pdf]
\stopplacefigure

\footnote{asdf} \footnote{asdf} \footnote{asdf}

\startplacefigure[title={asdfasdf\footnote{test 2}}]
\externalfigure[cow.pdf][height=10cm]
\stopplacefigure

\footnote{asdf} \footnote{asdf} \footnote{asdf}


\page
\footnote{asdf} \footnote{asdf} \footnote{asdf}

\input ward

\startplacefigure[title={asdfasdf\footnote{test 1}}]
\externalfigure[cow.pdf]
\stopplacefigure

\footnote{asdf} \footnote{asdf} \footnote{asdf}

\startpostponingnotes
\startplacefigure[title={asdfasdf\footnote{test 2}}]
\externalfigure[cow.pdf][height=10cm]
\stopplacefigure
\stoppostponingnotes

\footnote{asdf} \footnote{asdf} \footnote{asdf}
\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] Rotating jpeg image gives weird output

2022-06-15 Thread Denis Maier via ntg-context
Thanks for all your help. Using Magick had no effect so I've had another look 
at my setup. It turned out I had this in m

\setupexternalfigures
  [maxwidth=\textwidth,
  maxheight=0.8\textheight.
  location={local,global},
]

The period to end maxheight is obviously a mistake. (However, I'm still 
perplexed that this only shows up when the image is rotated...)

Sorry for the noise.

Denis

> -Ursprüngliche Nachricht-
> Von: Max Chernoff 
> Gesendet: Mittwoch, 15. Juni 2022 00:52
> An: Maier, Denis Christian (UB) ; ntg-context@ntg.nl
> Betreff: Re: [NTG-context] Rotating jpeg image gives weird output
> 
> > Any other ideas? (I tend to think the image is corrupted in one way or
> > the other, but I have no clue how to fix that.)
> 
> You could try making a new image with the same content. Assuming you're
> on Windows 10/11, install Image Magick
> 
>  winget install -e --id ImageMagick.ImageMagick
> 
> then run
> 
>  magick convert -strip image.jpg temp.tga
>  magick convert -strip temp.tga new-image.jpg
>  del temp.tga
> 
> which should give you a new image "new-image.jpg" that shouldn't be
> corrupt. If you are still having problems with this new image, then the issue 
> is
> likely with ConTeXt itself, and this specific image is just triggering it
> somehow.
> 
> -- Max
___
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] Rotating jpeg image gives weird output

2022-06-14 Thread Denis Maier via ntg-context
Thanks for your suggestions.

It probably is not EXIF-related. I've opened and saved the image with MS Paint, 
but that did not change anything (the increase in file size aside...).

Any other ideas? (I tend to think the image is corrupted in one way or the 
other, but I have no clue how to fix that.)

Best,
Denis

> -Ursprüngliche Nachricht-
> Von: Max Chernoff 
> Gesendet: Dienstag, 14. Juni 2022 11:45
> An: ntg-context@ntg.nl
> Cc: Maier, Denis Christian (UB) 
> Betreff: Re: [NTG-context] Rotating jpeg image gives weird output
> 
> > So, I've rotated the image, but now two things happen:
> >
> > 1. there's a weird offset (the image is moved to the right)
> >
> > This seems to be somehow related to the particular file. With a
> > different file that does not happen.
> 
> This can sometimes happen if the image has an embedded EXIF "Orientation"
> tag and you're using a buggy viewer. Really old versions of Firefox/pdf.js had
> this bug. If this is the case, you should be able to reproduce it with the
> following bash commands:
> 
>  convert -size 64x256 canvas:grey -fill black -draw "circle 32,128 16,112"
> demo1.jpg
>  exiftool -Orientation='Rotate 90 CW' demo1.jpg -o demo2.jpg
> 
> Then, include "demo1.jpg" and "demo2.jpg" in a ConTeXt file using
> \externalfigure. Both pictures should display as circles; if you get ovals, 
> then
> it's definitely EXIF-related.
> 
> > 2. The output contains this line
> > . location=local,global. location=local,global
> 
> Never seen this before, which makes me suspect that maybe this isn't EXIF-
> related. Maybe the image is just subtly corrupted?
> 
> Anyways, if the problem is EXIF-related, then opening and saving the image
> file with MS Paint (or any other non-EXIF-aware editor) should fix things.
> Otherwise, I have no suggestions.
> 
> -- Max
___
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] Rotating jpeg image gives weird output

2022-06-14 Thread Denis Maier via ntg-context
Hi,

I have a jpeg image that drives me crazy. The scanned image I have received 
from the author is in landscape. So, I've rotated the image, but now two things 
happen:

1. there's a weird offset (the image is moved to the right)
2. The output contains this line
. location=local,global. location=local,global

I'm not quite quite sure how I can produce a MWE that shows the problem, but 
has anyone ever seen something like this? Does anyone know what that < . 
location=local,global. location=local,global > stuff means?

Best,
Denis

P.S: I've performed the rotations using the standard picture editor on Windows 
and with GIMP. Happens with both tools.l
P.S.S.: This seems to be somehow related to the particular file. With a 
different file that does not happen.
___
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] Contractions in ligature suppression word list

2022-06-07 Thread Denis Maier via ntg-context
A somewhat more complete testfile with a couple of options is below. My context 
installation is not current so please double check, but I think it boils down 
to this:  apostrophes seem not to be considered to be part of a word. Once I 
enable wolfin under \startlanguageoptions[en] it will disable the fi-ligature 
everywhere below, but adding the word variants with an apostroph doesn’t do 
anything, neither to the explicit wordlist under startlanguageoptions, nor in 
one of the additional goodies files.

Denis

Von: Thangalin 
Gesendet: Dienstag, 7. Juni 2022 02:14
An: Maier, Denis Christian (UB) 
Cc: mailing list for ConTeXt users ; Bruce Horrocks 

Betreff: Re: [NTG-context] Contractions in ligature suppression word list

Here's a short example (version 2022.05.11 11:36):

\setuplanguage[en][goodies={lang-en.llg}]

\starttext
  % Expected: no ligature; actual: as expected
  wolfish

  % Expected: no ligatures; actual: ligature
  wolfing
  wolfin'
  wolfin’
\stoptext


%%
%%

\startluacode
-- Testfile for fi ligature over suffix boundary

local testoversuffixboundary = {
  name= "test-over-suffix-boundary",
  options = {
{
patterns = {fi  = "f|i",},
words = [[ wolf ]],
suffixes = [[
in'
in’
]],
},
  },
}

-- Testfile for fi ligature in word with apostroph
local testwithsuffix = {
  name= "test-with-suffix",
  options = {
{
patterns = {fi  = "f|i",},
words = [[ wolfin' wolfin’ ]],
},
  },
}

-- which table do we want to test?
-- table.save("test.llg",testoversuffixboundary)
table.save("test",testwithsuffix)
\stopluacode

\setuplanguage[en][goodies={lang-en.llg,test.llg}]

% explicit suppression
\startlanguageoptions[en]
wolf|in' % this here doesn't do anything
wolf|in’ % this here doesn't do anything either
%wolf|in % this here disables the fi ligature across the board for all the 
words below
\stoplanguageoptions


\mainlanguage[en]

\starttext

% defined in lang-en.llg => works
   wolfish
   wolfing

  % Expected: no ligatures; actual: ligature
  wolfin'
  wolfin’

  % shibboleth
  wolfin

\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] Contractions in ligature suppression word list

2022-06-06 Thread Denis Maier via ntg-context
Could you please share a complete MWE. Makes it easier to test if the problem 
occurs here as well.
Best,
Denis

Von: ntg-context  Im Auftrag von Thangalin via 
ntg-context
Gesendet: Montag, 6. Juni 2022 23:56
An: Bruce Horrocks 
Cc: Thangalin ; mailing list for ConTeXt users 

Betreff: Re: [NTG-context] Contractions in ligature suppression word list

Thanks for the response, Bruce.


1) The file you attached doesn't include the word "wolfing", nor "wolfin". I 
assume they need to be

The suffixes section accounts for this. Wolfing and wolfish both suppress the 
ligature correctly.

I removed the comma separators, good catch. No difference, though.

Looks like I edited 
/opt/context/tex/texmf-context/tex/context/patterns/mkxl/lang-en.llg instead of 
the LMTX file. SMH.

I've now tried both files, lmtx and mkxl:

suffixes = [[
in
in'
in’
ing
]],

Wolfish works fine, the ligature is suppressed as expected. Wolfing, wolfin, 
and wolfin' aren't suppressed. I'd have thought that defining the word "wolf" 
with a suffix of "ing" (and variations thereof) would suppress ligatures at the 
suffix boundary?

Maybe that's not the case. If so, then it means having to define all the *f-ing 
words (heh) a few times for the different suffixes (in', in’, and ing), which 
seems to defeat the purpose of separating suffixes?

Help is appreciated.
___
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] Improving pandoc's ConTeXt output

2022-06-05 Thread Denis Maier via ntg-context
> -Ursprüngliche Nachricht-
> Von: ntg-context  Im Auftrag von Albert
> Krewinkel via ntg-context
> Gesendet: Sonntag, 5. Juni 2022 09:08
> An: ntg-context@ntg.nl
> Cc: Albert Krewinkel 
> Betreff: [NTG-context] Improving pandoc's ConTeXt output
> 
> Hi all,
> 
> I'm currently trying to improve the ConTeXt output generated by pandoc, the
> document convert. There are two questions that we haven't decided on, and
> I'd be grateful to receive some feedback from ConTeXt experts on these
> issues:
> 
[...]
> 
> 2. Similarly, I'd like to start wrapping paragraphs with
>`\startparagraph`/`\stopparagraph`. It is important for me to get
>properly tagged PDF, but this would also make the output more
>verbose. Is that something that you would find bothering, or do you
>see adding the extra environment by default as an acceptable
>practice?

My initial impulse was that this would be good when going directly to PDF, but 
that it may be disturbing (too verbose) when you intend to edit the context 
output.
See also: https://github.com/jgm/pandoc/pull/7885

Denis
___
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] Improving pandoc's ConTeXt output

2022-06-05 Thread Denis Maier via ntg-context
> -Ursprüngliche Nachricht-
> Von: ntg-context  Im Auftrag von juh via ntg-
> context
> Gesendet: Sonntag, 5. Juni 2022 10:20
> An: ntg-context@ntg.nl
> Cc: juh 
> Betreff: Re: [NTG-context] Improving pandoc's ConTeXt output
> 
> Dear Albert,
> 
> great to hear that, as my cooperative uses pandoc to produce print stuff with
> ConTeXt, we are always happy, when there are improvements.
> 
> Am Sun, Jun 05, 2022 at 09:07:37AM +0200 schrieb Albert Krewinkel via ntg-
> context:
> > 2. Similarly, I'd like to start wrapping paragraphs with
> >`\startparagraph`/`\stopparagraph`. It is important for me to get
> >properly tagged PDF, but this would also make the output more
> >verbose. Is that something that you would find bothering, or do you
> >see adding the extra environment by default as an acceptable
> >practice?
> 
> A similiary question came up in the org-mode mailinglist some weeks ago.
> 
> (Background: Org-mode is a markup used with Emacs to make single source
> publishing possible)
> 
> Someone who maintains an export programme for ConTeXt uses
> sectionlevels.
> 
> You get the incremental subsections and subsubsection like this.
> 
> \startsectionlevel
>   \startsectionlevel
> \startsectionlevel
> \stopsectionlevel
>   \stopsectionlevel
> \stopsectionlevel
> 
> This makes it possible to ignore the part-chapter-section naming convention
> and be more flexible. You can leave it to the style files to decide which 
> level
> is a part, chapter, section etc...
> 
> As I do not use this in production – only playing around with emacs and org-
> mode – I cannot say if this is a good way.
> 
> Have you considered sectionlevel?
> What is your opinion?

Yes, I've also suggested that: https://github.com/jgm/pandoc/issues/5539

Denis
___
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] Compiling context files in command line

2022-06-03 Thread Denis Maier via ntg-context
You cannot use the result command line option for that. Instead, switch to the 
target directory and run context from there.

Denis




Von: ntg-context  im Auftrag von Jaroslav Hajtmar 
via ntg-context 
Gesendet: Samstag, 4. Juni 2022 07:21:04
An: mailing list for ConTeXt users
Cc: Jaroslav Hajtmar
Betreff: [NTG-context] Compiling context files in command line

Hello ConTeXist.
After a long time, I turn to the conference for help.
I use command line to batch process of many ConTeXt files. Is it possible at 
the end off compile proces to move the created PDF to another directory 
(subdirectory of current directory) using the command line commands? Somehow I 
can't do it or maybe I'm making a mistake somewhere.

Renaming works but moving into subdirectory I can't do it for some reason. What 
could be the problem? Is it even possible do it? I work with OS X in bash.

Simple example of my use:
context —mode=mymode  --result=subdir/mypdffilename.pdf processedfile.tex

My nontrivial using (content of my bash file)
context --purgeall --mode=THISSECTIONONLYHARD 
--arguments="o=_identifikacni_udaje,k=1,pk=1,ppk=1,t=,s=14" 
—result="pdfresult/svp_identifikacni_udaje.pdf" _identifikacni_udaje
context --purgeall --mode=THISSECTIONONLYHARD 
--arguments="o=_charakteristika_skoly,k=2,pk=1,ppk=1,t=,s=15" 
--result="pdfresult/svp_charakteristika_skoly.pdf" _charakteristika_skoly
context --purgeall --mode=THISSECTIONONLYHARD 
--arguments="o=_charakteristika_svp,k=3,pk=1,ppk=1,t=,s=19" 
--result="pdfresult/svp_charakteristika_svp.pdf" _charakteristika_svp
context --purgeall --mode=THISSECTIONONLYHARD 
--arguments="o=_zacleneni_prurezovych_temat,k=3,pk=1,ppk=1,t=,s=30" 
--result="pdfresult/svp_zacleneni_prurezovych_temat.pdf" 
_zacleneni_prurezovych_temat
context --purgeall --mode=THISSECTIONONLYHARD 
--arguments="o=_ucebni_plan,k=4,pk=1,ppk=1,t=,s=36" 
--result="pdfresult/svp_ucebni_plan.pdf" _ucebni_plan


In fact, it is used to create separate PDF files from one large complex 
document, where individual chapters are cut out of the overall document in pdf 
form.
This creates a large number of PDF files that I do not want to be placed in the 
current directory. Parameters are used to pass chapter numbers and page numbers 
to ConTeXt, to  correct numbering in pdf files.

Can you please advise?

Thanx Jaroslav
___
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] Microtipography

2022-05-25 Thread Denis Maier via ntg-context
Just a quick addition to Henri’s answer : You can also define your own align 
definition, see https://www.mail-archive.com/ntg-context@ntg.nl/msg100832.html

That will probably make your life a bit easier.

Best,
Denis

Von: ntg-context  Im Auftrag von Tommaso Gordini 
via ntg-context
Gesendet: Mittwoch, 25. Mai 2022 17:06
An: mailing list for ConTeXt users 
Cc: Tommaso Gordini 
Betreff: Re: [NTG-context] Microtipography

Thank you, Henri!

Tommaso

Il mer 25 mag 2022, 16:59 Henri Menke via ntg-context 
mailto:ntg-context@ntg.nl>> ha scritto:
On Wed, 2022-05-25 at 15:51 +0200, Tommaso Gordini via ntg-context
wrote:
> Hello list,
>
> here and there on the Net there are slightly different ways to
> activate the
> microtypography functionality in a ConTeXt document.
>
>  My question is: what is the most correct and clean way to do it?

I do not claim that this is the cleanest way. Probably it's better to
define a separate font feature for microtypography rather than
overwriting the default set, but this definitely works:

   \definefontfeature[default][default]
 [protrusion=quality,
  expansion=quality]

   \setupbodyfont[modern] % or whatever

   \setupalign[hz,hanging]

Unfortunately the global alignment settings do not propagate into
certain structures. For example itemizations, captions, and
bibliographies just reset it and need special treatment:

   \setupitemize[each][align={hz,hanging}]
   \setupbtxlist[align={hz,hanging,tolerant}]
   \setupcaption[figure][align={justified,hz,hanging}]

I think captions are not justified by default, so that might or might
not matter to you. Bibliographies are usually full or names and
academic words that do not hyphenate well, so adding tolerant relaxes
that a little bit.

Cheers, Henri

>
> Thanks in advance
> Tommaso
> _
> __
> 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
___
___
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] blockligatures removing characters

2022-05-13 Thread Denis Maier via ntg-context
First of all, your pattern for Th is incorrect: fio  = "T|h", doesn't make much 
sense.

Anyway, even with this corrected I can confirm the behaviour.

%%
\startluacode
 local demo = {
 name= "demo",
 options = {
 {
 patterns = {
 fio  = "f|io",
 },
 words = [[ fioot fiots ]],
 },
 {
 patterns = {
 Th  = "T|h",
 },
 words = [[ This That ]],
 },
 },
 }
 table.save("oeps-fixes.llg",demo)
\stopluacode

\setuplanguage[en][goodies={oeps-fixes.llg}]

\mainlanguage[en]

\setupbodyfont[libertine]

\starttext
 fiets fiots fiats fioot

 This That Then

 \noligature{Th}is
\noligature{Th}at
\noligature{Th}en
\stoptext


Von: ntg-context  Im Auftrag von Ben Moon via 
ntg-context
Gesendet: Freitag, 13. Mai 2022 15:30
An: Context Mailing List 
Cc: Ben Moon 
Betreff: Re: [NTG-context] blockligatures removing characters

Thanks Hans,

I tried to modify your example for preventing the capital-Th ligature but this 
doesn't seem to work. The 'fi' ligature is prevented, but 'Th' still appears as 
a ligature. This occurs with the original lowercase version too. Have I missed 
something?

```
\startluacode
 local demo = {
 name= "demo",
 options = {
 {
 patterns = {
 fio  = "f|io",
 },
 words = [[ fioot fiots ]],
 },
 {
 patterns = {
 fio  = "T|h",
 },
 words = [[ This That ]],
 },
 },
 }
 table.save("oeps-fixes.llg",demo)
\stopluacode

\setuplanguage[en][goodies={oeps-fixes.llg}]

\setupbodyfont[ebgaramond]

\starttext
 fiets fiots fiats fioot This That
\stoptext
```
Ben

On Mon, 9 May 2022, at 14:03, Hans Hagen via ntg-context wrote:
On 5/9/2022 9:56 AM, Denis Maier via ntg-context wrote:
> Happens here as well, already on  ConTeXt  ver: 2022.03.12 17:56 LMTX.
>
> By the way, this even happens without special fonts:
>
> \blockligatures[Th]
>
> \definefontfeature[default:blocklig][default][liga=yes,blockligatures=yes]
>
> \setupbodyfont[myfont]
>
> \starttext
>
> \definedfont[Serif*default:blocklig]
>
>  The This These are missing the `h'
>
> \stoptext
I'll fix it but it's not the way to do it in lmtx where we have

\startluacode
 local demo = {
 name= "demo",
 options = {
 {
 patterns = {
 fio  = "f|io",
 },
 words = [[ fioot fiots ]],
 },
 {
 patterns = {
 fio  = "t|h",
 },
 words = [[ this that ]],
 },
 },
 }
 table.save("oeps-fixes.llg",demo)
\stopluacode

\setuplanguage[en][goodies={oeps-fixes.llg}]

\setupbodyfont[ebgaramond]

\starttext
 fiets fiots fiats fioot this that
\stoptext

I just added (no upload) this

\startluacode
 local demo = {
 name= "demo",
 options = {
 {
 substitutions = {
 th = "t|h",
 Th = "T|h",
 st = "s|t",
 St = "S|t",
 fi = "f|i",
 },
 },
 },
 }
 table.save("oeps-fixes.llg",demo)
\stopluacode

\setuplanguage[en][goodies={oeps-fixes.llg}]

\setupbodyfont[ebgaramond]

\starttext
 The This These fiets and thisthis thisfiets
\stoptext



-
   Hans Hagen | PRAGMA ADE
   Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | www.pragma-ade.nl<http://www.pragma-ade.nl> | 
www.pragma-pod.nl<http://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<mailto: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] \startXML vs \startPARSEDXML

2022-05-12 Thread Denis Maier via ntg-context
Thanks!
That's interesting.
Does anyone know what is happening here?
Best,
Denis

> -Ursprüngliche Nachricht-
> Von: ntg-context  Im Auftrag von Pablo
> Rodriguez via ntg-context
> Gesendet: Mittwoch, 11. Mai 2022 18:19
> An: Denis Maier via ntg-context 
> Cc: Pablo Rodriguez 
> Betreff: Re: [NTG-context] \startXML vs \startPARSEDXML
> 
> On 5/11/22 11:47, Denis Maier via ntg-context wrote:
> > Hi everyone,
> >
> > the wikipage on \starttyping
> > (https://wiki.contextgarden.net/Command/_starttyping
> > <https://wiki.contextgarden.net/Command/_starttyping>) says there are
> > some dedicated commands, e.g. \startXML and \startPARSEDXML. How do
> > they differ?
> 
> Hi Denis,
> 
> yesterday I had to start using xml instead of parsed-xml.
> 
> See the difference:
> 
>   \setuppapersize[A4, landscape]
>   \setupbodyfont[dejavu]
>   \starttext
>   \startxtable[option=stretch]
>   \startxrow[offset=1ex]
>   \startxcell
>   \startXML
>   
>   
>
> 
>  Anuncio
>  
>  Belleza
> 
>
>   
>   \stopXML
>   \stopxcell
>   \startxcell
>   \startPARSEDXML
>   
>   
>
> 
>  Anuncio
>  
>  Belleza
> 
>
>   
>   \stopPARSEDXML
>   \stopxcell
>   \stopxrow
>   \stopxtable
>   \stoptext
> 
> I wonder why attribute values are parsed so. I don’t know whether this might
> be a bug (but this is why I replaced "parsed-xml" with "xml" in my code).
> 
> If I could ask you a favor, would you be so kind to confirm whether \xmlpos
> and \xmldepth are misbehaving or not (as already reported in
> https://mailman.ntg.nl/pipermail/ntg-context/2022/105495.html and
> https://mailman.ntg.nl/pipermail/ntg-context/2022/105604.html)?
> 
> 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 / 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] \xmlpos and \xmldepth misbehave? (again)

2022-05-12 Thread Denis Maier via ntg-context
Hi,
I get the same behaviour with a slightly older version. I don't really 
understand what's happening, but I agree it's not what I'd have expected.
Best,
Denis

> > -Ursprüngliche Nachricht-
> > Von: ntg-context  Im Auftrag von Pablo
> > Rodriguez via ntg-context
> > Gesendet: Freitag, 6. Mai 2022 18:21
> > An: Hans Hagen via ntg-context 
> > Cc: Pablo Rodriguez 
> > Betreff: [NTG-context] \xmlpos and \xmldepth misbehave? (again)
> >
> > Dear list,
> >
> > I have the folloing sample:
> >
> >   \startbuffer[text]
> >   first level
> >   second level
> >   third level
> >   third level
> >   
> >   second level
> >   third level
> >   third level
> >   
> >   second level
> >   third level
> >   third level
> >   
> >   
> >   \stopbuffer
> >
> >   \startxmlsetups xml:text
> >   \xmlsetsetup{#1}{doc|s|ss}{xml:*}
> >   \stopxmlsetups
> >
> >   \xmlregistersetup{xml:text}
> >
> >   \startxmlsetups xml:doc
> >   \chapter{\xmlpos{#1}\letterat\xmldepth{#1}: \xmlflush{#1}}
> >   \stopxmlsetups
> >
> >   \startxmlsetups xml:s
> >   \section{\xmlpos{#1}\letterat\xmldepth{#1}: \xmlflush{#1}}
> >   \stopxmlsetups
> >
> >   \startxmlsetups xml:ss
> >   \subsection{\xmlpos{#1}\letterat\xmldepth{#1}: \xmlflush{#1}}
> >   \stopxmlsetups
> >
> >   \setuphead[chapter,section,subsection][before=,after=,]
> >
> >   \setuppapersize[A7]
> >   \setuplayout[width=middle, header=0cm]
> >
> >   \starttext
> >   \xmlprocessbuffer{main}{text}{}
> >   \stoptext
> >
> > All \xmldepth values are +1 that I think they should be (starting from
> > 2 [instead of 1] up to 4 [instead of 3]).
> >
> > \xmlpos values seem to count 2, 4, 6… (instead of 1, 2, 3…).
> >
> > This is with current latest from 2022.05.02 16:19.
> >
> > Sorry, but could anyone confirm whether I’m missing something or
> > whether this issue is a bug?
> >
> > 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 /
> > 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
___


[NTG-context] \startXML vs \startPARSEDXML

2022-05-11 Thread Denis Maier via ntg-context
Hi everyone,

the wikipage on \starttyping 
(https://wiki.contextgarden.net/Command/_starttyping) says there are some 
dedicated commands, e.g. \startXML and \startPARSEDXML. How do they differ?

Best,
Denis
___
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] Simple question

2022-05-10 Thread Denis Maier via ntg-context
Don't know how if there's an automatic way, perhaps look into ctx processing 
instructions.
Anyway you can use
--result=name
As you have to set quite a few options on the command line (modes, language) 
you'll perhaps want to use a makefile anyway.




Von: ntg-context  im Auftrag von Gerben Wierda via 
ntg-context 
Gesendet: Dienstag, 10. Mai 2022 18:47:32
An: mailing list for ConTeXt users
Cc: Gerben Wierda
Betreff: Re: [NTG-context] Simple question

Thank you.

Is it possible to change the name of the resulting PDF file based on the 
language and a mode?

So that with a command

context language=fr mode=simple file.tex

the result is in

file-simple-fr.pdf

and with

context language=ru mode=none file.tex (or no mode given)

the result is

file-ru.pdf

G

On 10 May 2022, at 17:21, Wolfgang Schuster 
mailto:wolfgang.schuster.li...@gmail.com>> 
wrote:

Gerben Wierda via ntg-context schrieb am 10.05.2022 um 00:15:
What is the easiest way to have a ‘database’ of translations for strings and 
maybe links?

I now have 4 languages and 2 versions so 8 documents, but I’d like to have all 
translatable strings together so I can maintain these in a single file. Ideally 
I can do a file where the key of the translation is one language (say English) 
and the translations are part of that.

Something I can call like this

\translatephrase[English phrase][nl]
\translatelocation[../LMTX-Output/without-ids/en/file.pdf][nl][simple]

and where I can maintain all the translations a bit like this:

\translationentry[English phrase]{
\definetranslatephrase[nl]Nederlandse frase]
\definetranslatephrase[fr][Phrase français]
}
}

\translatelocation[../LMTX-Output/without-ids/en/file.pdf][simple][nl][../LMTX-Output/without-ids/nl/file-simple.pdf]]
\translatelocation[../LMTX-Output/without-ids/en/file.pdf][none][nl][../LMTX-Output/without-ids/nl/file.pdf]]


Where the \translatelocation command can be used inside an \externalfigure 
command and \translatephrase can be used as as text.

In the end I’d like to compile with

context language=fr mode=simple mainfile.tex

Doable?

To set language dependent texts you can use the labeltext mechanism which is 
used by ConTeXt to change the captions for floats etc.

Besides the default \labeltext and \setuplabeltext commands you can create your 
own instance of the mechanism for your texts.

 begin example
\definelabelclass [gerben]

\setupgerbentext [en] [phrase=English phrase]
\setupgerbentext [nl] [phrase=Nederlandse frase]
\setupgerbentext [fr] [phrase=Phrase français]

%\mainlanguage[nl]
%\mainlanguage[fr]

\starttext
\gerbentext{phrase}
\stoptext
 end example

To change images you use multiple sub folders where each folder has images 
which the same name. In ConTeXt you can use a mode to choose which directory is 
used to load the image. Another method is to map the file names of the images 
to symbolic names and use only the symbolic names in your document.

 begin example
\setupexternalfigures [location={local,global,default}]

\useexternalfigure [simple] [cow.pdf]
%\useexternalfigure [simple] [hacker.png]

\starttext
\externalfigure[simple]
\stoptext
 end example

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
___


Re: [NTG-context] blockligatures removing characters

2022-05-09 Thread Denis Maier via ntg-context
So, if IIUC those substitutions can be used to block certain ligatures 
throughout? 

You can load multiple goodies files as in the example below, correct?

Best,
Denis

%%
\startluacode
 local blockthlig = {
 name= "blockthlig",
 options = {
 {
 substitutions = {
 th = "t|h",
 Th = "T|h",
 },
 },
 },
 }
 table.save("blockthlig.llg",blockthlig)
\stopluacode

\setuplanguage[en][goodies={lang-en.llg, blockthlig.llg }]

\setupbodyfont[ebgaramond]

\starttext
 The This These fiets and thisthis thisfiets 
\stoptext
%%


> -Ursprüngliche Nachricht-
> Von: ntg-context  Im Auftrag von Hans Hagen
> via ntg-context
> Gesendet: Montag, 9. Mai 2022 15:03
> An: ntg-context@ntg.nl
> Cc: Hans Hagen 
> Betreff: Re: [NTG-context] blockligatures removing characters
> 
> On 5/9/2022 9:56 AM, Denis Maier via ntg-context wrote:
> > Happens here as well, already on  ConTeXt  ver: 2022.03.12 17:56 LMTX.
> >
> > By the way, this even happens without special fonts:
> >
> > \blockligatures[Th]
> >
> > \definefontfeature[default:blocklig][default][liga=yes,blockligatures=
> > yes]
> >
> > \setupbodyfont[myfont]
> >
> > \starttext
> >
> > \definedfont[Serif*default:blocklig]
> >
> >      The This These are missing the `h'
> >
> > \stoptext
> I'll fix it but it's not the way to do it in lmtx where we have
> 
> \startluacode
>  local demo = {
>  name= "demo",
>  options = {
>  {
>  patterns = {
>  fio  = "f|io",
>  },
>  words = [[ fioot fiots ]],
>  },
>  {
>  patterns = {
>  fio  = "t|h",
>  },
>  words = [[ this that ]],
>  },
>  },
>  }
>  table.save("oeps-fixes.llg",demo)
> \stopluacode
> 
> \setuplanguage[en][goodies={oeps-fixes.llg}]
> 
> \setupbodyfont[ebgaramond]
> 
> \starttext
>  fiets fiots fiats fioot this that
> \stoptext
> 
> I just added (no upload) this
> 
> \startluacode
>  local demo = {
>  name= "demo",
>  options = {
>  {
>  substitutions = {
>  th = "t|h",
>  Th = "T|h",
>  st = "s|t",
>  St = "S|t",
>  fi = "f|i",
>  },
>  },
>  },
>  }
>  table.save("oeps-fixes.llg",demo)
> \stopluacode
> 
> \setuplanguage[en][goodies={oeps-fixes.llg}]
> 
> \setupbodyfont[ebgaramond]
> 
> \starttext
>  The This These fiets and thisthis thisfiets \stoptext
> 
> 
> 
> -
>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
> __
> _
___
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] blockligatures removing characters

2022-05-09 Thread Denis Maier via ntg-context
Happens here as well, already on  ConTeXt  ver: 2022.03.12 17:56 LMTX.

By the way, this even happens without special fonts:

\blockligatures[Th]
\definefontfeature[default:blocklig][default][liga=yes,blockligatures=yes]

\setupbodyfont[myfont]

\starttext
\definedfont[Serif*default:blocklig]
The This These are missing the `h'
\stoptext



Von: ntg-context  Im Auftrag von Ben Moon via 
ntg-context
Gesendet: Samstag, 7. Mai 2022 17:49
An: Context Mailing List 
Cc: Ben Moon 
Betreff: [NTG-context] blockligatures removing characters

Hi List,

I'm using blockligatures to avoid the 'Th' ligature in some fonts but keep 
others. Recently I've found this removes the 'h' completely, i.e. 'Th' is 
changed to 'T', 'The' becomes 'Te' etc.

Is there a way to restore the blockligatures functionality? I'm on ConTeXt 
version 2022.05.02 16:19.

Here is a MWE using Almendra 
(https://fonts.google.com/specimen/Almendra)
 from Google Fonts.

```
\starttypescriptcollection[myfont]

\starttypescript[myfont]
\definefontsynonym[Serif][Almendra-Regular][features=default]
\stoptypescript

\starttypescript[myfont]
\definetypeface[\typescriptone][rm][serif][myfont][default][]
\stoptypescript

\stoptypescriptcollection

\blockligatures[Th]

\definefontfeature[default][default][liga=yes]
\definefontfeature[default:nolig][default][liga=no]
\definefontfeature[default:blocklig][default][liga=yes,blockligatures=yes]

\setupbodyfont[myfont]

\starttext
The This These have the Th ligature and others (fi)

\definedfont[Serif*default:nolig]
The This These have no ligatures (not fi)

\definedfont[Serif*default:blocklig]
The This These are missing the `h' (fi)
\stoptext
```

Best,
Ben
___
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] How to place "Content" and other chapter-level titles the same vertical distance from the top?

2022-05-09 Thread Denis Maier via ntg-context
> -Ursprüngliche Nachricht-
> Von: Taco Hoekwater 
> Gesendet: Montag, 9. Mai 2022 09:48
> An: mailing list for ConTeXt users 
> Cc: Maier, Denis Christian (UB) 
> Betreff: Re: [NTG-context] How to place "Content" and other chapter-level
> titles the same vertical distance from the top?
> 
> 
> 
> > On 9 May 2022, at 09:45, Denis Maier via ntg-context  cont...@ntg.nl> wrote:
> >
> > This example from the wiki does not run anymore with LMTX:
> 
> Still worked ok in:  ConTeXt  ver: 2022.04.19 19:53 LMTX

Or better yet, works again in current LMTX versions. (Looks like I need to 
update again.) 

___
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] How to place "Content" and other chapter-level titles the same vertical distance from the top?

2022-05-09 Thread Denis Maier via ntg-context
This example from the wiki does not run anymore with LMTX:
You get the error message:
I've run across a '}' that doesn't seem to match anything. For example,
'\def\a#1{...}' and '\a}' would produce this error. The '\par' that I've just
inserted will cause me to report a runaway argument that might be the root of 
the
problem.

Maybe some expansion thing. Don't know, but consider this :

%
\setuppapersize[A6][A6] 
\setupbodyfont[8pt] 
\define[2]\MyChapterCommand{#1 #2} % does work
%\def\MyChapterCommand#1#2{#1 #2} % does not work
\setuphead[chapter][ 
command=\MyChapterCommand, 
] 
\starttext 
\startchapter{test} 
\input tufte 
\stopchapter 
\stoptext
%

So, this here should get you started:

%

\showframe
\setuppapersize[A6][A6]
\setupbodyfont[8pt]
\define[2]\MyChapterCommand%
  {\vbox to 15mm\bgroup
\vss
{#1\blank #2}
\egroup}
\define[1]\MyTitleCommand%
  {\vbox to 15mm\bgroup
\vss
{#1}
\egroup}

\setuphead[chapter][command=\MyChapterCommand]
\setuphead[title][command=\MyTitleCommand]
\starttext
\chapter{test} \input tufte
\title{test} \input tufte
\stoptext
%

I bet there are easier solutions, maybe use framed instead of vbox.

Denis

 
> 
> 
> Von: Maier, Denis Christian (UB)
> Gesendet: Sonntag, 8. Mai 2022 09:24:51
> An: mailing list for ConTeXt users
> Cc: Joel
> Betreff: AW: [NTG-context] How to place "Content" and other chapter-level
> titles the same vertical distance from the top?
> 
> Maybe define your own chapter command and use a vbox.
> Look at this example from the wiki:
> 
> \setuppapersize[A6][A6]
> \setupbodyfont[8pt]
> \def\MyChapterCommand#1#2%
>   {\vbox to 4cm\bgroup
>  {#1\hskip.75em #2}
>  \vss
>  \egroup}
> \setuphead[chapter][header=nomarking, command=\MyChapterCommand]
> \starttext \chapter{test} \input tufte \stoptext
> 
> That's not exactly what you want, but you can adapt it.
> 
> Denis
> 
> Von: ntg-context  im Auftrag von Joel via ntg-
> context 
> Gesendet: Sonntag, 8. Mai 2022 04:49:32
> An: ntg-context@ntg.nl
> Cc: Joel
> Betreff: [NTG-context] How to place "Content" and other chapter-level titles
> the same vertical distance from the top?
> 
> I created a chapter title style with a large number telling the chapter 
> number,
> and below it the title of the chapter.
> 
> It looks like this:
> 
> -
> 1   <--really big chapter number
> === <-- there is a border created by a background image between
> these
> How to keep  <--chapter title
> fish
> 
> This is the article <-- the article begins about how to keep fish
> -
> 
> \definefontsize[a]%
> \definefontsize[b]%
> \definefontsize[c]%
> \definefontsize[l]%
> \setupbodyfontenvironment[default]%
> [%
> a=1.200,
> b=1.440,
> c=1.728,
> l=8.916
> ]%
> %
> 
> \setuplabeltext[chapter=\strut]
> \setuphead[chapter][style=\ssc,placehead=yes,expansion=yes,page=yes,
> numbercommand=\groupedcommand{}{\blank[1cm]},
> alternative=middle,
> numberstyle=ssl,
> numbercolor=green,
> strut=yes]
> 
> \starttext
> 
> \completecontent
> 
> \chapter{Test}
> \input knuth
> 
> \chapter{Test}
> \input knuth
> 
> \stoptext
> 
> The problem I'm facing, is anytime a chapter title is called, such as 
> "Content"
> in complete content, or something in the appendix, such as one of the
> indexes, no number is printed above, so the vertical distance from the top of
> the page to the top of the chapter title changes. I need these to be
> consistent, as there is a background image, with vertical lines.
> 
> Basically, if I call \chapter{}, it appears perfectly aligned vertically on 
> the
> page, with no other settings. But when calling \completecontent or a similar
> title that won't get a number, because the number isn't placed, it is 
> vertically
> higher on the page, but I need it to be printed the same height, as it it had 
> an
> invisible number.
> 
> I've tried adding strut (the code has it in two places), but don't know if 
> I've
> used it appropriately, and it didn't solve the problem.
> 
> --Joel
___
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] How to place "Content" and other chapter-level titles the same vertical distance from the top?

2022-05-08 Thread Denis Maier via ntg-context
Or change the setup of unnumbered chapter titles...
Add a forced blank before there.

Denis



Von: Maier, Denis Christian (UB)
Gesendet: Sonntag, 8. Mai 2022 09:24:51
An: mailing list for ConTeXt users
Cc: Joel
Betreff: AW: [NTG-context] How to place "Content" and other chapter-level 
titles the same vertical distance from the top?

Maybe define your own chapter command and use a vbox.
Look at this example from the wiki:

\setuppapersize[A6][A6]
\setupbodyfont[8pt]
\def\MyChapterCommand#1#2%
  {\vbox to 4cm\bgroup
 {#1\hskip.75em #2}
 \vss
 \egroup}
\setuphead[chapter][header=nomarking, command=\MyChapterCommand]
\starttext
\chapter{test} \input tufte
\stoptext

That's not exactly what you want, but you can adapt it.

Denis

Von: ntg-context  im Auftrag von Joel via 
ntg-context 
Gesendet: Sonntag, 8. Mai 2022 04:49:32
An: ntg-context@ntg.nl
Cc: Joel
Betreff: [NTG-context] How to place "Content" and other chapter-level titles 
the same vertical distance from the top?

I created a chapter title style with a large number telling the chapter number, 
and below it the title of the chapter.

It looks like this:

-
1   <--really big chapter number
=== <-- there is a border created by a background image between these
How to keep  <--chapter title
fish

This is the article <-- the article begins
about how to keep
fish
-

\definefontsize[a]%
\definefontsize[b]%
\definefontsize[c]%
\definefontsize[l]%
\setupbodyfontenvironment[default]%
[%
a=1.200,
b=1.440,
c=1.728,
l=8.916
]%
%

\setuplabeltext[chapter=\strut]
\setuphead[chapter][style=\ssc,placehead=yes,expansion=yes,page=yes,
numbercommand=\groupedcommand{}{\blank[1cm]},
alternative=middle,
numberstyle=ssl,
numbercolor=green,
strut=yes]

\starttext

\completecontent

\chapter{Test}
\input knuth

\chapter{Test}
\input knuth

\stoptext

The problem I'm facing, is anytime a chapter title is called, such as "Content" 
in complete content, or something in the appendix, such as one of the indexes, 
no number is printed above, so the vertical distance from the top of the page 
to the top of the chapter title changes. I need these to be consistent, as 
there is a background image, with vertical lines.

Basically, if I call \chapter{}, it appears perfectly aligned vertically on the 
page, with no other settings. But when calling \completecontent or a similar 
title that won't get a number, because the number isn't placed, it is 
vertically higher on the page, but I need it to be printed the same height, as 
it it had an invisible number.

I've tried adding strut (the code has it in two places), but don't know if I've 
used it appropriately, and it didn't solve the problem.

--Joel
___
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] How to place "Content" and other chapter-level titles the same vertical distance from the top?

2022-05-08 Thread Denis Maier via ntg-context
Maybe define your own chapter command and use a vbox.
Look at this example from the wiki:

\setuppapersize[A6][A6]
\setupbodyfont[8pt]
\def\MyChapterCommand#1#2%
  {\vbox to 4cm\bgroup
 {#1\hskip.75em #2}
 \vss
 \egroup}
\setuphead[chapter][header=nomarking, command=\MyChapterCommand]
\starttext
\chapter{test} \input tufte
\stoptext

That's not exactly what you want, but you can adapt it.

Denis

Von: ntg-context  im Auftrag von Joel via 
ntg-context 
Gesendet: Sonntag, 8. Mai 2022 04:49:32
An: ntg-context@ntg.nl
Cc: Joel
Betreff: [NTG-context] How to place "Content" and other chapter-level titles 
the same vertical distance from the top?

I created a chapter title style with a large number telling the chapter number, 
and below it the title of the chapter.

It looks like this:

-
1   <--really big chapter number
=== <-- there is a border created by a background image between these
How to keep  <--chapter title
fish

This is the article <-- the article begins
about how to keep
fish
-

\definefontsize[a]%
\definefontsize[b]%
\definefontsize[c]%
\definefontsize[l]%
\setupbodyfontenvironment[default]%
[%
a=1.200,
b=1.440,
c=1.728,
l=8.916
]%
%

\setuplabeltext[chapter=\strut]
\setuphead[chapter][style=\ssc,placehead=yes,expansion=yes,page=yes,
numbercommand=\groupedcommand{}{\blank[1cm]},
alternative=middle,
numberstyle=ssl,
numbercolor=green,
strut=yes]

\starttext

\completecontent

\chapter{Test}
\input knuth

\chapter{Test}
\input knuth

\stoptext

The problem I'm facing, is anytime a chapter title is called, such as "Content" 
in complete content, or something in the appendix, such as one of the indexes, 
no number is printed above, so the vertical distance from the top of the page 
to the top of the chapter title changes. I need these to be consistent, as 
there is a background image, with vertical lines.

Basically, if I call \chapter{}, it appears perfectly aligned vertically on the 
page, with no other settings. But when calling \completecontent or a similar 
title that won't get a number, because the number isn't placed, it is 
vertically higher on the page, but I need it to be printed the same height, as 
it it had an invisible number.

I've tried adding strut (the code has it in two places), but don't know if I've 
used it appropriately, and it didn't solve the problem.

--Joel
___
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] Citeproc-lua

2022-05-07 Thread Denis Maier via ntg-context
> -Ursprüngliche Nachricht-
> Von: Hans Hagen 
> Gesendet: Samstag, 7. Mai 2022 01:15
> An: Maier, Denis Christian (UB) ; ntg-context@ntg.nl
> Betreff: Re: AW: [NTG-context] Citeproc-lua
> 
> On 5/7/2022 12:33 AM, denis.ma...@unibe.ch wrote:
> >> -Ursprüngliche Nachricht-
> >> Von: ntg-context  Im Auftrag von Hans
> >> Hagen via ntg-context
> >> Gesendet: Freitag, 6. Mai 2022 23:45
> >> An: Denis Maier via ntg-context 
> >> Cc: Hans Hagen 
> >> Betreff: Re: [NTG-context] Citeproc-lua
> >>
> >> [...]
> >>
> >> For the record: i don't think you should write something to the tuc
> >> file that doesn't come from context itself because you can mess it up
> >> (also performaance wise).
> >
> > Really? But what about that stuff? Anyway, even better if the data coming
> from context itself can be used.
> 
> A bibliography is just about (cross) referencing data. If that data comes from
> elsewhere it can best kept indepdendent. One can of course store some
> reference but why the data if it is not used in some special way.

I think we're on the same page here. I was just talking about the info about 
which items have been cited, which pages, prefixes, suffixes, etc. All that 
stuff that is basically already there...

> 
> > Of course you could have another file (just like a bib file
> >> is independent). One problem could be that you need to make some
> >> extra installation to make it work as we're not going to add all kind
> >> of code to the distribution (we tend to go smaller) and someone needs
> >> to maintain that moduie then because users depend in it working.
> >>
> >> Did you look into what pandoc provides? It might be easier to take
> >> that output and include it. Some kind of html? That's easy to render.
> >
> > Pandoc can output context as well, so we can just take that.
> 
> Sure, but some parseble format might be better if one wants control over
> rendering. Basically we're talking about some pseudo formatted bibliography
> entry with some unique tag as reference.

I see...

> 
> > Using the whole bibliography might give problems with regards to
> disambiguation.
> 
> In what sense? Aren't the 'tags' or id's unique? 

Tags/Ids are unique, for sure. But, if you render a bibliography based on 
everything in the bib-file, you might end up with 
Doe 2005a
Doe 2005b
etc.
but in the end you'll remove Doe 2005b, so the whole a/b stuff isn't necessary 
anymore.

Anyway, one can
> 
> - let \cite write some refe to soem file
> - that file gets pandoc'd to a bibliography list
> - that then gets included

Yes, looks reasonable.

> 
> if that list is in some parsable format (like html width classes) we can 
> easily pick
> up info (if needed) and do nmore
> 
> > So, that would work a bit like Aditya's filter module:
> > https://github.com/adityam/filter Right?
> 
> sort of
> 
> > Another option would be to just use pandoc's citeproc directly, as
> > described here:
> > https://github.com/jgm/citeproc/blob/master/man/citeproc.1.md
> >
> > We'd have to pass a list of citations as a JSON object to that citeproc and 
> > use
> the results.
> > The results will include citations as well as the bibliography (all as JSON,
> content can be HTML formatted).
> we can handle json indeed, so hwo does such a json look like? can you make an
> example?

There are some examples on this page 
https://github.com/jgm/citeproc/blob/master/man/citeproc.1.md
Does that help or do you need to know more?

Anyway, this adds the citeproc executable as a dependency. Maybe they can make 
that functionality from pandoc proper.

Denis
___
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] Citeproc-lua

2022-05-06 Thread Denis Maier via ntg-context
> -Ursprüngliche Nachricht-
> Von: ntg-context  Im Auftrag von Hans Hagen
> via ntg-context
> Gesendet: Freitag, 6. Mai 2022 23:45
> An: Denis Maier via ntg-context 
> Cc: Hans Hagen 
> Betreff: Re: [NTG-context] Citeproc-lua
> 
> [...]
> 
> For the record: i don't think you should write something to the tuc file that
> doesn't come from context itself because you can mess it up (also
> performaance wise). 

Really? But what about that stuff? Anyway, even better if the data coming from 
context itself can be used. 

Of course you could have another file (just like a bib file
> is independent). One problem could be that you need to make some extra
> installation to make it work as we're not going to add all kind of code to the
> distribution (we tend to go smaller) and someone needs to maintain that
> moduie then because users depend in it working.
> 
> Did you look into what pandoc provides? It might be easier to take that
> output and include it. Some kind of html? That's easy to render.

Pandoc can output context as well, so we can just take that.

> 
> A bit like this:
> 
> - Convert the whole bibliography database to html using pandoc in the
> preferred cs rendering. That should be fast.

Using the whole bibliography might give problems with regards to disambiguation.

> 
> - Use the normal context commands for referencing a citation (the cite part
> is normally easy as there is not much variation in that; if needed one can
> cheat and also pregenerate that). That's then just some relatively small
> plugin mode.
> 
> - When placing the bibliography, filter the right entries from that html file
> (easy) using info that got stored in the tuc.

As said above, that might create problems with regards to disambiguation. 
Better just use the right entries.

> 
> It is also fast. The only depdency then is pandoc but that is widely available
> (irr). But I would need to see an example of that kind of out first. We
> basically treat the (formatted) bibliography as an external resource but in
> some format that we can easily parse (and if needed tweak).

So, that would work a bit like Aditya's filter module: 
https://github.com/adityam/filter
Right?

Another option would be to just use pandoc's citeproc directly, as described 
here: https://github.com/jgm/citeproc/blob/master/man/citeproc.1.md

We'd have to pass a list of citations as a JSON object to that citeproc and use 
the results. 
The results will include citations as well as the bibliography (all as JSON, 
content can be HTML formatted).

Denis

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


  1   2   >