diff --git a/IPython/nbconvert/filters/tests/test_datatypefilter.py b/IPython/nbconvert/filters/tests/test_datatypefilter.py index 0187c1f..716d608 100644 --- a/IPython/nbconvert/filters/tests/test_datatypefilter.py +++ b/IPython/nbconvert/filters/tests/test_datatypefilter.py @@ -36,7 +36,7 @@ class TestDataTypeFilter(TestsBase): """Can the DataTypeFilter pickout a useful type from a list of junk types?""" filter = DataTypeFilter() assert "png" in filter(["hair", "water", "png", "rock"]) - assert "pdf" in filter(["pdf", "hair", "water", "png", "rock"]) + assert "application/pdf" in filter(["application/pdf", "hair", "water", "png", "rock"]) self.assertEqual(filter(["hair", "water", "rock"]), []) diff --git a/IPython/nbconvert/templates/latex/base.tplx b/IPython/nbconvert/templates/latex/base.tplx index 5bcdb53..fbf6918 100644 --- a/IPython/nbconvert/templates/latex/base.tplx +++ b/IPython/nbconvert/templates/latex/base.tplx @@ -173,7 +173,7 @@ This template does not define a docclass, the inheriting class must define this. ((*- block data_png -*))((( draw_figure(output.png_filename) )))((*- endblock -*)) ((*- block data_jpg -*))((( draw_figure(output.jpeg_filename) )))((*- endblock -*)) ((*- block data_svg -*))((( draw_figure(output.svg_filename) )))((*- endblock -*)) -((*- block data_pdf -*))((( draw_figure(output.pdf_filename) )))((*- endblock -*)) +((*- block data_pdf -*))((( draw_figure(output['application/pdf_filename']) )))((*- endblock -*)) % Draw a figure using the graphicx package. ((* macro draw_figure(filename) -*)) diff --git a/IPython/nbconvert/templates/latex/skeleton/display_priority.tplx b/IPython/nbconvert/templates/latex/skeleton/display_priority.tplx index 4ee8aa4..f8c2308 100644 --- a/IPython/nbconvert/templates/latex/skeleton/display_priority.tplx +++ b/IPython/nbconvert/templates/latex/skeleton/display_priority.tplx @@ -9,7 +9,7 @@ ((*- block data_priority scoped -*)) ((*- for type in output | filter_data_type -*)) - ((*- if type in ['pdf', 'application/pdf']*)) + ((*- if type in ['application/pdf']*)) ((*- block data_pdf -*)) ((*- endblock -*)) ((*- endif -*)) diff --git a/IPython/nbconvert/templates/skeleton/display_priority.tpl b/IPython/nbconvert/templates/skeleton/display_priority.tpl index b3f9a16..1765694 100644 --- a/IPython/nbconvert/templates/skeleton/display_priority.tpl +++ b/IPython/nbconvert/templates/skeleton/display_priority.tpl @@ -5,7 +5,7 @@ {%- block data_priority scoped -%} {%- for type in output | filter_data_type -%} - {%- if type in ['pdf', 'application/pdf']%} + {%- if type in ['application/pdf']%} {%- block data_pdf -%} {%- endblock -%} {%- endif -%} diff --git a/IPython/nbconvert/utils/base.py b/IPython/nbconvert/utils/base.py index a754313..d6cf2de 100644 --- a/IPython/nbconvert/utils/base.py +++ b/IPython/nbconvert/utils/base.py @@ -25,7 +25,7 @@ class NbConvertBase(LoggingConfigurable): Useful for display data priority that might be use by many transformers """ - display_data_priority = List(['html', 'application/pdf', 'pdf', 'svg', 'latex', 'png', 'jpg', 'jpeg' , 'text'], + display_data_priority = List(['html', 'application/pdf', 'svg', 'latex', 'png', 'jpg', 'jpeg' , 'text'], config=True, help= """ An ordered list of preferred output type, the first