summaryrefslogtreecommitdiff
path: root/sphinx/util/texescape.py
Commit message (Collapse)AuthorAgeFilesLines
* Use PEP 604 typesAdam Turner2023-01-011-3/+2
|
* Use PEP 595 typesAdam Turner2023-01-011-6/+6
|
* Insert ``from __future__ import annotations``Adam Turner2023-01-011-0/+2
|
* Improve static typing strictness (#10569)danieleades2022-07-181-3/+3
|
* Collapse single line docstringsAdam Turner2022-02-201-2/+1
|
* Remove copyright and licence fieldsAdam Turner2022-02-201-3/+0
|
* Fix module docstring indentationAdam Turner2022-02-201-2/+2
|
* Fix module docstring first lineAdam Turner2022-02-201-2/+1
|
* Remove module titles in docstringsAdam Turner2022-02-191-3/+0
|
* A happy new year!Takeshi KOMIYA2022-01-011-1/+1
|
* Add unicode multiplicationOz N Tiram2021-04-271-0/+2
| | | | | Since checkmark already exists, it makes sense to have this too. Both signs are used as "yes" or "no" replacements in text UIs.
* refactor: Use PEP-526 based variable annotation (sphinx.util)Takeshi KOMIYA2021-03-101-5/+5
|
* Merge branch '3.x'Takeshi KOMIYA2021-01-011-1/+1
|\
| * A happy new year!Takeshi KOMIYA2021-01-011-1/+1
| | | | | | | | | | | | | | .. note:: $ find sphinx tests LICENSE doc/conf.py -type f -exec sed -i '' -e 's/2007\-20../2007-2021/' {} \; $ git co sphinx/locale/**/*.js sphinx/templates/epub3/mimetype
* | Merge branch '3.x'Takeshi KOMIYA2020-11-121-1/+0
|\ \ | |/
| * Sort imports with isortFrançois Freitag2020-11-111-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | Keep imports alphabetically sorted and their order homogeneous across Python source files. The isort project has more feature and is more active than the flake8-import-order plugin. Most issues caught were simply import ordering from the same module. Where imports were purposefully placed out of order, tag with isort:skip.
* | Remove deprecated features marked as RemovedInSphinx40WarningTakeshi KOMIYA2020-04-291-10/+0
|/
* A happy new year!Takeshi KOMIYA2020-01-011-1/+1
|
* LaTeX: avoid quotes and TeX ligature replacements in PDF outputjfbu2019-12-151-6/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Refs: #6890 The comma character is not TeX-escaped because it is frequent in general text and escaping it would make the LaTeX output larger for only dealing with the problem of the LaTeX-ligature of ,, into a single character. And one there is problem with the commas in options to Verbatim from PygmentsBridge. The hyphen character is escaped (not in ids and URIs!) to \sphinxhyphen{} for both Unicode and non-Unicode engines. This is needed to work around hyperref transforming -- and --- from section titles into EN DASH resp. EM DASH in PDF bookmarks. https://github.com/latex3/hyperref/issues/112 Note to expert LaTeX users: if Sphinx latex user with xelatex has - turned off Smart Quotes for some reason, - but does want TeX ligatures and thus overrode Sphinx latex_elements['fontenc'] default (since #6888) to this effect, then this should be added to LaTeX preamble: \def\sphinxhyphen#1{-}% (\protected is now not needed) \let\sphinxhyphenforbookmarks\sphinxhyphen
* Merge pull request #6845 from jfbu/latex_do_not_escape_verticalbarcharJean-François B2019-11-181-2/+0
|\ | | | | LaTeX: stop escaping | to LaTeX macro, except if in an index entry
| * LaTeX: stop escaping | to LaTeX macro, except if in an index entryjfbu2019-11-181-2/+0
| |
* | Merge pull request #6834 from tk0miya/6738_deprecated_tex_escape_mapTakeshi KOMIYA2019-11-191-38/+32
|\ \ | |/ |/| Reconsider public APIs of sphinx.util.texescape
| * Make escape() and hlescape() as public APIs of texescapeTakeshi KOMIYA2019-11-161-29/+11
| |
| * Deprecate sphinx.util.texescape.tex_escape_mapTakeshi KOMIYA2019-11-161-15/+27
| |
* | LaTeX: escape fewer Unicode chars if engine is lualatex or xelatexjfbu2019-11-161-12/+18
|/
* Fix #6738: latex: literal_block does not support raw unicode charactersTakeshi KOMIYA2019-11-161-2/+26
|
* Do not replace unicode characters by LaTeX macros on unicode supported LaTeX ↵Takeshi KOMIYA2019-10-201-3/+29
| | | | engines
* Migrate to py3 style type annotation: sphinx.util.texescapeTakeshi KOMIYA2019-06-031-10/+4
|
* Merge branch '1.8'jfbu2019-01-051-0/+9
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: sphinx/writers/latex.py tests/test_build_latex.py Also, modifications were needed in further files. modified: CHANGES modified: sphinx/templates/latex/sphinxmessages.sty_t modified: sphinx/util/template.py modified: sphinx/util/texescape.py modified: sphinx/writers/latex.py modified: tests/test_build_latex.py
| * Merge branch '1.8' into latex_checkmarkJean-François B2019-01-021-1/+1
| |\
| * | LaTeX: escape Unicode HEAVY CHECK MARK into latex macrosjfbu2018-12-271-0/+1
| | | | | | | | | | | | Closes: #3707
* | | Merge branch '1.8'Takeshi KOMIYA2019-01-021-1/+1
|\ \ \ | | |/ | |/|
| * | A happy new year!Takeshi KOMIYA2019-01-021-1/+1
| |/
* | Merge pull request #5509 from stephenfin/remove-future-importsTakeshi KOMIYA2018-12-171-2/+0
|\ \ | | | | | | Remove future imports
| * | py3: Remove (most) __future__ importsStephen Finucane2018-12-171-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There were two used: - print_function - absolute_import Both of these are mandatory in Python 3.0 onwards [1] and can therefore be removed...mostly. Unfortunately, mypy is still running in Python 2.7 mode, meaning we need the 'print_function' future wherever we're calling 'print' with the 'file' argument. There's also a single 'absolute_import' future that must be retained as its removal breaks a test for as-yet unknown reasons. TODOs are added to resolve both issues in the future. [1] https://docs.python.org/3/library/__future__.html Signed-off-by: Stephen Finucane <stephen@that.guru>
* | | Remove unnecessary encoding cookie from Python source filesJon Dufresne2018-12-161-1/+0
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | In Python 3, the default encoding of source files is utf-8. The encoding cookie is now unnecessary and redundant so remove it. For more details, see the docs: https://docs.python.org/3/howto/unicode.html#the-string-type > The default encoding for Python source code is UTF-8, so you can > simply include a Unicode character in a string literal ... Includes a fix for the flake8 header checks to stop expecting an encoding cookie.
* | Replace all "unicode" type by "str"Takeshi KOMIYA2018-12-151-3/+2
| |
* | Add sphinx.util.typing:unicode to help mypy-3 migrationTakeshi KOMIYA2018-11-241-0/+1
| |
* | LaTeX: support for Greek and Cyrillicjfbu2018-11-161-50/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 0. do not escape Unicode Greek letters via LaTeX math mark-up: pass them through un-modified to LaTeX document, 1. if "fontenc" receives extra option LGR, then pdflatex will support Unicode Greek letters (not in math), and with extra option T2A it will support (most) Unicode Cyrillic letters. 2. for pdflatex with LGR, this will use "textalpha" LaTeX package and "substitutefont" package to set up some automatic font substitution to work around the unavailability of Greek with "times" package (which is default font package chosen by Sphinx for pdflatex), same with T2A and "substitutefont" for Cyrillic. 3. for xelatex/lualatex, set up Computer Modern Unicode as default font, as it supports Cyrillic and Greek scripts, 4. for platex, don't do anything special as the engine already has its default font supporting Cyrillic and Greek (even in math mode!) Closes: #5251 Fixes: #5248 Fixes: #5247
* | refactor: Separate message catalogs to sphinxmessage.styTakeshi KOMIYA2018-10-071-0/+1
| |
* | latex: escape \releasename and \indexnameTakeshi KOMIYA2018-10-071-1/+10
|/
* A happy new year!Takeshi KOMIYA2018-01-011-1/+1
|
* Fix #3851 and fix #3706 about box drawing characters for PDF outputjfbu2017-06-181-3/+0
| | | | | | | | | | | Do not tex-escape them, but provide suitable definitions for pdflatex only (and platex). Define the 4 box drawing characters needed by unix tree command with charset utf8. Also define the U+2572 as it was previously escaped for all engines. No definitions for xelatex/lualatex as it is then only a matter of using a font providing them (a priori, only the mono font needs definition, as the characters will be used in literal blocks).
* Merge branch 'stable'Takeshi KOMIYA2017-03-261-1/+1
|\
| * Year++Takeshi KOMIYA2017-03-261-1/+1
| |
* | Fix mypy violationsTakeshi KOMIYA2017-02-081-0/+1
|/
* Fix Unicode super- and subscript digits in LaTeX parsed-literaljfbu2017-01-151-20/+20
|
* Fix typo (ref: #3181)Takeshi KOMIYA2016-12-031-1/+1
|
* Fix #3181: pLaTeX crashes with a section contains emdashTakeshi KOMIYA2016-11-251-0/+1
|
* Revert "Add ``config-inited`` event"Takeshi KOMIYA2016-11-201-10/+0
| | | | This reverts commit 9569c6dbff8e9bb2cc032ec4bc7ebdd50c4b570e.