Bug#921593: accent translations

2019-02-15 Thread James Van Zandt
I am attaching a patch that does the following:

There were translations (HTML or unicode or both) for several specific
normal text characters (a, o, n, etc.) with accents.  I added
translations for rest of the accents on p. 52 of the TeXbook using
pre-composed characters where available, otherwise characters with
combining class "above" or "below".

I added translations for all the math accents listed on p. 135 of the
TeXbook
 similarly, but using ... to get italic characters.

The translations for \~u and \~U were incorrect.  They had the hex
unicode values, but lacked the "x".

\dot was translated as a common period, but should be an accent.

There were several translations for dotless i or j with accents.  I
added translations for those symbols without accents.

I corrected the translation for \models to U+22a7, as per
https://www.compart.com/en/unicode/U+22A8, (The former translation
U+22a8 is the symbol for "true", which is similar to the one for
"models" but not as tall.  There's no record of a symbol "not
models".  U+22ad (decimal 8877) is the Unicode character for "not
true", which is the symbol for "true" with a stroke added.  However,
neither \true nor \false are standard macros in LaTeX, so there is no
need to provide those translations.)

I added translations for many more macros - all the plain TeX symbols
listed here:
http://mirrors.ibiblio.org/CTAN/macros/latex/contrib/unicode-math/unimath-symbols.pdf


There are Unicode translations of several letters with a dot under
accent, and a character with combining class "below".  However,
neither Chrome nor Firefox on Linux render them.

For the accent \vec or \overrightarrow as I've translated them, Chrome
unaccountably changes the font.  Firefox does a better job with lower
case letters, but it fails to raise the accent high enough for the
upper case letters.  I have not tried other browsers.


Most of the new translations use Unicode, but so did some of the
existing translations, even without the --unicode option.  In general,
where I found a named HTML entity, I put it in the --html-entity
section, and the corresponding numeric code in the --unicode section.
Otherwise, I just put the translation in the math macros section that
is always used.

I would appreciate your forwarding this patch to the upstream authors.  It
is meant to be applied after my first patch (that added translations for
cosh, etc.).

For what it's worth, I'm also attaching the test file I used to exercise
most of these translations.


accent-translations
Description: Binary data

 @Article{   a-sample,
  author =	 {J{\"u}rgen Prestin and Daniela Ro\c{s}ca},
  title =	 {On some cubature formulas on the sphere},
  journal =	 {J. Approximation Theory},
  year =	 2019,
  volume =	 2,
  number =	 1,
  pages =	 {11-22},
  month =	 mar,
  abstract =	 {We construct interpolatory cubature rules on the
  two-dimensional sphere, using the fundamental system
  of points obtained by Laín Fernández [Polynomial
  Bases on the Sphere, Logos-Verlag, Berlin, 2003;
  Localized polynomial bases on the sphere,
  Electron. Trans. Numer. Anal. 19 (2005) 84–93]. \\
		  \\
  {\bf Functions:} \\
  \cosh x, {\hbox{cosh}} x	\\
  \tanh x, {\hbox{tanh}} x	\\
		  \sinh x, {\hbox{sinh}} x	\\   
  \sup  x, {\hbox{sup}}  x	\\
  \cos  x, {\hbox{cos}}  x	\\
		  \tan  x, {\hbox{tan}}  x	\\	
  \sin  x, {\hbox{sin}}  x	\\
		  {x\over y}, over (division)  	\\

{\bf Plain text accents (TeXbook, p. 52):}\\
\; \'a\; \'e\; \'i\; \'j\; \'o\; \'u\; \'x\; \'A\; \'E\; \'I\; \'O\; \'U\; \'X \quad \backslash ', grave accent\\
\; \`a\; \`e\; \`i\; \`j\; \`o\; \`u\; \`x\; \`A\; \`E\; \`I\; \`O\; \`U\; \`X \quad \backslash `, acute accent\\
\; \^a\; \^e\; \^i\; \^j\; \^o\; \^u\; \^x\; \^A\; \^E\; \^I\; \^O\; \^U\; \^X \quad \backslash ^, circumflex or hat\\
\; \"a\; \"e\; \"i\; \"j\; \"o\; \"u\; \"x\; \"A\; \"E\; \"I\; \"O\; \"U\; \"X \quad \backslash ", umlaut or dieresis\\
\; \~a\; \~e\; \~i\; \~j\; \~o\; \~u\; \~x\; \~A\; \~E\; \~I\; \~O\; \~U\; \~X \quad tilde\\
\; \=a\; \=e\; \=i\; \=j\; \=o\; \=u\; \=x\; \=A\; \=E\; \=I\; \=O\; \=U\; \=X \quad \backslash =, macron or bar\\
 \u a \u e \u i \u j \u o \u u \u x \u A \u E \u I \u O \u U \u X \quad \backslash u, breve accent\\
 \v a \v e \v i \v j \v o \v u \v x \v A \v E \v I \v O \v U \v X \quad \backslash v, hacek or "check"\\
 \H a \H e \H i \H j \H o \H u \H x \H A \H E \H I \H O \H U \H X \quad \backslash H, long Hungarian umlaut\\
\; \.a\; \.e\; \qquad \qquad \.o\; \.u\; \.x\; \.A\; \.E\  \.I\; \.O\; \.U\; \.X \quad \backslash ., dot accent\\
\;\t xy \quad \backslash t, tie-after accent \\
 \c a \c b \c c \c d \c e \c f \c g \c h \c i \c j \c k \c l \c m \c n \c o \c p \c q \c r \c s \c t \c u \c v \c w \c x \c y \c z , cedilla accent \\
 \d a \d b \d c \d d \d e \d f \d g \d h \d i \d j \d 

Bug#921593: accent translations

2019-02-11 Thread James Van Zandt
Ack.  I see some problems in that last patch.  Please hold off implementing
it - I'll submit a correction.