Skip to content

Commit

Permalink
added raw output for latex and html
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisjsewell committed Jun 19, 2018
1 parent 8161c9b commit 10614bb
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 2 deletions.
2 changes: 2 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,8 @@ matrix:
sudo: required
python: 3.5
dist: trusty
- os: osx
language: generic

before_install:
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then sudo apt-get -qq update ; fi
Expand Down
2 changes: 1 addition & 1 deletion ipypublish/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = '0.6.6'
__version__ = '0.6.7'
8 changes: 8 additions & 0 deletions ipypublish/html/standard/content.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,14 @@
{{ cell.source | highlight_code(metadata=cell.metadata) }}
</div>
</div>
""",

'notebook_input_raw': r"""
{%- if cell.metadata.raw_mimetype: -%}
{%- if cell.metadata.raw_mimetype == "text/html" -%}
{{ super() }}
{%- endif %}
{%- endif %}
""",

'notebook_input_unknown': r"""
Expand Down
2 changes: 1 addition & 1 deletion ipypublish/latex/create_tplx.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@
{notebook_input_unknown}
((* endblock unknowncell *))
%% Notebook Outbook
%% Notebook Output
%% ================
% Redirect execute_result to display data priority.
Expand Down
10 changes: 10 additions & 0 deletions ipypublish/latex/ipypublish/contents_output.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,14 @@

'notebook_input_markdown': r"""
((( cell.source | citation2latex | strip_files_prefix | convert_pandoc('markdown', 'json',extra_args=[]) | resolve_references | convert_pandoc('json','latex'))))
""",

'notebook_input_raw': r"""
((*- if cell.metadata.raw_mimetype: -*))
((*- if cell.metadata.raw_mimetype == "text/latex" -*))
((( super() )))
((*- endif *))
((*- endif *))
""",

'notebook_output': r"""
Expand Down Expand Up @@ -56,6 +64,8 @@
((*- endif *))
""",



'notebook_output_latex': r"""
((*- if cell.metadata.ipub: -*))
Expand Down

0 comments on commit 10614bb

Please sign in to comment.