# Preparing tutorials and books

**URL:** <https://discourse.julialang.org/t/preparing-tutorials-and-books/59298>\
**Category:** Numerics\
**Tags:** documentation, documenter, book, latex, weave\
**Created:** [April 14, 2021, 6:43pm UTC](https://discourse.julialang.org/t/preparing-tutorials-and-books/59298 "2021-04-14T18:43:49Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![vector](https://avatars.discourse-cdn.com/v4/letter/v/dc4da7/32.png) [@vector](https://discourse.julialang.org/u/vector)\
**Post date:** [April 14, 2021, 6:43pm UTC](https://discourse.julialang.org/t/preparing-tutorials-and-books/59298/1 "2021-04-14T18:43:49Z")

</div>

Hi.

I am not sure whther this is the right category for posting my query. I cannot find the appropriate category.

What software or platform do you use for writing Julia languge tutorials and books?  
Is it the good old tex or are there any libraries availble for the purpose. I have tried using Weave. Its good for writing tutorials. What options are available for writing longer book length documents containing sections and chapters. R has the excellent bookdwn package. My document will contain many mathematical equations.

---

<div class="post-metadata">

**Author:** ![cormullion](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/cormullion/32/49131_2.png) [@cormullion](https://discourse.julialang.org/u/cormullion)\
**Post date:** [April 14, 2021, 7:16pm UTC](https://discourse.julialang.org/t/preparing-tutorials-and-books/59298/2 "2021-04-14T19:16:49Z")

</div>

You could look at [Publish.jl](https://github.com/MichaelHatherly/Publish.jl).

---

<div class="post-metadata">

**Author:** ![lmiq](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/lmiq/32/18314_2.png) [@lmiq](https://discourse.julialang.org/u/lmiq)\
**Post date:** [April 14, 2021, 7:44pm UTC](https://discourse.julialang.org/t/preparing-tutorials-and-books/59298/3 "2021-04-14T19:44:49Z")

</div>

> [@vector](#):
>
> Julia languge tutorials

[Pluto.jl](https://github.com/fonsp/Pluto.jl) maybe?

(I just found out that it is possible to create a table of contents in the notebook, and the looks are very nice, even if simply at the end one exports the notebook to html).

---

<div class="post-metadata">

**Author:** ![cormullion](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/cormullion/32/49131_2.png) [@cormullion](https://discourse.julialang.org/u/cormullion)\
**Post date:** [April 14, 2021, 8:04pm UTC](https://discourse.julialang.org/t/preparing-tutorials-and-books/59298/4 "2021-04-14T20:04:26Z")

</div>

Oops, I forgot [DocumenterEpub](https://github.com/laborg/DocumenterEpub.jl), which lets you use Documenter.jl to create Epub books.

---

<div class="post-metadata">

**Author:** ![EvoArt](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/evoart/32/25357_2.png) [@EvoArt](https://discourse.julialang.org/u/EvoArt)\
**Post date:** [April 14, 2021, 10:12pm UTC](https://discourse.julialang.org/t/preparing-tutorials-and-books/59298/5 "2021-04-14T22:12:22Z")

</div>

[![](https://global.discourse-cdn.com/julialang/original/3X/c/5/c53c4328f2e7a760fd6857a63f7483899da100c3.jpeg "JuliaCon 2019 | How We Wrote a Textbook using Julia") ](https://www.youtube.com/watch?v=ofWy5kaZU3g)

Might be of some help

---

<div class="post-metadata">

**Author:** ![vector](https://avatars.discourse-cdn.com/v4/letter/v/dc4da7/32.png) [@vector](https://discourse.julialang.org/u/vector)\
**Post date:** [April 15, 2021, 3:16am UTC](https://discourse.julialang.org/t/preparing-tutorials-and-books/59298/6 "2021-04-15T03:16:41Z")

</div>

Latex sounds like the best option.  
I am not sure how to include julia code and output in the tex document. Perhaps the listings package. I will give it a try.

---

<div class="post-metadata">

**Author:** ![liuyxpp](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/liuyxpp/32/9870_2.png) [@liuyxpp](https://discourse.julialang.org/u/liuyxpp)\
**Post date:** [April 15, 2021, 3:25am UTC](https://discourse.julialang.org/t/preparing-tutorials-and-books/59298/7 "2021-04-15T03:25:49Z")

</div>

Take a look at [GitHub - sisl/tufte\_algorithms\_book: A template for textbooks in the same style as Algorithms for Optimization](https://github.com/sisl/tufte_algorithms_book)

---

<div class="post-metadata">

**Author:** ![EvoArt](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/evoart/32/25357_2.png) [@EvoArt](https://discourse.julialang.org/u/EvoArt)\
**Post date:** [April 15, 2021, 6:19am UTC](https://discourse.julialang.org/t/preparing-tutorials-and-books/59298/8 "2021-04-15T06:19:27Z")

</div>

The video I posted is a talk by someone who wrote and published a textbook in LateX with Julia. They did this with the julia code being run as the book is compiled.

Also this topic has been discussed here: [What do you use to embed Julia code in LaTeX?](https://discourse.julialang.org/t/what-do-you-use-to-embed-julia-code-in-latex/23992)

This is also excellent if you with to produce talk slides with julia code embeded: [GitHub - mossr/julia-tufte-beamer: Tufte-style beamer template with Julia integration](https://github.com/mossr/julia-tufte-beamer)

---

<div class="post-metadata">

**Author:** ![cadojo](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/cadojo/32/25328_2.png) [@cadojo](https://discourse.julialang.org/u/cadojo)\
**Post date:** [June 25, 2021, 6:45pm UTC](https://discourse.julialang.org/t/preparing-tutorials-and-books/59298/9 "2021-06-25T18:45:36Z")

</div>

I came looking for a topic like this — I’m writing a [note-set](https://jcarpinelli.dev/ControlTheoryNotes.jl/stable) using `Documenter.jl`.

Maybe this is a bit niche, but for anyone else wanting to publish open source notes and textbooks online, would you have any interest in a separate Julia registry (not General) for hosting and tracking educational content?

---

<div class="post-metadata">

**Author:** ![Stefan\_Bringuier](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/stefan_bringuier/32/20132_2.png) [@Stefan\_Bringuier](https://discourse.julialang.org/u/Stefan_Bringuier)\
**Post date:** [September 20, 2022, 5:13pm UTC](https://discourse.julialang.org/t/preparing-tutorials-and-books/59298/10 "2022-09-20T17:13:22Z")

</div>

I would recommend taking a look at [Quarto](https://quarto.org/) which has support for [Julia](https://quarto.org/docs/computations/julia.html). I’ve used the setup from [SISL/TufteAlgorithmBook](https://github.com/sisl/tufte_algorithms_book) that @EvoArt mentioned, and it is fairly good, but the environment setup as well as customization is cumbersome. I wish there was a way to do it with [Pluto.jl](https://github.com/fonsp/Pluto.jl) by stitching notebooks together and somehow enabling crossref and references.

There is also [Books.jl](https://github.com/JuliaBooks/Books.jl) and [Franklin.jl](https://github.com/tlienart/Franklin.jl). In particular [Books.jl](https://github.com/JuliaBooks/Books.jl) looks nice and they have published [book](https://juliadatascience.io/) using it.

---

<div class="post-metadata">

**Author:** ![jmair](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/jmair/32/35117_2.png) [@jmair](https://discourse.julialang.org/u/jmair)\
**Post date:** [September 20, 2022, 5:37pm UTC](https://discourse.julialang.org/t/preparing-tutorials-and-books/59298/11 "2022-09-20T17:37:33Z")

</div>

I am currently using the Tufte algorithms template [GitHub - sisl/tufte\_algorithms\_book: A template for textbooks in the same style as Algorithms for Optimization](https://github.com/sisl/tufte_algorithms_book) to write a Julia textbook as referenced a lot in previous posts and it’s really good, but has some pain points. e.g. when wanting to write an algorithm and then use it in the console so I’ve had some work arounds to fix this. Overall, I would recommend it if you are already used to LaTeX and the book is quite long. Having the figures and graphs use the actual code you write is exceptionally useful.

The installation procedure can be a little tedious, but does work on any Linux machine, and I have got it to work on my Windows machine by using the `chocolatey` package manager to install the packages needed.

---

<div class="post-metadata">

**Author:** ![ctkelley](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ctkelley/32/10684_2.png) [@ctkelley](https://discourse.julialang.org/u/ctkelley)\
**Post date:** [September 20, 2022, 7:12pm UTC](https://discourse.julialang.org/t/preparing-tutorials-and-books/59298/12 "2022-09-20T19:12:45Z")

</div>

I’ve been [happy with LaTeX](https://my.siam.org/Store/Product/viewproduct/?ProductId=44313635), using the publisher’s style file, and IJulia. The mapping from notebook to/from print book is not trivial, but once you figure it out progress is fast. I just finished [such a project](https://discourse.julialang.org/t/ann-siamfanlequations-jl-v1-0-publication-release/86946) and had a great time.

If your book will have a significant software component, you should consider building a package for that. This will help you stay organized and give you a convenient way to do CI. I had a [very good experience](https://github.com/ctkelley/SIAMFANLEquations.jl) with this and it was much better than trying to do the same thing in Matlab and letting the publisher store the files.

Putting your examples in an IJulia [notebook](https://github.com/ctkelley/NotebookSIAMFANL) also keeps you organized.

There’s a [new Julia-based book](https://my.siam.org/Store/Product/viewproduct/?ProductId=41831895) that’s worth a look too.
