[NTG-context] nearly on topic: BoVeX, AI alignment

2024-06-10 Thread Henning Hraban Ramm
Funny idea of replacing hyphenation with LLM-generated alternative 
wording, also explains a bit how TeX works:

http://tom7.org/bovex/

(a SIGBOVIK submission)

;) hr
___
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: missing space with French quotation

2024-05-30 Thread Rik Kabel

My apologies to all, and thank you, Wolfgang. Time to update my notes.

--
Rik

On 2024-05-30 16:33, Wolfgang Schuster wrote:

Rik Kabel schrieb am 30.05.2024 um 19:21:

 From my basic environment file, a useful reminder:

    %% \mainlanguage sets language used for labels (TOC, chapters, ...)
    %% \language sets language to use for hyphenation, quote rules, ...


\mainlanguage includes all settings of \language.

As you can see in the following example \mainlanguage change the float 
label and the quotation marks but \language changes only the quotation 
marks and uses the label of the main language.


 begin example
\starttext

\startplacefigure[title=\quotation{English quotes}]
\midaligned{\blackrule[width=6cm,height=2cm,color=red]}
\stopplacefigure

\start \mainlanguage[nl]
\startplacefigure[title=\quotation{Dutch quotes}]
\midaligned{\blackrule[width=6cm,height=2cm,color=green]}
\stopplacefigure
\stop

\start \language[fr]
\startplacefigure[title=\quotation{French quotes}]
\midaligned{\blackrule[width=6cm,height=2cm,color=blue]}
\stopplacefigure
\stop

\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 / 
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: missing space with French quotation

2024-05-30 Thread Wolfgang Schuster

Rik Kabel schrieb am 30.05.2024 um 19:21:

 From my basic environment file, a useful reminder:

%% \mainlanguage sets language used for labels (TOC, chapters, ...)
%% \language sets language to use for hyphenation, quote rules, ...


\mainlanguage includes all settings of \language.

As you can see in the following example \mainlanguage change the float 
label and the quotation marks but \language changes only the quotation 
marks and uses the label of the main language.


 begin example
\starttext

\startplacefigure[title=\quotation{English quotes}]
\midaligned{\blackrule[width=6cm,height=2cm,color=red]}
\stopplacefigure

\start \mainlanguage[nl]
\startplacefigure[title=\quotation{Dutch quotes}]
\midaligned{\blackrule[width=6cm,height=2cm,color=green]}
\stopplacefigure
\stop

\start \language[fr]
\startplacefigure[title=\quotation{French quotes}]
\midaligned{\blackrule[width=6cm,height=2cm,color=blue]}
\stopplacefigure
\stop

\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 / 
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: missing space with French quotation

2024-05-30 Thread Rik Kabel

From my basic environment file, a useful reminder:

   %% \mainlanguage sets language used for labels (TOC, chapters, ...)
   %% \language sets language to use for hyphenation, quote rules, ...

--
Rik


On 2024-05-30 11:34, Peter Münster wrote:

Hi,

When using \start/stopquotation in French documents, there is a missing space:

\mainlanguage[fr]
\setcharacterspacing[frenchpunctuation]
\starttext
bla \quotation{OK} bla\\
bla «OK» bla
\startquotation
   Not Ok: a space is missing
\stopquotation
\stoptext

Is this a bug or a feature?

How could I get a space before "»" please?

TIA for any help,___
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: How to Define a New Language

2024-05-24 Thread Wolfgang Schuster

ai2472206...@yeah.net schrieb am 24.05.2024 um 16:39:

3. In general, it is enough to distinguish between Chinese Simplified Chinese 
and Chinese Traditional.

Chinese has a large number of Chinese characters, therefore the fonts produced 
are generally divided into Chinese Simplified and Chinese Traditional. This 
causes Chinese Simplified Chinese fonts to fail to display Chinese Traditional.

In addition to the differences in fonts, Chinese mainland, Taiwan(china), Hong 
Kong(china), etc. use different punctuation marks, expressions, etc. For example, Chinese 
mainland mainly uses "", while Taiwan may use 「」 more often. and the difference 
between the two Chinese expressions, such as when using labeltext.


There are also differences regarding punctuation marks between official 
documents from the government and universities etc. but this is 
something which can be changed in the document style.



While it's great to set up new languages at the system level, there is always 
the possibility that new languages will be added for one reason or another.

As far as Chinese is concerned, it has a very large number of dialects. We 
can't be fully integrated into the system. Opening up suitable interfaces to 
add new languages can reduce the cost of system maintenance.


The following should work with two main languages for simplified and 
traditional and local variant which fall back on both. The current 
chinese language can also be changed to the fallbacks.


\installlanguage [zh-hans] [..,..=..,..] % Simplified Chinese
\installlanguage [zh-hant] [..,..=..,..] % Traditional Chinese

\installlanguage [zh-cn] [zh-hans] % China
\installlanguage [zh-my] [zh-hans] % Malaysia
\installlanguage [zh-sg] [zh-hans] % Singapore

\installlanguage [zh-hk] [zh-hant] % Hong Kong
\installlanguage [zh-mo] [zh-hant] % Macau
\installlanguage [zh-tw] [zh-hant] % Taiwan


As far as I know, the characters used (Chinese Simplified, Chinese 
Traditional), the punctuation marks used (Chinese mainland, Taiwan, Hong Kong), 
and the expressions used (Chinese mainland, Taiwan, Hong Kong) are basically 
different between the dialects of Chinese. There is no hyphenation difference 
in any dialect.


I looked at the rules for linebreaking in chinese a while ago and even 
though there are a few guidelines there is no fixed list this. Many 
programs let you change the characters where a break is or isn't possible.



As far as I am currently using, the context is not very well set for 
localization, and there are many words in lang-txt.lua that have not been 
translated into Chinese. I think that as an ordinary user, it is very dangerous 
to modify information at the system level.


You're free to fill the missing entries.


Although, as a temporary alternative, we can use 'newif' or 'startmode' to add 
a new condition to accommodate both Chinese Simplified and Chinese Traditional 
in the same document. However, it would be nice to have support at the system 
level.

I don't know if I'm getting my point right. Because of the above, I used 
translation software to translate my thoughts.


To support both forms it is easier to have separate languages and 
linebreaking/font settings for each of them.


Wolfgang
___
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: How to Define a New Language

2024-05-24 Thread ai2472206007
3. In general, it is enough to distinguish between Chinese Simplified Chinese 
and Chinese Traditional.

Chinese has a large number of Chinese characters, therefore the fonts produced 
are generally divided into Chinese Simplified and Chinese Traditional. This 
causes Chinese Simplified Chinese fonts to fail to display Chinese Traditional. 

In addition to the differences in fonts, Chinese mainland, Taiwan(china), Hong 
Kong(china), etc. use different punctuation marks, expressions, etc. For 
example, Chinese mainland mainly uses "", while Taiwan may use 「」 more often. 
and the difference between the two Chinese expressions, such as when using 
labeltext.

While it's great to set up new languages at the system level, there is always 
the possibility that new languages will be added for one reason or another. 

As far as Chinese is concerned, it has a very large number of dialects. We 
can't be fully integrated into the system. Opening up suitable interfaces to 
add new languages can reduce the cost of system maintenance. 

As far as I know, the characters used (Chinese Simplified, Chinese 
Traditional), the punctuation marks used (Chinese mainland, Taiwan, Hong Kong), 
and the expressions used (Chinese mainland, Taiwan, Hong Kong) are basically 
different between the dialects of Chinese. There is no hyphenation difference 
in any dialect. 

As far as I am currently using, the context is not very well set for 
localization, and there are many words in lang-txt.lua that have not been 
translated into Chinese. I think that as an ordinary user, it is very dangerous 
to modify information at the system level.

Although, as a temporary alternative, we can use 'newif' or 'startmode' to add 
a new condition to accommodate both Chinese Simplified and Chinese Traditional 
in the same document. However, it would be nice to have support at the system 
level.

I don't know if I'm getting my point right. Because of the above, I used 
translation software to translate my thoughts.

Muyik
___
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: How to Define a New Language

2024-05-24 Thread Wolfgang Schuster

ai2472206...@yeah.net schrieb am 24.05.2024 um 14:05:

Hello, everyone.

As the title describes, I want to define a new language: Chinese Traditional.
Based on what I could find on the Internet, I made these settings.
But I couldn't get the results I wanted.

%%%start example
\usetypescriptfile[osx]
\setupbodyfont   [stfangsong]
\unprotect
\installlanguage[cnt] [default=cn,patterns=cn,factor=yes]
\setuplanguage  [cnt] [spacing=packed,default=cn,patterns=cn,factor=yes]
\setuplabeltext [cnt] [appendix={附錄}]
\protect
\mainlanguage[cnt]
\currentmainlanguage
\labeltext{appendix}
%%% stopexample

I think I'm going to get the two kanji [附錄]. But the truth is, he has nothing.
But when I converted to Chinese Simplified, he magically appeared.

%%%start example
\usetypescriptfile[osx]
\setupbodyfont   [stfangsong]
\unprotect
\setuplabeltext [cn] [appendix={附錄}] %%% here switch to Chinese-Simplified
\protect
\currentmainlanguage
\labeltext{appendix}
%%% stopexample

So, what should I do to get it. Of course, my original assumption was that
when I changed the language, these labels, fonts, indentations, line spacing, 
etc.,
would change. But for now, I'm stuck at defining a new language.

  If anyone can give advice, appreciate it


1. It is better to add new languages to Context itself and not just in 
your document.


2. Chinese doesn't use hyphenation pattern but has rules where to break 
which is enabled with the \setscript command.


3. We should use agree upon a name which is used for traditional and 
simplified chinese (at the moment we have only chinese without 
distinction). Is it even enough to just separate between both or do we 
need separate setting china, singapore, taiwan, hong kong and macau?


Wolfgang

___
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: How to disable hyphenation at the end of a line?

2024-05-20 Thread Wolfgang Schuster

Joel via ntg-context schrieb am 20.05.2024 um 03:30:
I'm using mostly default ConTeXt settings, but an editor has warned I 
should avoid using hyphenation at the end of lines--at least for my 
particular audience.


I've found manual text that says how to disable specific words from 
being hyphenated.


Is there a whole-document switch to disable it?


You can disable hyphenation with \setupalign[nothyphenated] but this 
setting alone isn't enough because now text tends to stick into the 
right margin. To get better result you have to combine it with other 
option like "tolerant" or "verytolerant".


The example below show also how you can use font enpansion in 
combination with a lesser tolerance value to align the text on both 
margins with result in smaller interword spacer than a larger tolerance 
value. You can combine this with font protrusion to move punctuation 
marks slightly into the margin area to have a better alignment of the 
text alone.


 begin example
\setupwhitespace[big]

\showframe[text][text]

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

\starttext

\type{alignment: default}

\samplefile{lorem}

\page

\type{alignment: nothyphenated}

\start \setupalign[nothyphenated]
\samplefile{lorem}
\stop

\page

\type{alignment: nothyphenated,flushleft}

\start \setupalign[nothyphenated,flushleft]
\samplefile{lorem}
\stop

\page

\type{alignment: nothyphenated,verytolerant}

\start \setupalign[nothyphenated,verytolerant]
\samplefile{lorem}
\stop

\page

\type{alignment: nothyphenated,tolerant,hz}

\start \setupalign[nothyphenated,tolerant,hz]
\samplefile{lorem}
\stop

\page

\type{alignment: nothyphenated,verytolerant,hanging}

\start \setupalign[nothyphenated,verytolerant,hanging]
\samplefile{lorem}
\stop

\page

\type{alignment: nothyphenated,tolerant,hz,hanging}

\start \setupalign[nothyphenated,tolerant,hz,hanging]
\samplefile{lorem}
\stop

\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 / 
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: How to disable hyphenation at the end of a line?

2024-05-19 Thread Mikael Sundqvist
Hi,

since it has to do with paragraph building and not with certain breaks
it is controlled by a demerits rather than a penalty, and there is, as
far as I know, no value that explicitly prohibits a hyphen at the last
line specifically (you can set the hyphenpenalty to 1 to avoid
hyphenations everywhere). In the total demerits calculation penalties
are more or less squared, so setting

\finalhyphendemerits

to a ridiculously high value might do, for most paragraphs.

/Mikael

On Mon, May 20, 2024 at 3:33 AM Joel via ntg-context  wrote:
>
> I'm using mostly default ConTeXt settings, but an editor has warned I should 
> avoid using hyphenation at the end of lines--at least for my particular 
> audience.
>
> I've found manual text that says how to disable specific words from being 
> hyphenated.
>
> Is there a whole-document switch to disable it?
>
> --Joel
> ___
> 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] How to disable hyphenation at the end of a line?

2024-05-19 Thread Joel via ntg-context
I'm using mostly default ConTeXt settings, but an editor has warned I should 
avoid using hyphenation at the end of lines--at least for my particular 
audience.
I've found manual text that says how to disable specific words from being 
hyphenated.

Is there a whole-document switch to disable it?
--Joel
___
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: incosistent output of --- dash

2024-04-06 Thread Hans Hagen

On 4/6/2024 1:38 PM, Wolfgang Schuster wrote:

Henning Hraban Ramm schrieb am 06.04.2024 um 12:23:

Am 06.04.24 um 11:43 schrieb madiazm.eo...@gmail.com:

Hi everyone,
I'm a bit puzzled because I usually don't get an em-dash when I type 
tree hyphens. If I use the command \emdash, no problem but when I use 
the hyphens some days it works... and somedays I see three small 
hyphens.
I tried it on overleaf and of ContextOnWeb with the same 
inconsistency. If I create a new file it usually works right; but 
when I overwrite an existing file subtituting a hyphen for three 
where the dash should be I sometimes get it right and sometimes wrong.
It is not the pdf viewer since I get good or bad results in all, the 
overleaf pdf preview tool, the context on web preview tool and the 
mozilla integrated pdf viewer.


Am I missing something on the use of this ligature? (the question is 
just out of curiosity, since I plan to create a command that adds a 
hairspace after or before the dash, since I don't like it to stick to 
some letters like "o".


Generally, “we” try to reduce active characters as much as possible, 
that’s why -- and --- usually /don’t/ produce en or em dashes. You can 
activate these ligatures as a font feature though (AFAIR 
"latexhyphens", can’t find it…).


The name of the option has changes a few times and the current setting 
is textcontrol=collapsehyphens.



Some editors and some fonts do automatical replacements.


In this case it could be the wrong symbol in the document, there are 
many dashes in unicode which look similar in the input and output files.


\starttext

\startbuffer
\starttabulate[|T]
\NC U+0002D \NC - \NC -- \NC --- \NC\NR
\NC U+02011 \NC ‑ \NC ‑‑ \NC ‑‑‑ \NC\NR
\NC U+02012 \NC ‒ \NC ‒‒ \NC ‒‒‒ \NC\NR
\stoptabulate
\stopbuffer

\getbuffer

\setupbodyfont[pagella]

\getbuffer

\stoptext
detail: it is not a real fontfeature (as tlig in mkiv) but implemented 
differently with a bit more control, so we have


\nohyphencollapsing
\dohyphencollapsing

etc too as control options. These collapsed hyphens are also configured 
as valid hyphenation chars.


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
___


[NTG-context] Re: ck hyphenation in old German orthography

2024-03-18 Thread Hraban Ramm

Am 18.03.24 um 00:02 schrieb Wolfgang Schuster:

Hraban Ramm schrieb am 17.03.2024 um 12:06:
Hi, the sample file aesop-de is in old German orthography, there, ck 
should get hyphenated as k-k, this doesn’t work (e.g. Mücke isn’t 
hyphenated at all). Is there something I can configure?


Hraban


\mainlanguage[deo]
\setuplanguage[deo][
   hyphenmin=4,
   lefthyphenmin=2,
   righthyphenmin=2,
]

\starttext

\hyphenatedfile{aesop-de}

\startcolumns
Funktioniert die Trennung? Heckeneckenzecken

\samplefile{aesop-de}

\stopcolumns

\stoptext


Just as a start, the languages manual provides more details about 
hyphenation.


\startexceptions[de]
He{k-}{k}{ck}en-e{k-}{k}{ck}en-ze{k-}{k}{ck}en
\stopexceptions

% \registerhyphenationpattern[de][c1k/k=k]
%
% \setuphyphenation[method=traditional]

\mainlanguage[de]

\starttext
Heckeneckenzecken = \hyphenatedword{Heckeneckenzecken}
\stoptext


Thank you! There’s some information I need to add in the wiki.

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
___


[NTG-context] Re: ck hyphenation in old German orthography

2024-03-17 Thread Wolfgang Schuster

Hraban Ramm schrieb am 17.03.2024 um 12:06:
Hi, the sample file aesop-de is in old German orthography, there, ck 
should get hyphenated as k-k, this doesn’t work (e.g. Mücke isn’t 
hyphenated at all). Is there something I can configure?


Hraban


\mainlanguage[deo]
\setuplanguage[deo][
   hyphenmin=4,
   lefthyphenmin=2,
   righthyphenmin=2,
]

\starttext

\hyphenatedfile{aesop-de}

\startcolumns
Funktioniert die Trennung? Heckeneckenzecken

\samplefile{aesop-de}

\stopcolumns

\stoptext


Just as a start, the languages manual provides more details about 
hyphenation.


\startexceptions[de]
He{k-}{k}{ck}en-e{k-}{k}{ck}en-ze{k-}{k}{ck}en
\stopexceptions

% \registerhyphenationpattern[de][c1k/k=k]
%
% \setuphyphenation[method=traditional]

\mainlanguage[de]

\starttext
Heckeneckenzecken = \hyphenatedword{Heckeneckenzecken}
\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://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] ck hyphenation in old German orthography

2024-03-17 Thread Hraban Ramm
Hi, the sample file aesop-de is in old German orthography, there, ck 
should get hyphenated as k-k, this doesn’t work (e.g. Mücke isn’t 
hyphenated at all). Is there something I can configure?


Hraban


\mainlanguage[deo]
\setuplanguage[deo][
  hyphenmin=4,
  lefthyphenmin=2,
  righthyphenmin=2,
]

\starttext

\hyphenatedfile{aesop-de}

\startcolumns
Funktioniert die Trennung? Heckeneckenzecken

\samplefile{aesop-de}

\stopcolumns

\stoptext

___
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 Jean-Pierre Delange

Thanks to Thomas and Denis,

That's it: use GFS Didot for the French text and Theano Didot for the 
Greek. In my working text I have this preamble (and other things):


\setuplanguage[fr][patterns={fr,agr}]
\mainlanguage[fr]
\setcharacterspacing[frenchpunctuation]]
\setuplayout [backspace=40mm]
\setuppagenumbering[alternative=doublesided, location={header, inmargin}]
\setupmargindata[inmargin][location=inner, 
style={setupinterlinespace[line=2.8ex]}]

\setupmarginframed[inmargin][align=right]
\setupbodyfontenvironment[default][em=italic]
\definefallbackfamily[mainface][rm][Theano 
Didot][preset=range:greek,force=yes]

\definefontfamily[mainface][rm][GFS Didot]
\setupbodyfont[mainface, 11pt]

I'm currently working on MS Windows 11 for the moment (as a test beside 
Linux). I didn't try to compile this text under Linux, but I don't think 
there is an issue with the OS.


As far as GFS Didot is concerned, I have installed the most recent 
version. But what amazes me the most is that by only keeping a font like 
EBGaramond without writing :

\definefallbackfamily
 [mainface]
[rm]
[Theano Didot]
[preset=range:greek,force=yes]
So, using EBGaramond only, I have the French text (with italics), as 
well as the Greek text...


Try this :

\setuplanguage

\mainlanguage[fr,agr]

\definefontfamily

[mainface]

[rm]

[EBGaramond]

\setupbodyfont[mainface, 12pt]

\setupbodyfontenvironment[default][em=italic]


\starttext

Socrate est descendu au Pirée et affirme sa satisfaction du culte rendu 
à cette nouvelle déesse par les Thraces; néanmoins, {\em il ne nous dit 
rien des prières} qu'il a lui-même rendues à la déesse avec les autres 
participants, dont il fait pourtant état. Sur le chemin du retour, il 
est arrêté par Polémarque qui leur apprend qu'une retraite aux flambeaux 
à cheval est prévue par les Thraces, ainsi qu'une fête de nuit 
\quote{qui vaut la peine d'être vue} (ἣν ἄξιον θεάσασθαι; {\em èn 
axion théasasthai} - 328a).


\blank


Κάθε άνθρωπος δικαιούται να επικαλείται όλα τα δικαιώματα και όλες τις 
ελευθερίες που προκηρύσσει η παρούσα Διακήρυξη, χωρίς καμία απολύτως 
διάκριση, ειδικότερα ως προς τη φυλή, το χρώμα, το φύλο, τη γλώσσα, τις 
θρησκείες, τις πολιτικές ή οποιεσδήποτε άλλες πεποιθήσεις, την εθνική ή 
κοινωνική καταγωγή, την περιουσία, τη γέννηση ή οποιαδήποτε άλλη κατάσταση.



Δεν θα μπορεί ακόμα να γίνεται καμία διάκριση εξαιτίας του πολιτικού, 
νομικού ή διεθνούς καθεστώτος της χώρας από την οποία προέρχεται κανείς, 
είτε πρόκειται για χώρα ή εδαφική περιοχή ανεξάρτητη, υπό κηδεμονία ή 
υπεξουσία, ή που βρίσκεται υπό οποιονδήποτε άλλον περιορισμό κυριαρχίας.


\stoptext


I've found a solution, with Segoeui (Windows font) as the main font and 
Theano Didot for the Greek text.
But I don't understand why setting the fonts to GFS Didot and Theano 
Didot prevents italics from being displayed ...



Best//JP





Le 26/02/2024 à 15:02, Thomas A. Schmitz a écrit :

I just tried your example with the latest version of GFSDidot (the older 
version I had on my system did not show some diacritics; this problem 
disappeared when I installed the latest), and the italics are there, I don’t 
see any problem in the pdf. If you want the Greek displayed in Theano, you will 
have to add “force=yes” to your definition of the fallback family:

\definefallbackfamily
 [mainface]
 [rm]
 [Theano Didot]
 [preset=range:greek,force=yes]

Your text cannot have two main languages, so

\mainlanguage[fr]

If you want hyphenation for your Greek passages, you can add

\setuplanguage [fr] [patterns={fr,agr}]

The line where you have polytonic Greek does not use precomposed characters, 
but combinations of greek characters and diacritics; this will probably not 
work in recent context versions that expect actual unicode input.

I hope I have really understood what you want: GFSDIdot for the French text and 
Theano for Greek?

HTH

Thomas


On 26. Feb 2024, at 13:32, Jean-Pierre Delange  wrote:

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

[NTG-context] Re: Issue with italics

2024-02-26 Thread Thomas A. Schmitz
I just tried your example with the latest version of GFSDidot (the older 
version I had on my system did not show some diacritics; this problem 
disappeared when I installed the latest), and the italics are there, I don’t 
see any problem in the pdf. If you want the Greek displayed in Theano, you will 
have to add “force=yes” to your definition of the fallback family:

\definefallbackfamily
[mainface]
[rm]
[Theano Didot]
[preset=range:greek,force=yes]

Your text cannot have two main languages, so 

\mainlanguage[fr]

If you want hyphenation for your Greek passages, you can add

\setuplanguage [fr] [patterns={fr,agr}]

The line where you have polytonic Greek does not use precomposed characters, 
but combinations of greek characters and diacritics; this will probably not 
work in recent context versions that expect actual unicode input. 

I hope I have really understood what you want: GFSDIdot for the French text and 
Theano for Greek?

HTH

Thomas

> On 26. Feb 2024, at 13:32, Jean-Pierre Delange  wrote:
> 
> 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: Sorry for once more asking, i am at Work

2024-02-19 Thread Gavin via ntg-context
Hi Uschi,

The log file is certainly helpful. It tells me two things. First, you have TeX 
Live 2023 installed. TeX Live 2023 has a good version of ConTeXt. Unless you 
need specific, newer ConTeXt features, you can use the ConTeXt version in TeX 
Live that you already have.

Second, when you tried to typeset your file, context-test.tex, your computer 
attempted to use pdftex rather than ConTeXt. To figure out why it did that, we 
need to know how you are doing the typesetting. Do you use a command on the 
command line? Are use using an editor that has a “typeset” button? Something in 
that part of the process needs to be changed so the typesetting uses ConTeXt 
rather than pdftex.

Gavin


> On Feb 19, 2024, at 5:06 AM, Ursula Hermann  
> wrote:
> 
> Dear List,
> I have done the new download at Work. After compiling is always the same:
> Command Line:   context.exe --synctex=-1 "context-test.tex"
> Startup Folder: 
> C:\Users\Hermann\Downloads\context-mswin\tex\texmf-context\tex\context\test\mkiv
> startup error : no format file given, quitting
> I wrote on Wednesday last week. I also did an download of cont- lmt and cont- 
> tmf. Don’t know if there is a mistake which is my fault?
> I don’t know, maybe important:
> The log file says:
> This is pdfTeX, Version 3.141592653-2.6-1.40.25 (TeX Live 2023) (preloaded 
> format=pdflatex 2024.2.6)  19 FEB 2024 12:41
> entering extended mode
> restricted \write18 enabled.
> %&-line parsing enabled.
> **context-test.tex
> (./context-test.tex
> LaTeX2e <2023-11-01> patch level 1
> L3 programming layer <2024-01-22>
> ! Undefined control sequence.
> l.1 \starttext
> ? ! Emergency stop.
> l.1
>End of file on the terminal!
> Here is how much of TeX's memory you used:
> 16 strings out of 474221
> 403 string characters out of 5750189
> 1922978 words of memory out of 500
> 22371 multiletter control sequences out of 15000+60
> 558069 words of font info for 36 fonts, out of 800 for 9000
> 1141 hyphenation exceptions out of 8191
> 12i,0n,13p,58b,8s stack positions out of 1i,1000n,2p,20b,20s
> !  ==> Fatal error occurred, no output PDF file produced!
> Uschi
>  Von: Ursula Hermann
> Gesendet: Mittwoch, 14. Februar 2024 14:16
> An: 'mailing list for ConTeXt users' 
> Betreff: AW: Sorry for once more asking, i am at Work
> Dear Hans,
> This was before you wrote, that you did an new  upload, but i saw it in the 
> installation. Because there were more files.
> Uschi
> Von: Ursula Hermann
> Gesendet: Mittwoch, 14. Februar 2024 13:42
> An: 'mailing list for ConTeXt users' 
> Betreff: Sorry for once more asking, i am at Work
> So after a new update on my Computer at Work, I did once more download the 
> installation. After compiling with context-mswin I got this file
> Command Line:   context.exe --synctex=-1 "context-test.tex"
> Startup Folder: 
> C:\Users\Hermann\Downloads\context-mswin\tex\texmf-context\tex\context\test\mkiv
> startup error : no format file given, quitting
> 
> ConTeXt Compilation Report (Pages: 0)
> Errors: 0   Warnings: 0   Bad Boxes: 0
> Did I something wrong?
> Uschi 
> ___
> 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: Sorry for once more asking, i am at Work

2024-02-19 Thread Ursula Hermann
Dear List,

I have done the new download at Work. After compiling is always the same:
Command Line:   context.exe --synctex=-1 "context-test.tex"
Startup Folder: 
C:\Users\Hermann\Downloads\context-mswin\tex\texmf-context\tex\context\test\mkiv

startup error : no format file given, quitting

I wrote on Wednesday last week. I also did an download of cont- lmt and cont- 
tmf. Don't know if there is a mistake which is my fault?
I don't know, maybe important:

The log file says:

This is pdfTeX, Version 3.141592653-2.6-1.40.25 (TeX Live 2023) (preloaded 
format=pdflatex 2024.2.6)  19 FEB 2024 12:41
entering extended mode
restricted \write18 enabled.
%&-line parsing enabled.
**context-test.tex
(./context-test.tex
LaTeX2e <2023-11-01> patch level 1
L3 programming layer <2024-01-22>
! Undefined control sequence.
l.1 \starttext

?
! Emergency stop.
l.1

End of file on the terminal!

Here is how much of TeX's memory you used:
16 strings out of 474221
403 string characters out of 5750189
1922978 words of memory out of 500
22371 multiletter control sequences out of 15000+60
558069 words of font info for 36 fonts, out of 800 for 9000
1141 hyphenation exceptions out of 8191
12i,0n,13p,58b,8s stack positions out of 1i,1000n,2p,20b,20s
!  ==> Fatal error occurred, no output PDF file produced!

Uschi


Von: Ursula Hermann
Gesendet: Mittwoch, 14. Februar 2024 14:16
An: 'mailing list for ConTeXt users' 
Betreff: AW: Sorry for once more asking, i am at Work

Dear Hans,

This was before you wrote, that you did an new  upload, but i saw it in the 
installation. Because there were more files.

Uschi

Von: Ursula Hermann
Gesendet: Mittwoch, 14. Februar 2024 13:42
An: 'mailing list for ConTeXt users' 
mailto:ntg-context@ntg.nl>>
Betreff: Sorry for once more asking, i am at Work

So after a new update on my Computer at Work, I did once more download the 
installation. After compiling with context-mswin I got this file

Command Line:   context.exe --synctex=-1 "context-test.tex"
Startup Folder: 
C:\Users\Hermann\Downloads\context-mswin\tex\texmf-context\tex\context\test\mkiv

startup error : no format file given, quitting



ConTeXt Compilation Report (Pages: 0)

Errors: 0   Warnings: 0   Bad Boxes: 0

Did I something wrong?

Uschi
___
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: hyphenation question

2024-02-02 Thread Hans van der Meer via ntg-context
Yes, that is a possibilty that did not escape me. But this is but an example. 
In those documents such abbreviations are quite common and frequent. 
I hoped therefore to find a generic solution!

yours sincerely
dr. Hans van der Meer



> On 2 Feb 2024, at 18:25, Hans Hagen via ntg-context  
> wrote:
> 
> On 2/2/2024 1:03 PM, Hans van der Meer via ntg-context wrote:
>> In the 18th century documents I am transcribing often words are abbreviated 
>> as for example /voorschreeve/ becoming /voors:/ In the transcription it is 
>> usual to write this as /voors[chreeve]/ indicating to the reader how the 
>> abbreviation was interpreted.
>> The problem then arises with hyphenation, because /voors[chreeve]/  in the 
>> example will not be hyphenated as if the []'s were absent. Which is what I 
>> would like to happen.
>> Question: is it possible to realize this and how?
> Like this?
> 
> \starttext
> 
> \startexceptions
>voor-s[chree-ve]
> \stopexceptions
> 
> \hsize1mm
> voors[chreeve]
> 
> \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 / 
> 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: hyphenation question

2024-02-02 Thread Hans Hagen via ntg-context

On 2/2/2024 1:03 PM, Hans van der Meer via ntg-context wrote:
In the 18th century documents I am transcribing often words are 
abbreviated as for example /voorschreeve/ becoming /voors:/ In the 
transcription it is usual to write this as /voors[chreeve]/ indicating 
to the reader how the abbreviation was interpreted.


The problem then arises with hyphenation, because /voors[chreeve]/  in 
the example will not be hyphenated as if the []'s were absent. Which is 
what I would like to happen.


Question: is it possible to realize this and how?

Like this?

\starttext

\startexceptions
voor-s[chree-ve]
\stopexceptions

\hsize1mm
voors[chreeve]

\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 / 
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] hyphenation question

2024-02-02 Thread Hans van der Meer via ntg-context
In the 18th century documents I am transcribing often words are abbreviated as 
for example voorschreeve becoming voors: In the transcription it is usual to 
write this as voors[chreeve] indicating to the reader how the abbreviation was 
interpreted.

The problem then arises with hyphenation, because voors[chreeve]  in the 
example will not be hyphenated as if the []'s were absent. Which is what I 
would like to happen.

Question: is it possible to realize this and how?

yours sincerely
dr. Hans van der Meer



___
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: LMTX schema for poster

2024-01-11 Thread Henning Hraban Ramm

Here’s a preliminary schema of LMTX. What do you think?

Is there something important missing?
Maybe add mtxrun, hyphenation patterns, modules. Move the images to the 
resources?
Maybe I should replace the “files” within MkXL with the parts like 
parser, par builder and whatever?

I don’t want to complicate it needlessly.

I’ll redraw it in MetaPost (with proper typography) if I’m sure enough.

Hraban

LMTX-Schema.pdf
Description: Adobe PDF document
___
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: Links

2024-01-09 Thread Ursula Hermann
Dear Henning, 

Many thanks .

Uschi 

-Ursprüngliche Nachricht-
Von: Henning Hraban Ramm  
Gesendet: Montag, 08. Jänner 2024 16:00
An: ntg-context@ntg.nl
Betreff: [NTG-context] Re: Links

Am 08.01.24 um 14:10 schrieb Ursula Hermann:
> Dear List,
> 
> Is this the right way?
> 
> I want to use linked bibliography numbers, linked Chapter, section 
> subsection, linked margin numbers, in the text.
> 
> \setupinteraction[state=start]

This is essential.

> 
> \starttext
> 
> Der Wert von \m{y = f(x)} ist unabhängig von der Wahl\par von 
> \m{x\doubleprime} ist gleichbedeutend mit \m{∃y : ∀x : f(x) = y} \par 
> (Beutelspacher [\hyphenatedurl {10},S.54]).
> 
> \stoptext

\hyphenatedurl only changes the hyphenation of its content, it doesn’t create a 
link. In your example it makes no sense.

Generally, you need an anchor (link target) to link to, e.g.

\startchapter[title={My chapter},reference=chap:first] or 
\chapter[chap:first]{My chapter}

This works the same for other structure levels. I’m not sure about 
bibliography, but I think you must use the bib entry code.

You can also set anchors manually using \textreference and \pagereference.

Then you can use \in[chap:first], \about[chap:first] or \at[chap:first].

For external links, you use \goto (it’s a bit extensive).

Please look up the syntax reference in the wiki.

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: Links

2024-01-08 Thread Henning Hraban Ramm

Am 08.01.24 um 14:10 schrieb Ursula Hermann:

Dear List,

Is this the right way?

I want to use linked bibliography numbers, linked Chapter, section 
subsection, linked margin numbers, in the text.


\setupinteraction[state=start]


This is essential.



\starttext

Der Wert von \m{y = f(x)} ist unabhängig von der Wahl\par von 
\m{x\doubleprime} ist gleichbedeutend mit \m{∃y : ∀x : f(x) = y} \par 
(Beutelspacher [\hyphenatedurl {10},S.54]).


\stoptext


\hyphenatedurl only changes the hyphenation of its content, it doesn’t 
create a link. In your example it makes no sense.


Generally, you need an anchor (link target) to link to, e.g.

\startchapter[title={My chapter},reference=chap:first]
or
\chapter[chap:first]{My chapter}

This works the same for other structure levels. I’m not sure about 
bibliography, but I think you must use the bib entry code.


You can also set anchors manually using \textreference and \pagereference.

Then you can use \in[chap:first], \about[chap:first] or \at[chap:first].

For external links, you use \goto (it’s a bit extensive).

Please look up the syntax reference in the wiki.

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
___


[NTG-context] Re: Hyphenation for Indonesian language

2023-12-29 Thread Hans Hagen

On 12/29/2023 9:09 PM, Arthur Rosendahl wrote:

Hi Muhammad,

On Sat, Dec 30, 2023 at 01:08:24AM +0700, Muhammad Rizqi Siregar wrote:

I'd like to ask if ConTeXt LMTX has hyphenation for Indonesian language or
a way to enable it. I think Babel package in LaTeX has some pattern files
for the language, although I am not sure whether they can be borrowed to
work with ConTeXt or not.


   Yes, ConTeXt can use the same patterns as LaTeX.  Hans: they’re in the
same repository as all the other ones, BCP47 code ‘id’.

ok, i enabled them in mtx-patterns.lua ad will include them next upload

Btw, Tomas Hala is currently working on (among some other languages) 
Indonesian with his students (labels etc) so next month that will likely 
show up.


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
___


[NTG-context] Re: Hyphenation for Indonesian language

2023-12-29 Thread Arthur Rosendahl
Hi Muhammad,

On Sat, Dec 30, 2023 at 01:08:24AM +0700, Muhammad Rizqi Siregar wrote:
> I'd like to ask if ConTeXt LMTX has hyphenation for Indonesian language or
> a way to enable it. I think Babel package in LaTeX has some pattern files
> for the language, although I am not sure whether they can be borrowed to
> work with ConTeXt or not.

  Yes, ConTeXt can use the same patterns as LaTeX.  Hans: they’re in the
same repository as all the other ones, BCP47 code ‘id’.

Best,

Arthur
___
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] Hyphenation for Indonesian language

2023-12-29 Thread Muhammad Rizqi Siregar
Hello,

I'd like to ask if ConTeXt LMTX has hyphenation for Indonesian language or
a way to enable it. I think Babel package in LaTeX has some pattern files
for the language, although I am not sure whether they can be borrowed to
work with ConTeXt or not.

Appreciate any help on this. Thanks.

Best regards,
Muhammad
___
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: [ how to force hyphenation all words ]

2023-11-16 Thread Marco Patzer
On Thu, 16 Nov 2023 21:40:08 +0100
vm via ntg-context  wrote:

> Is there a command in context to force every word in a text to
> hyphenate? e.g to typeset a text with "ge-dach-ten-streep-jes"

Like this?

\starttext
  \hyphenatedword{\samplefile{knuth}}
\stoptext

Marco
___
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] [ how to force hyphenation all words ]

2023-11-16 Thread vm via ntg-context

Is there a command in context to force every word in a text to
hyphenate? e.g to typeset a text with "ge-dach-ten-streep-jes"

Thanks
.Floris
___
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: hyphenation inside quotation

2023-08-22 Thread Hans Hagen

On 8/22/2023 9:59 AM, Henning Hraban Ramm wrote:

Am 20.08.23 um 08:32 schrieb Wolfgang Schuster:

In the next release you don't need the method=font anymore because the 
missing hyphenation
is the result of a old patch which was needed in 2013. Back than there 
was no problem
with hyphenation and the patch but since than Hans added a few new 
features to Luametatex
to improve the quotation mechanism and the patch results now in the 
unwanted side effect.


I always had \setupdelimitedtext[quotation][method=font] in my 
environments without really understanding it (remark: enables hanging 
quotation marks).


So both methods (font/text) are obsolete now / with an upcoming update?
no, we only remove a penalty preventing hyphensation .. there is no need 
to change this mechanism


-
  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: hyphenation inside quotation

2023-08-22 Thread Henning Hraban Ramm

Am 20.08.23 um 08:32 schrieb Wolfgang Schuster:

In the next release you don't need the method=font anymore because the 
missing hyphenation
is the result of a old patch which was needed in 2013. Back than there 
was no problem
with hyphenation and the patch but since than Hans added a few new 
features to Luametatex
to improve the quotation mechanism and the patch results now in the 
unwanted side effect.


I always had \setupdelimitedtext[quotation][method=font] in my 
environments without really understanding it (remark: enables hanging 
quotation marks).


So both methods (font/text) are obsolete now / with an upcoming update?

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
___


[NTG-context] Re: hyphenation inside quotation

2023-08-20 Thread Wolfgang Schuster

Thomas A. Schmitz schrieb am 19.08.2023 um 18:10:

On 8/19/23 17:51, Wolfgang Schuster wrote:


You can use the font method to have hyphenated words back.
The culprit which prevents hyphenation are the penalty settings
which are added by ConTeXt when the default method is used.

\mainlanguage [de]

\setuppapersize [A6]

\setupquotation[method=text]


Hi Wolfgang,

as always, thanks for the precise explanation. Is there a reason why 
this behavior is not the default? I.e.: in what situations would the 
default behavior be (more) desirable? Or is it just because 
\setupquotation is a subset of \setupdelimitedtext?


Quotation is a instance of delimitedtext and the \setupquotation command 
is \setupdelimitedtext[quotation].


In the next release you don't need the method=font anymore because the 
missing hyphenation
is the result of a old patch which was needed in 2013. Back than there 
was no problem
with hyphenation and the patch but since than Hans added a few new 
features to Luametatex
to improve the quotation mechanism and the patch results now in the 
unwanted side effect.


Wolfgang

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

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


[NTG-context] Re: hyphenation inside quotation

2023-08-19 Thread Thomas A. Schmitz

On 8/19/23 17:51, Wolfgang Schuster wrote:


You can use the font method to have hyphenated words back.
The culprit which prevents hyphenation are the penalty settings
which are added by ConTeXt when the default method is used.

\mainlanguage [de]

\setuppapersize [A6]

\setupquotation[method=text]


Hi Wolfgang,

as always, thanks for the precise explanation. Is there a reason why 
this behavior is not the default? I.e.: in what situations would the 
default behavior be (more) desirable? Or is it just because 
\setupquotation is a subset of \setupdelimitedtext?


All best

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
___


[NTG-context] Re: hyphenation inside quotation

2023-08-19 Thread Wolfgang Schuster

Thomas A. Schmitz schrieb am 19.08.2023 um 16:01:

Hi,

is this a limitation or a bug? Text inside \quotation{} is not 
hyphenated. It appears to be like this for a couple of versions, but 
I'm not sure if it has always been the case. Silly example to test:


You can use the font method to have hyphenated words back.
The culprit which prevents hyphenation are the penalty settings
which are added by ConTeXt when the default method is used.

\mainlanguage [de]

\setuppapersize [A6]

\setupquotation[method=text]

\starttext

„Originalgenie“ „Originalgenie“ „Originalgenie“

\quotation{Originalgenie} \quotation{Originalgenie} 
\quotation{Originalgenie}


„\penalty\plustenthousand Originalgenie\penalty\plustenthousand“
„\penalty\plustenthousand Originalgenie\penalty\plustenthousand“
„\penalty\plustenthousand Originalgenie\penalty\plustenthousand“

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

[NTG-context] hyphenation inside quotation

2023-08-19 Thread Thomas A. Schmitz

Hi,

is this a limitation or a bug? Text inside \quotation{} is not 
hyphenated. It appears to be like this for a couple of versions, but I'm 
not sure if it has always been the case. Silly example to test:


\mainlanguage [de]

\setuppapersize [A6]

\setupbodyfont [14pt]

\starttext

„Originalgenie“ „Originalgenie“ „Originalgenie“

\quotation{Originalgenie} \quotation{Originalgenie} 
\quotation{Originalgenie}


\stoptext

All best

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
___

[NTG-context] Re: Tracker for hyphens at the end of lines

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

On 8/9/2023 12:10 PM, denis.ma...@unibe.ch wrote:

Keith, you can also check hyphenations using a script:

-- check-hyphens.lua
--[[
 analyze hyphenations based on a ConTeXt log file
 enable hyphenation tracking in the ConTeXt file with
 \enabletrackers[hyphenation.applied]
 then run this script with
 lua check-hyphens.lua input_file whitelist.ending
 for the input_file we assume .log, so no need to add this
 for the whitelist a file ending has to be supplied
 the whitelist is optional
]]

-- local lines = string.splitlines(io.loaddata("oeps.tex")or "") or { }

-- local pprint = require('pprint')

function main (input_file, whitelist_file)
 local lines = lines_from(input_file .. ".log")
 local whitelist = {}
 if whitelist_file == nil then
 whitelist = {}
 else
 whitelist = lines_from(whitelist_file)
 end
 --pprint (lines)
 --pprint (whitelist)
 local filteredWordlist = filterHyphenationsWordlist
 (cleanLines
 (getHyphenationLines(lines)),
 whitelist)
 -- pprint(filteredWordlist)
 saveResultsToFile(filteredWordlist, 'check-hyphens.log')
end

-- see if the file exists

-- http://lua-users.org/wiki/FileInputOutput

-- see if the file exists
function file_exists(file)
 local f = io.open(file, "rb")
 if f then f:close() end
 return f ~= nil
end
   
-- get all lines from a file, returns an empty

-- list/table if the file does not exist
function lines_from(file)
 if not file_exists(file) then return {} end
 local lines = {}
 for line in io.lines(file) do
 lines[#lines + 1] = line
 end
 return lines
end

-- String testing
function starts_with(str, start)
 return str:sub(1, #start) == start
end

-- get relevant lines
function getHyphenationLines(lines)
 local lines_with_hyphenations = {}
 for k,v in pairs(lines) do
 if
 (starts_with(v, "hyphenated")
 and not string.find(v, "start hyphenated words")
 and not string.find(v, "stop hyphenated words"))
 then table.insert(lines_with_hyphenations, v) end
 end
 return lines_with_hyphenations
end

-- String cleaning
-- wrapper functions

function cleanLines (xs)
 local cleanedLines = {}
 for k,v in pairs(xs) do
 table.insert(cleanedLines, cleanLine(v))
 end
 return cleanedLines
end

function cleanLine (x)
 return removeTrailingPunctuation(getWord(x))
end

-- 1. Start reading at colon
function getWord(x)
 -- wir lesen aber Zeichen 26
 return string.sub(x,26)
end

-- 2. Remove trailing punctuation
function removeTrailingPunctuation (x)
 if string.find(x, ',') then
 return x:sub(1, -2)
 else
 return x
 end
end

-- test if word is in second list
function inList (x, list)
 for k,v in ipairs(list) do
 if v == x then
 return true
 end
 end
 return nil
end

-- Filter hyphenated words based on second list (whitelist)
function filterHyphenationsWordlist (xs, list)
 local result = {}
 for k,v in ipairs(xs) do
 if not inList(v, list) then table.insert (result, v) end
 end
 return result
end

function saveResultsToFile(results, output_file)
 -- Opens a file in write mode
 output_file = io.open("check_hyphens.log", "w")
 -- sets the default output file as output_file
 io.output(output_file)
 -- iterate oiver
 for k,v in ipairs(results) do
 io.write(v..'\n')
 end
 -- closes the open file
 io.close(output_file)
end

-- Run
main(arg[1], arg[2])

Ok, a little lua lesson, if you don't mind.

 xxx.tex 

\enabletrackers[hyphenation.applied]

\starttext
\input tufte
\stoptext

 xxx.tmp 

re-fine

 xxx.lua 

local function check(logname,whitename)
if not logname then
return
end
local data = io.loaddata(logname) or ""
if data == "" then
return
end
local blob  = string.match(data,"start hyphenated words(.-)stop 
hyphenated words")

if not blob then
return
end
local white = table.tohash(string.splitlines(whitename and 
io.loaddata(whitename) or ""))

for n, s in string.gmatch(blob,"(%d+) *: (%S+)") do
if white[s] then
-- were good
else
print(n,s)
end
end
end

check(environment.files[1],environment.files[2])

-- print("TEST 1")
-- check("xxx.log")
-- print("TEST 2")
-- check("xxx.log","xxx.tmp")

---

>mtxrun --script xxx xxx.log
1   dis-tinguish
1   harmo-nize
1   re-fine

>mtxrun --script xxx xxx.log xxx.tmp
1   dis-tinguish
1   harmo-nize

That said, i wonder if we should add the filename, just in case on

[NTG-context] Re: Tracker for hyphens at the end of lines

2023-08-09 Thread denis.maier
Keith, you can also check hyphenations using a script:

-- check-hyphens.lua
--[[ 
analyze hyphenations based on a ConTeXt log file
enable hyphenation tracking in the ConTeXt file with
\enabletrackers[hyphenation.applied]
then run this script with
lua check-hyphens.lua input_file whitelist.ending
for the input_file we assume .log, so no need to add this
for the whitelist a file ending has to be supplied
the whitelist is optional
]] 

-- local lines = string.splitlines(io.loaddata("oeps.tex")or "") or { }

-- local pprint = require('pprint')

function main (input_file, whitelist_file)
local lines = lines_from(input_file .. ".log")
local whitelist = {}
if whitelist_file == nil then
whitelist = {}
else 
whitelist = lines_from(whitelist_file)
end
--pprint (lines)
--pprint (whitelist)
local filteredWordlist = filterHyphenationsWordlist
(cleanLines
(getHyphenationLines(lines)), 
whitelist)
-- pprint(filteredWordlist)
saveResultsToFile(filteredWordlist, 'check-hyphens.log')
end

-- see if the file exists

-- http://lua-users.org/wiki/FileInputOutput

-- see if the file exists
function file_exists(file)
local f = io.open(file, "rb")
if f then f:close() end
return f ~= nil
end
  
-- get all lines from a file, returns an empty 
-- list/table if the file does not exist
function lines_from(file)
if not file_exists(file) then return {} end
local lines = {}
for line in io.lines(file) do 
lines[#lines + 1] = line
end
return lines
end

-- String testing
function starts_with(str, start)
return str:sub(1, #start) == start
end

-- get relevant lines
function getHyphenationLines(lines)
local lines_with_hyphenations = {}
for k,v in pairs(lines) do
if 
(starts_with(v, "hyphenated") 
and not string.find(v, "start hyphenated words") 
and not string.find(v, "stop hyphenated words"))
then table.insert(lines_with_hyphenations, v) end
end
return lines_with_hyphenations
end

-- String cleaning
-- wrapper functions

function cleanLines (xs)
local cleanedLines = {}
for k,v in pairs(xs) do
table.insert(cleanedLines, cleanLine(v))
end
return cleanedLines
end

function cleanLine (x)
return removeTrailingPunctuation(getWord(x))
end

-- 1. Start reading at colon 
function getWord(x)
-- wir lesen aber Zeichen 26
return string.sub(x,26)
end

-- 2. Remove trailing punctuation
function removeTrailingPunctuation (x)
if string.find(x, ',') then
return x:sub(1, -2)
else
return x
end
end

-- test if word is in second list
function inList (x, list)
for k,v in ipairs(list) do
if v == x then
return true
end
end
return nil
end

-- Filter hyphenated words based on second list (whitelist)
function filterHyphenationsWordlist (xs, list)
local result = {}
for k,v in ipairs(xs) do
if not inList(v, list) then table.insert (result, v) end
end
return result
end

function saveResultsToFile(results, output_file)
-- Opens a file in write mode
output_file = io.open("check_hyphens.log", "w")
-- sets the default output file as output_file
io.output(output_file)
-- iterate oiver 
for k,v in ipairs(results) do
io.write(v..'\n')
end
-- closes the open file
io.close(output_file)
end

-- Run
main(arg[1], arg[2])

> -Ursprüngliche Nachricht-
> Von: Keith McKay 
> Gesendet: Dienstag, 1. August 2023 20:22
> An: mailing list for ConTeXt users 
> Betreff: [NTG-context] Re: Tracker for hyphens at the end of lines
> 
> Thanks Hans!
> 
> I'm never disappointed, always amazed with ConTeXt!
> 
> This is just what I was looking for.
> 
> Best Wishes
> 
> Keith McKay
> 
> On 01/08/2023 18:10, Hans Hagen via ntg-context wrote:
> > On 8/1/2023 4:54 PM, Keith McKay wrote:
> >> Hi colleagues,
> >>
> >> Is there a tracker for highlighting hyphens at the end of lines
> >> similar the way underfull and overfull boxes can be displayed with a
> >> coloured bar at the end of the offending line?
> >>
> >> I have looked at the wiki page "Reviewing hyphenation" and it has a
> >> solution for mkii from 2009 which, I would think, won't be suitable
> >> for present day ConTeXt. I have tried searching for hyphens using
> >> Skim and Adobe Acrobate viewers but although they find hyphenation in
> >> line they don't recognise hyphens at the edge of lines.
> >>
> >> Any help would be appreciated.
> > I suppose you would be disappointed it there was no tracker ...
&g

[NTG-context] Re: How to make words searchable without diacritics

2023-08-07 Thread Marcus Vinicius Mesquita
This is perfect, as it works also with mupdf-gl and firefox!

Thank you, Hans

Kind regards

Marcus Vinicius

On Mon, Aug 7, 2023 at 4:58 PM Hans Hagen  wrote:
>
> On 8/7/2023 8:58 PM, Marcus Vinicius Mesquita wrote:
> > @ Ulrike: This is what my client wants, and the client is always right.
> You can try this:
>
> \starttext
>
> \protected\def\ProofOfConcept#1#2%
>{{#1\llap{\effect[hidden]{#2
>
> test test \ProofOfConcept{föö}{foo} test
>
> \stoptext
>
> but forget about hyphenation (actualtext probably also doesn't always
> work well across lines in viewers).
>
> 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
> ___



-- 
Todas as coisas fatigam o corpo, salvo a música, que não fatiga nem o
corpo nem seus membros, por ser descanso da alma, primavera do
coração, distração do aflito, entretenimento do solitário, e viático
do viajante.

Kunnâsh al-Hâ'ik (Cancioneiro de al-Hâ'ik)
___
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: How to make words searchable without diacritics

2023-08-07 Thread Hans Hagen

On 8/7/2023 8:58 PM, Marcus Vinicius Mesquita wrote:

@ Ulrike: This is what my client wants, and the client is always right.

You can try this:

\starttext

\protected\def\ProofOfConcept#1#2%
  {{#1\llap{\effect[hidden]{#2

test test \ProofOfConcept{föö}{foo} test

\stoptext

but forget about hyphenation (actualtext probably also doesn't always 
work well across lines in viewers).


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: \phrasetext issue with language uk. Was: Ukrainian hyphenation?

2023-08-05 Thread Gerben Wierda
Basically, the situation then is, the language is called ua but the patterns 
are called uk?

> On 5 Aug 2023, at 15:23, Gerben Wierda  wrote:
> 
> 
> 
>> On 19 Jul 2023, at 09:17, Hans Hagen via ntg-context  
>> wrote:
>> 
>> On 7/19/2023 8:58 AM, Gerben Wierda wrote:
>>>> On 19 Jul 2023, at 08:52, Hans Hagen  wrote:
>>>> 
>>>> so best not mess with setting up languages that already have been set up.
>>> I had no idea I was messing. What am I doing wrong, then. Because in my 
>>> actual document with ua language setting it is not hyphenated. This was 
>>> just a minimal example
>> 
>> do you get something similar?
>> 
>>> mtxrun lang-uk.lua
>> c:/data/develop/tex-context/tex/texmf-context/tex/context/patterns/mkiv/lang-uk.lua
>> 
>> uk is the offical tag but for historic reasone we use ua as language; given 
>> the uk's exit and ua's entry in the european union we could now consider 
>> adapting it; and i'd wonder is anyone would notice - or bother - is we'd use 
>> ukrain hyphenation for russian, which could save some bytes in the 
>> distribution
> 
> Yes, that solved the hyphenation issue. But  now I am having trouble with 
> \phrasetext. When using uk as language code, \phrasetext does not work.
> 
> So, use 'ua', \phrasetext works, but hyphenation does not
> And use 'uk', hyphenation works, but \phrasetext does not
> 
> %==
> \definefallbackfamily
>  [archimate]
>  [ss]
>  [Helvetica]
>  [preset=range:cyrillic,
>   tf=style:light,
>   it=style:lightoblique,
>   bf=style:regular,
>   bi=style:oblique,
>   force=yes,
>   rscale=1.0]
> \definefontfamily [archimate] [ss] [Helvetica]
> \setupbodyfont[archimate]
> 
> \definelabelclass[phrase]
> \setupphrasetext[en][sheettitle={ArchiMate® 3.2 Metamodel -- Core}]
> \setupphrasetext[ru][sheettitle={Ядро метамодели ArchiMate® 3.2}]
> \setupphrasetext[uk][sheettitle={Основні елементи метамоделі ArchiMate® 3.2}]
> \setupphrasetext[ua][sheettitle={Основні елементи метамоделі ArchiMate® 3.2}]
> 
> \starttext
> \setuplanguage[uk][patterns={uk}]\mainlanguage[uk]
> \phrasetext{sheettitle}
> 
> \setuplanguage[ru][patterns={ru}]\mainlanguage[ru]
> \phrasetext{sheettitle}
> 
> \setuplanguage[uk][patterns={uk}]\mainlanguage[uk]
> \phrasetext{sheettitle}
> 
> \setuplanguage[ua][patterns={ua}]\mainlanguage[ua]
> \phrasetext{sheettitle}
> \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
> ___

Gerben Wierda (LinkedIn <https://www.linkedin.com/in/gerbenwierda>, Mastodon 
<https://newsie.social/@gctwnl>)
R IT Strategy <https://ea.rna.nl/> (main site)
Book: Chess and the Art of Enterprise Architecture <https://ea.rna.nl/the-book/>
Book: Mastering ArchiMate <https://ea.rna.nl/the-book-edition-iii/>

___
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] \phrasetext issue with language uk. Was: Ukrainian hyphenation?

2023-08-05 Thread Gerben Wierda


> On 19 Jul 2023, at 09:17, Hans Hagen via ntg-context  
> wrote:
> 
> On 7/19/2023 8:58 AM, Gerben Wierda wrote:
>>> On 19 Jul 2023, at 08:52, Hans Hagen  wrote:
>>> 
>>> so best not mess with setting up languages that already have been set up.
>> I had no idea I was messing. What am I doing wrong, then. Because in my 
>> actual document with ua language setting it is not hyphenated. This was just 
>> a minimal example
> 
> do you get something similar?
> 
> >mtxrun lang-uk.lua
> c:/data/develop/tex-context/tex/texmf-context/tex/context/patterns/mkiv/lang-uk.lua
> 
> uk is the offical tag but for historic reasone we use ua as language; given 
> the uk's exit and ua's entry in the european union we could now consider 
> adapting it; and i'd wonder is anyone would notice - or bother - is we'd use 
> ukrain hyphenation for russian, which could save some bytes in the 
> distribution

Yes, that solved the hyphenation issue. But  now I am having trouble with 
\phrasetext. When using uk as language code, \phrasetext does not work.

So, use 'ua', \phrasetext works, but hyphenation does not
And use 'uk', hyphenation works, but \phrasetext does not

%==
\definefallbackfamily
  [archimate]
  [ss]
  [Helvetica]
  [preset=range:cyrillic,
   tf=style:light,
   it=style:lightoblique,
   bf=style:regular,
   bi=style:oblique,
   force=yes,
   rscale=1.0]
\definefontfamily [archimate] [ss] [Helvetica]
\setupbodyfont[archimate]

\definelabelclass[phrase]
\setupphrasetext[en][sheettitle={ArchiMate® 3.2 Metamodel -- Core}]
\setupphrasetext[ru][sheettitle={Ядро метамодели ArchiMate® 3.2}]
\setupphrasetext[uk][sheettitle={Основні елементи метамоделі ArchiMate® 3.2}]
\setupphrasetext[ua][sheettitle={Основні елементи метамоделі ArchiMate® 3.2}]

\starttext
\setuplanguage[uk][patterns={uk}]\mainlanguage[uk]
\phrasetext{sheettitle}

\setuplanguage[ru][patterns={ru}]\mainlanguage[ru]
\phrasetext{sheettitle}

\setuplanguage[uk][patterns={uk}]\mainlanguage[uk]
\phrasetext{sheettitle}

\setuplanguage[ua][patterns={ua}]\mainlanguage[ua]
\phrasetext{sheettitle}
\stoptext
%==
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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

[NTG-context] Re: Tracker for hyphens at the end of lines

2023-08-01 Thread Keith McKay

Thanks Hans!

I'm never disappointed, always amazed with ConTeXt!

This is just what I was looking for.

Best Wishes

Keith McKay

On 01/08/2023 18:10, Hans Hagen via ntg-context wrote:

On 8/1/2023 4:54 PM, Keith McKay wrote:

Hi colleagues,

Is there a tracker for highlighting hyphens at the end of lines 
similar the way underfull and overfull boxes can be displayed with a 
coloured bar at the end of the offending line?


I have looked at the wiki page "Reviewing hyphenation" and it has a 
solution for mkii from 2009 which, I would think, won't be suitable  
for present day ConTeXt. I have tried searching for hyphens using 
Skim and Adobe Acrobate viewers but although they find hyphenation in 
line they don't recognise hyphens at the edge of lines.


Any help would be appreciated.

I suppose you would be disappointed it there was no tracker ...

\enabletrackers[hyphenation.applied.console]
\enabletrackers[hyphenation.applied.visualize]

you even get a file with the hyphenated words

You can see all of them with

\disabledirectives[backend.cleanup.flatten]
\bitwiseflip \normalizelinemode -\flattendiscretionariesnormalizecode
\showmakeup[discretionary]

weren't it that i had to provide the directive for this to work well 
(disbale flattening) so for that you have to wait till we update


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
___

___
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: Tracker for hyphens at the end of lines

2023-08-01 Thread Hans Hagen via ntg-context

On 8/1/2023 4:54 PM, Keith McKay wrote:

Hi colleagues,

Is there a tracker for highlighting hyphens at the end of lines similar 
the way underfull and overfull boxes can be displayed with a coloured 
bar at the end of the offending line?


I have looked at the wiki page "Reviewing hyphenation" and it has a 
solution for mkii from 2009 which, I would think, won't be suitable  for 
present day ConTeXt. I have tried searching for hyphens using Skim and 
Adobe Acrobate viewers but although they find hyphenation in line they 
don't recognise hyphens at the edge of lines.


Any help would be appreciated.

I suppose you would be disappointed it there was no tracker ...

\enabletrackers[hyphenation.applied.console]
\enabletrackers[hyphenation.applied.visualize]

you even get a file with the hyphenated words

You can see all of them with

\disabledirectives[backend.cleanup.flatten]
\bitwiseflip \normalizelinemode -\flattendiscretionariesnormalizecode
\showmakeup[discretionary]

weren't it that i had to provide the directive for this to work well 
(disbale flattening) so for that you have to wait till we update


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] Tracker for hyphens at the end of lines

2023-08-01 Thread Keith McKay

Hi colleagues,

Is there a tracker for highlighting hyphens at the end of lines similar 
the way underfull and overfull boxes can be displayed with a coloured 
bar at the end of the offending line?


I have looked at the wiki page "Reviewing hyphenation" and it has a 
solution for mkii from 2009 which, I would think, won't be suitable  for 
present day ConTeXt. I have tried searching for hyphens using Skim and 
Adobe Acrobate viewers but although they find hyphenation in line they 
don't recognise hyphens at the edge of lines.


Any help would be appreciated.

Keith McKay

___
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: Par Builder Tests

2023-07-30 Thread Keith McKay
Hraban's suggestion works really well. I setup hyphenation rules for the 
underfull boxes of Russian names and reduced the \tolerance to 600.  I'm 
now down to about 20 underfull boxes which to my eyes look fine.


Thanks again Hraban

Best Wishes

Keith

On 28/07/2023 19:20, Keith McKay wrote:


Thanks Hraban, didn't think of that so will give it a try.
Best Wishes
Keith


On Fri, 28 Jul 2023, 17:28 Henning Hraban Ramm,  wrote:

Am 28.07.23 um 17:04 schrieb Keith McKay:
> I played around with the setups for the align:pass:test4 code
below, as
> Hans suggested, and it was changing the \tolerance value which
made the
> difference. Increasing the \tolerance value to 1000 eliminated all
> overfull hboxes but still left 79 underfull hboxes. I continued to
> increase the \tolerance value up to 6600 and was left with two
overfull
> hboxes. One with a badness of 6641 (warAndPeace1.png) and one
with a
> badness of 1097 (warAndPeace2.png). Above the \tolerance of 6600
only
> warAndPeace2.png was left with a badness of 1097. Both of these
> underfull hboxes were at the beginning of a paragraph - "To his
Honor"
> in the first png and "Well, you see," in the second png. I not
sure a
> reader would spot the second png badness but the first is
noticeable to
> my eyes.

Hi Keith,
since both cases are caused by names with accents, did you try to add
hyphenation exceptions for those? Such cases are probably not
covered by
English hyphentation rules.

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
___

[NTG-context] Re: Par Builder Tests

2023-07-28 Thread Keith McKay
Thanks Hraban, didn't think of that so will give it a try.
Best Wishes
Keith


On Fri, 28 Jul 2023, 17:28 Henning Hraban Ramm,  wrote:

> Am 28.07.23 um 17:04 schrieb Keith McKay:
> > I played around with the setups for the align:pass:test4 code below, as
> > Hans suggested, and it was changing the \tolerance value which made the
> > difference. Increasing the \tolerance value to 1000 eliminated all
> > overfull hboxes but still left 79 underfull hboxes. I continued to
> > increase the \tolerance value up to 6600 and was left with two overfull
> > hboxes. One with a badness of 6641 (warAndPeace1.png) and one with a
> > badness of 1097 (warAndPeace2.png). Above the \tolerance of 6600 only
> > warAndPeace2.png was left with a badness of 1097. Both of these
> > underfull hboxes were at the beginning of a paragraph - "To his Honor"
> > in the first png and "Well, you see," in the second png. I not sure a
> > reader would spot the second png badness but the first is noticeable to
> > my eyes.
>
> Hi Keith,
> since both cases are caused by names with accents, did you try to add
> hyphenation exceptions for those? Such cases are probably not covered by
> English hyphentation rules.
>
> 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
___

[NTG-context] Re: Par Builder Tests

2023-07-28 Thread Henning Hraban Ramm

Am 28.07.23 um 17:04 schrieb Keith McKay:
I played around with the setups for the align:pass:test4 code below, as 
Hans suggested, and it was changing the \tolerance value which made the 
difference. Increasing the \tolerance value to 1000 eliminated all 
overfull hboxes but still left 79 underfull hboxes. I continued to 
increase the \tolerance value up to 6600 and was left with two overfull 
hboxes. One with a badness of 6641 (warAndPeace1.png) and one with a 
badness of 1097 (warAndPeace2.png). Above the \tolerance of 6600 only 
warAndPeace2.png was left with a badness of 1097. Both of these 
underfull hboxes were at the beginning of a paragraph - "To his Honor" 
in the first png and "Well, you see," in the second png. I not sure a 
reader would spot the second png badness but the first is noticeable to 
my eyes.


Hi Keith,
since both cases are caused by names with accents, did you try to add 
hyphenation exceptions for those? Such cases are probably not covered by 
English hyphentation rules.


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
___


[NTG-context] Re: Ukrainian hyphenation?

2023-07-19 Thread Hans Hagen via ntg-context

On 7/19/2023 8:58 AM, Gerben Wierda wrote:




On 19 Jul 2023, at 08:52, Hans Hagen  wrote:

so best not mess with setting up languages that already have been set up.


I had no idea I was messing. What am I doing wrong, then. Because in my actual 
document with ua language setting it is not hyphenated. This was just a minimal 
example


do you get something similar?

>mtxrun lang-uk.lua
c:/data/develop/tex-context/tex/texmf-context/tex/context/patterns/mkiv/lang-uk.lua

uk is the offical tag but for historic reasone we use ua as language; 
given the uk's exit and ua's entry in the european union we could now 
consider adapting it; and i'd wonder is anyone would notice - or bother 
- is we'd use ukrain hyphenation for russian, which could save some 
bytes in the distribution


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: Ukrainian hyphenation?

2023-07-19 Thread Gerben Wierda



> On 19 Jul 2023, at 08:52, Hans Hagen  wrote:
> 
> so best not mess with setting up languages that already have been set up.

I had no idea I was messing. What am I doing wrong, then. Because in my actual 
document with ua language setting it is not hyphenated. This was just a minimal 
example 
___
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: Ukrainian hyphenation?

2023-07-19 Thread Hans Hagen

On 7/19/2023 12:36 AM, Gerben Wierda wrote:

This file:

\setupinteraction
   [state=start,
color=blue,
style=bold]

\definefallbackfamily
   [archimate]
   [ss]
   [Helvetica]
   [preset=range:cyrillic,
tf=style:light,
it=style:lightoblique,
bf=style:regular,
bi=style:oblique,
force=yes,
rscale=1.0]
\definefontfamily [archimate] [ss] [Helvetica]
\setupbodyfont[archimate]

\starttext
\setuplanguage[en][patterns={ru}]\mainlanguage[ru]
{\framed[frame=on,align=flushleft,width=7cm]{Техніка здатна до фізичної 
поведінки (на відміну від інформаційної поведінки). Наприклад `Металургійний 
комбінат'.}}\\
\setuplanguage[ua][patterns={ua}]\mainlanguage[ua]
{\framed[frame=on,align=flushleft,width=7cm]{Техніка здатна до фізичної 
поведінки (на відміну від інформаційної поведінки). Наприклад `Металургійний 
комбінат'.}}\\

\stoptext

Hyphenates russian but not ukrainian. Why?
If there was some magick like that going on it should be the reverse 
right now. That said,


\setupbodyfont[dejavu]

\startbuffer[sample]
Техніка здатна до фізичної поведінки (на відміну від інформаційної
поведінки). Наприклад `Металургійний комбінат'.
\stopbuffer

\starttext

\mainlanguage[ru] {\hsize3cm \getbuffer[sample]}

\mainlanguage[ua] {\hsize3cm \getbuffer[sample]}

\stoptext

hyphenates differently and eventually reports

  mkiv lua stats  > loaded patterns: en::1 ru::22 ua::23

so best not mess with setting up languages that already have been set up.

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] Ukrainian hyphenation?

2023-07-18 Thread Gerben Wierda
This file:

\setupinteraction
  [state=start,
   color=blue,
   style=bold]

\definefallbackfamily
  [archimate]
  [ss]
  [Helvetica]
  [preset=range:cyrillic,
   tf=style:light,
   it=style:lightoblique,
   bf=style:regular,
   bi=style:oblique,
   force=yes,
   rscale=1.0]
\definefontfamily [archimate] [ss] [Helvetica]
\setupbodyfont[archimate]

\starttext
\setuplanguage[en][patterns={ru}]\mainlanguage[ru]
{\framed[frame=on,align=flushleft,width=7cm]{Техніка здатна до фізичної 
поведінки (на відміну від інформаційної поведінки). Наприклад `Металургійний 
комбінат'.}}\\
\setuplanguage[ua][patterns={ua}]\mainlanguage[ua]
{\framed[frame=on,align=flushleft,width=7cm]{Техніка здатна до фізичної 
поведінки (на відміну від інформаційної поведінки). Наприклад `Металургійний 
комбінат'.}}\\

\stoptext

Hyphenates russian but not ukrainian. Why?

Gerben Wierda (LinkedIn , Mastodon 
)
R IT Strategy  (main site)
Book: Chess and the Art of Enterprise Architecture 
Book: Mastering ArchiMate 

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

2023-06-23 Thread Marcus Vinicius Mesquita via ntg-context
Should then \setupalign[granular] be used before defining font features?

On Thu, Jun 22, 2023 at 9:37 AM Hans Hagen via ntg-context
 wrote:
>
> Hi,
>
> I uploaded a new lmtx version (so the next series will be luametatex
> 2.10.10). Although Mikael and I are still in improving math mode, we
> side tracked a bit to the par builder (better breaking of math etc). In
> the end some experiments there turned features.
>
> (1) We already had a more granular par builder but that was never really
> enabled. From now on you can do that with
>
> \setupalign[granular]
>
> After quite some tests and careful inspection of outcome we think that
> the results look better, which is why if could become a default. The
> main impact is a bit more even spacing between neighbouring lines,
> because we operate in five instead of three ranges of primary badness now.
>
> (2) As side effect of (3) initialization of expansion (as well as
> compression and protrusion) is delayed till it kicks in. This means that
>
> \definefontfeature[default][default][expansion=quality]
>
> has become cheaper and might as well become the default.
>
> (3) The biggest new feature (already known to some of you as we chat
> about it) is that in addition to the (upto three) passes that create a
> paragraph we can now have extra ones. This is discussed in
> lowlevel-lines.pdf (preliminary). The second pass is the most important
> one (it uses hyphenation but not yet emergency stretch) and, based on
> criteria that can be set, between the second and third pass multiple
> attempts can be triggered.
>
> So, for instance one can start careful (pass one), less careful (pass
> two), test all kind of variants (pass 2 subpasses) etc. These subpasses
> can have different tolerances, demerits, expansion, etc and quit once
> soem criteria are met.
>
> The problem here is: what makes good defaults. Therefore we have some
> tests definitions added (see spac-pas-tests) that we hope users will
> test on realistic documents.
>
> In case one wonders: performance is quite okay and you won't notice much
> difference on a reasonable run. Also, when you normally use expansion
> for a whole document, you can now let it kick in more selectively. As a
> result a run can be faster and the resulting pdf file can be smaller.
> This feature kind of assumes (1) above.
>
> (4) There's also a new feature for optional content: you can have marked
> sections in a paragraph that can be enabled or disabled in attempts to
> get better output. Of course one can wonder it this is useful but it was
> one of the older todo's. When it is considered usefull it can evolve.
>
> (The lowlevel-lines manual is work in progress and in a few weeks we
> will pick up on that.)
>
> 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
> ___



-- 
Todas as coisas fatigam o corpo, salvo a música, que não fatiga nem o
corpo nem seus membros, por ser descanso da alma, primavera do
coração, distração do aflito, entretenimento do solitário, e viático
do viajante.

Kunnâsh al-Hâ'ik (Cancioneiro de al-Hâ'ik)
___
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] new version

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

Hi,

I uploaded a new lmtx version (so the next series will be luametatex 
2.10.10). Although Mikael and I are still in improving math mode, we 
side tracked a bit to the par builder (better breaking of math etc). In 
the end some experiments there turned features.


(1) We already had a more granular par builder but that was never really 
enabled. From now on you can do that with


\setupalign[granular]

After quite some tests and careful inspection of outcome we think that 
the results look better, which is why if could become a default. The 
main impact is a bit more even spacing between neighbouring lines, 
because we operate in five instead of three ranges of primary badness now.


(2) As side effect of (3) initialization of expansion (as well as 
compression and protrusion) is delayed till it kicks in. This means that


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

has become cheaper and might as well become the default.

(3) The biggest new feature (already known to some of you as we chat 
about it) is that in addition to the (upto three) passes that create a 
paragraph we can now have extra ones. This is discussed in 
lowlevel-lines.pdf (preliminary). The second pass is the most important 
one (it uses hyphenation but not yet emergency stretch) and, based on 
criteria that can be set, between the second and third pass multiple 
attempts can be triggered.


So, for instance one can start careful (pass one), less careful (pass 
two), test all kind of variants (pass 2 subpasses) etc. These subpasses 
can have different tolerances, demerits, expansion, etc and quit once 
soem criteria are met.


The problem here is: what makes good defaults. Therefore we have some 
tests definitions added (see spac-pas-tests) that we hope users will 
test on realistic documents.


In case one wonders: performance is quite okay and you won't notice much 
difference on a reasonable run. Also, when you normally use expansion 
for a whole document, you can now let it kick in more selectively. As a 
result a run can be faster and the resulting pdf file can be smaller. 
This feature kind of assumes (1) above.


(4) There's also a new feature for optional content: you can have marked 
sections in a paragraph that can be enabled or disabled in attempts to 
get better output. Of course one can wonder it this is useful but it was 
one of the older todo's. When it is considered usefull it can evolve.


(The lowlevel-lines manual is work in progress and in a few weeks we 
will pick up on that.)


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] Change in flushleft alignment?

2023-06-01 Thread Rik Kabel via ntg-context

On 2023-06-01 03:02, Hans Hagen via ntg-context wrote:

On 6/1/2023 4:17 AM, Rik Kabel via ntg-context wrote:
Previously (May 7) flushleft paragraphs were as wide as possible 
within the text area. Now (May 30) they appear to be re-wrapped to a 
much narrower width.


Here is the same paragraph, showing the difference:

and

It looks like every paragraph has been run through par.

This does not seem to create paragraphs with more lines, but they 
create a very odd, choppy page. It does not prevent hyphenation, and 
sometimes introduces it where none was present before.


Did I miss a change?

I'll check it (we're experimenting a bit with alignments related to math)

Hans


Thank you for the quick fix.

--
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] Change in flushleft alignment?

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

On 6/1/2023 4:17 AM, Rik Kabel via ntg-context wrote:
Previously (May 7) flushleft paragraphs were as wide as possible within 
the text area. Now (May 30) they appear to be re-wrapped to a much 
narrower width.


Here is the same paragraph, showing the difference:

and

It looks like every paragraph has been run through par.

This does not seem to create paragraphs with more lines, but they create 
a very odd, choppy page. It does not prevent hyphenation, and sometimes 
introduces it where none was present before.


Did I miss a change?

I'll check it (we're experimenting a bit with alignments related to math)

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] Change in flushleft alignment?

2023-06-01 Thread Henning Hraban Ramm via ntg-context

Am 01.06.23 um 04:17 schrieb Rik Kabel via ntg-context:
Previously (May 7) flushleft paragraphs were as wide as possible within 
the text area. Now (May 30) they appear to be re-wrapped to a much 
narrower width.


Here is the same paragraph, showing the difference:

and

It looks like every paragraph has been run through par.

This does not seem to create paragraphs with more lines, but they create 
a very odd, choppy page. It does not prevent hyphenation, and sometimes 
introduces it where none was present before.


Did I miss a change?


I found the same problem with a \definedescription; a workaround was to 
add "wide,hyphenated" to the alignment.


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
___


[NTG-context] Change in flushleft alignment?

2023-05-31 Thread Rik Kabel via ntg-context
Previously (May 7) flushleft paragraphs were as wide as possible within 
the text area. Now (May 30) they appear to be re-wrapped to a much 
narrower width.


Here is the same paragraph, showing the difference:

and

It looks like every paragraph has been run through par.

This does not seem to create paragraphs with more lines, but they create 
a very odd, choppy page. It does not prevent hyphenation, and sometimes 
introduces it where none was present before.


Did I miss a change?

--
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] custom hyphenator again

2023-02-15 Thread Hans Hagen via ntg-context

On 2/15/2023 6:13 PM, Pablo Rodriguez via ntg-context wrote:

Hi Hans,

with the sample hyphenator from
https://www.pragma-ade.com/general/manuals/languages-mkiv.pdf#page=23,
next letters after hyphenation are missing.

I already reported this
(https://mailman.ntg.nl/pipermail/ntg-context/2023/107743.html).

Am I missing something or have I hit a bug?

more a hit on my maximum parallel task abilities

-
  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] custom hyphenator again

2023-02-15 Thread Pablo Rodriguez via ntg-context
Hi Hans,

with the sample hyphenator from
https://www.pragma-ade.com/general/manuals/languages-mkiv.pdf#page=23,
next letters after hyphenation are missing.

I already reported this
(https://mailman.ntg.nl/pipermail/ntg-context/2023/107743.html).

Am I missing something or have I hit 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 / 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] issue with custom hyphenator

2023-02-10 Thread Pablo Rodriguez via ntg-context
Dear list,

I have just copied this from
https://www.pragma-ade.com/general/manuals/languages-mkiv.pdf#page=23:

  \startluacode
  local subset = {
  a = true,
  e = true,
  i = true,
  o = true,
  u = true,
  y = true,
  }

  languages.hyphenators.traditional.installmethod("test",
  function(dictionary,word,n)
  local t = { }
  for i=1,#word do
  local w = word[i]
  if subset[w] then
  t[i] = {
  before = "<" .. w,
  after  = w .. ">",
  left   = false,
  right  = false,
  }
  else
  t[i] = false
  end
  end
  return t
  end
  )
  \stopluacode

  \definehyphenationfeatures
[demo]
[alternative=test]
  \setuphyphenation[method=traditional]

  \starttext
  %\righthyphenmin=-1
  \sethyphenationfeatures[demo]
  \hsize\zeropoint
  coming anaback
  \stoptext

Using current latest (from 2023.02.07 19:06), I get:

  cing
  anack

I’m missing m and b in the hyphenated words.

I’m afraid that the hyphenator is all Greek to me.

Is there any reason why letters are lost in hyphenation?

I’m afraid (I think) I might have hit 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 / 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 in verbatim wrapping examples on wiki

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

On 2/5/2023 4:52 PM, Pablo Rodriguez via ntg-context wrote:

On 2/5/23 13:13, Hans Hagen via ntg-context wrote:

On 2/5/2023 12:32 PM, Pablo Rodriguez via ntg-context wrote:

[...]
Are we missing something or is this a bug?

what do you expect as result? (maybe try \righthyphenmin=1)


Line breaks are removing characters.

In the sample below, output from

   \hsize\zeropoint
   \sha{a1b2c3d4}

reads:

   a
  _
  _
  _
  _
   3d4

I’m afraid \righthyphenmin=-1 prevents hyphenation (it seems to do it
everywhere).

This

   \unexpanded\def\sha#1%
 {\begingroup
  \sethyphenationfeatures[sha]%
  \showglyphs
  \righthyphenmin1
  #1%
  \endgroup}

gives

a·
·
·
·
·
·
4


-
  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] Bug in verbatim wrapping examples on wiki

2023-02-05 Thread Pablo Rodriguez via ntg-context
On 2/5/23 13:13, Hans Hagen via ntg-context wrote:
> On 2/5/2023 12:32 PM, Pablo Rodriguez via ntg-context wrote:
>> [...]
>> Are we missing something or is this a bug?
> what do you expect as result? (maybe try \righthyphenmin=1)

Line breaks are removing characters.

In the sample below, output from

  \hsize\zeropoint
  \sha{a1b2c3d4}

reads:

  a
 _
 _
 _
 _
  3d4

I’m afraid \righthyphenmin=-1 prevents hyphenation (it seems to do it
everywhere).

Sorry, but I don’t get what is wrong here.

Many thanks for your help,

Pablo


  \startluacode
  function document.addfunnyhyphen(tfmdata)
  local underscore = utf.byte("_")
  local char   = tfmdata.characters[underscore]
  if not char then return end
  tfmdata.characters[0xFE000]   = {
  width= 0,
  height   = 0,
  depth= 0,
  commands = {
  { "right", -char.width },
  { "down", char.depth },
  { "slot", 1, underscore },
  }
  }
  end


  utilities.sequencers.appendaction("aftercopyingcharacters",
  "after","document.addfunnyhyphen")

  local shared = {
  start  = 1,
  length = 1,
  before = utf.char(0xFE000),
  after  = nil,
  left   = false,
  right  = false,
  }

  local all = table.setmetatableindex({ }, function(t,k)
  return shared
  end)

  languages.hyphenators.traditional.installmethod("sha",
  function(dictionary,word,n)
  return all
  end
  )
  \stopluacode

  \definehyphenationfeatures
   [sha]
   [characters=all,
alternative=sha,
righthyphenchar="FE000]

  \unexpanded\def\sha#1%
   {\begingroup\tt
\righthyphenmin=-1
\sethyphenationfeatures[sha]%
\setuphyphenation[method=traditional]%
#1%
\endgroup}

  \starttext
  \startTEXpage[width=6em, offset=.25em]
  \hsize\zeropoint
  \sha{a1b2c3d4}

  extraordinary linguistics

  \righthyphenmin=-1
  extraordinary linguistics
  \stopTEXpage
  \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] rewrite for Greek in the wiki

2023-01-21 Thread Jean-Pierre Delange via ntg-context

Thank you very much about this accurate "mise au point", Pablo !

Le 21/01/2023 à 13:16, Pablo Rodriguez via ntg-context a écrit :

Dear list,

just in case it might help, I’ve rewritten the Greek entry in the wiki:

   https://wiki.contextgarden.net/Greek

Although nobody seemed to have mentioned them (afaIk), there are two issues:

1. Hyphenation patterns are different for ancient, monotonic and modern
polytonic Greek. Greek ortography was polytonic before 1982.

ConTeXt includes patterns for ancient and monotonic Greek, but none for
modern polytonic Greek
(http://mirror.ctan.org/language/hyph-utf8/tex/generic/hyph-utf8/patterns/tex/hyph-el-polyton.tex).

Ironically, modern polytonic Greek patterns would be required to typeset
both the act and the decree that introduced the monotonic ortography.

2. Greek doesn’t seem to have language-dependent commands (such as
\currentdate).

In both cases, Hans will reply that nobody asked for any of them.

Of course, I totally agree. AfaIk, nobody asked for these features.

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
___


--
Jean-Pierre Delange
Ancients
Professeur Agrégé de Philosophie (HC)

___
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] rewrite for Greek in the wiki

2023-01-21 Thread Thomas A. Schmitz via ntg-context

Hi Pablo,

thanks for this; it is very informative and clear. Just one short remark 
and one correction:


1. "Before 1982, Greek ort[h]ography was polytonic." That's a bit of an 
oversimplification. I'm no expert here, but I think many Greek print 
publications had already given up on using circumflex and grave accent 
or at least greatly simplified their use; the law of 1982 simple 
codified what had been developing for some time. Your sentence makes it 
sound like a sudden and random decision.


2. I think it would be worth pointing out that unfortunately, Greek 
lowercase letters with acute accent occur separately in two unicode 
blocks: the combinations in U+03AC-U+03AF and U+03CC-U+03CF ("Greek 
small letter X with tonos") are functionally identical to the 
combinations in the U+1F7 block ("Greek small letter X with acute 
accent"). This is a source of confusion both in fonts and in 
programming, because some programs normalize these letters, so for 
string operations and searches, you may obtain surprising results.


Thank you for the article!

Thomas

On 1/21/23 13:16, Pablo Rodriguez via ntg-context wrote:

Dear list,

just in case it might help, I’ve rewritten the Greek entry in the wiki:

   https://wiki.contextgarden.net/Greek

Although nobody seemed to have mentioned them (afaIk), there are two issues:

1. Hyphenation patterns are different for ancient, monotonic and modern
polytonic Greek. Greek ortography was polytonic before 1982.

ConTeXt includes patterns for ancient and monotonic Greek, but none for
modern polytonic Greek
(http://mirror.ctan.org/language/hyph-utf8/tex/generic/hyph-utf8/patterns/tex/hyph-el-polyton.tex).

Ironically, modern polytonic Greek patterns would be required to typeset
both the act and the decree that introduced the monotonic ortography.

2. Greek doesn’t seem to have language-dependent commands (such as
\currentdate).

In both cases, Hans will reply that nobody asked for any of them.

Of course, I totally agree. AfaIk, nobody asked for these features.

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
___


___
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] rewrite for Greek in the wiki

2023-01-21 Thread Pablo Rodriguez via ntg-context
Dear list,

just in case it might help, I’ve rewritten the Greek entry in the wiki:

  https://wiki.contextgarden.net/Greek

Although nobody seemed to have mentioned them (afaIk), there are two issues:

1. Hyphenation patterns are different for ancient, monotonic and modern
polytonic Greek. Greek ortography was polytonic before 1982.

ConTeXt includes patterns for ancient and monotonic Greek, but none for
modern polytonic Greek
(http://mirror.ctan.org/language/hyph-utf8/tex/generic/hyph-utf8/patterns/tex/hyph-el-polyton.tex).

Ironically, modern polytonic Greek patterns would be required to typeset
both the act and the decree that introduced the monotonic ortography.

2. Greek doesn’t seem to have language-dependent commands (such as
\currentdate).

In both cases, Hans will reply that nobody asked for any of them.

Of course, I totally agree. AfaIk, nobody asked for these features.

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] \autoinsertedspace fails

2023-01-05 Thread Hans Hagen via ntg-context

On 1/6/2023 3:05 AM, Rik Kabel via ntg-context wrote:


On 2023-01-05 04:35, Hans Hagen via ntg-context wrote:

On 1/5/2023 4:21 AM, Rik Kabel via ntg-context wrote:


     [ snipped by rik]


Here is a more lmtx-ish variant:

\starttexdefinition tolerant protected BD #=#*#=
   \removeunwantedspaces
   \space % insert a space
   (
   \ifparameter#2\or
   #1|–|#2
   \orelse\ifparameter#1\or
   #1–
   \else
   {\red I NEED A DATE OR DATES!}
   \fi
   )
   \autoinsertedspace
\stoptexdefinition

Hans


Thank you for that. This works for me with \optionalspace, but fails in 
some cases with \autoinsertedspace.


I have now re-read lowlevel-macros.pdf and have a better understanding 
of what I read when first I approached it; I still have a way to go.


/Tolerant/ removes the need for /dodoubleempty/ and friends and the 
two-step /macro/ and /doMacro/ dance. There was a small advantage to the 
two-step, however. I had two separate macros, BD and BDNP (no parens), 
as shown.


The old code in full was:

% Birth and death dates ---%
% Ferdinand de Saussure\BD{1857}{1913}
% Noam Chomsky \BD{1928}
%
% Perhaps this could be tied to an acronym-like database so that the
%   dates are printed only once per person.
% \removeunwantedspaces allows this to directly follow, or follow
%   after whitespace, the associated name: Name\BD{1}{2} or
%   Name \BD{1}{2}.
% Using the compound indication (|–|) allows hyphenation after the
%   endash. Omitting it and using a bare endash inhibits hyphenation
%   ‘twixt the endash and the paren.
% By default, add parens around the dates. If none are needed due to
%   the context, use \BDNP.
%
\newif\ifBDParen
\starttexdefinition unexpanded BD
   \BDParentrue
   \dodoublegroupempty
   \doBD
\stoptexdefinition
\starttexdefinition unexpanded BDNP
   \BDParenfalse
   \dodoublegroupempty
   \doBD
\stoptexdefinition
\starttexdefinition doBD #1#2
    \removeunwantedspaces\
    \ifBDParen(\fi
    \ifsecondargument
    #1|–|#2
    \else\iffirstargument
    #1–
    \else
    {\red I NEED A DATE OR DATES!}
    \fi\fi
    \ifBDParen)\fi
    \autoinsertedspace
\stoptexdefinition

Both call the same doBD, but they set a flag (newif) to control 
insertion or not of the parens. While there is no performance benefit 
compared to having two fully separate macros, there is a maintenance 
benefit in having only one place, doBD, to make changes should they be 
required.


Can you suggest a way to do this under the new one-step scheme, or am I 
over-thinking this?


just remove the #* in the example i sent,

\starttexdefinition tolerant protected BD #=#=

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] \autoinsertedspace fails

2023-01-05 Thread Rik Kabel via ntg-context


On 2023-01-05 04:35, Hans Hagen via ntg-context wrote:

On 1/5/2023 4:21 AM, Rik Kabel via ntg-context wrote:


    [ snipped by rik]


Here is a more lmtx-ish variant:

\starttexdefinition tolerant protected BD #=#*#=
   \removeunwantedspaces
   \space % insert a space
   (
   \ifparameter#2\or
   #1|–|#2
   \orelse\ifparameter#1\or
   #1–
   \else
   {\red I NEED A DATE OR DATES!}
   \fi
   )
   \autoinsertedspace
\stoptexdefinition

Hans


Thank you for that. This works for me with \optionalspace, but fails in 
some cases with \autoinsertedspace.


I have now re-read lowlevel-macros.pdf and have a better understanding 
of what I read when first I approached it; I still have a way to go.


/Tolerant/ removes the need for /dodoubleempty/ and friends and the 
two-step /macro/ and /doMacro/ dance. There was a small advantage to the 
two-step, however. I had two separate macros, BD and BDNP (no parens), 
as shown.


The old code in full was:

   % Birth and death dates ---%
   % Ferdinand de Saussure\BD{1857}{1913}
   % Noam Chomsky \BD{1928}
   %
   % Perhaps this could be tied to an acronym-like database so that the
   %   dates are printed only once per person.
   % \removeunwantedspaces allows this to directly follow, or follow
   %   after whitespace, the associated name: Name\BD{1}{2} or
   %   Name \BD{1}{2}.
   % Using the compound indication (|–|) allows hyphenation after the
   %   endash. Omitting it and using a bare endash inhibits hyphenation
   %   ‘twixt the endash and the paren.
   % By default, add parens around the dates. If none are needed due to
   %   the context, use \BDNP.
   %
   \newif\ifBDParen
   \starttexdefinition unexpanded BD
  \BDParentrue
  \dodoublegroupempty
  \doBD
   \stoptexdefinition
   \starttexdefinition unexpanded BDNP
  \BDParenfalse
  \dodoublegroupempty
  \doBD
   \stoptexdefinition
   \starttexdefinition doBD #1#2
   \removeunwantedspaces\
   \ifBDParen(\fi
   \ifsecondargument
   #1|–|#2
   \else\iffirstargument
   #1–
   \else
   {\red I NEED A DATE OR DATES!}
   \fi\fi
   \ifBDParen)\fi
   \autoinsertedspace
   \stoptexdefinition

Both call the same doBD, but they set a flag (newif) to control 
insertion or not of the parens. While there is no performance benefit 
compared to having two fully separate macros, there is a maintenance 
benefit in having only one place, doBD, to make changes should they be 
required.


Can you suggest a way to do this under the new one-step scheme, or am I 
over-thinking this?


Finally, is there any reason to go back to previously written and 
properly functioning macros and convert them to the LMTX-only syntax? It 
does imply committing to LMTX-only (or


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


[NTG-context] language identifier for all languages

2022-12-30 Thread Pablo Rodriguez via ntg-context
Hi Hans,

as already mentioned in a previous thread
(https://mailman.ntg.nl/pipermail/ntg-context/2022/106713.html), I think
it might be useful to have an identifier for any language, such as in:

  \setuphyphenation[method=traditional]
  \registerhyphenationexception[*][macOS]
  \registerhyphenationexception[any][macOS]
  \registerhyphenationexception[it][macOS]

  \startbuffer
  \currentlanguage: \hyphenatedword{macOS}
  \stopbuffer
  \starttext
  \startTEXpage[offset=1em]
  \getbuffer

  \language[it]\getbuffer
  \stopTEXpage
  \stoptext

I think this is better than having other commands to add hyphenation
exceptions for all languages.

I wonder whether Steffen would be fine with this addition.

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 / 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] upload

2022-12-21 Thread Pablo Rodriguez via ntg-context
rpage 70, subpage 70
pages   > flushing realpage 71, userpage 71, subpage 71
structures  > bookmark: [Contracubierta]
structure   > sectioning > hiddentitle @ level 2 : 0.0 -> \xmlflush {main::1070}
pages   > flushing realpage 72, userpage 72, subpage 72
structures  > end of sectionblock 'whatcomeslast'
backend > bookmarks > confusing level change at level 2 around 'Prólogo'
backend > bookmarks > confusing level change at level 2 around 'Conceptos previos'
backend > bookmarks > confusing level change at level 3 around 'Conclusiones'
backend > bookmarks > confusing level change at level 2 around 'Apéndices'
backend > bookmarks > confusing level change at level 3 around 'Notas'
mkiv lua stats  > scheme handling time: 0.003 seconds, 1 processed, threshold 86400 seconds, loaded: http:1, reused: http:1
mkiv lua stats  > used config file: selfautoparent:/texmf/web2c/texmfcnf.lua
mkiv lua stats  > used cache path: ~/context/tex/texmf-cache/luametatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e
mkiv lua stats  > resource resolver: loadtime 0.005 seconds, 1 scans with scantime 0.000 seconds, 0 shared scans, 29 found files, scanned paths: ~/texmf
mkiv lua stats  > stored bytecode data: 507 modules (0.177 sec), 106 tables (0.010 sec), 613 chunks (0.187 sec)
mkiv lua stats  > traced context: maxstack: 1658, freed: 1, unreachable: 1657
mkiv lua stats  > cleaned up reserved nodes: 84 nodes, 7 lists of 434
mkiv lua stats  > node memory usage: 37 attribute, 4 dir, 46 fontspec, 8 glue, 121 gluespec, 3 kern, 647 mathspec, 8 penalty, 2 temp
mkiv lua stats  > node list callback tasks: 13 unique task lists, 18 instances (re)created, 9335 calls
mkiv lua stats  > h-node processing time: 0.211 seconds including kernel
mkiv lua stats  > attribute processing time: 0.014 seconds front- and backend
mkiv lua stats  > driver time: 0.185 seconds 
mkiv lua stats  > used backend: pdf
mkiv lua stats  > jobdata time: 0.011 seconds saving, 0.003 seconds loading
mkiv lua stats  > callbacks: file: 2632, saved: 17724, direct: 148, function: 18648, value: 86, message: 0, bytecode: 613, late 0, total: 39851 (553 per page)
mkiv lua stats  > randomizer: resumed with value 0.96080909448678
mkiv lua stats  > v-node processing time: 0.018 seconds 
mkiv lua stats  > loaded patterns: agr:gr:62 de::3 en::1 es::64 la::67, load time: 0.000
mkiv lua stats  > hyphenation: 5575 words hyphenated, 1995 unique, used time 0.217 seconds 
mkiv lua stats  > xml load time: 0.022 seconds, 1 files, 1 converted
mkiv lua stats  > lxml preparation time: 0.063 seconds, 1383 nodes, 659 lpath calls, 506 cached calls
mkiv lua stats  > interactive elements: 240 references, 143 destinations
mkiv lua stats  > margin data: 6 entries, 0 pending
mkiv lua stats  > loaded fonts: 12 files: cousine-bold.ttf, cousine-regular.ttf, gfsheraklit.otf, p052-bold.otf, p052-italic.otf, p052-roman.otf, urwclassico-regular.otf, texgyrepagella-bold.otf, texgyrepagella-italic.otf, texgyrepagella-math.otf, texgyrepagella-regular.otf, dejavusans.ttf
mkiv lua stats  > font engine: otf 3.131, afm 1.513, tfm 1.000, 24 instances, 11 shared in backend, 5 common vectors, 6 common hashes, load time 0.184 seconds 
mkiv lua stats  > body font sizes: defined: 10pt 11pt 12pt 14.4pt 17.3pt 20.7pt 4pt 5pt 6pt 7pt 8pt 9pt, undefined: 15pt 18pt 20pt 25pt 30pt
mkiv lua stats  > math tweaking time: 0.007 seconds, 2 math goodie tables
mkiv lua stats  > pdf annotations: 240 links (240 unique), 6 special
mkiv lua stats  > font embedding time: 0.010 seconds, 7 fonts
mkiv lua stats  > result saved in file: xml-context.pdf, compresslevel 1, objectcompresslevel 3
mkiv lua stats  > positions: 428 collected, 307 deltas, 422 shared partials, 30 partial entries
mkiv lua stats  > used platform: linux-64, type: unix, binary subtree: texmf-linux-64
mkiv lua stats  > used engine: luametatex version: 2.1004, functionality level: 20221216, format id: 680, compiler: gcc
mkiv lua stats  > tex properties: 740852 hash slots used of 2097152, 54566 control sequences, approximate memory usage: 39 MB
mkiv lua stats  > lua properties: engine: lua 5.4, used memory: 109 MB, ctx: 104 MB, max: 104 MB, symbol mask: utf (τεχ)
mkiv lua stats  > runtime: 2.114 seconds, 72 processed pages, 72 shipped pages, 34.062 pages/second

resolvers   | formats | executing runner 'run luametatex format': ~/context/tex/texmf-linux-64/bin/luametatex --jobname="./xml-context.xml" --fmt=~/context/tex/texmf-cache/luametatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/formats/luametatex/cont-en.fmt --lua=~/context/tex/texmf-cache/luametatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/formats/luametatex/cont-en.lui  --c:currentrun=4 --c:environment="xml-context.tex" --c:fulljobname="./xml-context.xml" --c:in

Re: [NTG-context] extra hyphen in underscore hyphenation

2022-12-10 Thread Pablo Rodriguez via ntg-context
On 12/8/22 13:14, Hans Hagen via ntg-context wrote:
> [...] 
> \setuplanguage
>   [explicitrighthyphenchar=-1]

Sorry for insisting, Hans, but many languages (excepting en and uk) seem
nor to recogize this option:

  \startluacode
  function document.addfunnyhyphen(tfmdata)
  local underscore = utf.byte("_")
  local char   = tfmdata.characters[underscore]
  if not char then return end
  tfmdata.characters[0xFE000]   = {
  width= 0,
  height   = 0,
  depth= 0,
  commands = {
  { "right", -char.width },
  { "down", char.depth },
  { "slot", 1, underscore },
  }
  }
  end

  utilities.sequencers.appendaction("aftercopyingcharacters",
  "after","document.addfunnyhyphen")
  \stopluacode

  \definehyphenationfeatures
 [underscore]
 [righthyphenchar="FE000]

  \setuphyphenation[method=traditional]%
  \sethyphenationfeatures[underscore]%
  \setuplanguage
[explicitrighthyphenchar=-1]
  \setupinteractionscreen[option=singlesided]
  \starttext
  \doloopoverlist
{es,en,uk,de,nl,pt,fr,it,deo,da,sv,af,no,nb,pl,cs,sk,hr,sl,fi,et,hu}
  {\mainlanguage[\recursestring]
  \startTEXpage[offset=1em, width=5em]
\hsize\zeropoint
\recursestring: \\
\tt
\hyphenatedword{legibility-legible}
  \stopTEXpage}
  \stoptext

pt, hr and et don’t break the line at the hyphen. af breaks the line at
the hyphen adding an underscore just below the hyphen.

Either I’m missing something extremely basic, or
"\setuplanguage[explicitrighthyphenchar=-1]" only works for English.

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 / 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] extra hyphen in underscore hyphenation

2022-12-08 Thread Pablo Rodriguez via ntg-context
On 12/8/22 13:14, Hans Hagen via ntg-context wrote:
> On 12/8/2022 12:33 PM, Pablo Rodriguez via ntg-context wrote:
>> [...]
>> What am I missing here?
> 
> \setuplanguage
>   [explicitrighthyphenchar=-1]

Many thanks for your fast reply, Hans.

I’m afraid it doesn’t work here:

  \startluacode
  function document.addfunnyhyphen(tfmdata)
  local underscore = utf.byte("_")
  local char   = tfmdata.characters[underscore]
  if not char then return end
  tfmdata.characters[0xFE000]   = {
  width= 0,
  height   = 0,
  depth= 0,
  commands = {
  { "right", -char.width },
  { "down", char.depth },
  { "slot", 1, underscore },
  }
  }
  end

  utilities.sequencers.appendaction("aftercopyingcharacters",
  "after","document.addfunnyhyphen")
  \stopluacode

  \definehyphenationfeatures
 [underscore]
 [righthyphenchar="FE000]

  \setuphyphenation[method=traditional]%
  \sethyphenationfeatures[underscore]%
  \setuplanguage
[explicitrighthyphenchar=-1]
  \mainlanguage[es]
  \starttext
  \startTEXpage[offset=1em, width=4em]
\hsize\zeropoint\tt
\hyphenatedword{legibility-legible}
  \stopTEXpage
  \stoptext

Results are the same with "\mainlanguage[es]" or "\mainlanguage[nl]".

If "\mainlanguage" is placed after "\setuplanguage", the extra unwanted
hyphen appears.

If "\mainlanguage" is placed before "\setuplanguage", hyphenation for
the second word doesn’t work at all (and the extra unwanted hyphen
appears in my actual document).

I don’t know what I’m missing here and it seems to be a picky issue to
provide a MWE.

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 / 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] extra hyphen in underscore hyphenation

2022-12-08 Thread Hans Hagen via ntg-context

On 12/8/2022 12:33 PM, Pablo Rodriguez via ntg-context wrote:

Dear list,

I have the following sample:

   \startluacode
   function document.addfunnyhyphen(tfmdata)
   local underscore = utf.byte("_")
   local char   = tfmdata.characters[underscore]
   if not char then return end
   tfmdata.characters[0xFE000]   = {
   width= 0,
   height   = 0,
   depth= 0,
   commands = {
   { "right", -char.width },
   { "down", char.depth },
   { "slot", 1, underscore },
   }
   }
   end

   utilities.sequencers.appendaction("aftercopyingcharacters",
   "after","document.addfunnyhyphen")
   \stopluacode

   \definehyphenationfeatures
  [underscore]
  [righthyphenchar="FE000]

   \sethyphenationfeatures[underscore]%
   \setuphyphenation[method=traditional]%

   \starttext
   \startTEXpage[offset=1em, width=4em]
 \hsize\zeropoint\tt
 \hyphenatedword{legibility-legible}
   \stopTEXpage
   \stoptext

In current latest (and in many versions before), I get an extra hyphen
in the next line after the hyphen, such as:

ity-
-leg

As far as I can remember, I would say this used to work before (no extra
hyphen was added in the next line.

What am I missing here?


\setuplanguage
 [explicitrighthyphenchar=-1]


--

-
  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] extra hyphen in underscore hyphenation

2022-12-08 Thread Pablo Rodriguez via ntg-context
Dear list,

I have the following sample:

  \startluacode
  function document.addfunnyhyphen(tfmdata)
  local underscore = utf.byte("_")
  local char   = tfmdata.characters[underscore]
  if not char then return end
  tfmdata.characters[0xFE000]   = {
  width= 0,
  height   = 0,
  depth= 0,
  commands = {
  { "right", -char.width },
  { "down", char.depth },
  { "slot", 1, underscore },
  }
  }
  end

  utilities.sequencers.appendaction("aftercopyingcharacters",
  "after","document.addfunnyhyphen")
  \stopluacode

  \definehyphenationfeatures
 [underscore]
 [righthyphenchar="FE000]

  \sethyphenationfeatures[underscore]%
  \setuphyphenation[method=traditional]%

  \starttext
  \startTEXpage[offset=1em, width=4em]
\hsize\zeropoint\tt
\hyphenatedword{legibility-legible}
  \stopTEXpage
  \stoptext

In current latest (and in many versions before), I get an extra hyphen
in the next line after the hyphen, such as:

   ity-
   -leg

As far as I can remember, I would say this used to work before (no extra
hyphen was added in the next line.

What am I missing here?

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 / 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] 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 <mailto:ntg-context@ntg.nl>>

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

*Kopie: *Pablo Rodriguez mailto:oi...@gmx.es>>
*Antwort an: *mailing list for ConTeXt users <mailto:ntg-context@ntg.nl>>


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  <mailto:ntg-context@ntg.nl>>
> Betreff: Aw: [NTG-context] Hyphenation in multi-language projects
> Datum: 14. September 2022 um 19:40:53 MESZ
> An: Denis Maier via ntg-context  <mailto:ntg-context@ntg.nl>>
> Kopie: Pablo Rodriguez mailto:oi...@gmx.es>>
> Antwort an: mailing list for ConTeXt users  <mailto:ntg-context@ntg.nl>>
> 
> 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
___


Re: [NTG-context] Suboptimal German hyphenation

2022-10-19 Thread Pablo Rodriguez via ntg-context
On 10/19/22 16:47, Leah Neukirchen via ntg-context wrote:
>> [...]
>> Many prefixes have two letters, so changing the default may be
>> reasonable.  But there are more experienced German typographers on
>> this list who can chime in.
>
> After some research, I found the recommendation in
> Forssman, de Jong: Detailtypografie (4. Aufl, 2008, S. 124f.) to
> use 2/3 for German justified texts, and 3/4 to 5/5 for ragged text.
> They also recommend to never hyphenate words with 5 letters, not sure
> that can be encoded.

Hi Leah,

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 hope it helps,

Pablo

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

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


Re: [NTG-context] Suboptimal German hyphenation

2022-10-19 Thread Leah Neukirchen via ntg-context
Leah Neukirchen via ntg-context  writes:

> Max Chernoff via ntg-context  writes:
>
>> Hi Leah,
>>
>>> I was typesetting some German text on a narrow page when I discovered
>>> the justification wasn't as good as expected.  I think I tracked this
>>> down to differences in hyphenation points, namely, ConTeXt has fewer:
>>> 
>>> \starttext
>>> \language[de]
>>> \showhyphens{Zusammenhang}
>>> \showhyphens{anderswo}
>>> \showhyphens{anderswoher}
>>> \stoptext
>>> 
>>> This shows
>>> languages   > hyphenation > show: Zusam[-||]men[-||]hang
>>> languages   > hyphenation > show: anderswo
>>> languages   > hyphenation > show: anders[-||]wo[-||]her
>>
>> Babel/ngerman sets left/righthyphenmin to 2/2, but ConTeXt sets those to
>> 3/3 for German. (The English default is 2/3). I don't speak German so I
>> have no idea which is correct, but you can get the same behaviour in
>> ConTeXt with:
>
> Perfect, thanks!
>
> Many prefixes have two letters, so changing the default may be
> reasonable.  But there are more experienced German typographers on
> this list who can chime in.

After some research, I found the recommendation in
Forssman, de Jong: Detailtypografie (4. Aufl, 2008, S. 124f.) to
use 2/3 for German justified texts, and 3/4 to 5/5 for ragged text.
They also recommend to never hyphenate words with 5 letters, not sure
that can be encoded.

-- 
Leah Neukirchenhttps://leahneukirchen.org
___
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 Rik Kabel via ntg-context


On 2022-10-11 15:06, Leah Neukirchen via ntg-context wrote:

Henning Hraban Ramm via ntg-context  writes:


Am 11.10.22 um 20:00 schrieb Leah Neukirchen via ntg-context:

Hello,
I noticed the following problem:
\showframe
\startluacode
fonts.protrusions.vectors.pure[0x201C] = { 1, 1 }
\stopluacode
\definefontfeature[default][default][protrusion=pure]
\setupalign[hanging]
\starttext
This text is unquoted.
“This text is quoted manually.”
\quotation{This text is quoted by a macro.}
This is a very long line followed by a nice linebreak, very
supercalifragilisticexpialidocious.
This is a very long line followed by an ugly linebreak, not
\quotation{supercalifragilisticexpialidocious}
\stoptext
The macro-quoted text is not protruded.  I fixed this locally with a
macro
\def\q#1{\protrusionboundary1\quotation{#1}}
Should this be default?
But the missing hyphenation I have to add myself with \-.  Ideas?

Try
\setupdelimitedtext[quotation][method=font]

That fixes both issues, thanks!

Not sure where I should have learned this exists, however. ;)


Note that this does not fix the problem when the quotation begins a 
footnote. See the thread "Hanging punctuation misalignment in footnotes" 
(https://mailman.ntg.nl/pipermail/ntg-context/2014/077122.html or 
https://www.mail-archive.com/ntg-context@ntg.nl/msg73516.html, pick your 
favorite archiver), where the problem is described. An test example follows:


   \setuplayout   [width=9cm,
    height=12cm]
   \definefontfeature [default]
   [default]
   [protrusion=quality]
   \setupalign    [hanging]
   \setupquotation    [method=font]
   \setupnote [endnote]
   [location=none]
   \setupnotation [footnote]
   [numberconversion=set 2]
   \setupnotation [footnote]
   [align=hanging]
   \setupwhitespace   [medium]
   \setupbodyfont [libertinus]
   \showframe
   \starttext

   \quotation{{\em Cantharides}} is the reported message from Sir Francis
   Drake upon defeating the Spanish Armada.\endnote{\quotation{{\em
   Vovi}} is
   reportedly the message from James Broun|-|Ramsay on taking Oudh. Both
   are as likely as the attribution of \quotation{{\em peccavi}} to
   Napier after
   his defeat of the Ameer of Scinde.}\footnote{“{\em Vovi}” is
   reportedly the message from James Broun|-|Ramsay on taking Oudh. Both
   are as likely as the attribution of \quotation{{\em peccavi}} to
   Napier after
   his defeat of the Ameer of Scinde.}

   {\tfx This problem appears intractable. See \quotation{Re:
   [NTG-context] Hanging punctuation misalignment in footnotes} on the
   mailing list, where Wolfgang explains that the problem is struts.}

   \placenotes[endnote]

   \stoptext

A solution is welcomed.

--
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] \quotation, protrusion and linebreaking

2022-10-11 Thread Leah Neukirchen via ntg-context
Henning Hraban Ramm via ntg-context  writes:

> Am 11.10.22 um 20:00 schrieb Leah Neukirchen via ntg-context:
>> Hello,
>> I noticed the following problem:
>> \showframe
>> \startluacode
>>fonts.protrusions.vectors.pure[0x201C] = { 1, 1 }
>> \stopluacode
>> \definefontfeature[default][default][protrusion=pure]
>> \setupalign[hanging]
>> \starttext
>> This text is unquoted.
>> “This text is quoted manually.”
>> \quotation{This text is quoted by a macro.}
>> This is a very long line followed by a nice linebreak, very
>> supercalifragilisticexpialidocious.
>> This is a very long line followed by an ugly linebreak, not
>> \quotation{supercalifragilisticexpialidocious}
>> \stoptext
>> The macro-quoted text is not protruded.  I fixed this locally with a
>> macro
>> \def\q#1{\protrusionboundary1\quotation{#1}}
>> Should this be default?
>> But the missing hyphenation I have to add myself with \-.  Ideas?
>
> Try
> \setupdelimitedtext[quotation][method=font]

That fixes both issues, thanks!

Not sure where I should have learned this exists, however. ;)

-- 
Leah Neukirchenhttps://leahneukirchen.org/
___
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-11 Thread Henning Hraban Ramm via ntg-context

Am 11.10.22 um 20:00 schrieb Leah Neukirchen via ntg-context:

Hello,

I noticed the following problem:


\showframe

\startluacode
   fonts.protrusions.vectors.pure[0x201C] = { 1, 1 }
\stopluacode

\definefontfeature[default][default][protrusion=pure]
\setupalign[hanging]

\starttext

This text is unquoted.

“This text is quoted manually.”

\quotation{This text is quoted by a macro.}

This is a very long line followed by a nice linebreak, very 
supercalifragilisticexpialidocious.

This is a very long line followed by an ugly linebreak, not 
\quotation{supercalifragilisticexpialidocious}

\stoptext


The macro-quoted text is not protruded.  I fixed this locally with a macro
\def\q#1{\protrusionboundary1\quotation{#1}}
Should this be default?

But the missing hyphenation I have to add myself with \-.  Ideas?


Try
\setupdelimitedtext[quotation][method=font]

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
___


[NTG-context] \quotation, protrusion and linebreaking

2022-10-11 Thread Leah Neukirchen via ntg-context
Hello,

I noticed the following problem:


\showframe

\startluacode
  fonts.protrusions.vectors.pure[0x201C] = { 1, 1 }
\stopluacode

\definefontfeature[default][default][protrusion=pure]
\setupalign[hanging]

\starttext

This text is unquoted.

“This text is quoted manually.”

\quotation{This text is quoted by a macro.}

This is a very long line followed by a nice linebreak, very 
supercalifragilisticexpialidocious.

This is a very long line followed by an ugly linebreak, not 
\quotation{supercalifragilisticexpialidocious}

\stoptext


The macro-quoted text is not protruded.  I fixed this locally with a macro
\def\q#1{\protrusionboundary1\quotation{#1}}
Should this be default?

But the missing hyphenation I have to add myself with \-.  Ideas?

-- 
Leah Neukirchenhttps://leahneukirchen.org/
___
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-09-29 Thread Arthur Rosendahl via ntg-context
On Thu, Sep 29, 2022 at 06:49:23AM +0200, Henning Hraban Ramm via ntg-context 
wrote:
> Thank you, Leah, Max and Wolfgang! I changed that immediately in all of my
> ongoing projects, but I don’t think we should change the default after all
> these years.

  Are you sure that the default in ConTeXt has *not* changed in all
these years? :-)

Arthur
___
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-09-29 Thread Henning Hraban Ramm via ntg-context

Am 29.09.22 um 08:27 schrieb Arthur Rosendahl:

On Thu, Sep 29, 2022 at 06:49:23AM +0200, Henning Hraban Ramm via ntg-context 
wrote:

Thank you, Leah, Max and Wolfgang! I changed that immediately in all of my
ongoing projects, but I don’t think we should change the default after all
these years.


   Are you sure that the default in ConTeXt has *not* changed in all
these years? :-)


jag vet inte

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
___


Re: [NTG-context] Suboptimal German hyphenation

2022-09-28 Thread Henning Hraban Ramm via ntg-context

Am 29.09.22 um 06:10 schrieb Wolfgang Schuster via ntg-context:

Max Chernoff via ntg-context schrieb am 29.09.2022 um 02:17:

Babel/ngerman sets left/righthyphenmin to 2/2, but ConTeXt sets those to
3/3 for German. (The English default is 2/3). I don't speak German so I
have no idea which is correct, but you can get the same behaviour in
ConTeXt with:

    \mainlanguage[de]
    \lefthyphenmin=2
    \righthyphenmin=2


You can use \setuplanguage to change the values.

\setuplanguage
   [de]
   [ lefthyphenmin=2,
    righthyphenmin=2]


Thank you, Leah, Max and Wolfgang! I changed that immediately in all of 
my ongoing projects, but I don’t think we should change the default 
after all these years.


published: https://literatur.social/@fiee/109079837141552277

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
___


Re: [NTG-context] Suboptimal German hyphenation

2022-09-28 Thread Wolfgang Schuster via ntg-context

Max Chernoff via ntg-context schrieb am 29.09.2022 um 02:17:

Hi Leah,


I was typesetting some German text on a narrow page when I discovered
the justification wasn't as good as expected.  I think I tracked this
down to differences in hyphenation points, namely, ConTeXt has fewer:

\starttext
\language[de]
\showhyphens{Zusammenhang}
\showhyphens{anderswo}
\showhyphens{anderswoher}
\stoptext

This shows
languages   > hyphenation > show: Zusam[-||]men[-||]hang
languages   > hyphenation > show: anderswo
languages   > hyphenation > show: anders[-||]wo[-||]her

Babel/ngerman sets left/righthyphenmin to 2/2, but ConTeXt sets those to
3/3 for German. (The English default is 2/3). I don't speak German so I
have no idea which is correct, but you can get the same behaviour in
ConTeXt with:

\mainlanguage[de]
\lefthyphenmin=2
\righthyphenmin=2


You can use \setuplanguage to change the values.

\setuplanguage
  [de]
  [ lefthyphenmin=2,
   righthyphenmin=2]

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

2022-09-28 Thread Leah Neukirchen via ntg-context
Max Chernoff via ntg-context  writes:

> Hi Leah,
>
>> I was typesetting some German text on a narrow page when I discovered
>> the justification wasn't as good as expected.  I think I tracked this
>> down to differences in hyphenation points, namely, ConTeXt has fewer:
>> 
>> \starttext
>> \language[de]
>> \showhyphens{Zusammenhang}
>> \showhyphens{anderswo}
>> \showhyphens{anderswoher}
>> \stoptext
>> 
>> This shows
>> languages   > hyphenation > show: Zusam[-||]men[-||]hang
>> languages   > hyphenation > show: anderswo
>> languages   > hyphenation > show: anders[-||]wo[-||]her
>
> Babel/ngerman sets left/righthyphenmin to 2/2, but ConTeXt sets those to
> 3/3 for German. (The English default is 2/3). I don't speak German so I
> have no idea which is correct, but you can get the same behaviour in
> ConTeXt with:

Perfect, thanks!

Many prefixes have two letters, so changing the default may be
reasonable.  But there are more experienced German typographers on
this list who can chime in.

-- 
Leah Neukirchenhttps://leahneukirchen.org
___
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-09-28 Thread Max Chernoff via ntg-context
Hi Leah,

> I was typesetting some German text on a narrow page when I discovered
> the justification wasn't as good as expected.  I think I tracked this
> down to differences in hyphenation points, namely, ConTeXt has fewer:
> 
> \starttext
> \language[de]
> \showhyphens{Zusammenhang}
> \showhyphens{anderswo}
> \showhyphens{anderswoher}
> \stoptext
> 
> This shows
> languages   > hyphenation > show: Zusam[-||]men[-||]hang
> languages   > hyphenation > show: anderswo
> languages   > hyphenation > show: anders[-||]wo[-||]her

Babel/ngerman sets left/righthyphenmin to 2/2, but ConTeXt sets those to
3/3 for German. (The English default is 2/3). I don't speak German so I
have no idea which is correct, but you can get the same behaviour in
ConTeXt with:

   \mainlanguage[de]
   \lefthyphenmin=2
   \righthyphenmin=2
   
   \starttext
   \showhyphens{Zusammenhang}
   \showhyphens{anderswo}
   \showhyphens{anderswoher}
   \stoptext

which gives:

   languages   > hyphenation > show: Zu[-||]sam[-||]men[-||]hang
   languages   > hyphenation > show: an[-||]ders[-||]wo
   languages   > hyphenation > show: an[-||]ders[-||]wo[-||]her
   
-- Max
___
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] Suboptimal German hyphenation

2022-09-28 Thread Leah Neukirchen via ntg-context
Hi,

I was typesetting some German text on a narrow page when I discovered
the justification wasn't as good as expected.  I think I tracked this
down to differences in hyphenation points, namely, ConTeXt has fewer:

\starttext
\language[de]
\showhyphens{Zusammenhang}
\showhyphens{anderswo}
\showhyphens{anderswoher}
\stoptext

This shows
languages   > hyphenation > show: Zusam[-||]men[-||]hang
languages   > hyphenation > show: anderswo
languages   > hyphenation > show: anders[-||]wo[-||]her

Now with LaTeX and Babel:

\documentclass{article}
\usepackage[ngerman]{babel}
\begin{document}
\showhyphens{Zusammenhang}
\showhyphens{anderswo}
\showhyphens{anderswoher}
\end{document}

This shows
[] \TU/lmr/m/n/10 Zu-sam-men-hang
[] \TU/lmr/m/n/10 an-ders-wo
[] \TU/lmr/m/n/10 an-ders-wo-her

The LaTeX hyphenation points agree with the German Duden dictionary.

As none of the words use more than 7-bit ASCII, I think newer pattern
changes are not related.

Curiously, the same effect already appears with MKII and MKIV from
TeXLive 2014, the oldest I had around.

I'm also surprised 'anders-wo-her' gets hyphenated but 'anderswo' is
not hyphenated at all.

I could not reproduce a difference with English words so far.

Any ideas? As far as I understand, MKIV/LMTX should use the
de-hyph-1996 patterns which LuaLaTeX uses these days too, via
hyph-utf8.

Thanks,
-- 
Leah Neukirchenhttps://leahneukirchen.org/
___
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] strange issue with hyphens

2022-09-28 Thread Pablo Rodriguez via ntg-context
Dear list,

I’m experiencing a weird issue with hyphenation:

  \setuphyphenation
[method=traditional]

  \starttext
  \hyphenatedword{a-legibility-c}

  \sethyphenationfeatures
[strict]
  \hyphenatedword{a-legibility-c}
  \stoptext

I need the setup hyphenation commands to get underscore hyphenation.

But how can I make that strict hyphenation features behave as standard
hyphenation ones?

I mean, that the first hyphen doesn’t get doubled and that hyphenation
is also enabled after the first hyphen.

I don’t know whether the strict hyphenation features are misbehaving
here or I am missing something very basic here.

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 / 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 Pablo Rodriguez via ntg-context
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
___
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 Steffen Wolfrum via ntg-context
a bug?

st.


> Am 14.09.2022 um 16:54 schrieb denis.ma...@unibe.ch:
> 
>> -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] 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] Hyphenation in multi-language projects

2022-09-14 Thread Steffen Wolfrum via ntg-context
Isn’t there a way to list exceptions that will work in *all* languages?

Steffen


> Am 14.09.2022 um 09:19 schrieb 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
> ___

___
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-14 Thread Max Chernoff via ntg-context
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.

-- Max
___
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 Steffen Wolfrum via ntg-context
… \replaceword should be the correct way for proper hyphenation??

st.


> Am 14.09.2022 um 08:35 schrieb Max Chernoff :
> 
> 
> Hi Steffen,
> 
>> 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)?
> 
> You can use \replaceword:
> 
> \starttext
> 
> \setuppapersize[A6][A6]
> 
> \mainlanguage[en]
> 
> \replaceword[hyphenations][steffen][steff{-}{}{}en]
> \setreplacements[hyphenations]
> 
> english text english text english teste: steffen steffen
> 
> \start\language[it]
> italian text italian text italian teste: steffen steffen
> \stop
> 
> \stoptext
> 
> -- Max

___
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 Max Chernoff via ntg-context

Hi Steffen,

> 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)?

You can use \replaceword:

   \starttext
   
   \setuppapersize[A6][A6]
   
   \mainlanguage[en]
   
   \replaceword[hyphenations][steffen][steff{-}{}{}en]
   \setreplacements[hyphenations]
   
   english text english text english teste: steffen steffen
   
   \start\language[it]
   italian text italian text italian teste: steffen steffen
   \stop
   
   \stoptext
   
-- Max
___
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
___


  1   2   3   4   5   6   7   8   9   10   >