* \replaceword and \setreplacements with xml files
@ 2016-01-16 11:24 Jan U. Hasecke
2016-01-16 12:31 ` Schmitz Thomas A.
0 siblings, 1 reply; 10+ messages in thread
From: Jan U. Hasecke @ 2016-01-16 11:24 UTC (permalink / raw)
To: ntg-context
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 was shown
http://tex.stackexchange.com/a/37465/323
http://tex.stackexchange.com/a/28746/323
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 I place the replacement commands somewhere in the style file I get
no result. I can see no error message. The file is compiled just fine
but without replacements.
Has anyone yet implemented replacements in xml processing and can give
me a hint where to place the commands?
TIA
juh
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage : http://www.pragma-ade.nl / http://tex.aanhet.net
archive : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: \replaceword and \setreplacements with xml files
2016-01-16 11:24 \replaceword and \setreplacements with xml files Jan U. Hasecke
@ 2016-01-16 12:31 ` Schmitz Thomas A.
2016-01-16 14:58 ` Jan U. Hasecke
0 siblings, 1 reply; 10+ messages in thread
From: Schmitz Thomas A. @ 2016-01-16 12:31 UTC (permalink / raw)
To: mailing list for ConTeXt users
> On 16 Jan 2016, at 12:24, Jan U. Hasecke <juh+ntg-context@mailbox.org> 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 I place the replacement commands somewhere in the style file I get
> no result. I can see no error message. The file is compiled just fine
> but without replacements.
>
> Has anyone yet implemented replacements in xml processing and can give
> me a hint where to place the commands?
Please provide a minimal example of your problem. It’s impossible to help when we have no clue what you’re doing.
Thomas
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage : http://www.pragma-ade.nl / http://tex.aanhet.net
archive : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: \replaceword and \setreplacements with xml files
2016-01-16 12:31 ` Schmitz Thomas A.
@ 2016-01-16 14:58 ` Jan U. Hasecke
2016-01-17 19:05 ` Hans Hagen
0 siblings, 1 reply; 10+ messages in thread
From: Jan U. Hasecke @ 2016-01-16 14:58 UTC (permalink / raw)
To: ntg-context
[-- Attachment #1: Type: text/plain, Size: 456 bytes --]
Am 16.01.2016 um 13:31 schrieb Schmitz Thomas A.:
>
> Please provide a minimal example of your problem. It’s impossible to
> help when we have no clue what you’re doing.
Sorry, of course.
After setting up a mwe I found that it is a font related issue.
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.
juh
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: example.tex --]
[-- Type: text/x-tex; name="example.tex", Size: 427 bytes --]
\startbuffer[demo]
<p>auflösen, fließend</p>
\stopbuffer
\startxmlsetups xml:initialize
\xmlsetsetup{#1}{p}{xml:*}
\stopxmlsetups
\xmlregistersetup{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
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #3: example-Garamond.tex --]
[-- Type: text/x-tex; name="example-Garamond.tex", Size: 493 bytes --]
\startbuffer[demo]
<p>auflösen, fließend</p>
\stopbuffer
\startxmlsetups xml:initialize
\xmlsetsetup{#1}{p}{xml:*}
\stopxmlsetups
\xmlregistersetup{xml:initialize}
\startxmlsetups xml:p
\xmlflush{#1}
\stopxmlsetups
\definefontfamily
[mainface]
[rm]
[EB Garamond]
\setupbodyfont
[mainface, 16pt]
\replaceword[sellig][auflösen][au{fl}ösen]
\setreplacements[sellig]
\starttext
\xmlprocessbuffer{main}{demo}{}
\stoptext
[-- Attachment #4: Type: text/plain, Size: 485 bytes --]
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage : http://www.pragma-ade.nl / http://tex.aanhet.net
archive : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: \replaceword and \setreplacements with xml files
2016-01-16 14:58 ` Jan U. Hasecke
@ 2016-01-17 19:05 ` Hans Hagen
2016-01-18 6:31 ` Jan U. Hasecke
2016-01-18 9:16 ` Ligatures in EB Garamond (was: \replaceword and \setreplacements with xml files) Jan U. Hasecke
0 siblings, 2 replies; 10+ messages in thread
From: Hans Hagen @ 2016-01-17 19:05 UTC (permalink / raw)
To: ntg-context
On 1/16/2016 3:58 PM, Jan U. Hasecke wrote:
> Am 16.01.2016 um 13:31 schrieb Schmitz Thomas A.:
>>
>> Please provide a minimal example of your problem. It’s impossible to
>> help when we have no clue what you’re doing.
>
> Sorry, of course.
>
> After setting up a mwe I found that it is a font related issue.
>
> 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 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]
-----------------------------------------------------------------
Hans Hagen | PRAGMA ADE
Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | www.pragma-ade.com | 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 / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage : http://www.pragma-ade.nl / http://tex.aanhet.net
archive : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: \replaceword and \setreplacements with xml files
2016-01-17 19:05 ` Hans Hagen
@ 2016-01-18 6:31 ` Jan U. Hasecke
2016-01-18 10:12 ` Hans Hagen
2016-01-18 9:16 ` Ligatures in EB Garamond (was: \replaceword and \setreplacements with xml files) Jan U. Hasecke
1 sibling, 1 reply; 10+ messages in thread
From: Jan U. Hasecke @ 2016-01-18 6:31 UTC (permalink / raw)
To: ntg-context
Am 17.01.2016 um 20:05 schrieb Hans Hagen:
> On 1/16/2016 3:58 PM, Jan U. Hasecke wrote:
>>
>> When I choose EB Garamond, it does not work. -- example-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]
Thanks a lot. This was new to me.
juh
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage : http://www.pragma-ade.nl / http://tex.aanhet.net
archive : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 10+ messages in thread
* Ligatures in EB Garamond (was: \replaceword and \setreplacements with xml files)
2016-01-17 19:05 ` Hans Hagen
2016-01-18 6:31 ` Jan U. Hasecke
@ 2016-01-18 9:16 ` Jan U. Hasecke
2016-01-18 10:09 ` Ligatures in EB Garamond Hans Hagen
1 sibling, 1 reply; 10+ messages in thread
From: Jan U. Hasecke @ 2016-01-18 9:16 UTC (permalink / raw)
To: ntg-context
Am 17.01.2016 um 20:05 schrieb Hans Hagen:
> On 1/16/2016 3:58 PM, Jan U. Hasecke wrote:
>> Am 16.01.2016 um 13:31 schrieb Schmitz Thomas A.:
>>>
>>> Please provide a minimal example of your problem. It’s impossible to
>>> help when we have no clue what you’re doing.
>>
>> Sorry, of course.
>>
>> After setting up a mwe I found that it is a font related issue.
>>
>> 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 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) ligatures.
They are listed as glyphs.
https://github.com/georgd/EB-Garamond/blob/master/specimen/Specimen.pdf
juh
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage : http://www.pragma-ade.nl / http://tex.aanhet.net
archive : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Ligatures in EB Garamond
2016-01-18 9:16 ` Ligatures in EB Garamond (was: \replaceword and \setreplacements with xml files) Jan U. Hasecke
@ 2016-01-18 10:09 ` Hans Hagen
2016-01-18 12:46 ` Jan U. Hasecke
0 siblings, 1 reply; 10+ messages in thread
From: Hans Hagen @ 2016-01-18 10:09 UTC (permalink / raw)
To: ntg-context
On 1/18/2016 10:16 AM, Jan U. Hasecke wrote:
> Am 17.01.2016 um 20:05 schrieb Hans Hagen:
>> On 1/16/2016 3:58 PM, Jan U. Hasecke wrote:
>>> Am 16.01.2016 um 13:31 schrieb Schmitz Thomas A.:
>>>>
>>>> Please provide a minimal example of your problem. It’s impossible to
>>>> help when we have no clue what you’re doing.
>>>
>>> Sorry, of course.
>>>
>>> After setting up a mwe I found that it is a font related issue.
>>>
>>> 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 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) ligatures.
> They are listed as glyphs.
>
> https://github.com/georgd/EB-Garamond/blob/master/specimen/Specimen.pdf
maybe the archaic st ligature is a precomposed but f f l i aren't done
that way but by either kerning or replacement of individual glyphs +
kerning (there are many methods for this) ... also, 'liga' might mean
ligature but in practice is used for all kind of things ... in opentype
'ligature substitution' is just a many-to-one replacement but that
doesn't mean that 'liga' uses that ... welcome to the inconsistent open
type mess
Hans
-----------------------------------------------------------------
Hans Hagen | PRAGMA ADE
Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | www.pragma-ade.com | 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 / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage : http://www.pragma-ade.nl / http://tex.aanhet.net
archive : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: \replaceword and \setreplacements with xml files
2016-01-18 6:31 ` Jan U. Hasecke
@ 2016-01-18 10:12 ` Hans Hagen
0 siblings, 0 replies; 10+ messages in thread
From: Hans Hagen @ 2016-01-18 10:12 UTC (permalink / raw)
To: ntg-context
On 1/18/2016 7:31 AM, Jan U. Hasecke wrote:
> Am 17.01.2016 um 20:05 schrieb Hans Hagen:
>> On 1/16/2016 3:58 PM, Jan U. Hasecke wrote:
>>>
>>> When I choose EB Garamond, it does not work. -- example-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]
>
> 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
-----------------------------------------------------------------
Hans Hagen | PRAGMA ADE
Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | www.pragma-ade.com | 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 / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage : http://www.pragma-ade.nl / http://tex.aanhet.net
archive : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Ligatures in EB Garamond
2016-01-18 10:09 ` Ligatures in EB Garamond Hans Hagen
@ 2016-01-18 12:46 ` Jan U. Hasecke
2016-01-18 19:22 ` Hans Hagen
0 siblings, 1 reply; 10+ messages in thread
From: Jan U. Hasecke @ 2016-01-18 12:46 UTC (permalink / raw)
To: ntg-context
Am 18.01.2016 um 11:09 schrieb Hans Hagen:
> On 1/18/2016 10:16 AM, Jan U. Hasecke wrote:
>> Am 17.01.2016 um 20:05 schrieb Hans Hagen:
>>> On 1/16/2016 3:58 PM, Jan U. Hasecke wrote:
>>>> Am 16.01.2016 um 13:31 schrieb Schmitz Thomas A.:
>>>>>
>>>>> Please provide a minimal example of your problem. It’s impossible to
>>>>> help when we have no clue what you’re doing.
>>>>
>>>> Sorry, of course.
>>>>
>>>> After setting up a mwe I found that it is a font related issue.
>>>>
>>>> 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 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) ligatures.
>> They are listed as glyphs.
>>
>> https://github.com/georgd/EB-Garamond/blob/master/specimen/Specimen.pdf
>
> maybe the archaic st ligature is a precomposed but f f l i aren't done
> that way but by either kerning or replacement of individual glyphs +
> kerning (there are many methods for this) ... also, 'liga' might mean
> ligature but in practice is used for all kind of things ... in opentype
> 'ligature substitution' is just a many-to-one replacement but that
> doesn't mean that 'liga' uses that ... welcome to the inconsistent open
> type mess
>
Mh, yes. :-(
Two additional questions. Shall I file a bugreport for this issue? What
would be the right words: please provide real ligature glyphs instead of
composed ones?
EB Garamond is a free font also in the sense free of charge. But what
can I expect when I buy a commercial font? I would be quite annoyed when
I buy a font which does not provide the features in a way that I can use
them in ConTeXt.
Is there a font quality page on the Wiki with a feature comparison?
juh
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage : http://www.pragma-ade.nl / http://tex.aanhet.net
archive : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Ligatures in EB Garamond
2016-01-18 12:46 ` Jan U. Hasecke
@ 2016-01-18 19:22 ` Hans Hagen
0 siblings, 0 replies; 10+ messages in thread
From: Hans Hagen @ 2016-01-18 19:22 UTC (permalink / raw)
To: ntg-context
[-- Attachment #1: Type: text/plain, Size: 3263 bytes --]
On 1/18/2016 1:46 PM, Jan U. Hasecke wrote:
> Am 18.01.2016 um 11:09 schrieb Hans Hagen:
>> On 1/18/2016 10:16 AM, Jan U. Hasecke wrote:
>>> Am 17.01.2016 um 20:05 schrieb Hans Hagen:
>>>> On 1/16/2016 3:58 PM, Jan U. Hasecke wrote:
>>>>> Am 16.01.2016 um 13:31 schrieb Schmitz Thomas A.:
>>>>>>
>>>>>> Please provide a minimal example of your problem. It’s impossible to
>>>>>> help when we have no clue what you’re doing.
>>>>>
>>>>> Sorry, of course.
>>>>>
>>>>> After setting up a mwe I found that it is a font related issue.
>>>>>
>>>>> 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 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) ligatures.
>>> They are listed as glyphs.
>>>
>>> https://github.com/georgd/EB-Garamond/blob/master/specimen/Specimen.pdf
>>
>> maybe the archaic st ligature is a precomposed but f f l i aren't done
>> that way but by either kerning or replacement of individual glyphs +
>> kerning (there are many methods for this) ... also, 'liga' might mean
>> ligature but in practice is used for all kind of things ... in opentype
>> 'ligature substitution' is just a many-to-one replacement but that
>> doesn't mean that 'liga' uses that ... welcome to the inconsistent open
>> type mess
>>
>
> Mh, yes. :-(
>
> Two additional questions. Shall I file a bugreport for this issue? What
> would be the right words: please provide real ligature glyphs instead of
> composed ones?
there are many fonts out that that do similar things replacing f an i by
different shapes, or overlaying, or kerning, or replacing by one char,
looking forward (from f to i) or backward (from i to f) ... as all is
technically possible/permitted nothing is a bug (but there might be
occasional differences between hyphenation although quite some effort
went into getting that kind of right ... and it makes a good topic for
complex hard to follow boring presentations (see attachment)
(btw, sometimes glyphs get funny non standard names in which case
roundtrip copy/paste becomes a mess)
> EB Garamond is a free font also in the sense free of charge. But what
> can I expect when I buy a commercial font? I would be quite annoyed when
> I buy a font which does not provide the features in a way that I can use
> them in ConTeXt.
you can expect the same ... in fact you can also expect type1 -> otf
converted fonts with hardly any use of opentype features
> Is there a font quality page on the Wiki with a feature comparison?
that would be nice (has been discussed)
Hans
-----------------------------------------------------------------
Hans Hagen | PRAGMA ADE
Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | www.pragma-ade.com | www.pragma-pod.nl
-----------------------------------------------------------------
[-- Attachment #2: ligatures.pdf --]
[-- Type: application/x-pdf, Size: 97603 bytes --]
[-- Attachment #3: Type: text/plain, Size: 485 bytes --]
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage : http://www.pragma-ade.nl / http://tex.aanhet.net
archive : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2016-01-18 19:22 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-01-16 11:24 \replaceword and \setreplacements with xml files Jan U. Hasecke
2016-01-16 12:31 ` Schmitz Thomas A.
2016-01-16 14:58 ` Jan U. Hasecke
2016-01-17 19:05 ` Hans Hagen
2016-01-18 6:31 ` Jan U. Hasecke
2016-01-18 10:12 ` Hans Hagen
2016-01-18 9:16 ` Ligatures in EB Garamond (was: \replaceword and \setreplacements with xml files) Jan U. Hasecke
2016-01-18 10:09 ` Ligatures in EB Garamond Hans Hagen
2016-01-18 12:46 ` Jan U. Hasecke
2016-01-18 19:22 ` Hans Hagen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).