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 (doc): explain how to allow Unicode input in math #5693

Merged
merged 1 commit into from Dec 20, 2018

Conversation

jfbu
Copy link
Contributor

@jfbu jfbu commented Nov 30, 2018

Closes: #5249

This is only update to documentation.

There is no solution for pdflatex, and it appears unneeded to add per default unicode-math usage for xelatex/lualatex (especially as some option may be needed to pass to the package as explained in the added documentation from this PR).

Thus I propose this as "fix" of #5249.

@jfbu jfbu added this to the 2.0.0 milestone Nov 30, 2018
@jfbu jfbu removed the type:bug label Nov 30, 2018
Copy link
Contributor Author

@jfbu jfbu left a comment

Choose a reason for hiding this comment

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

I did not test much HTML+MathJaX but it renders well α and 𝚹 and ∫ for example. Only way I know in LaTeX for same level of support is to use xelatex/lualatex with unicode-math. On the other hand it is debatable to add unicode-math to default xelatex/lualatex conf, as it adds overhead and slows down compilation significantly. And its usage may need some user customization such as math-style=literal which we can not guess.

for Greek in text (see discussion of the :confval:`latex_elements`
``'fontenc'`` key) *and* to add ``r'\usepackage{alphabeta}'`` to
``'preamble'``. An ``α`` (U+03B1) input will render as :math:`\alpha`.

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 comment on Japanese case: α is ok but for example 𝚹 is not in my brief testing.

@codecov
Copy link

codecov bot commented Nov 30, 2018

Codecov Report

Merging #5693 into master will decrease coverage by 0.02%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #5693      +/-   ##
==========================================
- Coverage   83.22%   83.19%   -0.03%     
==========================================
  Files         290      292       +2     
  Lines       39333    39367      +34     
  Branches     5866     5869       +3     
==========================================
+ Hits        32735    32752      +17     
- Misses       5244     5258      +14     
- Partials     1354     1357       +3
Impacted Files Coverage Δ
sphinx/__init__.py 73.91% <0%> (ø)
sphinx/make_mode.py 0% <0%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 914e655...fdb6147. Read the comment docs.

CHANGES Outdated
@@ -87,6 +87,7 @@ Bugs fixed
language and ``'xelatex'`` or ``'lualatex'`` as :confval:`latex_engine`
(refs: #5251)
* #5248: LaTeX: Greek letters in section titles disappear from PDF bookmarks
* LaTeX: document how to allow use of Unicode literals in math (refs: #5249)
Copy link
Member

Choose a reason for hiding this comment

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

I think this isn't a bug fix. So I feel a bit strange for this entry.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

of course, don't know why I added this entry. I will remove that. And I will try to make the added explanations a bit less verbose. (as matter of fact I find our LaTeX doc occupies already much space...)

@jfbu
Copy link
Contributor Author

jfbu commented Dec 20, 2018

merging, thanks for reviewing! (I refactored a bit after that, I hope all for the best :) )

@jfbu jfbu merged commit 696c8f0 into sphinx-doc:master Dec 20, 2018
@jfbu jfbu deleted the latex_doc_unicode_in_math branch January 7, 2019 16:53
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 19, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

LaTeX: Unicode Greek letters in math directive break PDF build
2 participants