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
TeX escaping ≥ and ≤ #3444
Comments
Thanks for the suggestion ! The texescape will apply to all engines, hence is not appropriate: with xetex and luatex you can input character as is with OpenType font, even in math mode with package unicode-math. The latex.py location could be the place for pdflatex engine. However there are many Unicode characters ;-). Hence my opinion is that this should not be incorporated to Sphinx-core. What do you think @tk0miya ? If the document uses Unicode characters extensively it is best compiled with xelatex/lualatex and OpenType fonts. If with pdflatex user can always insert the By the way I can recommend newunicodechar LaTeX package. With it you can do things like
without needing to check a Unicode codepoint (assuming you have some way via your keyboard or copy paste to insert the character). Note: the rendering of some glyphs may be considered language dependent. For example, French uses This is another reason why it complicates things to try to put such mappings in Sphinx-core. |
by the way, for the specific case you mentioned you can use |
ah sorry, It appears that with |
Thank you! I see the French redefinition is a complicating factor and will just stick to my I seem to recall horrors with utf8x (although I forgot why), but the newunicodechar package is a very nice suggestion I will make use of. Great thanks also for mentioning the experimental templating feature in tex, but I am already doing customizations via preamble commands such as:
which is sufficient for my needs. |
It's difficult question. Surely there are many unicode characters. so it is hard to incorporate all of them into sphinx-core. So it would be nice to add the characters to BTW, fundamentally, it would be nice if we move to the engines supports unicode; XeTeX, LuaTeX and upLaTeX. |
The non-strict greater than and smaller than symbols, ≥ and ≤, are not defined in the TeX builder of Sphinx. I've studied the case and found that the perhaps best solution is having these definitions in the preamble:
I wanted to contribute this to Sphinx, but the question is where? Should this go into the
ADDITIONAL_SETTINGS
of sphinx/writers/latex.py where\\nobreakspace
is defined similarly, or should it rather go into sphinx/util/texescape.py where most unicode definitions seem to be?The text was updated successfully, but these errors were encountered: