Commit Graph

32 Commits

Author SHA1 Message Date
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
825426c841 refactor figure_wrapper() using state.inline_text() 2018-12-04 01:14:53 +09: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
Takeshi KOMIYA
cb5cf26c85 Merge branch 'stable' into 1.7-release 2018-01-30 00:20:45 +09:00
Takeshi KOMIYA
8494638e45 Fix graphviz: workaround for wrong map ID which graphviz generates 2018-01-29 22:33:23 +09:00
Takeshi KOMIYA
2312a0a5bc Fix #4501: graphviz: epub3 validation error caused if graph is not clickable 2018-01-29 22:32:58 +09: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
Takeshi KOMIYA
a9efb2517a Fix flake8 violations 2017-12-23 21:21:21 +09:00
Oliver Sanders
261f74bc7a Add test for ext.graphviz alignment. 2017-09-24 17:04:25 +09:00
Oliver Sanders
447582724d Add test for ext.graphviz alignment. 2017-09-18 11:10:19 +01: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
5b7d237db3 pytest migration 2017-01-04 00:59:30 +09:00
Takeshi KOMIYA
9fc53cecf7 Reduce deprecation warnings (refs: #3192) 2016-12-15 17:15:49 +09:00
Takeshi KOMIYA
1d17475a08 #2575: Now `sphinx.ext.graphviz allows :align:` option 2016-05-28 18:29:10 +09:00
Takeshi KOMIYA
0636d54f6f `sphinx.ext.graphviz` supports graph substituions by locale 2016-02-22 21:32:06 +09:00
Takeshi KOMIYA
7d1b0ec7a1 Refactor tests: Add @skip_if_graphviz_not_found decorator 2016-02-22 16:30:41 +09:00
Takeshi KOMIYA
9273140ee2 Override figure directive to apply :name: option to the figure itself 2016-02-14 14:49:20 +09:00
Takeshi KOMIYA
14f58e6619 `sphinx.ext.graphviz`: show graph image in inline by default
To support subsutituion syntax, make graphviz node inline (ref: #1149).
Now graphviz directive behaves like ``image`` directive when no captions.
If specified, it generates ``figure`` node and ``caption`` node like
``figure`` directive.
2016-01-17 19:23:55 +09:00
Georg Brandl
4f72bdb722 Merge branch 'stable' 2016-01-14 22:54:08 +01:00
Georg Brandl
46d7e8558e Obligatory copyright update. 2016-01-14 22:54:04 +01:00
Georg Brandl
cca88c212b graphviz test: raise Skip if dot not available, instead of just passing 2015-07-25 16:43:08 +02:00
Takeshi KOMIYA
65663912a4 Add testcase for graphviz 2015-06-26 21:23:03 +09:00