det: 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
uage 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
&g
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 "
… \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 paragra
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\languag
Hi list,
I'm looking to perform text replacements.
\definereplacement[SubstPostmeridian][
match={[Pp].[Mm].]},
replace={\cap{pm}}
]
The \replaceword command doesn't handle periods well. The translate module
doesn't seem flexible enough to cover edge cases. Consider the following
example
mechanism (\replaceword[eg][Auflage][Au{fl}age]) now
obsolete? I tried using it, but unwanted ligatures still occurred. If it
is indeed deprecated, I'll add a note to the wiki (this would mean that
the current texlive version does not have the new mechanism and the
latest lmtx doesn't use the old
Hi all,
just two quick questions: a couple of weeks ago, there was a long
discussion on ligature exceptions in, e.g., German. Hans provided an
elegant new mechanism (\startlanguageoptions). So my two questions:
1. Is the old mechanism (\replaceword[eg][Auflage][Au{fl}age]) now
obsolete? I
On 3/24/2021 11:43 PM, denis.ma...@ub.unibe.ch wrote:
So, what's the general recommendation? Which approach is the best in your
opinion? (In case it's the \replaceword approach: do you think you'll have time
to look into this?)
I've seen in an older thread that the best way to deal
b.unibe.ch wrote:
> > So, what's the general recommendation? Which approach is the best in
> > your opinion? (In case it's the \replaceword approach: do you think
> > you'll have time to look into this?)
> >
> > I've seen in an older thread that the best way to deal with this
On 3/24/2021 11:43 PM, denis.ma...@ub.unibe.ch wrote:
So, what's the general recommendation? Which approach is the best in your
opinion? (In case it's the \replaceword approach: do you think you'll have time
to look into this?)
I've seen in an older thread that the best way to deal
So, what's the general recommendation? Which approach is the best in your
opinion? (In case it's the \replaceword approach: do you think you'll have time
to look into this?)
I've seen in an older thread that the best way to deal with this would be in
the hyphenator. What do you think about
Hi,
Trying to sum up what we currently have regarding ligature prevention, it looks
like we have three mechanisms available:
1. \replaceword[set][input][output]
Ex.: \replaceword[ligs][Auflage][Au{fl}age]
Replaces a word input with the corresponding output.
Doesn't work at the moment with LMTX
Ah, I've now realized that the \blockligatures needs to be activated as a font
feature... So forget about this point.
But, it still looks like ligature prevention with \replaceword is not working
with lmtx, but it works with --luatex
Hi,
last October I've reported a strange bug with \replaceword
I know there's the new mechanism for dealing with ligatures, and I still intend
to convert the word list to the new format, but I'm still wondering whether
that has been fixed.
Now, I've been testing with the minimal example below
on a wordlist originating from selnolig),
but then ran into a curious bug (?) with disappearing characters (see
my posts from a couple of days ago). I'm now converting this list to
the \blockligatures mechanism (instead of using \replaceword), which
also has better kerning support due to Hans. When
on a wordlist originating from selnolig),
but then ran into a curious bug (?) with disappearing characters (see
my posts from a couple of days ago). I'm now converting this list to
the \blockligatures mechanism (instead of using \replaceword), which
also has better kerning support due to Hans. When
),
but then ran into a curious bug (?) with disappearing characters (see
my posts from a couple of days ago). I'm now converting this list to
the \blockligatures mechanism (instead of using \replaceword), which
also has better kerning support due to Hans. When done, I'll of
course share this on the Wiki
(?) with disappearing characters (see my
posts from a couple of days ago). I'm now converting this list to the
\blockligatures mechanism (instead of using \replaceword), which also
has better kerning support due to Hans. When done, I'll of course share
this on the Wiki if there's any need for this.
Now I'm
of days ago). I'm now converting this list to the
\blockligatures mechanism (instead of using \replaceword), which also
has better kerning support due to Hans. When done, I'll of course share
this on the Wiki if there's any need for this.
Now I'm wondering how others deal with inappropriate
Arg, it's getting uglier...
I've been playing around with the replacement patterns.
```
\replaceword[replace][auff][au{ff}]
\replaceword[replace][Aufl][Au{fl}]
\replaceword[replace][aufl][au{fl}]
\setreplacements[replace]
\starttext
auffasste
auffasse
Auflage
aufliegen
auffliegen
On 10/8/2020 3:15 PM, Denis Maier wrote:
Ok,
I've commented the whole nolig-german-wordlist out piece by piece, and
it looks like it comes down to this:
```
\replaceword[eka][auffasse][au{ff}asse]
\replaceword[eka][auffasst][au{ff}asst]
\setreplacements[eka]
\starttext
auffasste
auffasse
Next try,
the compact syntax gives the same weird result:
```
\replaceword[replace][au{ff}asse au{ff}asst]
\setreplacements[replace]
\starttext
auffasste
auffasse
\stoptext
```
I would really like to have correct ligatures. What can I do to help
finding the reason
on't have that file
It was from my projects (eka = Edition Kritische Ausgabe, a series by Verlag
Dreiviertelhaus).
(I didn’t remember I uploaded it to the wiki, tried to send it here, but it was
too big.)
>> ```
>> \replaceword[eka][auffasse][au{ff}asse]
>> \re
n't really understand what is happening here. Why is the t
disappearing.
```
\replaceword[eka][auffasse][au{ff}asse]
\replaceword[eka][auffasste][au{ff}asste]
\setreplacements[eka]
\starttext
auffasste
auffasse
\stoptext
```
This example gives correct resul
Ok,
I've commented the whole nolig-german-wordlist out piece by piece, and
it looks like it comes down to this:
```
\replaceword[eka][auffasse][au{ff}asse]
\replaceword[eka][auffasst][au{ff}asst]
\setreplacements[eka]
\starttext
auffasste
auffasse
\stoptext
```
Uncommenting one
y I didn't attached it to the mail (and, it's too big to post
here).
```
\replaceword[eka][auffasse][au{ff}asse]
\replaceword[eka][auffasste][au{ff}asste]
\setreplacements[eka]
\starttext
auffasste
auffasse
\stoptext
```
This example gives correct results.
so we're okay
Yes, but it looks li
fasse" (see attachment.)
I don't really understand what is happening here. Why is the t
disappearing.
who knows ... i don't have that file
```
\replaceword[eka][auffasse][au{ff}asse]
\replaceword[eka][auffasste][au{ff}asste]
\setreplacements[eka]
\starttext
auffasste
auffasse
On 8/21/20 2:59 PM, Hans Hagen wrote:
> On 8/20/2020 4:20 PM, Pablo Rodriguez wrote:
>
>>\replaceword[whatever][this or][no]
>>\replaceword[whatever][that][]
> this feature creep is in the next upload
Hans,
many thanks for the new feature.
Pablo
-
On 8/20/2020 4:20 PM, Pablo Rodriguez wrote:
\replaceword[whatever][this or][no]
\replaceword[whatever][that][]
this feature creep is in the next upload
Hans
-
Hans Hagen | PRAGMA
; " word." " word?" (and so on). I would
>> like to avoid having to code all combinations (of course, if this were
>> already available).
>
> old stuff present for a long time ... probaly documented somewhere ...
> if not than you have to wikify it ...
Man
d?" (and so on). I would
like to avoid having to code all combinations (of course, if this were
already available).
old stuff present for a long time ... probaly documented somewhere ...
if not than you have to wikify it ...
\starttext
\replaceword[whatever][this][that]
\replaceword[whatever][t
On 04/15/2018 06:39 PM, Hans Hagen wrote:
> On 4/15/2018 6:14 PM, Pablo Rodriguez wrote:
>> [...]
>> Many thanks for the fix, Hans.
> it's not a fix .. it's an extension to the font extension mechanism
Hans
it was my fault. Of course it is a new implementation. (I was thinking
about the solution
On 4/15/2018 7:07 PM, Floris van Manen wrote:
On 15 Apr 2018, at 18:42, Hans Hagen wrote:
In this case "The Time Capsule" from Endre eNerd (blu ray on my top floor work
space with surround 5.1).
much like TeX, drummers do know about timing ;-)
Indeed I love to watch
On Sun, Apr 15, 2018 at 6:02 PM, Hans Hagen wrote:
> ... yet another obscure feature
>
It's a proven theorem that, by adding a suitable number of obscure features,
you can transform everything into black magic.
--
luigi
> On 15 Apr 2018, at 18:42, Hans Hagen wrote:
>
> In this case "The Time Capsule" from Endre eNerd (blu ray on my top floor
> work space with surround 5.1).
much like TeX, drummers do know about timing ;-)
.F
signature.asc
Description: Message signed with OpenPGP using
On 4/15/2018 6:22 PM, Floris van Manen wrote:
On 15 Apr 2018, at 18:02, Hans Hagen wrote:
(some upbeat music in the background so i could convince myself)
what music ?
In this case "The Time Capsule" from Endre eNerd (blu ray on my top
floor work space with surround
On 4/15/2018 6:14 PM, Pablo Rodriguez wrote:
On 04/15/2018 06:02 PM, Hans Hagen wrote:
On 4/15/2018 1:30 PM, Pablo Rodriguez wrote:
[...]
Is there any way to get spaces in the string to be replaced?
not with a lot of effort on my end which i'm not willing to invest in
something that is just a
> On 15 Apr 2018, at 18:02, Hans Hagen wrote:
>
> (some upbeat music in the background so i could convince myself)
what music ?
.F
signature.asc
Description: Message signed with OpenPGP using GPGMail
On 04/15/2018 06:02 PM, Hans Hagen wrote:
> On 4/15/2018 1:30 PM, Pablo Rodriguez wrote:
>> [...]
>> Is there any way to get spaces in the string to be replaced?
> not with a lot of effort on my end which i'm not willing to invest in
> something that is just a hack for bad input ... tex has no
On 4/15/2018 1:30 PM, Pablo Rodriguez wrote:
Dear list,
I have the following sample:
\replaceword[some][via ][Vía]
\replaceword[some][calle ][c/ ]
\replaceword[some][ calle][ Calle]
\starttext
\startTEXpage[offset=2em]
This is what I get:
\setreplacements
Dear list,
I have the following sample:
\replaceword[some][via ][Vía]
\replaceword[some][calle ][c/ ]
\replaceword[some][ calle][ Calle]
\starttext
\startTEXpage[offset=2em]
This is what I get:
\setreplacements[some]%
calle via del viaducto de la calle
]
[mode=node,kern=yes,
liga=yes,tlig=yes,
ccmp=yes,language=dflt,
protrusion=quality,
expansion=quality]
\replaceword[eka][Auflage][Au{fl}age]
\replaceword[eka][Kampffront][Kamp{ff}ront]
\starttext
falsch: Auflage Kampffront
richtig: Au\noligature{fl}age Kamp\noligature{ff}ront
\setreplacements[eka
Am 2017-09-28 um 01:16 schrieb Hans Hagen <pra...@wxs.nl>:
> On 9/27/2017 11:08 PM, Thomas A. Schmitz wrote:
>> On 09/27/2017 10:25 PM, Henning Hraban Ramm wrote:
>>> Thank you for the suggestion.
>>> I tried
>>>
>>> \replacewor
u indeed use the latest beta? anyway, the \replaceword mechanism is
> a bit more flexible and efficient
Hans,
after updating to latest beta (from 2017.09.25 19:19 to 2017.09.28 10:07
[I didn’t realize that there was a newer beta yesterday]), it works.
Just in case it may be relevant, \bl
is written _with_ a ligature?
Herbert,
I overlooked that \blockligatures[u:fl:age, u:fl:eg] only works if there
is also a \blockligatures[fl].
Hans, is this a bug or is it intended?
do you indeed use the latest beta? anyway, the \replaceword mechanism is
a bit more flexible and effici
Am 2017-09-27 um 23:02 schrieb Herbert Voss <herbert.v...@fu-berlin.de>:
>> Thank you for the suggestion.
>> I tried
>> \replaceword[eka][Auflage][Au{fl}age]
>> \setreplacements[eka]
>> and even converted the german wordlist from the selnolig package,
On 9/27/2017 11:08 PM, Thomas A. Schmitz wrote:
On 09/27/2017 10:25 PM, Henning Hraban Ramm wrote:
Thank you for the suggestion.
I tried
\replaceword[eka][Auflage][Au{fl}age]
\setreplacements[eka]
and even converted the german wordlist from the selnolig package, but
it doesn’t help.
Works
On 09/27/2017 10:25 PM, Henning Hraban Ramm wrote:
Thank you for the suggestion.
I tried
\replaceword[eka][Auflage][Au{fl}age]
\setreplacements[eka]
and even converted the german wordlist from the selnolig package, but it
doesn’t help.
Works here. You'll have to make a real example
s, too.
This exists, see here:
https://www.mail-archive.com/ntg-context@ntg.nl/msg79381.html
Thank you for the suggestion.
I tried
\replaceword[eka][Auflage][Au{fl}age]
\setreplacements[eka]
and even converted the german wordlist from the selnolig package, but it
doesn’t help.
If I try
\repla
e here:
> https://www.mail-archive.com/ntg-context@ntg.nl/msg79381.html
Thank you for the suggestion.
I tried
\replaceword[eka][Auflage][Au{fl}age]
\setreplacements[eka]
and even converted the german wordlist from the selnolig package, but it
doesn’t help.
If I try
\replaceword[eka][Auflag
On 4/6/2016 9:04 AM, Thomas A. Schmitz wrote:
On 04/06/2016 08:57 AM, Wolfgang Schuster wrote:
The feature is disabled in footnotes and you have to reenable it:
\startsetups[footnote]
\setreplacements [german]
\stopsetups
\setupnote[footnote][setups=footnote]
Thank you, Wolfgang, this
On 04/06/2016 08:57 AM, Wolfgang Schuster wrote:
The feature is disabled in footnotes and you have to reenable it:
\startsetups[footnote]
\setreplacements [german]
\stopsetups
\setupnote[footnote][setups=footnote]
Thank you, Wolfgang, this works indeed!
Thomas
Thomas
\setreplacements [german]
\replaceword [german] [Auflage] [Au{fl}age]
\mainlanguage [de]
\setupbodyfont [termes, 12pt]
\starttext
flüssig Auflage\footnote{flüssig Auflage}
\stoptext
The feature is disabled in footnotes and you have to reenable it:
\startsetups[footnote]
\setreplacements [
Hi all,
I use replacements to break unwanted ligatures in German text. This
works in the text body, but not in footnotes. How can this be achieved
in footnotes as well? Example attached!
Thanks
Thomas
\setreplacements [german]
\replaceword [german] [Auflage] [Au{fl}age]
\mainlanguage [de
, but as I only have to use it
once...)
I have no clue what a package is supposed to do but any solution has to
come up with a list if words.
\replaceword[sellig][auflösen][auf{-}{}{\zwnj}lösen]
The {-}{}{\zwnj} is in fact a discretionary spec because you probably
would like to permit
using patterns they don't need a very huge word list, I think.
If patterns were the solution then making better pattern files would be
the solution ... anyway, i just see a list of what are basically
exceptions.
So just for the fun of it i'll add {} as shortcut for \zwnj
\replacewor
;> I confirmed this behaviour in my real setup.
>
> don't assume that ligatures are always real ligatures ... in that font
> it's just kerning .. this kind of works okay:
>
> \replaceword[sellig][auflösen][auf{-}{}{\zwnj}lösen]
I am confused as the specimen of EB Garamond
ligatures ... in that font
it's just kerning .. this kind of works okay:
\replaceword[sellig][auflösen][auf{-}{}{\zwnj}lösen]
Thanks a lot. This was new to me.
there are many hidden tricks ... to be revealed in due time (so that we
can suggest that it was just implemented)
Hans
res are always real ligatures ... in that font
it's just kerning .. this kind of works okay:
\replaceword[sellig][auflösen][auf{-}{}{\zwnj}lösen]
I am confused as the specimen of EB Garamond mentions (real) ligatures.
They are listed as glyphs.
https://github.com/georgd/EB-Garamond/blob/master/speci
sue.
>>>>
>>>> When I don't specify a font, it works. --> example.tex
>>>>
>>>> When I choose EB Garamond, it does not work. -- example-Garamond.tex
>>>>
>>>> I confirmed this behaviour in my real setup.
>>>
>>> d
ple-Garamond.tex
I confirmed this behaviour in my real setup.
don't assume that ligatures are always real ligatures ... in that font
it's just kerning .. this kind of works okay:
\replaceword[sellig][auflösen][auf{-}{}{\zwnj}lösen]
I am confused as the specimen of EB Garamond mentions (real) ligatu
t;>> When I don't specify a font, it works. --> example.tex
>>>>>
>>>>> When I choose EB Garamond, it does not work. -- example-Garamond.tex
>>>>>
>>>>> I confirmed this behaviour in my real setup.
>>>>
>>>> don't assu
>>
>>>> I confirmed this behaviour in my real setup.
>>>
>>> don't assume that ligatures are always real ligatures ... in that font
>>> it's just kerning .. this kind of works okay:
>>>
>>> \replaceword[sellig][auflösen][auf{-}{}{\zwnj}lösen]
&
ligatures ... in that font
> it's just kerning .. this kind of works okay:
>
> \replaceword[sellig][auflösen][auf{-}{}{\zwnj}lösen]
Thanks a lot. This was new to me.
juh
___
If your question is of inter
kay:
\replaceword[sellig][auflösen][auf{-}{}{\zwnj}lösen]
-
Hans Hagen | PRAGMA ADE
Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | www.pragma-ade.
> On 16 Jan 2016, at 12:24, Jan U. Hasecke wrote:
>
> Both solutions work fine if I use them in a simple context file, but I
> can't use neither solution in my xml processing.
>
> I use a customized version of the from-pandoc-to-context solution of Pablo.
>
> When
Dear list,
some time ago I ask for a way to selectively suppress ligatures. Hans
told me to use the replacement feature.
- http://www.ntg.nl/pipermail/ntg-context/2015/083044.html
- http://www.ntg.nl/pipermail/ntg-context/2015/083034.html
In another thread a solution with the translate module
egistersetup{xml:initialize}
\startxmlsetups xml:p
\xmlflush{#1}
\stopxmlsetups
\setupbodyfont
[mainface, 16pt]
\replaceword[sellig][auflösen][au{fl}ösen]
\setreplacements[sellig]
\starttext
\xmlprocessbuffer{main}{demo}{}
\stoptext
\startbuffer[demo]
auflösen, flieÃend
.
The best place to incorporate such a feature is in the hyphenator but I
have no time now to do that. So, instead I added a few lines to an
existing (probably unknown) mechanism:
\replaceword[more][shelfful] [shel{ff}ul]
\replaceword[more][shifffahrt][shi{ff}fahrt]
\starttext
shel\noligature{ff
) mechanism:
\replaceword[more][shelfful] [shel{ff}ul]
\replaceword[more][shifffahrt][shi{ff}fahrt]
\starttext
shel\noligature{ff}ul
\setreplacements[more]
shelfful
\stoptext
The downside of the 10 line extension is that it's not the most
efficient implementation but probably still fast
without and 18.95 sec with
suppression enabled (0.14 s loop overhead), so some 5% extra runtime.
\replaceword[more][slffl][sl{ff}l]
\replaceword[more][slfful][sl{ff}ul]
\replaceword[more][shlfful][shl{ff}ul]
\replaceword[more][shelfful][shel{ff}ul]
\startbuffer
\testfeatureonce{100
72 matches
Mail list logo