Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add packages required by IRkernel/repr #335

Merged
merged 1 commit into from
Aug 5, 2016
Merged

Conversation

flying-sheep
Copy link
Contributor

@flying-sheep flying-sheep commented Jul 13, 2016

The IRkernel’s display machinery, powered by the repr R package, by default requires two LaTeX packages.

Since there is

  1. no way to specify required packages during kernel runtime, and
  2. templates aren’t kernel specific

this project is the right place for adding LaTeX packages. Eventually it would be nice to have a way to register notebook-wide data that can be used by templates, and therefore allow for kernels and extension packages to influence LaTeX packages, HTML scripts, and the like. this idea is also discussed in IRkernel/IRdisplay#14

The IRkernel’s display machinery, powered by the repr R package, by default requires two LaTeX packages.
@jankatins
Copy link
Contributor

For an alternative proposal ("don't use the latex package in the rich display of vectors/lists and functions, but only what is already included"), see IRkernel/repr#74

@flying-sheep
Copy link
Contributor Author

flying-sheep commented Jul 14, 2016

no. this i the right place until more flexible approaches are possible. i see no reason to accommodate to an unspecified and arbitrary setup, but will rather change that setup or make it configurable.

the alternative proposal will not be implemented if i have any say in this. @JanSchulz i think it’s in your best interest to champion this PR.

@takluyver
Copy link
Member

I think @JanSchulz said on one of the many threads about this that these packages are not installed by the tex 'recommended' metapackage in Ubuntu. Of course everything is arbitrary, but that does raise doubts about it for me.

@flying-sheep, please soften your tone when we're discussing potential solutions to a problem. This is your preferred solution, but people can disagree. No-one gets to unilaterally define the 'right' answer. And the nature of software is that we often have to work around things in other code that we may disagree with.

@flying-sheep
Copy link
Contributor Author

flying-sheep commented Jul 14, 2016

sorry, @JanSchulz if my tone is too grumpy, i think i’m affected by being sick right now. i really value your contributions and your opinion in these discussions.

@takluyver texlive-latex-extra contains upquote.sty which the default template already uses. therefore every Jupyter user clicking “Download PDF” needs it already

@takluyver
Copy link
Member

Fair enough, then it seems OK to me to add things, but I'll leave it for others to have a look too.

@flying-sheep
Copy link
Contributor Author

flying-sheep commented Jul 14, 2016

good 😃

re-reading the above thing about “best interest” makes me realize that it really sounds like a threat or so. 😨 not my intention!

@JanSchulz i wanted to say that my opinion where this change belongs is pretty definite, so your goal to make the download button work is best served by no longer trying to remove enumerate* from repr but focusing on this PR. of course you can do what you want, but for me this is clear-cut if there’s nothing we didn’t consider yet.

@minrk minrk added this to the 5.0 milestone Aug 5, 2016
@minrk minrk merged commit 39b86e9 into jupyter:master Aug 5, 2016
@flying-sheep flying-sheep deleted the patch-1 branch August 5, 2016 09:31
@flying-sheep
Copy link
Contributor Author

thank you, this is a great relief!

@amueller
Copy link
Contributor

This introduced a test failure in master: #350
You added the minted packages which needs the -shell-escape flag.

@flying-sheep
Copy link
Contributor Author

flying-sheep commented Aug 10, 2016

sorry. i was aware it needs that flag but i remembered that this didn’t cause issues earlier.

did you at some point have the flag and removed it? also: why did travis not catch this?

in any case: if this can’t be (or you don’t want to) work(ed) around, we can remove the minted package again. it’s not as important as the other changed line.

@jankatins
Copy link
Contributor

jankatins commented Aug 10, 2016

did you at some point have the flag and removed it? also: why did travis not catch this?

https://github.com/jupyter/nbconvert/blob/master/nbconvert/exporters/tests/test_pdf.py tests if pandoc is available, but the travis command seems to set the wrong path: the unpacked file (when opened in 7zip on windows) has pandoc as bin/pandoc but the path is set differently: PATH=$TRAVIS_BUILD_DIR/pandoc:$PATH?

-> Lets try that hypothesis in #356

@mpacer
Copy link
Member

mpacer commented Aug 18, 2016

Since this has been merged, is it possible to remove minted so that we can close #27? Or are there other issues not related to minted and --shell-escape?

Also tracking down this entire issue/pr dependency chain has been quite a mental workout. I'm impressed that everyone has managed to hold all of these pieces in their head at once.

@brad-ross
Copy link

Bumping this issue--I'm trying to export a PDF version of my jupyter notebooks and I can't because of the missing enumitem package. Any update on when a fix will be merged?

@takluyver
Copy link
Member

This has been merged, and should be in nbconvert 5.0, which has now been released.

@brad-ross
Copy link

Ah I see, version 5.0.0 is still not available through Anaconda--they only have up to version 4.2.0 available to install.

@mpacer
Copy link
Member

mpacer commented Jan 19, 2017

I can look into getting a version of 5.0 on conda-forge, since we don't have too many compiled external dependencies (none?) I think it should be fairly straightforward (at least from what I understand). So then it can at least be accessed from that channel.

@brad-ross
Copy link

That would be fantastic--thanks!

@takluyver
Copy link
Member

Min already made a start (conda-forge/nbconvert-feedstock#7), but it got stuck for a while on a package of mine. I think it should be able to move forwards now.

@brad-ross
Copy link

Should I bump it so that there's action? It doesn't look like anyone's done anything with it for a few weeks.

@takluyver
Copy link
Member

Thanks, I just did :-)

@NataliaDiaz
Copy link

In Ubuntu 14.04 I still get the error:

jupyter nbconvert --to pdf face_recognition.ipynb [NbConvertApp] Converting notebook face_recognition.ipynb to pdf [NbConvertApp] Support files will be in face_recognition_files/ [NbConvertApp] Making directory face_recognition_files [NbConvertApp] Making directory face_recognition_files [NbConvertApp] Writing 31953 bytes to notebook.tex [NbConvertApp] Building PDF [NbConvertApp] Running pdflatex 3 times: [u'pdflatex', u'notebook.tex'] [NbConvertApp] CRITICAL | pdflatex failed: [u'pdflatex', u'notebook.tex'] This is pdfTeX, Version 3.1415926-2.5-1.40.14 (TeX Live 2013/Debian) restricted \write18 enabled. entering extended mode (./notebook.tex LaTeX2e <2011/06/27> Babel <3.9h> and hyphenation patterns for 2 languages loaded. (/usr/share/texlive/texmf-dist/tex/latex/base/article.cls Document Class: article 2007/10/19 v1.4h Standard LaTeX document class (/usr/share/texlive/texmf-dist/tex/latex/base/size11.clo)) (/usr/share/texlive/texmf-dist/tex/latex/base/fontenc.sty (/usr/share/texlive/texmf-dist/tex/latex/base/t1enc.def) kpathsea: Running mktextfm ecrm1095 /usr/share/texlive/texmf-dist/web2c/mktexnam: Could not map source abbreviation for ecrm1095. /usr/share/texlive/texmf-dist/web2c/mktexnam: Need to update ? mktextfm: Running mf-nowin -progname=mf \mode:=ljfour; mag:=1; nonstopmode; input ecrm1095 This is METAFONT, Version 2.718281 (TeX Live 2013/Debian)

kpathsea: Running mktexmf ecrm1095

! I can't find file `ecrm1095'.
<*> ...ljfour; mag:=1; nonstopmode; input ecrm1095

Please type another input file name
! Emergency stop.
<*> ...ljfour; mag:=1; nonstopmode; input ecrm1095

Transcript written on mfput.log.
grep: ecrm1095.log: No such file or directory
mktextfm: `mf-nowin -progname=mf \mode:=ljfour; mag:=1; nonstopmode; input ecrm1095' failed to make ecrm1095.tfm.
kpathsea: Appending font creation commands to missfont.log.

! Font T1/cmr/m/n/10.95=ecrm1095 at 10.95pt not loadable: Metric (TFM) file not
found.

relax
l.100 \fontencoding\encodingdefault\selectfont

?
! Emergency stop.

relax
l.100 \fontencoding\encodingdefault\selectfont

! ==> Fatal error occurred, no output PDF file produced!
Transcript written on notebook.log.

Traceback (most recent call last):
File "/home/natalia/anaconda2/bin/jupyter-nbconvert", line 6, in
main()
File "/home/natalia/anaconda2/lib/python2.7/site-packages/jupyter_core/application.py", line 267, in launch_instance
return super(JupyterApp, cls).launch_instance(argv=argv, **kwargs)
File "/home/natalia/anaconda2/lib/python2.7/site-packages/traitlets/config/application.py", line 658, in launch_instance
app.start()
File "/home/natalia/anaconda2/lib/python2.7/site-packages/nbconvert/nbconvertapp.py", line 293, in start
self.convert_notebooks()
File "/home/natalia/anaconda2/lib/python2.7/site-packages/nbconvert/nbconvertapp.py", line 457, in convert_notebooks
self.convert_single_notebook(notebook_filename)
File "/home/natalia/anaconda2/lib/python2.7/site-packages/nbconvert/nbconvertapp.py", line 428, in convert_single_notebook
output, resources = self.export_single_notebook(notebook_filename, resources, input_buffer=input_buffer)
File "/home/natalia/anaconda2/lib/python2.7/site-packages/nbconvert/nbconvertapp.py", line 357, in export_single_notebook
output, resources = self.exporter.from_filename(notebook_filename, resources=resources)
File "/home/natalia/anaconda2/lib/python2.7/site-packages/nbconvert/exporters/exporter.py", line 165, in from_filename
return self.from_file(f, resources=resources, **kw)
File "/home/natalia/anaconda2/lib/python2.7/site-packages/nbconvert/exporters/exporter.py", line 183, in from_file
return self.from_notebook_node(nbformat.read(file_stream, as_version=4), resources=resources, **kw)
File "/home/natalia/anaconda2/lib/python2.7/site-packages/nbconvert/exporters/pdf.py", line 175, in from_notebook_node
raise LatexFailed('\n'.join(self._captured_output))
nbconvert.exporters.pdf.LatexFailed: PDF creating failed, captured latex output:
This is pdfTeX, Version 3.1415926-2.5-1.40.14 (TeX Live 2013/Debian)
restricted \write18 enabled.
entering extended mode
(./notebook.tex
LaTeX2e <2011/06/27>
Babel <3.9h> and hyphenation patterns for 2 languages loaded.
(/usr/share/texlive/texmf-dist/tex/latex/base/article.cls
Document Class: article 2007/10/19 v1.4h Standard LaTeX document class
(/usr/share/texlive/texmf-dist/tex/latex/base/size11.clo))
(/usr/share/texlive/texmf-dist/tex/latex/base/fontenc.sty
(/usr/share/texlive/texmf-dist/tex/latex/base/t1enc.def)
kpathsea: Running mktextfm ecrm1095
/usr/share/texlive/texmf-dist/web2c/mktexnam: Could not map source abbreviation for ecrm1095.
/usr/share/texlive/texmf-dist/web2c/mktexnam: Need to update ?
mktextfm: Running mf-nowin -progname=mf \mode:=ljfour; mag:=1; nonstopmode; input ecrm1095
This is METAFONT, Version 2.718281 (TeX Live 2013/Debian)

kpathsea: Running mktexmf ecrm1095

! I can't find file `ecrm1095'.
<*> ...ljfour; mag:=1; nonstopmode; input ecrm1095

Please type another input file name
! Emergency stop.
<*> ...ljfour; mag:=1; nonstopmode; input ecrm1095

Transcript written on mfput.log.
grep: ecrm1095.log: No such file or directory
mktextfm: `mf-nowin -progname=mf \mode:=ljfour; mag:=1; nonstopmode; input ecrm1095' failed to make ecrm1095.tfm.
kpathsea: Appending font creation commands to missfont.log.

! Font T1/cmr/m/n/10.95=ecrm1095 at 10.95pt not loadable: Metric (TFM) file not
found.

relax
l.100 \fontencoding\encodingdefault\selectfont

?
! Emergency stop.

relax
l.100 \fontencoding\encodingdefault\selectfont

! ==> Fatal error occurred, no output PDF file produced!
Transcript written on notebook.log.
<\details>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

8 participants