[NTG-context] \autoinsertnextspace regression / discrepancy, mkiv to lmtx

2022-10-25 Thread Rik Kabel via ntg-context
The following example produces different results when processed by LMTX 
and MkIV. In particular, a space between the X and Y is not 
auto-inserted by LMTX, while it is by MkIV.


   \starttexdefinition TEST #1
  #1\autoinsertnextspace
   \stoptexdefinition
   \tt
   \starttext
  \TEST{X} \emph{Y}
   \stoptext

The MkIV result is the correct result (in my opinion).

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

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


Re: [NTG-context] How to make a row of text have vertical centering in tabulate environment?

2022-10-25 Thread Pablo Rodriguez via ntg-context
On 10/25/22 02:35, Joel via ntg-context wrote:
> I have a simple tabulate environment like this:
> [...]
> I'd like to vertically center the content in the one marked row. By
> default, they seem to place each cell aligned to the top, but how can I
> adjust them vertically so the text is vertically centered just in
> specific rows?

Hi Joel,

I have no experience with tabulates, but I wouldn’t be surprised if they
didn’t support vertical alignment.

You can achieve that with xtables:

  \starttext
  \startxtable[frame=off, option={stretch, width}]
\startxrow[topframe=on, bottomframe=on]
  \startxcell[nx=2]
Cause
  \stopxcell
  \startxcell
Effect
  \stopxcell
\stopxrow
\startxrow[bottomframe=on]
\startxcell[width=.45\textwidth,  align=lohi]
text a
  \stopxcell
  \startxcell[width=.1\textwidth,  align=lohi]
text b
  \stopxcell
  \startxcell[width=.45\textwidth, align=center]
\input knuth
  \stopxcell
\stopxrow
  \stopxtable
  \stoptext

xtables-mkiv.pdf contains all the details.

Just in case it might help,

Pablo

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

maillist : ntg-context@ntg.nl / https://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 make a row of text have vertical centering in tabulate environment?

2022-10-25 Thread Wolfgang Schuster via ntg-context

Joel via ntg-context schrieb am 25.10.2022 um 02:35:

I have a simple tabulate environment like this:

\starttext

 
\starttabulate[|p(.45\textwidth)|cp(.1\textwidth)|p(.45\textwidth)|]

             \NR
                 \HL
                 \NC Cause    \NC \NC Effect    \NC\NR
                 \HL
                 \NC            \NC \NC            \NC\NR
   \NC   text a     \NC text b \NC       \input knuth     \NC\NR 
%<-- vertically center this row

                 \HL
             \NR
         \stoptabulate


\stoptext

I'd like to vertically center the content in the one marked row. By 
default, they seem to place each cell aligned to the top, but how can I 
adjust them vertically so the text is vertically centered just in 
specific rows?


Use natural or extreme tables.

\starttext

\startxtable[frame=off,topframe=on,bottomframe=on]
\startxrow
\startxcell[width=.45\textwidth]
Cause
\stopxcell
\startxcell[width=.1\textwidth]
% empty cell
\stopxcell
\startxcell[width=.45\textwidth]
Effect
\stopxcell
\stopxrow
\startxrow[align={flushleft,lohi}]
\startxcell
text a
\stopxcell
\startxcell
text b
\stopxcell
\startxcell
\input knuth
\stopxcell
\stopxrow
\stopxtable

\stoptext

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

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


Re: [NTG-context] never add a hyphen to break a URL

2022-10-25 Thread Pablo Rodriguez via ntg-context
On 10/25/22 12:11, Steffen Wolfrum via ntg-context wrote:
> [...]
> …. strange, on my machine your example doesn't open the link.
>
> Please have a look here: only the last one («works …») opens the link. Why?

URIs only accept letters belonging to the US-ASCII
(https://datatracker.ietf.org/doc/html/rfc3986#section-2.3).

Other ones (such as "ö") have to be escaped. This is why only the sample
containing the escaped "ö" (as "%C3%B6" [which TeX needs to escape
again]) worked for you.

It seems that depending on the PDF viewer (and I guess the browser),
unescaped chars in URIs are a must or not.

I’m using Evince and SumatraPDF (with Wine). Firefox opens the links
fine (even using its internal viewer).

Maybe Acrobat is more picky when passing unescaped chars in URIs.

I hope it might help,

Pablo

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

maillist : ntg-context@ntg.nl / https://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] never add a hyphen to break a URL

2022-10-25 Thread Steffen Wolfrum via ntg-context


> Am 25.10.2022 um 11:47 schrieb Hans Hagen via ntg-context 
> :
> 
> On 10/25/2022 11:05 AM, Steffen Wolfrum via ntg-context wrote:
>> This does not open the right link.
>> At least on my machine nothing happens when clicking on «litteraturbanken.se 
>> ».
>> (And it looks as the link was cropped, only reads the first line?)
> 
> \setupinteraction[state=start]
> 
> \useurl
>  [litteraturbanken]
>  [https://litteraturbanken.se]
> [författare/CollijnI/titlar/ActaEtProcessusCanon/sida/614/faksimil?show_search_work_query=retractata_lbworkid=lb487378_mediatype=faksimil_word_form_only]
>  [https://litteraturbanken.se]
> 
> \starttext
> 
>before \goto{\url[litteraturbanken]}[url(litteraturbanken)] after
> 
>before \from[litteraturbanken] after
> 
> \stoptext
> 
> beware of viewer behaviour: some viewers parse the displayed pdf
> 
> Hans



…. strange, on my machine your example doesn't open the link.

Please have a look here: only the last one («works …») opens the link. Why?


\setupinteraction[state=start]

\useurl
 [litteraturbanken]
 [https://litteraturbanken.se]
[författare/CollijnI/titlar/ActaEtProcessusCanon/sida/614/faksimil?show_search_work_query=retractata_lbworkid=lb487378_mediatype=faksimil_word_form_only]
 [https://litteraturbanken.se]

\starttext

   before \goto{\url[litteraturbanken]}[url(litteraturbanken)] after

   before \from[litteraturbanken] after

   fails 
\useURL[test][https://litteraturbanken.se/författare/CollijnI/titlar/ActaEtProcessusCanon/sida/614/faksimil?
 
show_search_work_query=retractata_lbworkid=lb487378_mediatype=faksimil_word_form_only][][{https://litteraturbanken.se/författare/CollijnI/titlar/ActaEtProcessusCanon/sida/614/faksimil?
 
show_sear-ch_work_query=retractata_lbworkid=lb487378_mediatype=faksimil_word_form_only}]\from[test]
 after

   works 
\useURL[test][https://litteraturbanken.se/f\%C3\%B6rfattare/CollijnI/titlar/ActaEtProcessusCanon/sida/614/faksimil?
 
show_search_work_query=retractata_lbworkid=lb487378_mediatype=faksimil_word_form_only][][{https://litteraturbanken.se/författare/CollijnI/titlar/ActaEtProcessusCanon/sida/614/faksimil?
 
show_sear-ch_work_query=retractata_lbworkid=lb487378_mediatype=faksimil_word_form_only}]\from[test]
 after

\stoptext


Steffen
___
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] never add a hyphen to break a URL

2022-10-25 Thread Hans Hagen via ntg-context

On 10/25/2022 11:05 AM, Steffen Wolfrum via ntg-context wrote:

This does not open the right link.

At least on my machine nothing happens when clicking on 
«litteraturbanken.se ».


(And it looks as the link was cropped, only reads the first line?)


\setupinteraction[state=start]

\useurl
  [litteraturbanken]
  [https://litteraturbanken.se]

[författare/CollijnI/titlar/ActaEtProcessusCanon/sida/614/faksimil?show_search_work_query=retractata_lbworkid=lb487378_mediatype=faksimil_word_form_only]
  [https://litteraturbanken.se]

\starttext

before \goto{\url[litteraturbanken]}[url(litteraturbanken)] after

before \from[litteraturbanken] after

\stoptext

beware of viewer behaviour: some viewers parse the displayed pdf

Hans


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

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

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


Re: [NTG-context] never add a hyphen to break a URL

2022-10-25 Thread Steffen Wolfrum via ntg-context
This does not open the right link.

At least on my machine nothing happens when clicking on «litteraturbanken.se 
».

(And it looks as the link was cropped, only reads the first line?)

Steffen



> Am 24.10.2022 um 20:04 schrieb Pablo Rodriguez via ntg-context 
> mailto:ntg-context@ntg.nl>>:
> 
> A simpler approach would read (there is a single url, instead of two
> [less typos in the end]):
> 
> \setupinteraction[state=start]
> 
> \starttext
> 
> \def\MyURL[#1]{\goto{\tt\hyphenatedurl{#1}}[url(#1)]}
> 
> \MyURL[https://litteraturbanken.se/författare/CollijnI/titlar/ActaEtProcessusCanon/sida/614/faksimil?show_search_work_query=retractata_lbworkid=lb487378_mediatype=faksimil_word_form_only
>  
> ]
> \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] How to set the vertical spacing between a sequence of images?

2022-10-25 Thread Henning Hraban Ramm via ntg-context

Am 25.10.22 um 02:32 schrieb Joel via ntg-context:
I have code like this which randomly pulls a page from `comic2.pdf` and 
displays it, scaled to fit \textwidth, then displays four more random 
pages afterwares.


\starttext
     \dorecurse{5}{
             \placefigure[force, 
none]{}{\framed[frame=off]{\externalfigure[comic2.pdf][page=\randomnumber{1}{34}, width=\textwidth]}}

         }
\stoptext

The problem is I need to adjust the vertical space between the images. 
It seems to be set to some lineheight or such, but I need the distance 
between each image to be at 1/50th or 0.02 of \textwidth. ...though the 
last image can have the ordinary gap afterwards.


How can I se the vertical spacing between this sequence of image to 
0.02\textwidth?


Do you need floats at all? Otherwise a combination might fit your needs, 
and there you can setup the distances.


https://wiki.contextgarden.net/Combinations

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
___