ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Max Chernoff via ntg-context <ntg-context@ntg.nl>
To: ntg-context@ntg.nl
Cc: Max Chernoff <mseven@telus.net>
Subject: Re: Apostrophe entity using \xmltexentity is ignored
Date: Sat, 08 Oct 2022 15:49:00 -0600	[thread overview]
Message-ID: <982a2b7f43196eab9e0ad7fe41cd3d36736fcf27.camel@telus.net> (raw)
In-Reply-To: <CAANrE7oAAWK_oQSRL7D3YGgJyqkuubq6Dwr9n004YgueJ1LY+Q@mail.gmail.com>

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 &lsquo; to internal '󰀁'
      xml             > core > resolving entity &lsquo; to internal '󰀁'
      xml             > core > resolving entity &apos; to predefined '''
      xml             > core > resolving entity &laquo; to internal '󰀂'
      xml             > core > resolving entity &laquo; to internal '󰀂'
      xml             > core > resolving entity &raquo; to internal '󰀃'
      xml             > core > resolving entity &raquo; to internal '󰀃'
      xml             > core > resolving entity &rsquo; to internal '󰀄'
      xml             > core > resolving entity &rsquo; 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
___________________________________________________________________________________

      reply	other threads:[~2022-10-08 21:49 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-08 19:20 Thangalin via ntg-context
2022-10-08 21:49 ` Max Chernoff via ntg-context [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=982a2b7f43196eab9e0ad7fe41cd3d36736fcf27.camel@telus.net \
    --to=ntg-context@ntg.nl \
    --cc=mseven@telus.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).