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

2022-10-24 Thread Joel via ntg-context
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?
--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
___


[NTG-context] How to set the vertical spacing between a sequence of images?

2022-10-24 Thread 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?
--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] Backgrounds has changed in latest lmtx

2022-10-24 Thread Otared Kavian via ntg-context
Hi Thomas,

Sorry for answering too late… Meanwhile you found the culprit :-)

Anyway, I cleaned the cache, did a rebuild and typeset your example files. They 
do typeset, but as you pointed out the math font is from LMR, not Stix as you 
specified.

Best regards: Otared

> On 23 Oct 2022, at 21:52, Thomas A. Schmitz via ntg-context 
>  wrote:
> 
> On 10/23/22 21:34, Otared Kavian via ntg-context wrote:
>> Hi Thomas,
>> Both your examples typeset fine with my installation of LMTX (version 
>> 2022.10.22 11:23) on MacOS 11.7.
>> (Indeed you previous file test file reporting the background issue is 
>> typeset fine also).
>> Best regards : Otared
> 
> Thanks, Otared - that's bizarre. I just tried both on linux64 and macos 
> (12.6, arm): run install.sh, reload font cache and run context without the 
> luatex switch on the minimal example with the XITS Math font, and on both 
> systems, I get the error that I have sent this afternoon. Can you try after 
> rebuilding the font cache?
> 
> Thanks
> 
> Thomas
> ___
> If your question is of interest to others as well, please add an entry to the 
> Wiki!
> 
> maillist : ntg-context@ntg.nl / 
> https://www.ntg.nl/mailman/listinfo/ntg-context
> webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
> archive  : https://bitbucket.org/phg/context-mirror/commits/
> wiki : https://contextgarden.net
> ___

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://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-24 Thread Pablo Rodriguez via ntg-context
On 10/24/22 18:54, Steffen Wolfrum via ntg-context wrote:
> Hi,
>
> according to the Chicago Manual of Style we should «never add a hyphen to 
> break a URL»:
>
> (https://www.chicagomanualofstyle.org/qanda/data/faq/topics/URLs/faq0008.html)

Hi Steffen,

I think this is not even a question of style.

myhouse.com and my-house.com are different domains.

> Is there a switch to forbid \useURL adding hyphens?

\hyphenatedurl{} is the way to go. Although you add a hyphen (and a
blank space [spaces as part of urls need to be escaped) to your url.

I would also enclose the url inside \startasciimode...\stopasciimode to
avoid escaping the percent sign.

The percent sign has to be escaped as \letterpercent (otherwise, you get
\%) in text.

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

But https://wiki.contextgarden.net/URL has more info.

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
___


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

2022-10-24 Thread Steffen Wolfrum via ntg-context
Hi,

according to the Chicago Manual of Style we should «never add a hyphen to break 
a URL»:

(https://www.chicagomanualofstyle.org/qanda/data/faq/topics/URLs/faq0008.html)


Is there a switch to forbid \useURL adding hyphens?


\starttext

\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\%C3\%B6rfattare/CollijnI/titlar/ActaEtProcessusCanon/sida/614/faksimil?
 
show_sear-ch_work_query=retractata_lbworkid=lb487378_mediatype=faksimil_word_form_only}]\from[test]%

\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] Fwd: Hyphenation in multi-language projects

2022-10-24 Thread Pablo Rodriguez via ntg-context
On 10/24/22 17:09, Hans Hagen via ntg-context wrote:
>> [...]
>> Hans, is there any news regarding Pablos wish?
> no, because I'm in a different tex mode ...

Steffen,

meanwhile, a way of crappy cheating...

  \setuphyphenation[method=traditional]
  \doloopoverlist{en,nl,de,es,it,fr,da,fi}
{\registerhyphenationexception[\recursestring][Joha-nnes]}
  \starttext
  \startTEXpage[offset=1em]
  \hyphenatedword{Johannes}\\
  \nl \hyphenatedword{Johannes}\\
  \de \hyphenatedword{Johannes}\\
  \es \hyphenatedword{Johannes}\\
  \language[it] \hyphenatedword{Johannes}\\
  \language[fi] \hyphenatedword{Johannes}\\
  \fr \hyphenatedword{Johannes}\\
  \da \hyphenatedword{Johannes}\\
  \stopTEXpage
  \stoptext

Ugly code, but it might do the trick in some scenarios.

Just in case it might work,

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] Fwd: Hyphenation in multi-language projects

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

On 10/24/2022 3:08 PM, Steffen Wolfrum wrote:




Anfang der weitergeleiteten Nachricht:

*Von: *Pablo Rodriguez via ntg-context >

*Betreff: **Aw: [NTG-context] Hyphenation in multi-language projects*
*Datum: *14. September 2022 um 19:40:53 MESZ
*An: *Denis Maier via ntg-context >

*Kopie: *Pablo Rodriguez mailto:oi...@gmx.es>>
*Antwort an: *mailing list for ConTeXt users >


On 9/14/22 16:54, Denis Maier via ntg-context wrote:

[...]
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.


\hyphenation only works for the given language:

 \hyphenation{macOS}
 \starttext
 \startTEXpage[offset=1em]
 \currentlanguage:
 \hyphenatedword{macOS}

 \startlanguage[fr]
 \currentlanguage:
 \hyphenatedword{macOS}
 \stoplanguage
 \stopTEXpage
 \stoptext

But I’d say that \registerhyphenationexception[macOS] was
language-independent for me some time ago. (Now it seems to work like
\hyphenation.)

In any case, \registerhyphenationexception seems to have issues with
ligatures:

 \setuphyphenation[method=traditional]
 \registerhyphenationexception[steff-en macOS]
 \registerhyphenationexception[it][steff-en macOS]

 \starttext
 \startTEXpage[offset=1em]
 \currentlanguage:
 \hyphenatedword{steffen macOS}

 \startlanguage[it]
 \currentlanguage:
 \hyphenatedword{steffen macOS}
 \stoplanguage
 \stopTEXpage
 \stoptext

If there isn’t a command to add language-indepented hyphenation
exceptions or patterns, one for proper names (for people, products or
companies) would be really useful.

Just in case Hans or other wizard may take a look at this,

Pablo



Hans, is there any news regarding Pablos wish?

no, because I'm in a different tex mode ...

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] Fwd: Hyphenation in multi-language projects

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


> Anfang der weitergeleiteten Nachricht:
> 
> Von: Pablo Rodriguez via ntg-context  >
> Betreff: Aw: [NTG-context] Hyphenation in multi-language projects
> Datum: 14. September 2022 um 19:40:53 MESZ
> An: Denis Maier via ntg-context  >
> Kopie: Pablo Rodriguez mailto:oi...@gmx.es>>
> Antwort an: mailing list for ConTeXt users  >
> 
> On 9/14/22 16:54, Denis Maier via ntg-context wrote:
>>> [...]
>>> 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.
> 
> \hyphenation only works for the given language:
> 
>  \hyphenation{macOS}
>  \starttext
>  \startTEXpage[offset=1em]
>  \currentlanguage:
>  \hyphenatedword{macOS}
> 
>  \startlanguage[fr]
>  \currentlanguage:
>  \hyphenatedword{macOS}
>  \stoplanguage
>  \stopTEXpage
>  \stoptext
> 
> But I’d say that \registerhyphenationexception[macOS] was
> language-independent for me some time ago. (Now it seems to work like
> \hyphenation.)
> 
> In any case, \registerhyphenationexception seems to have issues with
> ligatures:
> 
>  \setuphyphenation[method=traditional]
>  \registerhyphenationexception[steff-en macOS]
>  \registerhyphenationexception[it][steff-en macOS]
> 
>  \starttext
>  \startTEXpage[offset=1em]
>  \currentlanguage:
>  \hyphenatedword{steffen macOS}
> 
>  \startlanguage[it]
>  \currentlanguage:
>  \hyphenatedword{steffen macOS}
>  \stoplanguage
>  \stopTEXpage
>  \stoptext
> 
> If there isn’t a command to add language-indepented hyphenation
> exceptions or patterns, one for proper names (for people, products or
> companies) would be really useful.
> 
> Just in case Hans or other wizard may take a look at this,
> 
> Pablo


Hans, is there any news regarding Pablos wish?

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
___