Commit Graph
2367 Commits
Author SHA1 Message Date
Jean-François B 8412bdf9d6 Merge pull request #5645 from jfbu/latex_greek_cyrillic_letters
LaTeX: support for Greek and Cyrillic
2018-11-21 23:11:15 +01:00
Jon Dufresne 77849f0ef6 Simplify ensuredir() with Python3 stdlib features
- Simplify ensuredir() to equivalent os.makedir(name, exist_ok=True)
- Do not check if a directory exists before calling
  ensuredir() (ensuredir() already handles it)
- Add exist_ok argument to path.makedirs() to follow same pattern
- Drop unnecessary .exists() check immediately before .isdir()
- Add tests for ensuredir
2018-11-20 18:37:05 -08:00
jfbu 2825e338c2 LaTeX: support for Greek and Cyrillic
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
2018-11-16 21:14:51 +01:00
Takeshi KOMIYA 6c94801ec2 Merge pull request #5621 from jdufresne/str-bytes
Fix all BytesWarning identified through tests
2018-11-14 20:05:48 +09:00
Jon Dufresne 4cda774566 Improve JS handling in test_search.py
- Reuse jsload() in all tests to reduce duplication.
- Fix -2 index to -1, to include the entire JSON string. Was previously
  chopping off the final '}'.
- Assert the serialized string ends with a closing parenthesis
2018-11-13 21:25:46 -08:00
Jon Dufresne 41ad0d5347 Fix all BytesWarning identified through tests
Code should not arbitrarily mix bytes & str values. The values should be
understood and deliberate. When Python is run with the -b option, this
change fixes warnings of the form:

  BytesWarning: str() on a bytes instance
2018-11-13 18:08:49 -08:00
Jon Dufresne 555960d668 Deprecate and drop internal use of force_decode()
In the Python 3 only code base, this function is no longer necessary.
The type of values is well understood and deliberate. Code should avoid
arbitrary mixing of bytes & str.

By removing force_decode() calls from docstring values, can deprecate
the now unused 'encoding' arguments to various autodoc methods.
2018-11-13 07:16:39 -08:00
Jon Dufresne 0137b0287a Remove dead code or '.'
The expression `os.path.dirname(__file__)` always evaluates as a truthy
value. The `or '.'` is never evaluated.
2018-11-12 14:31:29 -08:00
Jon Dufresne 710ca3d7c3 Use super() to call parent class's method 2018-11-11 13:07:12 -08:00
Takeshi KOMIYA 9c4e5b244a test: Replace call_autodoc() by do_autodoc() 2018-11-11 21:22:11 +09:00
Takeshi KOMIYA 2810f77edd Merge branch '1.8' 2018-11-09 22:10:35 +09:00
Takeshi KOMIYA b28ab1e103 Merge pull request #5600 from tk0miya/3080_invalid_texinfo
Fix #3080: multiline rubrics and citations are broken in texinfo builder
2018-11-09 22:08:51 +09:00
Takeshi KOMIYA feba53ff55 Fix #3080: texinfo: multiline citations are broken 2018-11-08 23:33:00 +09:00
Takeshi KOMIYA 84f781252f Fix #3080: texinfo: multiline rubric is broken 2018-11-08 23:33:00 +09:00
jfbu 16f47cded9 Merge branch '1.8' 2018-11-06 18:30:21 +01:00
Takeshi KOMIYA dcc4ac55bb latex: Move \pageautorefname to sphinxmessages.sty 2018-11-01 22:47:15 +09:00
jfbu 4df3b067b7 LaTeX: add styling to general index, similar to domain indices
Closes: #5579. Also closes #5576.
2018-10-31 19:22:34 +01:00
Takeshi KOMIYA 8b687ac304 Merge branch '1.8' 2018-11-01 01:24:12 +09:00
Takeshi KOMIYA e3574a6f78 Fix #3002: i18n: multiple footnote_references referring same footnote causes duplicated node_ids 2018-11-01 00:54:25 +09:00
Takeshi KOMIYA 08aadcffcd Merge pull request #5559 from JulienPalard/text-colspan-rowspan
Working on text colspan and rowspan.
2018-11-01 00:42:02 +09:00
jfbu f4d7b2e60e Fix invalid escape sequence \d in test (refs #5513) 2018-10-30 17:47:59 +01:00
Julien Palard dfa1824f19 Removing unnecessary indent. 2018-10-28 08:42:36 +01:00
Takeshi KOMIYA a4cce3e561 Merge pull request #5546 from tk0miya/refactor_test_root
test: Move autodoc_missing_imports to test-ext-autodoc
2018-10-25 23:55:07 +09:00
Takeshi KOMIYA 1af1d8a82b Merge pull request #5536 from tk0miya/5497_install_mathjax_only_if_needed
Fix #5497: Do not include MathJax.js and jsmath.js unless it is really needed
2018-10-25 23:03:38 +09:00
Julien Palard d527497b1f Moar tests 2018-10-23 18:41:08 +02:00
Julien Palard 9b30fc938d Working on text colspan and rowspan. 2018-10-22 23:38:01 +02:00
Takeshi KOMIYA ca8bc8ca49 refactor: Deprecate app._setting_up_extension 2018-10-17 11:56:11 +09:00
Takeshi KOMIYA ea03286647 test: Move autodoc_missing_imports to test-ext-autodoc 2018-10-17 11:36:11 +09:00
Takeshi KOMIYA 4ed5c51cff logging: Add prefixed_warnings() helper 2018-10-17 11:21:22 +09:00
Takeshi KOMIYA 44b385e2c9 Merge pull request #5533 from ericvw/autodoc_member-only_default-options
autodoc: Respect `member-order` in `autodoc_default_options` as documented
2018-10-17 11:12:56 +09:00
Takeshi KOMIYA 2e6e940df8 Fix #5497: Do not include MathJax.js and jsmath.js unless it is really needed 2018-10-17 01:42:17 +09:00
Takeshi KOMIYA 7e23a061b3 Fix typo 2018-10-16 10:34:59 +09:00
Takeshi KOMIYA 84e1eeb8a2 Move env.doc2path() and env.path2doc() to Project class 2018-10-16 10:34:59 +09:00
Takeshi KOMIYA eaec3bd916 Add sphinx.project; a manipulator for project and documents 2018-10-16 10:34:58 +09:00
Takeshi KOMIYA e7e07fd697 Merge branch '1.8' 2018-10-16 09:57:54 +09:00
Takeshi KOMIYA 793792fafc Fix #5480: autodoc: unable to find type hints for unresolvable Forward references 2018-10-15 23:40:05 +09:00
Eric N. Vander Weele d6b9db9581 tests: Ensure 'member-only' autodoc_default_options is respected
When specifying the 'member-only' option to `autodoc_default_options`,
ensure it is respected.
2018-10-14 20:18:59 -04:00
Takeshi KOMIYA b2cc425909 Fix #5498: autodoc: unable to find type hints for a `functools.partial` 2018-10-14 16:29:04 +09:00
jfbu 7ab09b5065 Fix #3704: wrong `\label` positioning for figures with a legend 2018-10-07 10:16:11 +02:00
Takeshi KOMIYA 6eb5b29484 Merge branch 'master' into refactor_latex 2018-10-07 13:33:55 +09:00
Paul Melnikow e792279791 Improve error message when config fails type check
The old message printed wrapped brackets around the type name, which would make you think it required an array.
2018-10-02 14:20:36 -04:00
Takeshi KOMIYA 973c3ffa25 Merge branch 'master' into change_master_doc_to_index 2018-09-29 21:12:40 +09:00
Takeshi KOMIYA 67e9f87a54 Merge branch 'master' into bytesio 2018-09-25 08:29:37 +09:00
Jon Dufresne 65da8a08ac Remove plistlib workaround for unsupported Pythons 2018-09-23 20:25:36 -07:00
Jon Dufresne 4f4e225775 Replace all six.BytesIO with io.BytesIO 2018-09-23 18:38:06 -07:00
Takeshi KOMIYA ff8df59ac1 Merge pull request #5479 from jdufresne/https
Prefer https:// links where available
2018-09-24 09:04:54 +09:00
Jon Dufresne dd383ec472 Prefer https:// links where available 2018-09-23 11:50:42 -07:00
Jon Dufresne 02d06bdaf0 Remove uses of six.moves that did not cause any type errors
Removal of the remaining imports may require passing "--python-version
3.5" to the mypy command.
2018-09-23 09:22:06 -07:00
Rob Ruana e547a6a0d2 Fixes #5426: [Napoleon] Better handling of inline attributes (#5470)
* Fixes #5426: [Napoleon] Better handling of inline attributes

* Removes uneeded NOQA comments

* Fixes imports
2018-09-23 09:26:17 -04:00
Antony Lee dbb7c38220 Rendering of exceptions by napoleon. (#4046)
This lets napoleon render exceptions using the standard info field
syntax
```
:raises FooException: Some condition.
```
rather than the nonstandard
```
:raises: :exc:`FooException` -- Some condition.
```

Note that the previous approach was more forgiving if an explanatory
text was given in the Raises section without an actual exception class:
```
Raises
------
If something occurs.
```
would be rendered as
```
:raises: *If something occurs*
```
which is OK-ish but is now rendered as
```
:raises If something occurs.:
```
which is somewhat more nonsensical.

However neither the Google style guide nor numpydoc actually support
this form (they always have both the type and the description) so I
think the change is reasonable.
2018-09-23 08:31:27 -04:00