[NTG-context] Re: Vertical Space between Text and Itemize List

2023-09-06 Thread Mikael Sundqvist
Hi,

You can use before, inbetween and after.

\setupitemgroup
[itemize]
[inbetween={\blank[1cm]},
before={\blank[2cm]},
after={\blank[3cm]}]

\starttext

\samplefile{ward}

\startitemize
\dorecurse{4}{
\startitem
\samplefile{knuthmath}
\stopitem
}
\stopitemize

\samplefile{ward}

\stoptext

/Mikael

On Thu, Sep 7, 2023 at 12:57 AM Jeroen  wrote:
>
> To get a packed itemize list I use this in the preamble
>
> \setupitemgroup
>   [itemize]
>   [packed]
>
> To get less vspace between the text and the first item, i changed it to this
>
> \setupitemgroup
>   [itemize]
>   [packed,
>nowhite]
>
> now there is indeed no whitespace. Is there a more granular way to place just 
> a little vertical whitespace between the text and the first item?
> ___
> 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] Vertical Space between Text and Itemize List

2023-09-06 Thread Jeroen
To get a packed itemize list I use this in the preamble

\setupitemgroup
  [itemize]
  [packed]

To get less vspace between the text and the first item, i changed it to this

\setupitemgroup
  [itemize]
  [packed,
   nowhite]

now there is indeed no whitespace. Is there a more granular way to place
just a little vertical whitespace between the text and the first item?
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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

[NTG-context] Re: XML, multiple spaces encoded as %20 get merged into one space

2023-09-06 Thread Hans Hagen via ntg-context

On 9/6/2023 4:59 PM, Pablo Rodriguez wrote:

On 9/6/23 12:28, denis.ma...@unibe.ch wrote:

Hi,

I have the example below that uses the three images in the attachment.
For some reason multiple spaces encoded as %20 get merged into a single %20.


Hi Denis,

this is standard TeX behavior (not only related to XML):

   \starttext
   \externalfigure[test  two spaces.pdf]
   \externalfigure[test  not two spaces.pdf]
   \stoptext

I don‘t know whether this is intended or not.

That being said, more than one consecutive space in a file name (I would
say it) is rather an exception than the rule.

Fixing this may cause more trouble that it might seem at first.
The problem with escaping is that there can be several round trips and 
it's kind of hard to predict usage and such. Also, take this:




Then, as i don't have these graphics, the test failed after a catch on 
the fact that tex didn't like the string for rendering in the 'unknown 
figure' drop in and after another catch the { } were not shown ...


Anyway, with a little magic i can now at least make this work but it 
needs testing with existing documents because it's not like we can 
update the xml stuff every thiem we have yet another exception (ok, 
those using sane image names are probably okay).


So, in a next update you can test some,

Hans


-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
   tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
-

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

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

[NTG-context] Re: escaping \ in Lua

2023-09-06 Thread Pablo Rodriguez
On 9/5/23 21:00, Hans Hagen wrote:
> On 9/5/2023 6:43 PM, Pablo Rodriguez wrote:
>> [...]
>> Sorry for the obscure question, but how can I access this with
>> "\goto{link to external}[a(b).pdf]"?
>
> \goto{link to external}[file(a(b).pdf)]

Many thanks for your help, Hans.

Pablo

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

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


[NTG-context] Re: XML, multiple spaces encoded as %20 get merged into one space

2023-09-06 Thread Pablo Rodriguez
On 9/6/23 12:28, denis.ma...@unibe.ch wrote:
> Hi,
>
> I have the example below that uses the three images in the attachment.
> For some reason multiple spaces encoded as %20 get merged into a single %20.

Hi Denis,

this is standard TeX behavior (not only related to XML):

  \starttext
  \externalfigure[test  two spaces.pdf]
  \externalfigure[test  not two spaces.pdf]
  \stoptext

I don‘t know whether this is intended or not.

That being said, more than one consecutive space in a file name (I would
say it) is rather an exception than the rule.

Fixing this may cause more trouble that it might seem at first.

Best,

Pablo


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

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

[NTG-context] XML, multiple spaces encoded as %20 get merged into one space

2023-09-06 Thread denis.maier
Hi,

I have the example below that uses the three images in the attachment.
For some reason multiple spaces encoded as %20 get merged into a single %20.

The first image () does not get included even though the 
name is correct.
The second image () gets included. Filename is correct.
The third image () gets included even though the actual 
file name does not contain two spaces (but @xlink:href does).

Any ideas what is going on here?

Then, in the case of the link, the two %20 end up as a single %20.

Best,
Denis

\setupinteraction[state=start]

\startxmlsetups xml:test
\xmlsetsetup{#1}{*}{-}
\xmlsetsetup{#1}{document|fig}{xml:*}
\stopxmlsetups

\xmlregisterdocumentsetup{test}{xml:test}

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

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

\startxmlsetups xml:graphic
  \externalfigure[\xmlfilter{#1}{./url('xlink:href')}]
\stopxmlsetups

\startxmlsetups xml:link
  https://uv-v4.netlify.app/\#?manifest=\xmlfilter{#1}{./url('xlink:href')}
\stopxmlsetups

\startxmlsetups xml:fig
\startplacefigure[title=Test]
\startalignment[center]
   \goto
   {\xmlfilter{#1}{/graphic/command(xml:graphic)}}
   [url(\xmlfilter{#1}{/link/command(xml:link)})]
\stopalignment
\stopplacefigure

\goto{test}[url(\xmlfilter{#1}{/link/command(xml:link)})]
\stopxmlsetups


\startbuffer[test]





https://iiif.ub.unibe.ch/presentation/v2.1/berner-inkunabeln/manifest/Inc%20IV%2076%20%20Spiegel%20vorn_Teigstempel"/>




https://iiif.ub.unibe.ch/presentation/v2.1/berner-inkunabeln/manifest/Inc%20IV%2076%20%20Spiegel%20vorn_Teigstempel"/>




https://iiif.ub.unibe.ch/presentation/v2.1/berner-inkunabeln/manifest/Inc%20IV%2076%20%20Spiegel%20vorn_Teigstempel"/>


\stopbuffer


\starttext

\xmlprocessbuffer{test}{test}{}

\stoptext



test  two spaces.pdf
Description: test  two spaces.pdf


test one space.pdf
Description: test one space.pdf


test not two spaces.pdf
Description: test not two spaces.pdf
___
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
___