microsoft / vscode-jupyter

VS Code Jupyter extension
https://marketplace.visualstudio.com/items?itemName=ms-toolsai.jupyter
MIT License
1.25k stars 276 forks source link

Better instruction or detection of missing `xelatex` #5912

Open rebornix opened 3 years ago

rebornix commented 3 years ago

Issue Type: Bug

Error 2021-05-17 13:06:37: If you have not installed xelatex (TeX) you will need to do so before you can export to PDF, for further instructions go to https://nbconvert.readthedocs.io/en/latest/install.html#installing-tex. 
To avoid installing xelatex (TeX) you might want to try exporting to HTML and using your browsers "Print to PDF" feature.

Extension version: 2021.6.834931520 VS Code version: Code - OSS Dev 1.57.0 (Commit unknown, Date unknown) OS version: Darwin x64 20.3.0

System Info |Item|Value| |---|---| |CPUs|Intel(R) Core(TM) i9-9980HK CPU @ 2.40GHz (16 x 2400)| |GPU Status|2d_canvas: enabled
gpu_compositing: enabled
metal: disabled_off
multiple_raster_threads: enabled_on
oop_rasterization: enabled
opengl: enabled_on
rasterization: enabled
skia_renderer: disabled_off_ok
video_decode: enabled
webgl: enabled
webgl2: enabled| |Load (avg)|3, 3, 2| |Memory (System)|32.00GB (0.26GB free)| |Process Argv|. --enable-proposed-api ms-vsliveshare.vsliveshare --enable-proposed-api rebornix.better-jupyter-errors| |Screen Reader|no| |VM|0%|
joyceerhl commented 3 years ago

Some ideas here:

DonJayamanne commented 3 years ago

using Chromium for the PDF export step, and install Chromium for the

I prefer this option, to my knowledge this is the deafult (preferred) option used in Jupyter when exporting to PDF.

joyceerhl commented 3 years ago

Strange, I believe Tim found that JupyterLab goes the nbconvert + TeX route, and the HTML to PDF using Chromium route would generate a subpar PDF that's formatted differently.

Not sure how well these work: https://www.npmjs.com/package/html-pdf-node and we could do the HTML step with nbconvert or in JS https://github.com/jirutka/ipynb2html