MakiePDF.jl

Author daizutabi
Popularity
0 Stars
Updated Last
4 Months Ago
Started In
December 2023

MakiePDF

A simple package for embedding PDF images in Jupyter notebooks.

Stable Dev Build Status Coverage PkgEval Code Style: Blue Aqua

Usage

In a Jupyter notebook (plot.ipynb), you can plot figures with CairoMakie.

img

PNG images are displayed on screen, while PDF images are embedded in the notebook.

Then, PDF images can be extracted from the notebook and saved as image files. For example,

using Base64
using JSON3

json_string = read("plot.ipynb", String)
nb = JSON3.read(json_string)
data = nb.cells[1].outputs[1].data["application/pdf"]

open("plot.pdf", "w") do f
    write(f, base64decode(data))
end

Saved images can be used in documentation processors such as LaTeX or Microsoft Word.

Used By Packages

No packages found.