Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LaTeX: support for Greek and Cyrillic #5645

Merged
merged 5 commits into from Nov 21, 2018
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
52 changes: 51 additions & 1 deletion CHANGES
Expand Up @@ -4,7 +4,44 @@ Release 2.0.0 (in development)
Dependencies
------------

* LaTeX builder now depends on TeX Live 2015 or above
* LaTeX builder now depends on TeX Live 2015 or above.
* LaTeX builder may need these additional LaTeX packages for PDF builds
(with ``'pdflatex'`` :confval:`latex_engine`):

.. list-table:: Requirements
:header-rows: 1

* - LaTeX package (CTAN)
- Ubuntu xenial
- needed for
* - substitutefont
- texlive-latex-extra
- Greek or Cyrillic letters (in non-Cyrillic documents)
* - textalpha
- texlive-lang-greek
- Greek letters (in text, not math)
* - gfsartemisia
- fonts-gfs-artemisia (texlive-fonts-extra)
- Greek letters (in text, not math)
* - gfsneohellenic
- fonts-gfs-neohellenic (texlive-fonts-extra)
- Greek letters (in text, not math)
* - cbfonts
- texlive-lang-greek
- Greek letters (in text, not math)
* - cm-lgc
- texlive-fonts-extra
- Cyrillic letters (in non-Cyrillic documents)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

They are alternative which may be better: texlive-fonts-extra appears to be rather big Ubuntu/Debian package, which installs many many TeX fonts. Thus, texlive-lang-cyrillic is much smaller and provides some Computer Modern fonts in "cyrillic" core LaTeX bundle which is not cm-lgc. They are available in X2 encoding which covers even more Cyrillic glyphs. I must check if in PDF they are rendered as scalable fonts. (I expect so)

It would be logical to tell people: for support of occasional Greek, you will need texlive-lang-greek and for support of occasional Cyrillic texlive-lang-cyrillic but not require them the big texlive-fonts-extra.

For xelatex/lualatex, this is different, I have no qualms about requiring full up-to-date installation if necessary. But for vast majority of projects using pdflatex it makes sense to try not to add big dependencies.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The X2 encoded Computer Modern seem to require not only texlive-lang-cyrillic but also cm-super-minimal (because PDF needs subsetting in particular font file sfrm1000.pfb, if I look at log of pdflatex at my locale). Investigating if cm-super-minimal is enough or cm-super is needed.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Investigating if cm-super-minimal is enough or cm-super is needed.

Yes, cm-super-minimal is enough, but \usepackage[10pt]{type1ec} must be used before \usepackage[...]{fontenc}. From the README.debian of the cm-super-minimal package,

If you DON'T have cm-super (the full package) installed you have to use
\usepackage[10pt]{type1ec}
which uses only those cm-super fonts available in cm-super-minimal and
scale those fonts for other design sizes.

and I confirmed by looing at contents of type1ec.sty file to see what it does.


These extra package are not required by default. The first two are needed if
the :confval:`latex_elements`.\ ``'fontenc'`` key has been modify to declare
the use of the ``LGR`` (Greek) and/or ``T2A`` (Cyrillic) font encoding. Even
then, the last four are font packages arising in the default value for
:confval:`latex_elements`.\ ``'fontpkg'``, and may be replaced by other font
packages providing ``LGR`` and/or ``T2A`` support.
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These explanations may move later on to builders/index.rst from CHANGES, after 2.0 release

* LaTeX builder with :confval:`latex_engine` set to ``'xelatex'`` or to
``'lualatex'`` requires (by default) the ``Computer Modern Unicode`` fonts,
which in Ubuntu xenial are in ``texlive-fonts-extra``.

Incompatible changes
--------------------
Expand All @@ -15,6 +52,11 @@ Incompatible changes
has been longly used as default of sphinx-quickstart.
* LaTeX: Move message resources to ``sphinxmessage.sty``
* LaTeX: Stop using ``\captions<lang>`` macro for some labels
* LaTeX: Greek letters in text are not escaped to math mode mark-up, and they
will use the text font not the math font. If (and only if) the document
contains such Greek Unicode letters *and* the :confval:`latex_engine` is
``'pdflatex'`` then the :confval:`latex_elements`.\ ``'fontenc'`` key
**must** be used to declare usage of the ``LGR`` font encoding.
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Initially I added LGR and usage of packages textalpha and substitutefont to the default pdflatex setting so that no document would need any change for transition to Sphinx 2.0. Unfortunately the textalpha is on Ubuntu xenial available via texlive-lang-greek which wasn't previous dependency.

So after some hesitation I decided on the contrary to not change anything to the default 'fontenc' but this means that if a document had a Greek Unicode in text, which previously was escaped to math mark-up, now, what will happens is that project author must explicitely use latex_elements 'fontenc' key to add usage of LGR encoding. And the TeX installation might need additional LaTeX packages (listed above).


Deprecated
----------
Expand Down Expand Up @@ -58,10 +100,18 @@ __ https://github.com/sphinx-contrib/sphinx-pretty-searchresults
* #4018: htmlhelp: Add :confval:`htmlhelp_file_suffix` and
:confval:`htmlhelp_link_suffix`
* #5559: text: Support complex tables (colspan and rowspan)
* LaTeX: support rendering (not in math, yet) of Greek and Cyrillic Unicode
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it is possible via alphabeta package to support Greek Unicode literals in math directive with pdflatex, but the problem is that an upright Unicode alpha will be mapped to \alpha and rendered by italic math font, contrarilty to MathJax rendering, which will keep separate the upright and the italic. Anyway there is no issue yet about this on your tracker, and besides, only xelatex/lualatex are reasonable for supporting Unicode input in math, it is not worthwile to go to extreme lengths to try to support it with pdflatex.

I was surprised to discover that platex (Japanese) has all set-up and individual Greek and Cyrillic letters work fine both in text mode and in math mode...

letters in non-Cyrillic document even with ``'pdflatex'`` as
:confval:`latex_engine`

Bugs fixed
----------

* #5247: LaTeX: PDF does not build with default font config for Russian
language and ``'xelatex'`` or ``'lualatex'`` as :confval:`latex_engine`
(refs: #5251)
* #5248: LaTeX: Greek letters in section titles disappear from PDF bookmarks
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There still remains #5249, but see previous comment, user should choose xelatex and add usage of unicode-math package for this.


Testing
--------

Expand Down
7 changes: 7 additions & 0 deletions doc/conf.py
Expand Up @@ -56,10 +56,17 @@
'Georg Brandl', 'manual', 1)]
latex_logo = '_static/sphinx.png'
latex_elements = {
'fontenc': r'\usepackage[LGR,T2A,T1]{fontenc}',
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I will probably switch to X2 in place of T2A to cover even more of Cyrillic Unicode block.

'fontpkg': r'''
\usepackage[sc]{mathpazo}
\usepackage[scaled]{helvet}
\usepackage{courier}
\substitutefont{LGR}{\rmdefault}{udidot}
\substitutefont{LGR}{\sfdefault}{neohellenic}
\substitutefont{LGR}{\ttdefault}{cmtt}
\substitutefont{T2A}{\rmdefault}{fcm}
\substitutefont{T2A}{\sfdefault}{fcs}
\substitutefont{T2A}{\ttdefault}{fct}
''',
'passoptionstopackages': '\\PassOptionsToPackage{svgnames}{xcolor}',
'preamble': '\\DeclareUnicodeCharacter{229E}{\\ensuremath{\\boxplus}}',
Expand Down
5 changes: 4 additions & 1 deletion doc/usage/builders/index.rst
Expand Up @@ -164,8 +164,11 @@ The builder's "name" must be given to the **-b** command-line option of
* ``texlive-latex-recommended``
* ``texlive-fonts-recommended``
* ``texlive-latex-extra``
* ``texlive-fonts-extra``, ``texlive-lang-greek`` (if needed to
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would be much better to say here texlive-fonts-cyrillic in place of texlive-fonts-extra

support Greek or Cyrillic letters in non-cyrillic document)
* ``latexmk`` (for ``make latexpdf`` on GNU/Linux and MacOS X)
* ``texlive-luatex``, ``texlive-xetex`` (see :confval:`latex_engine`)
* ``texlive-luatex``, ``texlive-xetex``, ``texlive-fonts-extra``
(if :confval:`latex_engine` is set to ``'xelatex'`` or ``'lualatex'``)

The testing of Sphinx LaTeX is done on Ubuntu xenial with the above mentioned
packages, which are from a TeXLive 2015 snapshot dated March 2016.
Expand Down
103 changes: 95 additions & 8 deletions doc/usage/configuration.rst
Expand Up @@ -2043,17 +2043,48 @@ information.
``babel``, not ``polyglossia``.

``'fontpkg'``
Font package inclusion, default ``'\\usepackage{times}'`` (which uses
Times for text, Helvetica for sans serif and Courier for code-blocks).
Font package inclusion, the default is ``'\\usepackage{times}'`` which
uses Times for text, Helvetica for sans serif and Courier for monospace.

.. versionchanged:: 1.2
Defaults to ``''`` when the :confval:`language` uses the Cyrillic
script.
.. versionchanged:: 1.5
Defaults to ``''`` when :confval:`latex_engine` is ``'xelatex'``.
.. versionchanged:: 1.6
Defaults to ``''`` also with ``'lualatex'``.

.. versionchanged:: 2.0
Support for individual Greek and Cyrillic letters:

- In order to support occasional Cyrillic (физика частиц)
or Greek letters (Σωματιδιακή φυσική) in
a document whose language is English or a Latin European
one, the default set-up is enhanced (only for ``'pdflatex'``
engine) to do:

.. code-block:: latex

\substitutefont{LGR}{\rmdefault}{artemisia}
\substitutefont{LGR}{\sfdefault}{neohellenic}
\substitutefont{LGR}{\ttdefault}{cmtt}
\substitutefont{T2A}{\rmdefault}{fcm}
\substitutefont{T2A}{\sfdefault}{fcs}
\substitutefont{T2A}{\ttdefault}{fct}
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the T2A fonts are from the cm-lgc LaTeX font package

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think I should replace the last three lines with \substitutefont{X2}{\rmdefault}{cmr} etc.. because x2cmr.fd exists in texlive-lang-cyrillic, and covers more Cyrillic than T2A encoded font files.


For this however, the ``'fontenc'`` key must be used to tell
LaTeX to load the ``LGR`` (Greek) or ``T2A`` (partial Cyrillic)
font encoding. If ``'fontenc'`` is not modified the above lines
are not executed.
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

as explained in previous comment, in earlier version of this PR, I had to the contrary automatically added LGR and T2A to fontenc loading. But to support this fully with the above default set-up this meant requiring Greek and Cyrillic fonts for all Sphinx projects with 'pdflatex' engine, even those not having usage for Greek and Cyrillic Unicode letters which is almost the totality of existing projects: Cyrillic was not supported (except of course for Cyrillic documents), and Greek was via escaping to math mark-up but I think few people must have used this.


In a custom ``'fontpkg'`` setting, do not use ``\substitutefont``
with a font encoding not also declared via ``'fontenc'``.

- For ``'xelatex'`` and ``'lualatex'``, the default is
``'\\setmainfont{CMU Serif}'`` (and similar for sans
serif and monospace) . This OpenType font family supports
both Cyrillic and Greek scripts (contrarily to the
default font configured by LaTeX for ``xelatex/lualatex``
if ``'fontpkg'`` is left to empty string, as was the case
prior to 2.0).
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is to close #5251 and fix #5247

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TODO: \setmainfont{CMU Serif} syntax works only with lualatex, for xelatex one needs in fact filename, as I did in latex.py. Update doc.


- ``'platex'`` (Japanese documents) engine supports individual
Cyrillic and Greek letters with no need of extra user set-up.
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I did not know that, but this is what my brief testing showed to me...

``'fncychap'``
Inclusion of the "fncychap" package (which makes fancy chapter titles),
default ``'\\usepackage[Bjarne]{fncychap}'`` for English documentation
Expand Down Expand Up @@ -2130,13 +2161,69 @@ information.
.. versionadded:: 1.2

``'fontenc'``
"fontenc" package inclusion, default ``'\\usepackage[T1]{fontenc}'``.
"fontenc" package inclusion, defaults to
``'\\usepackage[T1]{fontenc}'``.

.. versionchanged:: 1.5
Defaults to ``'\\usepackage{fontspec}'`` when
:confval:`latex_engine` is ``'xelatex'``.
.. versionchanged:: 1.6
``'lualatex'`` also uses ``fontspec`` per default.
.. versionchanged:: 2.0
With ``'pdflatex'`` you can add ``LGR`` and/or ``T2A``
(before ``T1`` which should remain the last) to trigger
automatic support of occasional Greek and Cyrillic letters
in text.

.. attention::

Prior to 2.0, Unicode Greek letters were escaped to use LaTeX
math mark-up. This is not the case anymore so it may be needed
to modify this key into ``'\\usepackage[LGR,T1]{fontenc}'`` and
also to make sure to have the suitable Greek font packages
as listed in :doc:`../changes` (or replacements).

``'textgreek'``
The default (``'pdflatex'`` only) is
``'\\usepackage{textalpha}'``, but only if ``'fontenc'`` was
modified by user to include ``LGR`` option. If not, the key
value will be forced to be empty string.

This is needed for ``pdfLaTeX`` to support Unicode input of Greek
letters such as φύσις. Expert users may want to load the ``textalpha``
package with its option ``normalize-symbols``.
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the only reason for documenting this key is to allow usage with this extra option


.. note::

- Unicode Greek letters in text were, prior to release 2.0, escaped
to LaTeX math markup in the produced LaTeX file, hence their
rendering in PDF used the math font. They are now copied over
unmodified to the LaTeX file and rendered in PDF by the text
font. But the ``LGR`` font encoding must be loaded.

- Unicode Greek letters are not accepted in :rst:dir:`math`
contents. LaTeX math mark-up ``\alpha`` etc..., must be used
there.

- With ``'xelatex'`` or ``'lualatex'``, this is ignored as the
support for Unicode Greek letters comes from using an OpenType
font which supports the Greek script. This is the case (since
2.0) with the default fonts used by Sphinx for these engines.

Besides, Unicode input in math (not only Greek symbols) can be
obtained by adding ``\usepackage{unicode-math}`` to the LaTeX
preamble (and perhaps use ``\setmathfont`` to switch to some
other OpenMath font than the XeLaTeX default). Then one can use
``:math:`α=\alpha``` input. But take note that
``\usepackage[math-style=literal]{unicode-math}`` is needed to
obtain in PDF similar output as in HTML+MathJaX, i.e. the ``α``
remains upright, and the ``\alpha`` gives an italic letter.

- With ``platex`` (Japanese), this key setting is ignored:
Greek (and Cyrillic) letters are handled natively by the engine
own default fonts.

.. versionadded:: 2.0

``'geometry'``
"geometry" package inclusion, the default definition is:
Expand Down
2 changes: 2 additions & 0 deletions sphinx/templates/latex/latex.tex_t
Expand Up @@ -26,7 +26,9 @@
<%= fontenc %>
<%= amsmath %>
<%= multilingual %>
<%= substitutefont %>
<%= fontpkg %>
<%= textgreek %>
<%= fncychap %>
\usepackage<%= sphinxpkgoptions %>{sphinx}
<%= sphinxsetup %>
Expand Down
24 changes: 24 additions & 0 deletions sphinx/texinputs/sphinx.sty
Expand Up @@ -247,6 +247,8 @@
\DeclareStringOption[\inv@mag in]{vmargin}
\DeclareStringOption[.5\dimexpr\inv@mag in\relax]{marginpar}
\fi
% Allow Cyrillic letters in non-Cyrillic document (needed for pdflatex only)
\DeclareBoolOption[false]{cyrnocyr}

\DeclareStringOption[0]{maxlistdepth}% \newcommand*\spx@opt@maxlistdepth{0}
\DeclareStringOption[-1]{numfigreset}
Expand Down Expand Up @@ -361,6 +363,28 @@
\newcommand\sphinxsetup[1]{\setkeys{sphinx}{#1}}


%% CYRILLIC IN NON-CYRILLIC DOCUMENTS (pdflatex only)
%
% refs: https://tex.stackexchange.com/q/460271/4686
%
\ifspx@opt@cyrnocyr
\@tfor\@tempa:=%
{ae}{a}{b}{chrdsc}{chvcrs}{ch}{c}{dje}{dze}{dzhe}{d}{erev}{ery}{e}%
{f}{ghcrs}{gup}{g}{hdsc}{hrdsn}{h}{ie}{ii}{ishrt}{i}{je}%
{kbeak}{kdsc}{kvcrs}{k}{lje}{l}{m}{ndsc}{ng}{nje}{n}{otld}{o}{p}{r}%
{schwa}{sdsc}{sftsn}{shch}{shha}{sh}{s}{tshe}{t}{ushrt}{u}{v}%
{ya}{yhcrs}{yi}{yo}{yu}{y}{zdsc}{zhdsc}{zh}{z}\do
{%
\expandafter\DeclareTextSymbolDefault\expandafter
{\csname cyr\@tempa\endcsname}{T2A}%
\expandafter\uppercase\expandafter{\expandafter
\def\expandafter\@tempa\expandafter{\@tempa}}%
\expandafter\DeclareTextSymbolDefault\expandafter
{\csname CYR\@tempa\endcsname}{T2A}%
}%
\DeclareTextSymbolDefault{\CYRpalochka}{T2A}%
\fi

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this fancy LaTeX code is what is needed for LaTeX to automatically use T2A font encoding when encountering a Cyrillic letter.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I will probably replace it by more extensive code covering X2 which is superset of T2A for Cyrillic. And tex.sx answer did already the work, in a more agreeable syntax using Unicode letters. I think I should externalize this to a sphinxcyrillic.sty file probably, to keep sphinx.sty simpler. Besides with a separate sphinxcyrillic.sty file, its loading can be done from template rather than pass an option to sphinx.

%% MAXLISTDEPTH
%
% remove LaTeX's cap on nesting depth if 'maxlistdepth' key used.
Expand Down
89 changes: 55 additions & 34 deletions sphinx/texinputs/sphinx.xdy
Expand Up @@ -147,40 +147,61 @@
(merge-rule "\(\sb{\text{7}}\)" "₇" :string)
(merge-rule "\(\sb{\text{8}}\)" "₈" :string)
(merge-rule "\(\sb{\text{9}}\)" "₉" :string)
(merge-rule "\(\alpha\)" "α" :string)
(merge-rule "\(\beta\)" "β" :string)
(merge-rule "\(\gamma\)" "γ" :string)
(merge-rule "\(\delta\)" "δ" :string)
(merge-rule "\(\epsilon\)" "ε" :string)
(merge-rule "\(\zeta\)" "ζ" :string)
(merge-rule "\(\eta\)" "η" :string)
(merge-rule "\(\theta\)" "θ" :string)
(merge-rule "\(\iota\)" "ι" :string)
(merge-rule "\(\kappa\)" "κ" :string)
(merge-rule "\(\lambda\)" "λ" :string)
(merge-rule "\(\mu\)" "μ" :string)
(merge-rule "\(\nu\)" "ν" :string)
(merge-rule "\(\xi\)" "ξ" :string)
(merge-rule "\(\pi\)" "π" :string)
(merge-rule "\(\rho\)" "ρ" :string)
(merge-rule "\(\sigma\)" "σ" :string)
(merge-rule "\(\tau\)" "τ" :string)
(merge-rule "\(\upsilon\)" "υ" :string)
(merge-rule "\(\phi\)" "φ" :string)
(merge-rule "\(\chi\)" "χ" :string)
(merge-rule "\(\psi\)" "ψ" :string)
(merge-rule "\(\omega\)" "ω" :string)
(merge-rule "\(\Gamma\)" "Γ" :string)
(merge-rule "\(\Delta\)" "Δ" :string)
(merge-rule "\(\Theta\)" "Θ" :string)
(merge-rule "\(\Lambda\)" "Λ" :string)
(merge-rule "\(\Xi\)" "Ξ" :string)
(merge-rule "\(\Pi\)" "Π" :string)
(merge-rule "\(\Sigma\)" "Σ" :string)
(merge-rule "\(\Upsilon\)" "Υ" :string)
(merge-rule "\(\Phi\)" "Φ" :string)
(merge-rule "\(\Psi\)" "Ψ" :string)
(merge-rule "\(\Omega\)" "Ω" :string)
(merge-rule "\IeC {\textalpha }" "α" :string)
(merge-rule "\IeC {\textbeta }" "β" :string)
(merge-rule "\IeC {\textgamma }" "γ" :string)
(merge-rule "\IeC {\textdelta }" "δ" :string)
(merge-rule "\IeC {\textepsilon }" "ε" :string)
(merge-rule "\IeC {\textzeta }" "ζ" :string)
(merge-rule "\IeC {\texteta }" "η" :string)
(merge-rule "\IeC {\texttheta }" "θ" :string)
(merge-rule "\IeC {\textiota }" "ι" :string)
(merge-rule "\IeC {\textkappa }" "κ" :string)
(merge-rule "\IeC {\textlambda }" "λ" :string)
(merge-rule "\IeC {\textmu }" "μ" :string)
(merge-rule "\IeC {\textnu }" "ν" :string)
(merge-rule "\IeC {\textxi }" "ξ" :string)
(merge-rule "\IeC {\textomicron }" "ο" :string)
(merge-rule "\IeC {\textpi }" "π" :string)
(merge-rule "\IeC {\textrho }" "ρ" :string)
(merge-rule "\IeC {\textsigma }" "σ" :string)
(merge-rule "\IeC {\texttau }" "τ" :string)
(merge-rule "\IeC {\textupsilon }" "υ" :string)
(merge-rule "\IeC {\textphi }" "φ" :string)
(merge-rule "\IeC {\textchi }" "χ" :string)
(merge-rule "\IeC {\textpsi }" "ψ" :string)
(merge-rule "\IeC {\textomega }" "ω" :string)
(merge-rule "\IeC {\textAlpha }" "Α" :string)
(merge-rule "\IeC {\textBeta }" "Β" :string)
(merge-rule "\IeC {\textGamma }" "Γ" :string)
(merge-rule "\IeC {\textDelta }" "Δ" :string)
(merge-rule "\IeC {\textEpsilon }" "Ε" :string)
(merge-rule "\IeC {\textZeta }" "Ζ" :string)
(merge-rule "\IeC {\textEta }" "Η" :string)
(merge-rule "\IeC {\textTheta }" "Θ" :string)
(merge-rule "\IeC {\textIota }" "Ι" :string)
(merge-rule "\IeC {\textKappa }" "Κ" :string)
(merge-rule "\IeC {\textLambda }" "Λ" :string)
(merge-rule "\IeC {\textMu }" "Μ" :string)
(merge-rule "\IeC {\textNu }" "Ν" :string)
(merge-rule "\IeC {\textTheta }" "Θ" :string)
(merge-rule "\IeC {\textIota }" "Ι" :string)
(merge-rule "\IeC {\textKappa }" "Κ" :string)
(merge-rule "\IeC {\textLambda }" "Λ" :string)
(merge-rule "\IeC {\textMu }" "Μ" :string)
(merge-rule "\IeC {\textNu }" "Ν" :string)
(merge-rule "\IeC {\textXi }" "Ξ" :string)
(merge-rule "\IeC {\textOmicron }" "Ο" :string)
(merge-rule "\IeC {\textPi }" "Π" :string)
(merge-rule "\IeC {\textRho }" "Ρ" :string)
(merge-rule "\IeC {\textSigma }" "Σ" :string)
(merge-rule "\IeC {\textTau }" "Τ" :string)
(merge-rule "\IeC {\textUpsilon }" "Υ" :string)
(merge-rule "\IeC {\textPhi }" "Φ" :string)
(merge-rule "\IeC {\textChi }" "Χ" :string)
(merge-rule "\IeC {\textPsi }" "Ψ" :string)
(merge-rule "\IeC {\textOmega }" "Ω" :string)
(merge-rule "\IeC {\textohm }" "Ω" :string)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

all these merge rules do nothing bad with xelatex/lualatex where Unicode letters remain identical to themselves when written to file; they serve only with pdflatex because the .idx file will have those macros rather than the Unicode letters. So we map the macros back to the Unicode letters.


;; This xindy module provides some basic support for "see"
(require "makeindex.xdy")
Expand Down