Closed
Description
Sometimes we want.
*** plot_directive.py.trunk 2012-10-24 14:03:19.396181016 +0900
--- plot_directive.py 2012-10-24 14:03:44.939338656 +0900
***************
*** 101,106 ****
--- 101,109 ----
plot_html_show_formats
Whether to show links to the files in HTML.
+ plot_html_show_source_link
+ Whether to show links to the source file in HTML.
+
plot_rcparams
A dictionary containing any non-standard rcParams that should
be applied before each plot.
***************
*** 300,305 ****
--- 303,309 ----
app.add_config_value('plot_formats', ['png', 'hires.png', 'pdf'], True)
app.add_config_value('plot_basedir', None, True)
app.add_config_value('plot_html_show_formats', True, True)
+ app.add_config_value('plot_html_show_source_link', True, True)
app.add_config_value('plot_rcparams', {}, True)
app.add_config_value('plot_apply_rcparams', False, True)
app.add_config_value('plot_working_directory', None, True)
***************
*** 374,382 ****
{{ only_html }}
! {% if source_link or (html_show_formats and not multi_image) %}
(
! {%- if source_link -%}
`Source code <{{ source_link }}>`__
{%- endif -%}
{%- if html_show_formats and not multi_image -%}
--- 378,386 ----
{{ only_html }}
! {% if (source_link and html_show_source_link) or (html_show_formats and not multi_image) %}
(
! {%- if source_link and html_show_source_link -%}
`Source code <{{ source_link }}>`__
{%- endif -%}
{%- if html_show_formats and not multi_image -%}
***************
*** 788,793 ****
--- 792,798 ----
images=images,
source_code=source_code,
html_show_formats=config.plot_html_show_formats,
+ html_show_source_link=config.plot_html_show_source_link,
caption=caption)
total_lines.extend(result.split("\n"))
Metadata
Metadata
Assignees
Labels
No labels