[XeTeX] Adobe Professional Fonts and Diacritics

Arthur Reutenauer arthur.reutenauer at normalesup.org
Thu Sep 10 15:36:18 CEST 2015


On Thu, Sep 10, 2015 at 02:02:13PM +0200, hanneder at staff.uni-marburg.de wrote:
> In the first case, writing Sanskrit in transliteration, one would write
> typically within an English, other Euopean,
> or Japanese (or whatever) environment that constitutes the main language.
> One just uses a few additional diacritics
> in latin alphabet and would not switch to another languange, since word
> division has to be added by hand anyway.
> The other case is the full use of Devanagari in a Sanskrit environment.

  I see.  That's an understandable use case, but it's too specific for a
reasonable user interface.  You're expecting "\begin{sanskrit}" (or some
equivalent command) to deactivate some setups you've done for Sanskrit
at the document level: that's not something we can reasonably support.
You know that the default document font will work well with your setups,
and not with the Devanagari font you're using within the sanskrit
environment; that's of course why you want to deactivate it.  But
Poylgossia can't know that, and some other users may very well expect
the exact opposite: a user whose document has very little Sanskrit in it
could very well decide to use the sanskrit environment for the Sanskrit
texts, and want to have the font fixes activated within it, and only
there.  That does in fact sound like a much more common use case to me.

  What you should do is define your own switches to deactivate the
redefinitions, and a new environment such as (untested code):

	\newcommand\activatesanskritchars{%
	  \catcode`\ṝ=\active
	  % Definitions as suggested by Ulrike
	}
	
	\newcommand\deactivatesanskritchars{%
	  \catcode`\ṝ=\letter
	}
	
	\newenvironment{mysanskrit}{%
	  \deactivatesanskritchars
	  \sanskrit
	}{%
	  \activatesanskritchars
	  \endsanskrit
	}

and use "\begin{mysanskrit}" instead of "\begin{sanskrit}".  As Ulrike
says, this is really a font problem anyway, it should be solved only for
documents that use that font (or by changing the font, of course).

	Best,

		Arthur


More information about the XeTeX mailing list