GithubHelp home page GithubHelp logo

t-makaro / nb_pdf_template Goto Github PK

View Code? Open in Web Editor NEW
130.0 5.0 25.0 1.97 MB

A more accurate representation of jupyter notebooks when converting to pdfs.

License: MIT License

Jupyter Notebook 93.29% Python 6.14% PowerShell 0.57%
jupyter-notebook latex latex-template nbconvert conversion pdf jupyter

nb_pdf_template's Introduction

classic.tplx

A more accurate representation of jupyter notebooks when converting to pdfs. This template was designed to make converted jupyter notebooks look (almost) identical to the actual notebook. If something doesn't exist in the original notebook then it doesn't belong in the conversion.

Note for nbconvert 5.5.0

As of nbconvert 5.5.0, the majority of these improvements have been merged into nbconvert's default template. Version 3.x of this package will continue to support nbconvert 5.5.0 and lower, whereas in the future version 4.x will only support nbconvert 5.5.0 and newer. Versions 3.x, and 4.x will overlap support for nbconvert version 5.5.0.

Note for nbconvert 6.0.0

nbconvert 6.0.0 is not yet released, but it will be changing the conversion template in a backward incompatible manner. A version 5.x of this repository will be made to support nbconvert >=6.0.0

Improvements

  1. \maketitle is removed (If you want a title then add a markdown cell to the top of your notebook).
  2. Sections are no longer numbered automatically (notebooks don't number sections so the pdf shouldn't).
  3. Markdown paragraphs are no longer auto-indented in the pdf.
  4. Syntax highlighting improvements. (Bonus if using XeLaTeX)
  5. BOXES! are drawn around code cells. (This change was merged into nbconvert 5.5.0)
  6. In/Out counts will move to the left as the execution count increases instead of pushing code to the right (only numbers are displayed by default to save page width). (This change was merged into nbconvert 5.5.0)
  7. $\LaTeX$ and $\Tex$ in markdown cells will no longer cause conversion to fail. (This change was merged into nbconvert 5.4.0)
  8. "\LaTeX" and "\TeX" are no longer converted into a logo on conversion to pdf unless they are in math mode. (This and the above point replicate the functionality of these commands in notebook markdown).
  9. In/Out prompt colours updated to match Jupyter. (This change was merged into nbconvert 5.5.0)
  10. Output text wrapping improvements. (This change was merged into nbconvert 5.5.0)
  11. Code cell text wrapping. (This change was merged into nbconvert 5.5.0)

Quick Comparison: comparison for a closer look see the example directory.

Installation

pip install nb_pdf_template
python -m nb_pdf_template.install

Updating

pip install -U nb_pdf_template
python -m nb_pdf_template.install

Manual Install:

Drop all of the "*.tplx" files into the folder containing the other LaTeX nbconvert templates. If using anaconda, it should be something like:

*/Anaconda3/Lib/site-packages/nbconvert/templates/latex

Use

From the command line:

jupyter nbconvert --to pdf filename.ipynb --template classic

Adding:

c.LatexExporter.template_file = 'classic'

to the jupyter_nbconvert_config.py file will let you drop the "--template classic", and to the jupyter_notebook_config.py file will let you use "download as pdf" from within the Jupyter notebook.

Replace classic with your template of choice.

Templates

This package offers the following templates:

Template Use
classic.tplx (Recommended) For most accurate recreation of the default Jupyter Notebook style.
classicm.tplx m for modified. Similar to classic.tplx, but in/out prompts are above cells instead of in the margin. Bonus left margins are smaller so code cells are wider.

Tips (Good for any template)

Moved to the wiki

nb_pdf_template's People

Contributors

t-makaro avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

nb_pdf_template's Issues

Code cells don't page break

This is the major limitation of this template. If a code cell is longer than 55ish lines, then it will not fit on one page, but it won't continue to be printed on the next page.

My solution is to replace the fancybox package with the tcolorbox package, since tcolorbox offers breakable boxes that allows for verbatim text.

The problem with this solution is that getting the cell and the prompt to align properly is very difficult. I tried using nested boxes, but then the cells page break at seriously awkward spots. I've looked at using vspaces, but due to the way LaTeX typesets things this won't provide a reliable alignment (it should only be off by a few millimeters, but knowing LaTeX it'll be a mile when you least expect it). The final option is to move the prompts from the left margin to above the cells. This would be reliable and has other benefits. I'll post pictures of the differences.

Consider making the minted template not clobber the non-minted template.

Currently, when doing

python -m nb_pdf_template --minted

The style_jupyter_minted.tplx template is install as style_jupyter.tplx instead of the original style_jupyter.tplx template.

If this wasn't the case, style_jupyter_template.tplx could inherit from style_jupyter.tplx.
Downsides:

  1. I'd have to make classic[m]_minted.tplx templates, doubling the number of templates provided in this library. Which will be really annoying when I add lab[m][_minted].tplx templates, for a total of 8 high level templates.
  2. People would need to be aware of the switch to the new templates. API break.

Unable to use template due to Command \@iflatexlater and \wordboundary already defined errors

Hi, I'm trying to output a pdf from my jupyter notebook that looks better than the default template. nb_pdf_template looks more similar to the expected notebook view. Thanks for creating this nifty template!

This is the command I use: jupyter nbconvert --to latex --template classic --no-input [filename].ipynb. However, the command won't finish running with the following errors.

! LaTeX Error: Command \@iflatexlater already defined.
               Or name \end... illegal, see p.192 of the manual.

See the LaTeX manual or LaTeX Companion for explanation.
Type  H <return>  for immediate help.
 ...

l.340 ...mand*\@iflatexlater{\@ifl@t@r\fmtversion}

?

! LaTeX Error: Command \wordboundary already defined.
               Or name \end... illegal, see p.192 of the manual.

See the LaTeX manual or LaTeX Companion for explanation.
Type  H <return>  for immediate help.
 ...

l.343 ^^I    \newcommand{\wordboundary}{255}}

?

Any help/hints appreciated!

Update syntax highlighting

I don't know when, but jupyter notebook's highlighting seems to have changed. Assignment operators are now highlighted like every other operator, so the ugly hack to separate the two can be removed.

Installation fails on ubuntu 22.04

Hi!

Installing the template according to instructions fails on the second command:

$ python3 -m nb_pdf_template.install
Traceback (most recent call last):
  File "/usr/lib/python3.10/runpy.py", line 196, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "/usr/lib/python3.10/runpy.py", line 86, in _run_code
    exec(code, run_globals)
  File "/home/ville/.local/lib/python3.10/site-packages/nb_pdf_template/install.py", line 37, in <module>
    install()
  File "/home/ville/.local/lib/python3.10/site-packages/nb_pdf_template/install.py", line 21, in install
    raise OSError("Directory: %s not found." % dst)
OSError: Directory: /usr/lib/python3/dist-packages/nbconvert/templates/latex not found.

Obviously /usr/lib/python3/dist-packages/nbconvert/templates/latex does not exist.

python3-nbconvert-6.4.0-1 installed system-wide.

Wrap text option looses highlighting

I followed the readme with the newest version released. The result is the code blocks wrap, but extra characters are added, and I loose syntax highlighting. Also, is the output supposed to wrap? See image of pdf.

screenshot from 2018-09-25 13-36-19

Error installing on Mac OS

This looks like such a great template and I really want to use it! However I am running into an issue when I try to install it.

$ python -m nb_pdf_template.install

  File "nb_pdf_template/__init__.py", line 1, in <module>
    from .jupyter_python import Jupyter_PythonStyle
  File "nb_pdf_template/jupyter_python.py", line 1, in <module>
    from pygments.style import Style
  File "pygments/style.py", line 171
    class Style(metaclass=StyleMeta):
                           ^
  SyntaxError: invalid syntax

I manually installed as well, but am running into an error when trying to convert to PDF using the classic theme: (is this just a nbconvert issue?)

  $ jupyter nbconvert HW2_VBRF.ipynb --to pdf --template classic
  
  File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/nbconvert/exporters/templateexporter.py", line 608, in get_template_names
  raise ValueError('Unsupported mimetype %r for template %r, mimetypes supported are: \n\t%s' %\
  ValueError: Unsupported mimetype 'application/pdf' for template 'classic', mimetypes supported are: 
  text/html

However nbconvert runs with classic theme if I convert to HTML instead of PDF. The styling does not look right in the HTML format of course

  $ jupyter nbconvert HW2_VBRF.ipynb --to html --template classic
  
  [NbConvertApp] Converting notebook HW2_VBRF.ipynb to html
  [NbConvertApp] Writing 272518 bytes to HW2_VBRF.html

Latex verbatim environment does not wrap text

Long lines of text will simply flow off the right side of the page.
Classic.tplx spills over at 86+1
Classicm.tplx spills over at 94+1
On the bright side, latex uses monospace fonts so this will be consistent.

I've found 3 potential solutions:

  1. fancyvrb + listings
  2. jinja wordwrap
  3. Sphinx's solution

Status of nbconvert 6 support

I was wondering what the status for nbconvert 6 support is. Unfortunately the current version 4.0.0 will not work :-(

Wrap print output

As discussed in #13 a print statement output doesn't wrap. In my case some of these are purely introspection to help debug and see what is going on. So, sometimes I'm printing dictionaries or lists that can be too long. Anyways, you hinted at having a solution for this. Thanks for the work you've done here. You've somehow managed to fix the most annoying part about jupyter notebooks for me.

code cell lines not wrapped

Hi

I tried using classic.tplx for my nbconvert, but facing below issue.

I tried wrapping by passing wrap_text(charlim) to input block also in style jupyter, but the resulting code is not wrapped at all. Here is a sample output (screenshot from pdf).

image

Error installing on MacOS

Hi, I wanted to say thank you for your work. It's been useful to me so far.

I was trying to install it through pip but ran into an error when issuing the second command python -m nb_pdf_template.install.py.
I saw it was only tested on Windows. I'm using MacOS High Sierra with a fresh Anaconda installation.

Here is the output, in case it is helpful.

$ pip install nb_pdf_template
Collecting nb_pdf_template
  Downloading nb_pdf_template-0.9.2.tar.gz
Building wheels for collected packages: nb-pdf-template
  Running setup.py bdist_wheel for nb-pdf-template ... done
  Stored in directory: /Users/<user>/Library/Caches/pip/wheels/b6/56/2e/0542bcc86c3a42f83de0d54fffd7aa8ec64412a78810cde20e
Successfully built nb-pdf-template
Installing collected packages: nb-pdf-template
Successfully installed nb-pdf-template-0.9.2
$ python -m nb_pdf_template.install.py
Success
/Users/<user>/anaconda3/bin/python: Error while finding module specification for 'nb_pdf_template.install.py' (AttributeError: module 'nb_pdf_template.install' has no attribute '__path__')

However the notebook conversion works as expected:

$ jupyter nbconvert --to pdf ass8.ipynb --template jupyter.tplx
[NbConvertApp] Converting notebook ass8.ipynb to pdf
[NbConvertApp] Support files will be in ass8_files/
[NbConvertApp] Making directory ass8_files
[NbConvertApp] Making directory ass8_files
[NbConvertApp] Writing 31241 bytes to notebook.tex
[NbConvertApp] Building PDF
[NbConvertApp] Running xelatex 3 times: ['xelatex', 'notebook.tex']
[NbConvertApp] Running bibtex 1 time: ['bibtex', 'notebook']
[NbConvertApp] WARNING | bibtex had problems, most likely because there were no citations
[NbConvertApp] PDF successfully created
[NbConvertApp] Writing 58244 bytes to ass8.pdf

Cheers!

Refractoring ideas

  • [] Refactor repygments out of the style_jupyter.tplx. Might be hard since repygments are different between minted and non-minted versions.
  • Drop the \ifleftmargins. The prompt can be directly overwritten now. No need for silly LaTeX logic.

Older versions of XeLaTeX are unsupported

I'm trying to use this template, via jupyter nbconvert --to pdf filename.ipynb --template classicm to convert to PDF, but it is failing with a strange error.

I am using RHEL 7.3 x64, Python 3.6.6, texlive2015-20150523 (only version of texlive available to me)

Steps to reproduce:

  1. source activate py36_mycustomenv
  2. pip install -r requirements.txt # includes nb-pdf-template
  3. python -m nb_pdf_template.install --minted # successful
  4. curl "http://path/to/internal/repo/texlive/texlive2015-20150523.iso" -o texlive2015-20150523.iso
  5. mkdir /app/software_packages/tl/
  6. sudo mount -o loop texlive2015-20150523.iso /app/software_packages/tl/
  7. cd /app/software_packages/tl/
  8. sudo ./install-tl # install with default options
  9. sudo echo 'export PATH=/usr/local/texlive/2015/bin/x86_64-linux:$PATH' > /etc/profile.d/texlive.sh
  10. sudo /usr/local/texlive/2015/bin/x86_64-linux/tlmgr paper letter
  11. sudo chmod o+rx /usr/local/texlive
  12. sudo find /usr/local/texlive -perm 770 -exec chmod o+rx {} \;
  13. sudo find /usr/local/texlive -perm 750 -exec chmod o+rx {} \;
  14. sudo find /usr/local/texlive -perm 660 -exec chmod o+r {} \;
  15. sudo find /usr/local/texlive -perm 640 -exec chmod o+r {} \;
  16. Log out, log back in. Verify xelatex is in the PATH (at /usr/local/texlive/2015/bin/x86_64-linux/xelatex)
  17. source activate py36_mycustomenv
  18. jupyter nbconvert --to pdf Insert_Prices_Run_EDA.ipynb --template classicm

Output, including error:

jupyter nbconvert --to pdf Insert_Prices_Run_EDA.ipynb --template classicm

[NbConvertApp] Converting notebook Insert_Prices_Run_EDA.ipynb to pdf
[NbConvertApp] Writing 19227 bytes to ./notebook.tex
[NbConvertApp] Building PDF
[NbConvertApp] Running xelatex 3 times: ['xelatex', './notebook.tex']
[NbConvertApp] CRITICAL | xelatex failed: ['xelatex', './notebook.tex']
This is XeTeX, Version 3.14159265-2.6-0.99992 (TeX Live 2015) (preloaded format=xelatex)
 restricted \write18 enabled.
entering extended mode
(./notebook.tex
LaTeX2e <2015/01/01>
Babel <3.9l> and hyphenation patterns for 79 languages loaded.
(/usr/local/texlive/2015/texmf-dist/tex/latex/base/article.cls
Document Class: article 2014/09/29 v1.4h Standard LaTeX document class
(/usr/local/texlive/2015/texmf-dist/tex/latex/base/size11.clo))
(/usr/local/texlive/2015/texmf-dist/tex/latex/parskip/parskip.sty)
(/usr/local/texlive/2015/texmf-dist/tex/latex/tcolorbox/tcolorbox.sty
(/usr/local/texlive/2015/texmf-dist/tex/latex/pgf/basiclayer/pgf.sty
(/usr/local/texlive/2015/texmf-dist/tex/latex/pgf/utilities/pgfrcs.sty
(/usr/local/texlive/2015/texmf-dist/tex/generic/pgf/utilities/pgfutil-common.te
x
(/usr/local/texlive/2015/texmf-dist/tex/generic/pgf/utilities/pgfutil-common-li
sts.tex))
(/usr/local/texlive/2015/texmf-dist/tex/generic/pgf/utilities/pgfutil-latex.def
(/usr/local/texlive/2015/texmf-dist/tex/latex/ms/everyshi.sty))
(/usr/local/texlive/2015/texmf-dist/tex/generic/pgf/utilities/pgfrcs.code.tex))
(/usr/local/texlive/2015/texmf-dist/tex/latex/pgf/basiclayer/pgfcore.sty
(/usr/local/texlive/2015/texmf-dist/tex/latex/graphics/graphicx.sty
(/usr/local/texlive/2015/texmf-dist/tex/latex/graphics/keyval.sty)
(/usr/local/texlive/2015/texmf-dist/tex/latex/graphics/graphics.sty
(/usr/local/texlive/2015/texmf-dist/tex/latex/graphics/trig.sty)
(/usr/local/texlive/2015/texmf-dist/tex/latex/latexconfig/graphics.cfg)
(/usr/local/texlive/2015/texmf-dist/tex/xelatex/xetex-def/xetex.def)))
(/usr/local/texlive/2015/texmf-dist/tex/latex/pgf/systemlayer/pgfsys.sty
(/usr/local/texlive/2015/texmf-dist/tex/generic/pgf/systemlayer/pgfsys.code.tex
(/usr/local/texlive/2015/texmf-dist/tex/generic/pgf/utilities/pgfkeys.code.tex
(/usr/local/texlive/2015/texmf-dist/tex/generic/pgf/utilities/pgfkeysfiltered.c
ode.tex))
(/usr/local/texlive/2015/texmf-dist/tex/generic/pgf/systemlayer/pgf.cfg)
(/usr/local/texlive/2015/texmf-dist/tex/generic/pgf/systemlayer/pgfsys-xetex.de
f
(/usr/local/texlive/2015/texmf-dist/tex/generic/pgf/systemlayer/pgfsys-dvipdfmx
.def
(/usr/local/texlive/2015/texmf-dist/tex/generic/pgf/systemlayer/pgfsys-common-p
df.def))))
(/usr/local/texlive/2015/texmf-dist/tex/generic/pgf/systemlayer/pgfsyssoftpath.
code.tex)
(/usr/local/texlive/2015/texmf-dist/tex/generic/pgf/systemlayer/pgfsysprotocol.
code.tex)) (/usr/local/texlive/2015/texmf-dist/tex/latex/xcolor/xcolor.sty
(/usr/local/texlive/2015/texmf-dist/tex/latex/latexconfig/color.cfg))
(/usr/local/texlive/2015/texmf-dist/tex/generic/pgf/basiclayer/pgfcore.code.tex
(/usr/local/texlive/2015/texmf-dist/tex/generic/pgf/math/pgfmath.code.tex
(/usr/local/texlive/2015/texmf-dist/tex/generic/pgf/math/pgfmathcalc.code.tex
(/usr/local/texlive/2015/texmf-dist/tex/generic/pgf/math/pgfmathutil.code.tex)
(/usr/local/texlive/2015/texmf-dist/tex/generic/pgf/math/pgfmathparser.code.tex
)
(/usr/local/texlive/2015/texmf-dist/tex/generic/pgf/math/pgfmathfunctions.code.
tex
(/usr/local/texlive/2015/texmf-dist/tex/generic/pgf/math/pgfmathfunctions.basic
.code.tex)
(/usr/local/texlive/2015/texmf-dist/tex/generic/pgf/math/pgfmathfunctions.trigo
nometric.code.tex)
(/usr/local/texlive/2015/texmf-dist/tex/generic/pgf/math/pgfmathfunctions.rando
m.code.tex)
(/usr/local/texlive/2015/texmf-dist/tex/generic/pgf/math/pgfmathfunctions.compa
rison.code.tex)
(/usr/local/texlive/2015/texmf-dist/tex/generic/pgf/math/pgfmathfunctions.base.
code.tex)
(/usr/local/texlive/2015/texmf-dist/tex/generic/pgf/math/pgfmathfunctions.round
.code.tex)
(/usr/local/texlive/2015/texmf-dist/tex/generic/pgf/math/pgfmathfunctions.misc.
code.tex)
(/usr/local/texlive/2015/texmf-dist/tex/generic/pgf/math/pgfmathfunctions.integ
erarithmetics.code.tex)))
(/usr/local/texlive/2015/texmf-dist/tex/generic/pgf/math/pgfmathfloat.code.tex)
)
(/usr/local/texlive/2015/texmf-dist/tex/generic/pgf/basiclayer/pgfcorepoints.co
de.tex)
(/usr/local/texlive/2015/texmf-dist/tex/generic/pgf/basiclayer/pgfcorepathconst
ruct.code.tex)
(/usr/local/texlive/2015/texmf-dist/tex/generic/pgf/basiclayer/pgfcorepathusage
.code.tex)
(/usr/local/texlive/2015/texmf-dist/tex/generic/pgf/basiclayer/pgfcorescopes.co
de.tex)
(/usr/local/texlive/2015/texmf-dist/tex/generic/pgf/basiclayer/pgfcoregraphicst
ate.code.tex)
(/usr/local/texlive/2015/texmf-dist/tex/generic/pgf/basiclayer/pgfcoretransform
ations.code.tex)
(/usr/local/texlive/2015/texmf-dist/tex/generic/pgf/basiclayer/pgfcorequick.cod
e.tex)
(/usr/local/texlive/2015/texmf-dist/tex/generic/pgf/basiclayer/pgfcoreobjects.c
ode.tex)
(/usr/local/texlive/2015/texmf-dist/tex/generic/pgf/basiclayer/pgfcorepathproce
ssing.code.tex)
(/usr/local/texlive/2015/texmf-dist/tex/generic/pgf/basiclayer/pgfcorearrows.co
de.tex)
(/usr/local/texlive/2015/texmf-dist/tex/generic/pgf/basiclayer/pgfcoreshade.cod
e.tex)
(/usr/local/texlive/2015/texmf-dist/tex/generic/pgf/basiclayer/pgfcoreimage.cod
e.tex
(/usr/local/texlive/2015/texmf-dist/tex/generic/pgf/basiclayer/pgfcoreexternal.
code.tex))
(/usr/local/texlive/2015/texmf-dist/tex/generic/pgf/basiclayer/pgfcorelayers.co
de.tex)
(/usr/local/texlive/2015/texmf-dist/tex/generic/pgf/basiclayer/pgfcoretranspare
ncy.code.tex)
(/usr/local/texlive/2015/texmf-dist/tex/generic/pgf/basiclayer/pgfcorepatterns.
code.tex)))
(/usr/local/texlive/2015/texmf-dist/tex/generic/pgf/modules/pgfmoduleshapes.cod
e.tex)
(/usr/local/texlive/2015/texmf-dist/tex/generic/pgf/modules/pgfmoduleplot.code.
tex)
(/usr/local/texlive/2015/texmf-dist/tex/latex/pgf/compatibility/pgfcomp-version
-0-65.sty)
(/usr/local/texlive/2015/texmf-dist/tex/latex/pgf/compatibility/pgfcomp-version
-1-18.sty)) (/usr/local/texlive/2015/texmf-dist/tex/latex/tools/verbatim.sty)
(/usr/local/texlive/2015/texmf-dist/tex/latex/environ/environ.sty
(/usr/local/texlive/2015/texmf-dist/tex/latex/trimspaces/trimspaces.sty))
(/usr/local/texlive/2015/texmf-dist/tex/latex/etoolbox/etoolbox.sty)
(/usr/local/texlive/2015/texmf-dist/tex/latex/tcolorbox/tcbbreakable.code.tex
Library (tcolorbox): 'tcbbreakable.code.tex' version '3.60'
)) (/usr/local/texlive/2015/texmf-dist/tex/latex/needspace/needspace.sty)
(/usr/local/texlive/2015/texmf-dist/tex/latex/base/fontenc.sty
(/usr/local/texlive/2015/texmf-dist/tex/latex/base/t1enc.def))
(/usr/local/texlive/2015/texmf-dist/tex/latex/psnfss/mathpazo.sty)
(/usr/local/texlive/2015/texmf-dist/tex/latex/caption/caption.sty
(/usr/local/texlive/2015/texmf-dist/tex/latex/caption/caption3.sty))
(/usr/local/texlive/2015/texmf-dist/tex/latex/adjustbox/adjustbox.sty
(/usr/local/texlive/2015/texmf-dist/tex/latex/xkeyval/xkeyval.sty
(/usr/local/texlive/2015/texmf-dist/tex/generic/xkeyval/xkeyval.tex
(/usr/local/texlive/2015/texmf-dist/tex/generic/xkeyval/xkvutils.tex)))
(/usr/local/texlive/2015/texmf-dist/tex/latex/adjustbox/adjcalc.sty)
(/usr/local/texlive/2015/texmf-dist/tex/latex/adjustbox/trimclip.sty
(/usr/local/texlive/2015/texmf-dist/tex/latex/collectbox/collectbox.sty)
(/usr/local/texlive/2015/texmf-dist/tex/latex/adjustbox/tc-xetex.def))
(/usr/local/texlive/2015/texmf-dist/tex/latex/ifoddpage/ifoddpage.sty)
(/usr/local/texlive/2015/texmf-dist/tex/latex/varwidth/varwidth.sty))
(/usr/local/texlive/2015/texmf-dist/tex/latex/tools/enumerate.sty)
(/usr/local/texlive/2015/texmf-dist/tex/latex/geometry/geometry.sty
(/usr/local/texlive/2015/texmf-dist/tex/generic/oberdiek/ifpdf.sty)
(/usr/local/texlive/2015/texmf-dist/tex/generic/oberdiek/ifvtex.sty)
(/usr/local/texlive/2015/texmf-dist/tex/generic/ifxetex/ifxetex.sty))
(/usr/local/texlive/2015/texmf-dist/tex/latex/amsmath/amsmath.sty
For additional information on amsmath, use the `?' option.
(/usr/local/texlive/2015/texmf-dist/tex/latex/amsmath/amstext.sty
(/usr/local/texlive/2015/texmf-dist/tex/latex/amsmath/amsgen.sty))
(/usr/local/texlive/2015/texmf-dist/tex/latex/amsmath/amsbsy.sty)
(/usr/local/texlive/2015/texmf-dist/tex/latex/amsmath/amsopn.sty))
(/usr/local/texlive/2015/texmf-dist/tex/latex/amsfonts/amssymb.sty
(/usr/local/texlive/2015/texmf-dist/tex/latex/amsfonts/amsfonts.sty))
(/usr/local/texlive/2015/texmf-dist/tex/latex/base/textcomp.sty
(/usr/local/texlive/2015/texmf-dist/tex/latex/base/ts1enc.def))
(/usr/local/texlive/2015/texmf-dist/tex/latex/upquote/upquote.sty)
(/usr/local/texlive/2015/texmf-dist/tex/latex/eurosym/eurosym.sty)
(/usr/local/texlive/2015/texmf-dist/tex/latex/ucs/ucs.sty
(/usr/local/texlive/2015/texmf-dist/tex/latex/ucs/data/uni-global.def))
(/usr/local/texlive/2015/texmf-dist/tex/latex/base/inputenc.sty

Package inputenc Warning: inputenc package ignored with utf8 based engines.

) (/usr/local/texlive/2015/texmf-dist/tex/latex/fancyvrb/fancyvrb.sty
Style option: `fancyvrb' v2.7a, with DG/SPQR fixes, and firstline=lastline fix
<2008/02/07> (tvz))
(/usr/local/texlive/2015/texmf-dist/tex/latex/oberdiek/grffile.sty
(/usr/local/texlive/2015/texmf-dist/tex/latex/oberdiek/kvoptions.sty
(/usr/local/texlive/2015/texmf-dist/tex/generic/oberdiek/ltxcmds.sty)
(/usr/local/texlive/2015/texmf-dist/tex/generic/oberdiek/kvsetkeys.sty
(/usr/local/texlive/2015/texmf-dist/tex/generic/oberdiek/infwarerr.sty)
(/usr/local/texlive/2015/texmf-dist/tex/generic/oberdiek/etexcmds.sty
(/usr/local/texlive/2015/texmf-dist/tex/generic/oberdiek/ifluatex.sty))))
(/usr/local/texlive/2015/texmf-dist/tex/generic/oberdiek/pdftexcmds.sty))
(/usr/local/texlive/2015/texmf-dist/tex/latex/hyperref/hyperref.sty
(/usr/local/texlive/2015/texmf-dist/tex/generic/oberdiek/hobsub-hyperref.sty
(/usr/local/texlive/2015/texmf-dist/tex/generic/oberdiek/hobsub-generic.sty))
(/usr/local/texlive/2015/texmf-dist/tex/latex/oberdiek/auxhook.sty)
(/usr/local/texlive/2015/texmf-dist/tex/latex/hyperref/pd1enc.def)
(/usr/local/texlive/2015/texmf-dist/tex/latex/latexconfig/hyperref.cfg)
(/usr/local/texlive/2015/texmf-dist/tex/latex/url/url.sty))

Package hyperref Message: Driver (autodetected): hxetex.

(/usr/local/texlive/2015/texmf-dist/tex/latex/hyperref/hxetex.def
(/usr/local/texlive/2015/texmf-dist/tex/latex/hyperref/puenc.def)
(/usr/local/texlive/2015/texmf-dist/tex/generic/oberdiek/stringenc.sty)
(/usr/local/texlive/2015/texmf-dist/tex/latex/oberdiek/rerunfilecheck.sty))
(/usr/local/texlive/2015/texmf-dist/tex/latex/tools/longtable.sty)
(/usr/local/texlive/2015/texmf-dist/tex/latex/booktabs/booktabs.sty)
(/usr/local/texlive/2015/texmf-dist/tex/latex/enumitem/enumitem.sty)
(/usr/local/texlive/2015/texmf-dist/tex/generic/ulem/ulem.sty)
(/usr/local/texlive/2015/texmf-dist/tex/latex/jknapltx/mathrsfs.sty)
! Bad register code (4095).
l.276     \XeTeXinterchartoks 4095
                                   \mycharclassGrey = {\bgroup\ifcode\color{...

?
! Emergency stop.
l.276     \XeTeXinterchartoks 4095
                                   \mycharclassGrey = {\bgroup\ifcode\color{...

No pages of output.
Transcript written on notebook.log.

Traceback (most recent call last):
  File "/app/local/anaconda3/envs/py36_mycustomenv/bin/jupyter-nbconvert", line 11, in <module>
    sys.exit(main())
  File "/app/local/anaconda3/envs/py36_mycustomenv/lib/python3.6/site-packages/jupyter_core/application.py", line 266, in launch_instance
    return super(JupyterApp, cls).launch_instance(argv=argv, **kwargs)
  File "/app/local/anaconda3/envs/py36_mycustomenv/lib/python3.6/site-packages/traitlets/config/application.py", line 658, in launch_instance
    app.start()
  File "/app/local/anaconda3/envs/py36_mycustomenv/lib/python3.6/site-packages/nbconvert/nbconvertapp.py", line 337, in start
    self.convert_notebooks()
  File "/app/local/anaconda3/envs/py36_mycustomenv/lib/python3.6/site-packages/nbconvert/nbconvertapp.py", line 507, in convert_notebooks
    self.convert_single_notebook(notebook_filename)
  File "/app/local/anaconda3/envs/py36_mycustomenv/lib/python3.6/site-packages/nbconvert/nbconvertapp.py", line 478, in convert_single_notebook
    output, resources = self.export_single_notebook(notebook_filename, resources, input_buffer=input_buffer)
  File "/app/local/anaconda3/envs/py36_mycustomenv/lib/python3.6/site-packages/nbconvert/nbconvertapp.py", line 407, in export_single_notebook
    output, resources = self.exporter.from_filename(notebook_filename, resources=resources)
  File "/app/local/anaconda3/envs/py36_mycustomenv/lib/python3.6/site-packages/nbconvert/exporters/exporter.py", line 178, in from_filename
    return self.from_file(f, resources=resources, **kw)
  File "/app/local/anaconda3/envs/py36_mycustomenv/lib/python3.6/site-packages/nbconvert/exporters/exporter.py", line 196, in from_file
    return self.from_notebook_node(nbformat.read(file_stream, as_version=4), resources=resources, **kw)
  File "/app/local/anaconda3/envs/py36_mycustomenv/lib/python3.6/site-packages/nbconvert/exporters/pdf.py", line 179, in from_notebook_node
    raise LatexFailed('\n'.join(self._captured_output))
nbconvert.exporters.pdf.LatexFailed: PDF creating failed, captured latex output:
This is XeTeX, Version 3.14159265-2.6-0.99992 (TeX Live 2015) (preloaded format=xelatex)
 restricted \write18 enabled.
entering extended mode
(./notebook.tex
LaTeX2e <2015/01/01>
Babel <3.9l> and hyphenation patterns for 79 languages loaded.
(/usr/local/texlive/2015/texmf-dist/tex/latex/base/article.cls
Document Class: article 2014/09/29 v1.4h Standard LaTeX document class
(/usr/local/texlive/2015/texmf-dist/tex/latex/base/size11.clo))
(/usr/local/texlive/2015/texmf-dist/tex/latex/parskip/parskip.sty)
(/usr/local/texlive/2015/texmf-dist/tex/latex/tcolorbox/tcolorbox.sty
(/usr/local/texlive/2015/texmf-dist/tex/latex/pgf/basiclayer/pgf.sty
(/usr/local/texlive/2015/texmf-dist/tex/latex/pgf/utilities/pgfrcs.sty
(/usr/local/texlive/2015/texmf-dist/tex/generic/pgf/utilities/pgfutil-common.te
x
(/usr/local/texlive/2015/texmf-dist/tex/generic/pgf/utilities/pgfutil-common-li
sts.tex))
(/usr/local/texlive/2015/texmf-dist/tex/generic/pgf/utilities/pgfutil-latex.def
(/usr/local/texlive/2015/texmf-dist/tex/latex/ms/everyshi.sty))
(/usr/local/texlive/2015/texmf-dist/tex/generic/pgf/utilities/pgfrcs.code.tex))
(/usr/local/texlive/2015/texmf-dist/tex/latex/pgf/basiclayer/pgfcore.sty
(/usr/local/texlive/2015/texmf-dist/tex/latex/graphics/graphicx.sty
(/usr/local/texlive/2015/texmf-dist/tex/latex/graphics/keyval.sty)
(/usr/local/texlive/2015/texmf-dist/tex/latex/graphics/graphics.sty
(/usr/local/texlive/2015/texmf-dist/tex/latex/graphics/trig.sty)
(/usr/local/texlive/2015/texmf-dist/tex/latex/latexconfig/graphics.cfg)
(/usr/local/texlive/2015/texmf-dist/tex/xelatex/xetex-def/xetex.def)))
(/usr/local/texlive/2015/texmf-dist/tex/latex/pgf/systemlayer/pgfsys.sty
(/usr/local/texlive/2015/texmf-dist/tex/generic/pgf/systemlayer/pgfsys.code.tex
(/usr/local/texlive/2015/texmf-dist/tex/generic/pgf/utilities/pgfkeys.code.tex
(/usr/local/texlive/2015/texmf-dist/tex/generic/pgf/utilities/pgfkeysfiltered.c
ode.tex))
(/usr/local/texlive/2015/texmf-dist/tex/generic/pgf/systemlayer/pgf.cfg)
(/usr/local/texlive/2015/texmf-dist/tex/generic/pgf/systemlayer/pgfsys-xetex.de
f
(/usr/local/texlive/2015/texmf-dist/tex/generic/pgf/systemlayer/pgfsys-dvipdfmx
.def
(/usr/local/texlive/2015/texmf-dist/tex/generic/pgf/systemlayer/pgfsys-common-p
df.def))))
(/usr/local/texlive/2015/texmf-dist/tex/generic/pgf/systemlayer/pgfsyssoftpath.
code.tex)
(/usr/local/texlive/2015/texmf-dist/tex/generic/pgf/systemlayer/pgfsysprotocol.
code.tex)) (/usr/local/texlive/2015/texmf-dist/tex/latex/xcolor/xcolor.sty
(/usr/local/texlive/2015/texmf-dist/tex/latex/latexconfig/color.cfg))
(/usr/local/texlive/2015/texmf-dist/tex/generic/pgf/basiclayer/pgfcore.code.tex
(/usr/local/texlive/2015/texmf-dist/tex/generic/pgf/math/pgfmath.code.tex
(/usr/local/texlive/2015/texmf-dist/tex/generic/pgf/math/pgfmathcalc.code.tex
(/usr/local/texlive/2015/texmf-dist/tex/generic/pgf/math/pgfmathutil.code.tex)
(/usr/local/texlive/2015/texmf-dist/tex/generic/pgf/math/pgfmathparser.code.tex
)
(/usr/local/texlive/2015/texmf-dist/tex/generic/pgf/math/pgfmathfunctions.code.
tex
(/usr/local/texlive/2015/texmf-dist/tex/generic/pgf/math/pgfmathfunctions.basic
.code.tex)
(/usr/local/texlive/2015/texmf-dist/tex/generic/pgf/math/pgfmathfunctions.trigo
nometric.code.tex)
(/usr/local/texlive/2015/texmf-dist/tex/generic/pgf/math/pgfmathfunctions.rando
m.code.tex)
(/usr/local/texlive/2015/texmf-dist/tex/generic/pgf/math/pgfmathfunctions.compa
rison.code.tex)
(/usr/local/texlive/2015/texmf-dist/tex/generic/pgf/math/pgfmathfunctions.base.
code.tex)
(/usr/local/texlive/2015/texmf-dist/tex/generic/pgf/math/pgfmathfunctions.round
.code.tex)
(/usr/local/texlive/2015/texmf-dist/tex/generic/pgf/math/pgfmathfunctions.misc.
code.tex)
(/usr/local/texlive/2015/texmf-dist/tex/generic/pgf/math/pgfmathfunctions.integ
erarithmetics.code.tex)))
(/usr/local/texlive/2015/texmf-dist/tex/generic/pgf/math/pgfmathfloat.code.tex)
)
(/usr/local/texlive/2015/texmf-dist/tex/generic/pgf/basiclayer/pgfcorepoints.co
de.tex)
(/usr/local/texlive/2015/texmf-dist/tex/generic/pgf/basiclayer/pgfcorepathconst
ruct.code.tex)
(/usr/local/texlive/2015/texmf-dist/tex/generic/pgf/basiclayer/pgfcorepathusage
.code.tex)
(/usr/local/texlive/2015/texmf-dist/tex/generic/pgf/basiclayer/pgfcorescopes.co
de.tex)
(/usr/local/texlive/2015/texmf-dist/tex/generic/pgf/basiclayer/pgfcoregraphicst
ate.code.tex)
(/usr/local/texlive/2015/texmf-dist/tex/generic/pgf/basiclayer/pgfcoretransform
ations.code.tex)
(/usr/local/texlive/2015/texmf-dist/tex/generic/pgf/basiclayer/pgfcorequick.cod
e.tex)
(/usr/local/texlive/2015/texmf-dist/tex/generic/pgf/basiclayer/pgfcoreobjects.c
ode.tex)
(/usr/local/texlive/2015/texmf-dist/tex/generic/pgf/basiclayer/pgfcorepathproce
ssing.code.tex)
(/usr/local/texlive/2015/texmf-dist/tex/generic/pgf/basiclayer/pgfcorearrows.co
de.tex)
(/usr/local/texlive/2015/texmf-dist/tex/generic/pgf/basiclayer/pgfcoreshade.cod
e.tex)
(/usr/local/texlive/2015/texmf-dist/tex/generic/pgf/basiclayer/pgfcoreimage.cod
e.tex
(/usr/local/texlive/2015/texmf-dist/tex/generic/pgf/basiclayer/pgfcoreexternal.
code.tex))
(/usr/local/texlive/2015/texmf-dist/tex/generic/pgf/basiclayer/pgfcorelayers.co
de.tex)
(/usr/local/texlive/2015/texmf-dist/tex/generic/pgf/basiclayer/pgfcoretranspare
ncy.code.tex)
(/usr/local/texlive/2015/texmf-dist/tex/generic/pgf/basiclayer/pgfcorepatterns.
code.tex)))
(/usr/local/texlive/2015/texmf-dist/tex/generic/pgf/modules/pgfmoduleshapes.cod
e.tex)
(/usr/local/texlive/2015/texmf-dist/tex/generic/pgf/modules/pgfmoduleplot.code.
tex)
(/usr/local/texlive/2015/texmf-dist/tex/latex/pgf/compatibility/pgfcomp-version
-0-65.sty)
(/usr/local/texlive/2015/texmf-dist/tex/latex/pgf/compatibility/pgfcomp-version
-1-18.sty)) (/usr/local/texlive/2015/texmf-dist/tex/latex/tools/verbatim.sty)
(/usr/local/texlive/2015/texmf-dist/tex/latex/environ/environ.sty
(/usr/local/texlive/2015/texmf-dist/tex/latex/trimspaces/trimspaces.sty))
(/usr/local/texlive/2015/texmf-dist/tex/latex/etoolbox/etoolbox.sty)
(/usr/local/texlive/2015/texmf-dist/tex/latex/tcolorbox/tcbbreakable.code.tex
Library (tcolorbox): 'tcbbreakable.code.tex' version '3.60'
)) (/usr/local/texlive/2015/texmf-dist/tex/latex/needspace/needspace.sty)
(/usr/local/texlive/2015/texmf-dist/tex/latex/base/fontenc.sty
(/usr/local/texlive/2015/texmf-dist/tex/latex/base/t1enc.def))
(/usr/local/texlive/2015/texmf-dist/tex/latex/psnfss/mathpazo.sty)
(/usr/local/texlive/2015/texmf-dist/tex/latex/caption/caption.sty
(/usr/local/texlive/2015/texmf-dist/tex/latex/caption/caption3.sty))
(/usr/local/texlive/2015/texmf-dist/tex/latex/adjustbox/adjustbox.sty
(/usr/local/texlive/2015/texmf-dist/tex/latex/xkeyval/xkeyval.sty
(/usr/local/texlive/2015/texmf-dist/tex/generic/xkeyval/xkeyval.tex
(/usr/local/texlive/2015/texmf-dist/tex/generic/xkeyval/xkvutils.tex)))
(/usr/local/texlive/2015/texmf-dist/tex/latex/adjustbox/adjcalc.sty)
(/usr/local/texlive/2015/texmf-dist/tex/latex/adjustbox/trimclip.sty
(/usr/local/texlive/2015/texmf-dist/tex/latex/collectbox/collectbox.sty)
(/usr/local/texlive/2015/texmf-dist/tex/latex/adjustbox/tc-xetex.def))
(/usr/local/texlive/2015/texmf-dist/tex/latex/ifoddpage/ifoddpage.sty)
(/usr/local/texlive/2015/texmf-dist/tex/latex/varwidth/varwidth.sty))
(/usr/local/texlive/2015/texmf-dist/tex/latex/tools/enumerate.sty)
(/usr/local/texlive/2015/texmf-dist/tex/latex/geometry/geometry.sty
(/usr/local/texlive/2015/texmf-dist/tex/generic/oberdiek/ifpdf.sty)
(/usr/local/texlive/2015/texmf-dist/tex/generic/oberdiek/ifvtex.sty)
(/usr/local/texlive/2015/texmf-dist/tex/generic/ifxetex/ifxetex.sty))
(/usr/local/texlive/2015/texmf-dist/tex/latex/amsmath/amsmath.sty
For additional information on amsmath, use the `?' option.
(/usr/local/texlive/2015/texmf-dist/tex/latex/amsmath/amstext.sty
(/usr/local/texlive/2015/texmf-dist/tex/latex/amsmath/amsgen.sty))
(/usr/local/texlive/2015/texmf-dist/tex/latex/amsmath/amsbsy.sty)
(/usr/local/texlive/2015/texmf-dist/tex/latex/amsmath/amsopn.sty))
(/usr/local/texlive/2015/texmf-dist/tex/latex/amsfonts/amssymb.sty
(/usr/local/texlive/2015/texmf-dist/tex/latex/amsfonts/amsfonts.sty))
(/usr/local/texlive/2015/texmf-dist/tex/latex/base/textcomp.sty
(/usr/local/texlive/2015/texmf-dist/tex/latex/base/ts1enc.def))
(/usr/local/texlive/2015/texmf-dist/tex/latex/upquote/upquote.sty)
(/usr/local/texlive/2015/texmf-dist/tex/latex/eurosym/eurosym.sty)
(/usr/local/texlive/2015/texmf-dist/tex/latex/ucs/ucs.sty
(/usr/local/texlive/2015/texmf-dist/tex/latex/ucs/data/uni-global.def))
(/usr/local/texlive/2015/texmf-dist/tex/latex/base/inputenc.sty

Package inputenc Warning: inputenc package ignored with utf8 based engines.

) (/usr/local/texlive/2015/texmf-dist/tex/latex/fancyvrb/fancyvrb.sty
Style option: `fancyvrb' v2.7a, with DG/SPQR fixes, and firstline=lastline fix
<2008/02/07> (tvz))
(/usr/local/texlive/2015/texmf-dist/tex/latex/oberdiek/grffile.sty
(/usr/local/texlive/2015/texmf-dist/tex/latex/oberdiek/kvoptions.sty
(/usr/local/texlive/2015/texmf-dist/tex/generic/oberdiek/ltxcmds.sty)
(/usr/local/texlive/2015/texmf-dist/tex/generic/oberdiek/kvsetkeys.sty
(/usr/local/texlive/2015/texmf-dist/tex/generic/oberdiek/infwarerr.sty)
(/usr/local/texlive/2015/texmf-dist/tex/generic/oberdiek/etexcmds.sty
(/usr/local/texlive/2015/texmf-dist/tex/generic/oberdiek/ifluatex.sty))))
(/usr/local/texlive/2015/texmf-dist/tex/generic/oberdiek/pdftexcmds.sty))
(/usr/local/texlive/2015/texmf-dist/tex/latex/hyperref/hyperref.sty
(/usr/local/texlive/2015/texmf-dist/tex/generic/oberdiek/hobsub-hyperref.sty
(/usr/local/texlive/2015/texmf-dist/tex/generic/oberdiek/hobsub-generic.sty))
(/usr/local/texlive/2015/texmf-dist/tex/latex/oberdiek/auxhook.sty)
(/usr/local/texlive/2015/texmf-dist/tex/latex/hyperref/pd1enc.def)
(/usr/local/texlive/2015/texmf-dist/tex/latex/latexconfig/hyperref.cfg)
(/usr/local/texlive/2015/texmf-dist/tex/latex/url/url.sty))

Package hyperref Message: Driver (autodetected): hxetex.

(/usr/local/texlive/2015/texmf-dist/tex/latex/hyperref/hxetex.def
(/usr/local/texlive/2015/texmf-dist/tex/latex/hyperref/puenc.def)
(/usr/local/texlive/2015/texmf-dist/tex/generic/oberdiek/stringenc.sty)
(/usr/local/texlive/2015/texmf-dist/tex/latex/oberdiek/rerunfilecheck.sty))
(/usr/local/texlive/2015/texmf-dist/tex/latex/tools/longtable.sty)
(/usr/local/texlive/2015/texmf-dist/tex/latex/booktabs/booktabs.sty)
(/usr/local/texlive/2015/texmf-dist/tex/latex/enumitem/enumitem.sty)
(/usr/local/texlive/2015/texmf-dist/tex/generic/ulem/ulem.sty)
(/usr/local/texlive/2015/texmf-dist/tex/latex/jknapltx/mathrsfs.sty)
! Bad register code (4095).
l.276     \XeTeXinterchartoks 4095
                                   \mycharclassGrey = {\bgroup\ifcode\color{...

?
! Emergency stop.
l.276     \XeTeXinterchartoks 4095
                                   \mycharclassGrey = {\bgroup\ifcode\color{...

No pages of output.
Transcript written on notebook.log.

I am new to latex, xelatex, and texlive, so I am not sure how to troubleshoot beyond here.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.