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 build broken with LaTeX2e <2019-10-01> patch level 1 if X2 present in latex_elements['fontenc'] key (Cyrillic)c #6776

Closed
jfbu opened this issue Oct 28, 2019 · 2 comments

Comments

@jfbu
Copy link
Contributor

jfbu commented Oct 28, 2019

Describe the bug

PDF can not be build if conf.py contains

latex_elements = {
    'fontenc': r'\usepackage[LGR,X2,T1]{fontenc}',
}

which is documented method (search 'fontenc' key) to handle individual Greek (LGR) and Cyrillic (X2) letters since v2.0

To Reproduce

Insert the above in conf.py and issue make latexpdf for any project. For example with this index.rst.

Test
====

Σ (greek)
л (cyrillic)

Expected behavior

PDF builds succesfully and letters are ok in output.

Observed behavior


! LaTeX Error: Command \CYRYO unavailable in encoding T1.

happens during loading of sphinxcyrillic.sty file.

The console output contains the banner:

LaTeX2e <2019-10-01> patch level 1

I have not tested with initial LaTeX2e 2019-10-01> which got released on October 1st, and it would be a bit complicated to test only that version, so I did not try.

There is no problem with LaTeX from TeXLive 2018 nor, surely, with LaTeX earlier than the 2019-10-01 release.

Environment info

  • OS: [e.g. Unix/Linux/Mac/Win/other with version]
  • Python version: [e.g. 3.7.1]
  • Sphinx version: release 2.0.0 or later
  • Extra tools: Up-to-date TeXLive 2019 as of October 28, 2019

Additional context

The problem is only with Cyrillic, not with Greek.

This problem prevents building Sphinx own docs to PDF with current LaTeX from updated TeXLive 2019.

@jfbu jfbu added this to the 2.2.2 milestone Oct 28, 2019
@jfbu
Copy link
Contributor Author

jfbu commented Oct 28, 2019

However using T2A in place of X2 has no issue.

latex_elements = {
    'fontenc': r'\usepackage[LGR,T2A,T1]{fontenc}',
}

The sphinxcyrillic.sty has various code branches, and for X2 it uses a method which was posted by tex.stackexchange user egreg and used with his permission. The T2A branch uses another method which however needs to know the names used internally by LaTeX for each cyrillic glyph. This other method is not broken by recent LaTeX release.

jfbu added a commit that referenced this issue Oct 29, 2019
Fix #6776: 2019-10-01 LaTeX release breaks sphinxcyrillic.sty
@jfbu
Copy link
Contributor Author

jfbu commented Oct 29, 2019

Fixed at 2ebdd0d

@jfbu jfbu closed this as completed Oct 29, 2019
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 1, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant