All Projects → davibarreira → NotebookToLaTeX.jl

davibarreira / NotebookToLaTeX.jl

Licence: MIT license
A Julia package for converting your Pluto and Jupyter Notebooks into beautiful Latex.

Programming Languages

TeX
3793 projects
Jupyter Notebook
11667 projects
julia
2034 projects

Projects that are alternatives of or similar to NotebookToLaTeX.jl

FaceDetection.jl
A face detection algorithm using Viola-Jones' rapid object detection framework written in Julia
Stars: ✭ 13 (-81.43%)
Mutual labels:  julia-language, julia-package
static-export-template
A template to automatically convert Pluto notebooks to an HTML website with GitHub Pages. Demo page:
Stars: ✭ 70 (+0%)
Mutual labels:  julia-language, pluto-notebooks
PlutoTest.jl
✔️ Visual, reactive testing library for Julia. Time machine included.
Stars: ✭ 56 (-20%)
Mutual labels:  julia-language, pluto-notebooks
OmniSci.jl
Julia client for OmniSci GPU-accelerated SQL engine and analytics platform
Stars: ✭ 22 (-68.57%)
Mutual labels:  julia-language, julia-package
18s191
Course 18.S191 at MIT, Spring 2021 - Introduction to computational thinking with Julia:
Stars: ✭ 2,094 (+2891.43%)
Mutual labels:  julia-language, pluto-notebooks
Nabla.jl
A operator overloading, tape-based, reverse-mode AD
Stars: ✭ 54 (-22.86%)
Mutual labels:  julia-language
Julia
The Julia Programming Language
Stars: ✭ 37,497 (+53467.14%)
Mutual labels:  julia-language
ReinforcementLearningZoo.jl
juliareinforcementlearning.org/
Stars: ✭ 46 (-34.29%)
Mutual labels:  julia-language
julia-NotepadPlusPlus
Julia language support for Notepad++
Stars: ✭ 34 (-51.43%)
Mutual labels:  julia-language
math-server-docker
The ideal multi-user Data Science server with Jupyterhub and RStudio, ready for Python, R and Julia languages.
Stars: ✭ 70 (+0%)
Mutual labels:  julia-language
TemporalGPs.jl
Fast inference for Gaussian processes in problems involving time. Partly built on results from https://proceedings.mlr.press/v161/tebbutt21a.html
Stars: ✭ 89 (+27.14%)
Mutual labels:  julia-language
Tectonic.jl
Tectonic typesetting for Julia.
Stars: ✭ 21 (-70%)
Mutual labels:  julia-language
LimitedLDLFactorizations.jl
Limited-Memory Factorization of Symmetric Matrices
Stars: ✭ 15 (-78.57%)
Mutual labels:  julia-language
Gen.jl
A general-purpose probabilistic programming system with programmable inference
Stars: ✭ 1,595 (+2178.57%)
Mutual labels:  julia-language
julia-workshop
"Integrating Julia in real-world, distributed pipelines" for JuliaCon 2017
Stars: ✭ 39 (-44.29%)
Mutual labels:  julia-language
Python-Course
Python Basics, Machine Learning and Deep Learning
Stars: ✭ 50 (-28.57%)
Mutual labels:  notebook-jupyter
LocalCoverage.jl
Trivial functions for working with coverage for packages locally.
Stars: ✭ 55 (-21.43%)
Mutual labels:  julia-language
Julia-Projects-for-Beginners
Julia Projects for Beginners — Easy Ideas to Get Started Coding in Julia
Stars: ✭ 29 (-58.57%)
Mutual labels:  julia-language
GlobalSensitivity.jl
Robust, Fast, and Parallel Global Sensitivity Analysis (GSA) in Julia
Stars: ✭ 30 (-57.14%)
Mutual labels:  julia-language
KittyTerminalImages.jl
A package that allows Julia to display images in the kitty terminal editor
Stars: ✭ 57 (-18.57%)
Mutual labels:  julia-language

NotebookToLaTeX.jl

Build Status Coverage

Important: The package is still in active development, so things might change/break. Note that the package name is being changed from NotebookToLatex.jl to NotebookToLaTeX.jl in order to be more consistent with the naming of other packages in the Julia environment. If you've cloned this repo before that, you might want to delete and clone again.

If you try this package and find some bug, or think of a feature you'd like to have implemented, do not hesitate to open an issue.

Why this Package?

This package converts your notebook files (Pluto or Jupyter) to beautiful and simple LaTeX files, that are easy to modify. Thus, making it ideal to write reports, articles or books from notebooks.

NotebookToLaTeX Example

Although it's already possible to convert both Pluto and Jupyter notebooks to PDFs, or even to LaTeX (via Pandoc), the PDFs are not very customizable and the LaTeX files are usually very messy. In contrast, NotebookToLaTeX.jl focuses less in generality, and more on opinionated defaults.

The package has it's own implementation to parse Markdown to LaTeX, e.g. it turns # Example to \chapter{Example}. Thus, one can dive down into the actual Julia code and customize it for his own preference. Or, submit an issue requesting the feature. Hopefully, more and more customization will be possible from the get go as the package evolves.

Another very important point to note is that NotebookToLaTeX.jl uses julia-mono-listing. This enables it to produce beautiful Julia code inside the LaTeX pdf. Note that it requires using lualatex for compilation.

Getting Started

This package is very simple to use. There is pretty much just one function to be used, i.e.

notebooktolatex

Basic Use

To convert the notebooks just use notebooktolatex("mynotebook.ipynb", template=:book). This will produce a directory ./build_latex/ where the LaTeX files will be generated. Inside build_latex/ you will have:

build_latex
│   main.tex
│   julia_font.tex
│   julia_listings.tex
│   julia_listings_unicode.tex
│   preface.tex
│
└───figures
│   │   mynotebook_plot1.png
│   └───mynotebook_plot2.png
└───fonts
│   │   JuliaMono_Regular.ttf
│   │   ...
│   
└───frontmatter
│   │   titlepage.tex
│   └───copyright.tex
│
└───notebooks
    └───mynotebook.tex

Using template=:book, we get the LaTeX book format, thus, we have a preface.tex, a titlepage.tex and a copyright.tex page. The notebook will be included as a chapter. To get your final book pdf, just compile the main.tex using lualatex.

In case you want a different project folder, you can run the command with an extra argument providing the target directory for the LaTeX files, e.g.:

`notebooktolatex("mynotebook.ipynb", "./project/",template=:book)`.

This will create a ./project/ folder instead of the ./build_latex.

If instead you just want a simple report containing the Notebook, you can use the :article template.

Pluto Users

If you want to convert Pluto notebooks, you have to import Makie.jl, CairoMakie.jl and Plots.jl, which are the packages used in order to save your figures. The reason for this is that NotebookToLaTeX.jl uses Requires.jl in order to avoid these packages as dependencies. Hence, to convert Pluto, you have to run:

using Makie, CairoMakie, Plots
notebooktolatex("myplutonotebook.jl", template=:book)

Templates

At the moment, the available templates are:

  • :book - The standard LaTeX book template;
  • :mathbook - Very similar to :book, but with some extra packages for mathematics;
  • :article - Simple template using the article document class;
  • :matharticle - The article template with extra packages for mathematics.

Read the documentation for more information.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].