Commit Graph

35 Commits

Author SHA1 Message Date
Takeshi KOMIYA
eaf495c3c4 A happy new year! 2020-01-01 14:27:43 +09:00
Takeshi KOMIYA
c27373ad76
Merge pull request #6341 from tk0miya/4550_centering_tables_using_css
Fix #4550: html: Centering tables by default using CSS
2019-05-12 13:33:37 +09:00
Takeshi KOMIYA
8c37f1f482 Merge test_ext_inheritance.py to test_ext_inheritance_diagram.py 2019-05-06 20:22:06 +09:00
Takeshi KOMIYA
107c20a11f Fix #4550: html: Centering tables by default using CSS 2019-05-06 20:19:53 +09:00
Takeshi KOMIYA
bd903c8904 Show deprecation warning for sphinx.application.CONFIG_FILENAME 2019-03-30 14:48:05 +09:00
Jon Dufresne
22afc77c48 Python-3-only clean ups discovered by pyupgrade
https://github.com/asottile/pyupgrade

> A tool to automatically upgrade syntax for newer versions of the
> language.

- Drop u str prefix
- Drop base object inheritance
- Drop args to super()
- Use set literals
- Use dict comprehension
- Use set comprehension
2019-03-19 01:09:48 +09:00
Takeshi KOMIYA
25027945f5 Close #4550: All tables and figures without `align` option are displayed to center 2019-02-08 01:39:41 +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
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
f591cba27f Fix #5002: graphviz: SVGs do not adapt to the column width 2018-08-05 08:16:46 +09:00
Michael Goerz
4a2b227376 Allow imgcls as class for SVG Graphviz <object>
For consistency, the `<object>` tag for the SVG output of a
inheritance-diagram should have the same `class="inheritance"` attribute
that the corresponding `<img>` tag for the PNG format has. This allows
to define the CSS attribute

    object.inheritance {
        max-width: 100%;
    }

which for SVG (unlike PNG) actually works and makes sense.

Added a test for inheritance-diagrams in SVG.
2018-04-21 00:59:27 -04:00
Michael Goerz
b689fb1c12 Wrap graphviz diagrams in <div class="graphviz">
The graphviz extension is modified to wrap the `<img>` and `<object>`
tags it creates for diagrams in the png and svg formats in an additional
`<div class="graphviz">...</div>` tag. This allows to apply additional
CSS styling to the the diagrams that cannot be applied to `<img>` and
`<object>` directly. Most notably,

    div.graphviz {
      overflow: auto;
    }

would be a useful style that the standard themes might consider.

In any case, it would allow users to add custom CSS code to their
project that gets around the problems with inheritance-diagrams
discussed in https://github.com/sphinx-doc/sphinx/issues/4865

The tests for the `grahviz` and `inheritance_diagram` have been modified
to test for the presence of the additional `<div>` tag.

Closes #4865
2018-04-20 12:43:12 -04:00
Roman Kapl
4a913e5cee Fit graphviz images to page.
Use \sphinxincludegraphics, that's what the core image directives use
and it handles fitting properly.
2018-02-16 18:16:32 +01:00
Daniel Pizetta
d3d4d94970 Add test for fix #4019 2018-02-01 17:29:18 -02:00
Takeshi KOMIYA
f1f6ca8cc9 Merge branch 'happy_new_year' into master 2018-01-01 01:09:17 +09:00
Takeshi KOMIYA
2426cedb8b A happy new year! 2018-01-01 01:06:58 +09:00
Bernat Gabor
0c3f9851b3 fixes #3959 alias/rename support for classes inside inheritence diagrams 2017-07-31 18:21:05 +01:00
shimizukawa
d497d74370 refs #3458: add sphinx.testing that are moved from /tests directory. 2017-05-14 20:47:15 +09:00
Takeshi KOMIYA
8f9dd64992 Merge branch 'stable' 2017-03-26 11:52:15 +09:00
Takeshi KOMIYA
c57e47e042 Year++ 2017-03-26 11:49:34 +09:00
Takeshi KOMIYA
e1da72b59c Reduce DeprecationWarnings for regexp 2017-02-17 02:01:04 +09:00
shimizukawa
baaef9146d pytest: remove deprecated with_app decorator functions 2017-01-06 01:14:47 +09:00
shimizukawa
f962ad67d2 pytest: remove deprecated raises and raises_msg assert functions 2017-01-06 00:46:42 +09:00
shimizukawa
5b7d237db3 pytest migration 2017-01-04 00:59:30 +09:00
jfbu
6dcf43c826 fix pattern string in test_inheritance_diagram_latex for CI testing 2016-12-08 22:14:48 +01:00
jfbu
18e01c8341 fix one more test failure and fix previous fix test (missing u) 2016-12-08 22:05:08 +01:00
Takeshi KOMIYA
98f7818101 Fix merging 2016-11-23 13:38:20 +09:00
Takeshi KOMIYA
0ee524e392 Merge branch 'stable' into 1.5-release 2016-11-23 13:22:38 +09:00
Takeshi KOMIYA
52f54a6379 Fix #3164: Change search order of `sphinx.ext.inheritance_diagram` 2016-11-23 00:50:02 +09:00
Takeshi KOMIYA
9676e79c1c inheritance_diagram: Move _import_class_or_module() method to function 2016-11-23 00:49:46 +09:00
Takeshi KOMIYA
ceedbb4d51 Skip tests for inheritance_diagram if graphviz not found 2016-03-11 14:41:02 +09:00
Takeshi KOMIYA
d86ea47b52 Add `:caption:` option for sphinx.ext.inheritance_diagram 2016-03-11 13:20:05 +09:00
Takeshi KOMIYA
492980c23e Add testcase for PR #2311 2016-02-14 15:06:28 +09:00