##// END OF EJS Templates
Include mdframed with nbconvert, reference directly
Jonathan Frederic -
Show More
@@ -14,6 +14,7 b' they are converted.'
14 #-----------------------------------------------------------------------------
14 #-----------------------------------------------------------------------------
15
15
16 from __future__ import print_function, absolute_import
16 from __future__ import print_function, absolute_import
17 import os
17
18
18 # Third-party import, needed for Pygments latex definitions.
19 # Third-party import, needed for Pygments latex definitions.
19 from pygments.formatters import LatexFormatter
20 from pygments.formatters import LatexFormatter
@@ -46,6 +47,7 b' class LatexPreprocessor(Preprocessor):'
46 # Generate Pygments definitions for Latex
47 # Generate Pygments definitions for Latex
47 resources["latex"] = {}
48 resources["latex"] = {}
48 resources["latex"]["pygment_definitions"] = LatexFormatter().get_style_defs()
49 resources["latex"]["pygment_definitions"] = LatexFormatter().get_style_defs()
50 resources["latex"]["mdframed_path"] = os.path.join(os.path.dirname(__file__), '..', 'templates', 'latex', 'mdframed')
49 return super(LatexPreprocessor, self).preprocess(nb, resources)
51 return super(LatexPreprocessor, self).preprocess(nb, resources)
50
52
51
53
@@ -9,7 +9,7 b''
9 % Needed to box output/input
9 % Needed to box output/input
10 \usepackage{tikz}
10 \usepackage{tikz}
11 \usetikzlibrary{calc,arrows,shadows}
11 \usetikzlibrary{calc,arrows,shadows}
12 \usepackage[framemethod=tikz]{mdframed}
12 \usepackage[framemethod=tikz]{((( resources.latex.mdframed_path | posix_path )))/mdframed}
13
13
14 \usepackage{scrextend} % Used to indent output
14 \usepackage{scrextend} % Used to indent output
15 \usepackage{needspace} % Make prompts follow contents
15 \usepackage{needspace} % Make prompts follow contents
General Comments 0
You need to be logged in to leave comments. Login now