Commit Graph

79 Commits

Author SHA1 Message Date
danieleades
64e7ba5e3f
Enable the entire pycodestyle category (#11820)
Co-authored-by: Adam Turner <9087854+aa-turner@users.noreply.github.com>
2023-12-28 06:41:32 +00:00
Bénédikt Tran
46f8f76e56
Fix the lazy loading conditions for MathJax (#11597)
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2023-09-21 18:18:09 +01:00
Adam Turner
7d046a862f
Allow `?config=... in mathjax_path` (#11659) 2023-08-30 19:35:29 +01:00
Adam Turner
d80eab689d Fix EM10{1,2} (exception must not use a string) 2023-08-13 22:11:15 +01:00
Adam Turner
a9b0f2708b Cache doctrees more efficiently 2023-01-04 05:46:23 +00:00
Julien Schueller
66276185ef
imgmath: Fix embed mode (#10878) 2022-09-29 15:37:24 +01:00
Julien Schueller
ef01c5b6bd
imgmath: Allow embedding images in HTML as base64 (#10816)
Co-authored-by: Adam Turner <9087854+aa-turner@users.noreply.github.com>
2022-09-23 17:11:21 +01:00
Adam Turner
24e3b7c8c8 .read_text() -> .read_text(encoding='utf8') 2022-04-27 03:04:19 +01:00
Adam Turner
5775912455 Collapse single line docstrings 2022-02-20 03:13:45 +00:00
Adam Turner
6bb7b891a1 Remove copyright and licence fields 2022-02-20 03:06:23 +00:00
Adam Turner
5694e0ce60 Fix module docstring indentation 2022-02-20 00:35:13 +00:00
Adam Turner
4f5a3269a6 Fix module docstring first line 2022-02-20 00:11:08 +00:00
Adam Turner
6b8bccec59 Remove module titles in docstrings 2022-02-19 23:17:29 +00:00
Takeshi KOMIYA
b84771dcd2 A happy new year! 2022-01-01 18:45:03 +09:00
Takeshi KOMIYA
e2c6146b3e Fix #9864: mathjax: Failed to render equations via MathJax v2
MathJax library has been loaded via "defer" method since v4.3.0.  But
it prevents to work MathJax v2.  This rollbacks the change and use
"async" method as default again.

To support changing the loading method, this allows to specify it via
mathjax_options.
2021-11-21 18:27:35 +09:00
Takeshi KOMIYA
4cd19b8274 Close #9450: mathjax: Load MathJax via "defer" strategy
To allow configure MathJax via static JS file, it should be loaded via
"defer" strategy.
2021-11-09 01:54:56 +09:00
Manuel Kaufmann
c818a70528 Rename variable to html_assets_policy 2021-06-14 16:50:26 +02:00
Manuel Kaufmann
d01e776c81 Add Sphinx.add_html_assets_in_all_pages
This new method in the `Sphinx` object allows extensions to communicate to
Sphinx that it's preferred to include HTML assets in all the pages. However,
it's extensions developers' responsability to follow this config and decide
whether or not include the assets required.

Extensions developers' can check `Sphinx.html_assets_in_all_pages` together with
any other logic they may have to decide if the assets will be included in the
rendered page or not.

Closes #9115
2021-05-06 15:21:12 +02:00
Takeshi KOMIYA
4582d5a396 refactor: Add testcase for mathjax3_config (refs: #9094) 2021-04-25 22:22:13 +09:00
Takeshi KOMIYA
5460ea103b Merge branch '3.x' 2021-01-08 01:23:17 +09:00
Takeshi KOMIYA
af4e615a8a Close #6241: html: Allow to add JS/CSS files to the specific page
Allow to add JS/CSS files to the specific page when an extension calls
`app.add_js_file()` or `app.add_css_file()` on `html-page-context`
event.
2021-01-07 02:12:07 +09:00
Takeshi KOMIYA
4b452338f9 Merge branch '3.x' 2021-01-01 13:57:19 +09:00
Takeshi KOMIYA
f996859420 A happy new year!
.. 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
2021-01-01 13:40:48 +09:00
Hameer Abbasi
436519743b Move to MathJax 3. 2020-07-15 13:09:08 +02:00
Ryan Soklaski
1d332a2e0a
Update test_ext_math.py
Bump hardcoded mathjax version to 2.7.7
2020-05-28 23:15:39 -04:00
Takeshi KOMIYA
4dd8b1022f test: Use read_text() and read_bytes() 2020-02-01 11:58:51 +09:00
Takeshi KOMIYA
eaf495c3c4 A happy new year! 2020-01-01 14:27:43 +09:00
Jon Dufresne
e6915baae8 Remove redundant type="text/javascript" from <script> elements
In HTML5, <script> elements default to MIME type text/javascript. The
HTML5 living standard and MDN recommend against including the attribute.

From https://developer.mozilla.org/en-US/docs/Web/HTML/Element/script#attr-type

> The HTML5 specification urges authors to omit the attribute rather
> than provide a redundant MIME type.

From https://html.spec.whatwg.org/#the-script-element

> Authors should omit the type attribute instead of redundantly setting
> it.
2019-12-15 07:52:40 -08:00
Takeshi KOMIYA
20bf74c637 Separate jsmath to sphinxcontrib package 2019-01-13 14:07:12 +09:00
Takeshi KOMIYA
68c90a26f1 quickstart: Simplify generated conf.py (for latex) 2019-01-07 23:06:14 +09:00
Takeshi KOMIYA
76e9f57c2e Merge branch '1.8' 2019-01-02 16:16:25 +09:00
Takeshi KOMIYA
1b1ebd2c75 A happy new year! 2019-01-02 16:00:30 +09:00
Takeshi KOMIYA
3905cb8b7c Merge branch '1.8' 2018-12-18 23:32:52 +09:00
Michael Goerz
77e617e25a Use mathjax CDN "latest" URL by default
Closes #5725
2018-12-17 22:14:25 -05:00
Jon Dufresne
bade33c7e4 Remove unnecessary encoding cookie from Python source files
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.
2018-12-16 12:22:12 -08:00
Takeshi KOMIYA
c6bd84a614 refactor: Remove u-prefix from strings 2018-12-16 21:28:51 +09:00
Jon Dufresne
49d3a3c0c1 Replace ENOENT errno checks with Python 3 FileNotFoundError
The error is more specific and self documenting.

This removes the last use of sphinx.util.osutil.ENOENT, so it is now
deprecated for removal. sphinx.util.osutil.EEXIST was already unused so
that is deprecated as well.
2018-12-15 09:02:55 -08: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
206395121d
Merge pull request #5250 from tk0miya/refactor_math4
Add :rst:role:`math:numref` role to refer equations (Same as :rst:role:`eq`)
2018-08-04 21:03:49 +09:00
Takeshi KOMIYA
8e56f86383 Add :rst:role:math:numref role to refer equations (Same as :rst:role:eq) 2018-08-02 01:52:40 +09:00
Takeshi KOMIYA
da7a06b323 WIP: #726, #969: Add mathjax_config 2018-07-29 22:36:53 +09:00
Takeshi KOMIYA
34126021d9 Close #3784: mathjax: Add :confval:mathjax_options 2018-06-13 23:24:21 +09:00
Takeshi KOMIYA
e675ad2ec9 Enable math_block node rendering by default (without HTML builders) 2018-05-17 00:42:22 +09:00
Takeshi KOMIYA
4e04bff4f5 Enable math node rendering by default (without HTML builders)
Nowadays, math elements (inline and block level equations) are
integrated into reST spec by default.  But, in Sphinx, they are
not enabled by default.  For this reason, users have to enable
one of math extensions even if target builder supports math
elements directly.

This change starts to enable them by default.  As a first step,
this replaces math node and its structure by docutils based one.
2018-05-15 22:27:49 +09:00
Takeshi KOMIYA
b1a0e8062f Fix #4767: html: search highlighting breaks mathjax equations 2018-04-15 00:30:53 +09:00
Takeshi KOMIYA
f7027049b1 Fix flake8 violations 2018-02-19 23:20:56 +09:00
Takeshi KOMIYA
9340a45393 test: Don't use os.errno. Use errno directly 2018-01-25 00:48:37 +09:00
Takeshi KOMIYA
d1d55eb35f Fix broken test 2018-01-20 10:54:53 +09:00
Takeshi KOMIYA
8b8c3d1736 Merge branch 'stable' into 1.7-release 2018-01-20 02:22:35 +09:00
Takeshi KOMIYA
f91c732749 Fix #4438: math: math with labels with whitespace cause html error 2018-01-19 23:13:21 +09:00