3

I want to use Jupyter (= IPython-notebook) as my file-manager for controlling my LaTeX projects. Pylatex is not what I want. You can for instance have a Matlab bridge so it is possible to have LaTeX bridge in IPython-notebook. Pseudocode

sudo -H pip install [pylatexbridge]
sudo -H pip install [latex_kernel]
python -m [latex_kernel.install]

Pseudocode in $HOME/.bash_profile

export LATEX_EXECUTABLE=/usr/local/bin/latex % TODO which one here?

Goals

  1. to get .tex syntax with colors in .tex files started from Jupyter.
  2. start the compilation of .tex document from Jupyter
  3. start preview of the output as pdf from Jupyter

Open

  • Which package does provide the .tex syntax with colors?

System: Ubuntu 16.04
Texlive-full: 2015

3
  • I am not sure why you would want to use a Jupyter notebook for this, or maybe I am not fully understand what you want to do. Regardless, does something like github.com/JelteF/PyLaTeX suit your use case?
    – edwinksl
    Jun 21, 2016 at 13:13
  • @edwinksl Thank you for the proposal! It is not what I am looking for. I want to use Jupyter to control my LaTeX projects, see the body. Jun 21, 2016 at 13:41
  • There is no LaTeX kernel for Jupyter as far as I can tell, so you'll have to wait or write one.
    – edwinksl
    Jun 21, 2016 at 13:45

1 Answer 1

2

This worked for me in ubuntu 14.04. I downloaded pandoc package from here

Download .deb file for ubuntu

sudo su
dpkg -i pandoc-1.19.2.1-1-amd64.deb 
# These packages are too big. That's why install only things that are needed.
# So, included --no-install-recommends. Installs only dependencies
apt-get install --no-install-recommends texlive
apt-get install xzdec
apt-get install --no-install-recommends texlive-latex-extra
apt-get install --no-install-recommends texlive-xetex
apt-get install latex-xcolor
apt-get install --no-install-recommends texlive-generic-recommended

# For full texlive
# apt-get install --no-install-recommends texlive-full
  1. After doing this run

    jupyter notebook

  2. open your .ipynb file

  3. In menu bar, click File -> Download As -> pdf via latex

The other packages you can install is

(note: each package is separated by space)

aglfn chktex clisp cm-super cm-super-minimal context dvidvi dvipng feynmf fonts-cabin fonts-comfortaa fonts-dejavu-extra fonts-font-awesome fonts-freefont-otf fonts-gfs-artemisia
fonts-gfs-baskerville fonts-gfs-complutum fonts-gfs-didot fonts-gfs-neohellenic fonts-gfs-olga fonts-gfs-porson fonts-gfs-solomos fonts-hosny-amiri fonts-inconsolata fonts-ipaexfont-gothic
fonts-ipaexfont-mincho fonts-ipafont-gothic fonts-ipafont-mincho fonts-junicode fonts-lato fonts-linuxlibertine fonts-lmodern fonts-lobster fonts-lobstertwo fonts-oflb-asana-math
fonts-sil-gentium fonts-sil-gentium-basic fonts-stix fonts-texgyre fragmaster lacheck latex-beamer latex-cjk-all latex-cjk-chinese latex-cjk-chinese-arphic-bkai00mp
latex-cjk-chinese-arphic-bsmi00lp latex-cjk-chinese-arphic-gbsn00lp latex-cjk-chinese-arphic-gkai00mp latex-cjk-common latex-cjk-japanese latex-cjk-japanese-wadalab latex-cjk-korean
latex-cjk-thai latex-sanskrit latex-xcolor latexdiff latexmk lcdf-typetools libffcall1 libfile-which-perl libintl-perl libmagick++5 libplot2c2 libpstoedit0c2a libruby1.9.1
libtext-unidecode-perl libxml-libxml-perl libxml-namespacesupport-perl libxml-sax-base-perl libxml-sax-perl libyaml-0-2 lmodern m-tx musixtex pfb2t1c2pfb pgf pmx prosper pstoedit psutils
purifyeps ruby ruby1.9.1 tex-gyre tex4ht tex4ht-common texinfo texlive-bibtex-extra texlive-extra-utils texlive-font-utils texlive-fonts-extra texlive-fonts-extra-doc
texlive-fonts-recommended-doc texlive-formats-extra texlive-games texlive-generic-extra texlive-generic-recommended texlive-humanities texlive-humanities-doc texlive-lang-african
texlive-lang-arabic texlive-lang-cjk texlive-lang-cyrillic texlive-lang-czechslovak texlive-lang-english texlive-lang-european texlive-lang-french texlive-lang-german texlive-lang-greek
texlive-lang-indic texlive-lang-italian texlive-lang-other texlive-lang-polish texlive-lang-portuguese texlive-lang-spanish texlive-latex-base-doc texlive-latex-extra-doc
texlive-latex-recommended-doc texlive-luatex texlive-math-extra texlive-metapost texlive-metapost-doc texlive-music texlive-omega texlive-pictures-doc texlive-plain-extra texlive-pstricks
texlive-pstricks-doc texlive-publishers texlive-publishers-doc texlive-science texlive-science-doc texlive-xetex tipa ttf-adf-accanthis ttf-adf-gillius xindy xindy-rules

The Screen shot is below

enter image description here

5
  • Can you please add a picture of your output? - - I think Pandoc itself is a not good choice here. There is a newer and more functional table format in LaTeX. Apr 28, 2017 at 11:47
  • output of what exactly? The pdf? May 1, 2017 at 4:20
  • Yes, about pdf. May 1, 2017 at 4:50
  • there you go. Pdf screenshot has been attached Jun 2, 2017 at 5:47
  • That's excellent. Thanks. Much better than having to install 1GB+ of non-needed packages. Jan 23, 2018 at 12:44

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .