Re: [NTG-context] \replaceword and \setreplacements with xml files

2016-01-18 Thread Hans Hagen

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
___

Re: [NTG-context] \replaceword and \setreplacements with xml files

2016-01-17 Thread Jan U. Hasecke
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
___

Re: [NTG-context] \replaceword and \setreplacements with xml files

2016-01-17 Thread 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]



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

Re: [NTG-context] \replaceword and \setreplacements with xml files

2016-01-16 Thread Schmitz Thomas A.

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

[NTG-context] \replaceword and \setreplacements with xml files

2016-01-16 Thread Jan U. Hasecke
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
___

Re: [NTG-context] \replaceword and \setreplacements with xml files

2016-01-16 Thread Jan U. Hasecke
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


\startbuffer[demo]
auflösen, fließend
\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
\startbuffer[demo]
auflösen, fließend
\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
___
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
___