Re: [NTG-context] Apostrophe entity using \xmltexentity is ignored

2022-10-08 Thread Max Chernoff via ntg-context
Hi,

> Has the handling for the apostrophe character entity changed recently?
> 
> In the following example, the \xmltexentity for apostrophe is ignored,
> resulting in a straight apostrophe instead of a curled one:

> Any ideas on how to fix it?

(see also https://tex.stackexchange.com/a/661002/270600)

There are two different problems here.

1. Typing "'" now gives a straight apostrophe instead of a curly one by 
   default.

   The solution to this is to add 
   
  \definefontfeature[default][default][trep=yes]
  
   somewhere near the start of your document. See this thread
   
  https://mailman.ntg.nl/pipermail/ntg-context/2021/104286.html
  
   from last year.
   
2. ConTeXt ignores the redefinition of predefined entities. 

   If you run this code:
   
  \enabletrackers[xml.entities]
  
  \xmltexentity{apos}{XXX}
  \xmltexentity{lsquo}{YYY}
  \xmltexentity{rsquo}{ZZZ}
  \xmltexentity{laquo}{«}
  \xmltexentity{raquo}{»}
  
   then you get this output:
   
  xml > tex > registering tex entity 'apos' as 'XXX'
  xml > tex > registering tex entity 'lsquo' as 'YYY'
  xml > tex > registering tex entity 'rsquo' as 'ZZZ'
  xml > tex > registering tex entity 'laquo' as '«'
  xml > tex > registering tex entity 'raquo' as '»'
  xml > core > resolving entity  to internal ''
  xml > core > resolving entity  to internal ''
  xml > core > resolving entity  to predefined '''
  xml > core > resolving entity  to internal ''
  xml > core > resolving entity  to internal ''
  xml > core > resolving entity  to internal ''
  xml > core > resolving entity  to internal ''
  xml > core > resolving entity  to internal ''
  xml > core > resolving entity  to internal ''
  xml > tex > passing entity 'lsquo' as 'YYY' using 
'ctxcatcodes'
  xml > tex > passing entity 'U+27' as ''' using 'ctxcatcodes'
  xml > tex > passing entity 'laquo' as '«' using 'ctxcatcodes'
  xml > tex > passing entity 'raquo' as '»' using 'ctxcatcodes'
  xml > tex > passing entity 'rsquo' as 'ZZZ' using 
'ctxcatcodes'

   I know of a bad way to fix this (see the linked SE question), but
   hopefully someone here knows of a proper solution.
   
Thanks,
-- 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] Apostrophe entity using \xmltexentity is ignored

2022-10-08 Thread Thangalin via ntg-context
Has the handling for the apostrophe character entity changed recently?

In the following example, the \xmltexentity for apostrophe is ignored,
resulting in a straight apostrophe instead of a curled one:

% SOT
\xmltexentity{apos}{’}
\xmltexentity{lsquo}{‘}
\xmltexentity{rsquo}{’}
\xmltexentity{laquo}{«}
\xmltexentity{raquo}{»}

\startbuffer[document]

  Sylvias spilled wine.

\stopbuffer

\startxmlsetups xml:xhtml
  \xmlsetsetup{\xmldocument}{body}{xml:*}
\stopxmlsetups

\startxmlsetups xml:body
  \xmlflush{#1}
\stopxmlsetups

\xmlregistersetup{xml:xhtml}

\starttext
  \xmlprocessbuffer{xhtml}{document}{}
\stoptext
% EOT

Any ideas on how to fix it?

Thank you.

mtx-context | current version: 2022.09.11 20:44
___
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
___