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
Changes from 3 commits
2825e33
f56431b
6283324
1edf2a4
5974c40
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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) | ||
|
||
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. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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 | ||
-------------------- | ||
|
@@ -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. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Initially I added LGR and usage of packages So after some hesitation I decided on the contrary to not change anything to the default |
||
|
||
Deprecated | ||
---------- | ||
|
@@ -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 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. it is possible via 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 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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 |
||
|
||
Testing | ||
-------- | ||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -56,10 +56,17 @@ | |
'Georg Brandl', 'manual', 1)] | ||
latex_logo = '_static/sphinx.png' | ||
latex_elements = { | ||
'fontenc': r'\usepackage[LGR,T2A,T1]{fontenc}', | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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}}', | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It would be much better to say here |
||
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. | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. the T2A fonts are from the cm-lgc LaTeX font package There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think I should replace the last three lines with |
||
|
||
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. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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 |
||
|
||
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). | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. TODO: |
||
|
||
- ``'platex'`` (Japanese documents) engine supports individual | ||
Cyrillic and Greek letters with no need of extra user set-up. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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 | ||
|
@@ -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``. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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: | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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} | ||
|
@@ -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 | ||
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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. There was a problem hiding this comment. Choose a reason for hiding this commentThe 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. | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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 |
||
|
||
;; This xindy module provides some basic support for "see" | ||
(require "makeindex.xdy") | ||
|
There was a problem hiding this comment.
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 notcm-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 Cyrillictexlive-lang-cyrillic
but not require them the bigtexlive-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.
There was a problem hiding this comment.
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 alsocm-super-minimal
(because PDF needs subsetting in particular font filesfrm1000.pfb
, if I look at log ofpdflatex
at my locale). Investigating ifcm-super-minimal
is enough orcm-super
is needed.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, cm-super-minimal is enough, but
\usepackage[10pt]{type1ec}
must be used before\usepackage[...]{fontenc}
. From the README.debian of thecm-super-minimal
package,and I confirmed by looing at contents of
type1ec.sty
file to see what it does.