TeX, PDF, SVG
Renders vector formats like TeX, PDF and SVG with no external dependencies
diff --git a/dev/404.html b/dev/404.html new file mode 100644 index 0000000..7c54a28 --- /dev/null +++ b/dev/404.html @@ -0,0 +1,22 @@ + + +
+ + +abstract type AbstractDocument
An AbstractDocument
must contain a document as a String or Vector{UInt8} of the full contents of whichever file it is using. It may contain additional fields - for example, PDFDocument
s contain a page number to indicate which page to display, in the case where a PDF has multiple pages.
AbstractDocument
s must implement the following functions:
getdoc(doc::AbstractDocument)::Union{Vector{UInt8}, String}
mimetype(doc::AbstractDocument)::Base.MIME
Cached(doc::AbstractDocument)::AbstractCachedDocument
getdoc(doc::AbstractDocument)::Union{Vector{UInt8}, String}
Return the document data (contents of the file) as a Vector{UInt8}
or String
. This must be the full file, i.e., if it was saved, the file should be immediately openable.
mimetype(::Type{<: AbstractDocument})::Base.MIME
+mimetype(::AbstractDocument)::Base.MIME
Return the MIME type of the document. For example, mimetype(::SVGDocument) == MIME("image/svg+xml")
.
Note
This is generally defined for the type, and there is a generic overload when passing a constructed object.
Cached(doc::AbstractDocument)::AbstractCachedDocument
Generic interface to cache a document and return it.
',3))]),e[145]||(e[145]=s("h3",{id:"AbstractCachedDocument",tabindex:"-1"},[s("code",null,"AbstractCachedDocument"),i(),s("a",{class:"header-anchor",href:"#AbstractCachedDocument","aria-label":'Permalink to "`AbstractCachedDocument` {#AbstractCachedDocument}"'},"")],-1)),s("details",b,[s("summary",null,[e[28]||(e[28]=s("a",{id:"MakieTeX.AbstractCachedDocument",href:"#MakieTeX.AbstractCachedDocument"},[s("span",{class:"jlbinding"},"MakieTeX.AbstractCachedDocument")],-1)),e[29]||(e[29]=i()),t(a,{type:"info",class:"jlObjectType jlType",text:"Type"})]),e[30]||(e[30]=l('abstract type AbstractCachedDocument
Cached documents are "loaded" versions of AbstractDocuments, and store a pointer/reference to the loaded version of the document (a Poppler handle for PDFs, or Rsvg handle for SVGs).
They also contain a Cairo surface to which the document has been rendered, as well as a cache of a rasterized PNG and its scale for performance reasons. See the documentation of rasterize
for more.
AbstractCachedDocument
s must implement the AbstractDocument
API, as well as the following:
rasterize(doc::AbstractCachedDocument, [scale::Real = 1])::Matrix{ARGB32}
draw_to_cairo_surface(doc::AbstractCachedDocument, surf::CairoSurface)
update_handle!(doc::AbstractCachedDocument)::<some_handle_type>
rasterize(doc::AbstractCachedDocument, scale::Real = 1)
Render a CachedDocument
to an image at a given scale. This is a convenience function which calls the appropriate rendering function for the document type. Returns an image as a Matrix{ARGB32}
.
draw_to_cairo_surface(doc::AbstractCachedDocument, surf::CairoSurface)
Render a CachedDocument
to a Cairo surface. This is a convenience function which calls the appropriate rendering function for the document type.
update_handle!(doc::AbstractCachedDocument)
Update the internal handle/pointer to the loaded document in a CachedDocument
, and returns it.
This function is used to refresh the handle/pointer to the loaded document in case it has been garbage collected or invalidated. It should return the updated handle/pointer.
For example, in CachedPDF
, this function would reload the PDF document using the doc.doc
field and update the ptr
field with the new Poppler handle, if it is found to be invalid.
Note that this function needs to be implemented for each concrete subtype of AbstractCachedDocument
, as the handle/pointer type and the method to load/update it will be different for different document types (e.g., PDF, SVG, etc.).
SVGDocument(svg::AbstractString)
A document type which stores an SVG string.
Is converted to CachedSVG
for use in plotting.
PDFDocument(pdf::AbstractString, [page = 0])
A document type which holds a raw PDF as a string.
Is converted to CachedPDF
for use in plotting.
TEXDocument(contents::AbstractString, add_defaults::Bool; requires, preamble, class, classoptions)
This constructor function creates a struct
of type TEXDocument
which can be passed to teximg
. All arguments are to be passed as strings.
If add_defaults
is false
, then we will not automatically add document structure. Note that in this case, keyword arguments will be disregarded and contents
must be a complete LaTeX document.
Available keyword arguments are:
requires
: code which comes before documentclass
in the preamble. Default: raw"\\RequirePackage{luatex85}"
.
class
: the document class. Default (and what you should use): "standalone"
.
classoptions
: the options you should pass to the class, i.e., \\documentclass[$classoptions]{$class}
. Default: "preview, tightpage, 12pt"
.
preamble
: arbitrary code for the preamble (between \\documentclass
and \\begin{document}
). Default: raw"\\usepackage{amsmath, xcolor} \\pagestyle{empty}"
.
See also CachedTEX
, compile_latex
, etc.
TypstDocument(contents::AbstractString, add_defaults::Bool; preamble)
This constructor function creates a struct
of type TypstDocument
. All arguments are to be passed as strings.
If add_defaults
is false
, then we will not automatically add document structure. Note that in this case, keyword arguments will be disregarded and contents
must be a complete Typst document.
Available keyword arguments are:
preamble
: arbitrary code inserted prior to the contents
. Default: ""
.See also CachedTypst
, compile_typst
, etc.
CachedTEX(doc::TEXDocument; kwargs...)
Compile a TEXDocument
, compile it and return the cached TeX object.
A CachedTEX
struct stores the document and its compiled form, as well as some pointers to in-program versions of it. It also stores the page dimensions.
In kwargs
, one can pass anything which goes to the internal function compile_latex
. These are primarily:
engine =
lualatex/
xelatex/...
: the LaTeX engine to use when rendering
options=
-file-line-error``: the options to pass tolatexmk
.
The constructor stores the following fields:
doc
pdf
ptr
surf
dims
Note
This is a mutable struct
because the pointer to the Poppler handle can change. TODO: make this an immutable struct with a Ref to the handle?? OR maybe even the surface itself...
Note
It is also possible to manually construct a CachedTEX
with nothing
in the doc
field, if you just want to insert a pre-rendered PDF into your figure.
CachedTypst(doc::TypstDocument)
Compile a TypstDocument
, compile it and return the cached Typst object.
A CachedTypst
struct stores the document and its compiled form, as well as some pointers to in-program versions of it. It also stores the page dimensions.
The constructor stores the following fields:
doc
pdf
ptr
surf
dims
Note
This is a mutable struct
because the pointer to the Poppler handle can change. TODO: make this an immutable struct with a Ref to the handle?? OR maybe even the surface itself...
Note
It is also possible to manually construct a CachedTypst
with nothing
in the doc
field, if you just want to insert a pre-rendered PDF into your figure.
CachedPDF(pdf::PDFDocument)
Holds a PDF document along with a Poppler handle and a Cairo surface to which it has already been rendered.
Usage
CachedPDF(read("path/to/pdf.pdf"), [page = 0])
+CachedPDF(read("path/to/pdf.pdf", String), [page = 0])
+CachedPDF(PDFDocument(...), [page = 0])
Fields
doc
: A reference to the PDFDocument
which is cached here.
ptr
: A pointer to the Poppler handle of the PDF. May be randomly GC'ed by Poppler.
dims
: The dimensions of the PDF page in points, for ease of access.
surf
: A Cairo surface to which Poppler has drawn the PDF. Permanent and cached.
image_cache
: A cache for a (rendered_image, scale_factor) pair. This is used to avoid re-rendering the PDF.
CachedSVG(svg::SVGDocument)
Holds an SVG document along with an Rsvg handle and a Cairo surface to which it has already been rendered.
Usage
CachedSVG(read("path/to/svg.svg"))
+CachedSVG(read("path/to/svg.svg", String))
+CachedSVG(SVGDocument(...))
Fields
doc
: The original SVGDocument
which is cached here, i.e., the text of that SVG.
handle
: A pointer to the Rsvg handle of the SVG. May be randomly GC'ed by Rsvg, so is stored as a Ref
in case it has to be refreshed.
dims
: The dimensions of the SVG in points, for ease of access.
surf
: A Cairo surface to which Rsvg has drawn the SVG. Permanent and cached.
image_cache
: A cache for a (rendered_image, scale_factor) pair. This is used to avoid re-rendering the PDF.
CachedTEX(doc::TEXDocument; kwargs...)
Compile a TEXDocument
, compile it and return the cached TeX object.
A CachedTEX
struct stores the document and its compiled form, as well as some pointers to in-program versions of it. It also stores the page dimensions.
In kwargs
, one can pass anything which goes to the internal function compile_latex
. These are primarily:
engine =
lualatex/
xelatex/...
: the LaTeX engine to use when rendering
options=
-file-line-error``: the options to pass tolatexmk
.
The constructor stores the following fields:
doc
pdf
ptr
surf
dims
Note
This is a mutable struct
because the pointer to the Poppler handle can change. TODO: make this an immutable struct with a Ref to the handle?? OR maybe even the surface itself...
Note
It is also possible to manually construct a CachedTEX
with nothing
in the doc
field, if you just want to insert a pre-rendered PDF into your figure.
CachedTypst(doc::TypstDocument)
Compile a TypstDocument
, compile it and return the cached Typst object.
A CachedTypst
struct stores the document and its compiled form, as well as some pointers to in-program versions of it. It also stores the page dimensions.
The constructor stores the following fields:
doc
pdf
ptr
surf
dims
Note
This is a mutable struct
because the pointer to the Poppler handle can change. TODO: make this an immutable struct with a Ref to the handle?? OR maybe even the surface itself...
Note
It is also possible to manually construct a CachedTypst
with nothing
in the doc
field, if you just want to insert a pre-rendered PDF into your figure.
EPSDocument(eps::AbstractString, [page = 0])
A document type which holds an EPS string.
Is converted to CachedPDF
for use in plotting.
MakieTeX.LTeX <: Block
No docstring defined.
Attributes
(type ?MakieTeX.LTeX.x
in the REPL for more information about attribute x
)
alignmode
, halign
, height
, padding
, render_density
, rotation
, scale
, tellheight
, tellwidth
, tex
, valign
, visible
, width
TEXDocument(contents::AbstractString, add_defaults::Bool; requires, preamble, class, classoptions)
This constructor function creates a struct
of type TEXDocument
which can be passed to teximg
. All arguments are to be passed as strings.
If add_defaults
is false
, then we will not automatically add document structure. Note that in this case, keyword arguments will be disregarded and contents
must be a complete LaTeX document.
Available keyword arguments are:
requires
: code which comes before documentclass
in the preamble. Default: raw"\\RequirePackage{luatex85}"
.
class
: the document class. Default (and what you should use): "standalone"
.
classoptions
: the options you should pass to the class, i.e., \\documentclass[$classoptions]{$class}
. Default: "preview, tightpage, 12pt"
.
preamble
: arbitrary code for the preamble (between \\documentclass
and \\begin{document}
). Default: raw"\\usepackage{amsmath, xcolor} \\pagestyle{empty}"
.
See also CachedTEX
, compile_latex
, etc.
TypstDocument(contents::AbstractString, add_defaults::Bool; preamble)
This constructor function creates a struct
of type TypstDocument
. All arguments are to be passed as strings.
If add_defaults
is false
, then we will not automatically add document structure. Note that in this case, keyword arguments will be disregarded and contents
must be a complete Typst document.
Available keyword arguments are:
preamble
: arbitrary code inserted prior to the contents
. Default: ""
.See also CachedTypst
, compile_typst
, etc.
compile_latex(document::AbstractString; tex_engine = CURRENT_TEX_ENGINE[], options = `-file-line-error`)
Compile the given document as a String and return the resulting PDF (also as a String).
',3))]),s("details",q,[s("summary",null,[e[93]||(e[93]=s("a",{id:"MakieTeX.compile_typst-Tuple{AbstractString}",href:"#MakieTeX.compile_typst-Tuple{AbstractString}"},[s("span",{class:"jlbinding"},"MakieTeX.compile_typst")],-1)),e[94]||(e[94]=i()),t(a,{type:"info",class:"jlObjectType jlMethod",text:"Method"})]),e[95]||(e[95]=l('compile_typst(document::AbstractString)
Compile the given document as a String and return the resulting PDF (also as a String).
',3))]),s("details",G,[s("summary",null,[e[96]||(e[96]=s("a",{id:"MakieTeX.crop_pdf-Tuple{String}",href:"#MakieTeX.crop_pdf-Tuple{String}"},[s("span",{class:"jlbinding"},"MakieTeX.crop_pdf")],-1)),e[97]||(e[97]=i()),t(a,{type:"info",class:"jlObjectType jlMethod",text:"Method"})]),e[98]||(e[98]=l('crop_pdf(path; margin = (0, 0, 0, 0))
Crop a PDF file using Ghostscript. This alters the crop box but does not actually remove elements.
',3))]),s("details",V,[s("summary",null,[e[99]||(e[99]=s("a",{id:"MakieTeX.get_pdf_bbox-Tuple{String}",href:"#MakieTeX.get_pdf_bbox-Tuple{String}"},[s("span",{class:"jlbinding"},"MakieTeX.get_pdf_bbox")],-1)),e[100]||(e[100]=i()),t(a,{type:"info",class:"jlObjectType jlMethod",text:"Method"})]),e[101]||(e[101]=l('get_pdf_bbox(path)
Get the bounding box of a PDF file using Ghostscript. Returns a tuple representing the (xmin, ymin, xmax, ymax) of the bounding box.
',3))]),s("details",U,[s("summary",null,[e[102]||(e[102]=s("a",{id:"MakieTeX.handle_render_document-Tuple{Cairo.CairoContext, Rsvg.RsvgHandle, MakieTeX._RsvgRectangle}",href:"#MakieTeX.handle_render_document-Tuple{Cairo.CairoContext, Rsvg.RsvgHandle, MakieTeX._RsvgRectangle}"},[s("span",{class:"jlbinding"},"MakieTeX.handle_render_document")],-1)),e[103]||(e[103]=i()),t(a,{type:"info",class:"jlObjectType jlMethod",text:"Method"})]),e[104]||(e[104]=s("p",null,"handle_render_document(cr::CairoContext, handle::RsvgHandle, viewport::_RsvgRectangle)",-1)),e[105]||(e[105]=s("p",null,[s("a",{href:"https://github.com/MakieOrg/MakieTeX.jl/blob/e63f98a532ae0f2ffaf2259d34ce4caf98896575/src/rendering/svg.jl#L45-L47",target:"_blank",rel:"noreferrer"},"source")],-1))]),s("details",_,[s("summary",null,[e[106]||(e[106]=s("a",{id:"MakieTeX.load_pdf-Tuple{String}",href:"#MakieTeX.load_pdf-Tuple{String}"},[s("span",{class:"jlbinding"},"MakieTeX.load_pdf")],-1)),e[107]||(e[107]=i()),t(a,{type:"info",class:"jlObjectType jlMethod",text:"Method"})]),e[108]||(e[108]=l(`load_pdf(pdf::String)::Ptr{Cvoid}
+load_pdf(pdf::Vector{UInt8})::Ptr{Cvoid}
Loads a PDF file into a Poppler document handle.
Input may be either a String or a Vector{UInt8}
, each representing the PDF file in memory.
Warn
The String input does NOT represent a filename!
page2img(ct::Union{CachedTeX, CachedTypst}, page::Int; scale = 1, render_density = 1)
Renders the page
of the given CachedTeX
or CachedTypst
object to an image, with the given scale
and render_density
.
This function reads the PDF using Poppler and renders it to a Cairo surface, which is then read as an image.
',4))]),s("details",$,[s("summary",null,[e[112]||(e[112]=s("a",{id:"MakieTeX.pdf_get_page_size-Tuple{Ptr{Nothing}, Int64}",href:"#MakieTeX.pdf_get_page_size-Tuple{Ptr{Nothing}, Int64}"},[s("span",{class:"jlbinding"},"MakieTeX.pdf_get_page_size")],-1)),e[113]||(e[113]=i()),t(a,{type:"info",class:"jlObjectType jlMethod",text:"Method"})]),e[114]||(e[114]=l('pdf_get_page_size(document::Ptr{Cvoid}, page_number::Int)::Tuple{Float64, Float64}
document
must be a Poppler document handle. Returns a tuple of width, height
.
pdf_num_pages(document::Ptr{Cvoid})::Int
document
must be a Poppler document handle. Returns the number of pages in the document.
pdf_num_pages(filename::String)::Int
Returns the number of pages in a PDF file located at filename
, using the Poppler executable.
split_pdf(pdf::Union{Vector{UInt8}, String})::Vector{UInt8}
Splits a PDF into its constituent pages, returning a Vector of UInt8 arrays, each representing a page.
The input must be a PDF file, either as a String or as a Vector{UInt8} of the PDF's bytes.
Warn
The input String does NOT represent a filename!
This uses Ghostscript to actually split the PDF and return PDF files. If you just want to render the PDF, use load_pdf
and page2img
instead.
texdoc(contents::AbstractString; kwargs...)
A shorthand for TEXDocument(contents, add_defaults=true; kwargs...)
.
Available keyword arguments are:
requires
: code which comes before documentclass
in the preamble. Default: raw"\\RequirePackage{luatex85}"
.
class
: the document class. Default (and what you should use): "standalone"
.
classoptions
: the options you should pass to the class, i.e., \\documentclass[$classoptions]{$class}
. Default: "preview, tightpage, 12pt"
.
preamble
: arbitrary code for the preamble (between \\documentclass
and \\begin{document}
). Default: raw"\\usepackage{amsmath, xcolor} \\pagestyle{empty}"
.
teximg(tex; position, ...)
+teximg!(ax_or_scene, tex; position, ...)
This recipe plots rendered TeX
to your Figure or Scene.
There are three types of input you can provide:
Any String
, which is rendered to LaTeX cognizant of the figure's overall theme,
A TeXDocument
object, which is rendered to LaTeX directly, and can be customized by the user,
A CachedTeX
object, which is a pre-rendered LaTeX document.
tex
may be a single one of these objects, or an array of them.
Attributes
Available attributes and their defaults for MakieCore.Plot{MakieTeX.teximg}
are:
align (:center, :center)
+ clip_planes MakieCore.Automatic()
+ depth_shift 0.0f0
+ inspectable true
+ inspector_clear MakieCore.Automatic()
+ inspector_hover MakieCore.Automatic()
+ inspector_label MakieCore.Automatic()
+ markerspace :pixel
+ overdraw false
+ position GeometryBasics.Point{2, Float32}[[0.0, 0.0]]
+ render_density 2
+ rotation Float32[0.0]
+ scale 1.0
+ space :data
+ ssao false
+ transparency false
+ visible true
typstdoc(contents::AbstractString; kwargs...)
A shorthand for TypstDocument(contents, add_defaults=true; kwargs...)
.
Available keyword arguments are:
preamble
: arbitrary code inserted prior to the contents
. Default: ""
.abstract type AbstractDocument
An AbstractDocument
must contain a document as a String or Vector{UInt8} of the full contents of whichever file it is using. It may contain additional fields - for example, PDFDocument
s contain a page number to indicate which page to display, in the case where a PDF has multiple pages.
AbstractDocument
s must implement the following functions:
getdoc(doc::AbstractDocument)::Union{Vector{UInt8}, String}
mimetype(doc::AbstractDocument)::Base.MIME
Cached(doc::AbstractDocument)::AbstractCachedDocument
getdoc(doc::AbstractDocument)::Union{Vector{UInt8}, String}
Return the document data (contents of the file) as a Vector{UInt8}
or String
. This must be the full file, i.e., if it was saved, the file should be immediately openable.
mimetype(::Type{<: AbstractDocument})::Base.MIME
+mimetype(::AbstractDocument)::Base.MIME
Return the MIME type of the document. For example, mimetype(::SVGDocument) == MIME("image/svg+xml")
.
Note
This is generally defined for the type, and there is a generic overload when passing a constructed object.
Cached(doc::AbstractDocument)::AbstractCachedDocument
Generic interface to cache a document and return it.
',3))]),e[145]||(e[145]=s("h3",{id:"AbstractCachedDocument",tabindex:"-1"},[s("code",null,"AbstractCachedDocument"),i(),s("a",{class:"header-anchor",href:"#AbstractCachedDocument","aria-label":'Permalink to "`AbstractCachedDocument` {#AbstractCachedDocument}"'},"")],-1)),s("details",b,[s("summary",null,[e[28]||(e[28]=s("a",{id:"MakieTeX.AbstractCachedDocument",href:"#MakieTeX.AbstractCachedDocument"},[s("span",{class:"jlbinding"},"MakieTeX.AbstractCachedDocument")],-1)),e[29]||(e[29]=i()),t(a,{type:"info",class:"jlObjectType jlType",text:"Type"})]),e[30]||(e[30]=l('abstract type AbstractCachedDocument
Cached documents are "loaded" versions of AbstractDocuments, and store a pointer/reference to the loaded version of the document (a Poppler handle for PDFs, or Rsvg handle for SVGs).
They also contain a Cairo surface to which the document has been rendered, as well as a cache of a rasterized PNG and its scale for performance reasons. See the documentation of rasterize
for more.
AbstractCachedDocument
s must implement the AbstractDocument
API, as well as the following:
rasterize(doc::AbstractCachedDocument, [scale::Real = 1])::Matrix{ARGB32}
draw_to_cairo_surface(doc::AbstractCachedDocument, surf::CairoSurface)
update_handle!(doc::AbstractCachedDocument)::<some_handle_type>
rasterize(doc::AbstractCachedDocument, scale::Real = 1)
Render a CachedDocument
to an image at a given scale. This is a convenience function which calls the appropriate rendering function for the document type. Returns an image as a Matrix{ARGB32}
.
draw_to_cairo_surface(doc::AbstractCachedDocument, surf::CairoSurface)
Render a CachedDocument
to a Cairo surface. This is a convenience function which calls the appropriate rendering function for the document type.
update_handle!(doc::AbstractCachedDocument)
Update the internal handle/pointer to the loaded document in a CachedDocument
, and returns it.
This function is used to refresh the handle/pointer to the loaded document in case it has been garbage collected or invalidated. It should return the updated handle/pointer.
For example, in CachedPDF
, this function would reload the PDF document using the doc.doc
field and update the ptr
field with the new Poppler handle, if it is found to be invalid.
Note that this function needs to be implemented for each concrete subtype of AbstractCachedDocument
, as the handle/pointer type and the method to load/update it will be different for different document types (e.g., PDF, SVG, etc.).
SVGDocument(svg::AbstractString)
A document type which stores an SVG string.
Is converted to CachedSVG
for use in plotting.
PDFDocument(pdf::AbstractString, [page = 0])
A document type which holds a raw PDF as a string.
Is converted to CachedPDF
for use in plotting.
TEXDocument(contents::AbstractString, add_defaults::Bool; requires, preamble, class, classoptions)
This constructor function creates a struct
of type TEXDocument
which can be passed to teximg
. All arguments are to be passed as strings.
If add_defaults
is false
, then we will not automatically add document structure. Note that in this case, keyword arguments will be disregarded and contents
must be a complete LaTeX document.
Available keyword arguments are:
requires
: code which comes before documentclass
in the preamble. Default: raw"\\RequirePackage{luatex85}"
.
class
: the document class. Default (and what you should use): "standalone"
.
classoptions
: the options you should pass to the class, i.e., \\documentclass[$classoptions]{$class}
. Default: "preview, tightpage, 12pt"
.
preamble
: arbitrary code for the preamble (between \\documentclass
and \\begin{document}
). Default: raw"\\usepackage{amsmath, xcolor} \\pagestyle{empty}"
.
See also CachedTEX
, compile_latex
, etc.
TypstDocument(contents::AbstractString, add_defaults::Bool; preamble)
This constructor function creates a struct
of type TypstDocument
. All arguments are to be passed as strings.
If add_defaults
is false
, then we will not automatically add document structure. Note that in this case, keyword arguments will be disregarded and contents
must be a complete Typst document.
Available keyword arguments are:
preamble
: arbitrary code inserted prior to the contents
. Default: ""
.See also CachedTypst
, compile_typst
, etc.
CachedTEX(doc::TEXDocument; kwargs...)
Compile a TEXDocument
, compile it and return the cached TeX object.
A CachedTEX
struct stores the document and its compiled form, as well as some pointers to in-program versions of it. It also stores the page dimensions.
In kwargs
, one can pass anything which goes to the internal function compile_latex
. These are primarily:
engine =
lualatex/
xelatex/...
: the LaTeX engine to use when rendering
options=
-file-line-error``: the options to pass tolatexmk
.
The constructor stores the following fields:
doc
pdf
ptr
surf
dims
Note
This is a mutable struct
because the pointer to the Poppler handle can change. TODO: make this an immutable struct with a Ref to the handle?? OR maybe even the surface itself...
Note
It is also possible to manually construct a CachedTEX
with nothing
in the doc
field, if you just want to insert a pre-rendered PDF into your figure.
CachedTypst(doc::TypstDocument)
Compile a TypstDocument
, compile it and return the cached Typst object.
A CachedTypst
struct stores the document and its compiled form, as well as some pointers to in-program versions of it. It also stores the page dimensions.
The constructor stores the following fields:
doc
pdf
ptr
surf
dims
Note
This is a mutable struct
because the pointer to the Poppler handle can change. TODO: make this an immutable struct with a Ref to the handle?? OR maybe even the surface itself...
Note
It is also possible to manually construct a CachedTypst
with nothing
in the doc
field, if you just want to insert a pre-rendered PDF into your figure.
CachedPDF(pdf::PDFDocument)
Holds a PDF document along with a Poppler handle and a Cairo surface to which it has already been rendered.
Usage
CachedPDF(read("path/to/pdf.pdf"), [page = 0])
+CachedPDF(read("path/to/pdf.pdf", String), [page = 0])
+CachedPDF(PDFDocument(...), [page = 0])
Fields
doc
: A reference to the PDFDocument
which is cached here.
ptr
: A pointer to the Poppler handle of the PDF. May be randomly GC'ed by Poppler.
dims
: The dimensions of the PDF page in points, for ease of access.
surf
: A Cairo surface to which Poppler has drawn the PDF. Permanent and cached.
image_cache
: A cache for a (rendered_image, scale_factor) pair. This is used to avoid re-rendering the PDF.
CachedSVG(svg::SVGDocument)
Holds an SVG document along with an Rsvg handle and a Cairo surface to which it has already been rendered.
Usage
CachedSVG(read("path/to/svg.svg"))
+CachedSVG(read("path/to/svg.svg", String))
+CachedSVG(SVGDocument(...))
Fields
doc
: The original SVGDocument
which is cached here, i.e., the text of that SVG.
handle
: A pointer to the Rsvg handle of the SVG. May be randomly GC'ed by Rsvg, so is stored as a Ref
in case it has to be refreshed.
dims
: The dimensions of the SVG in points, for ease of access.
surf
: A Cairo surface to which Rsvg has drawn the SVG. Permanent and cached.
image_cache
: A cache for a (rendered_image, scale_factor) pair. This is used to avoid re-rendering the PDF.
CachedTEX(doc::TEXDocument; kwargs...)
Compile a TEXDocument
, compile it and return the cached TeX object.
A CachedTEX
struct stores the document and its compiled form, as well as some pointers to in-program versions of it. It also stores the page dimensions.
In kwargs
, one can pass anything which goes to the internal function compile_latex
. These are primarily:
engine =
lualatex/
xelatex/...
: the LaTeX engine to use when rendering
options=
-file-line-error``: the options to pass tolatexmk
.
The constructor stores the following fields:
doc
pdf
ptr
surf
dims
Note
This is a mutable struct
because the pointer to the Poppler handle can change. TODO: make this an immutable struct with a Ref to the handle?? OR maybe even the surface itself...
Note
It is also possible to manually construct a CachedTEX
with nothing
in the doc
field, if you just want to insert a pre-rendered PDF into your figure.
CachedTypst(doc::TypstDocument)
Compile a TypstDocument
, compile it and return the cached Typst object.
A CachedTypst
struct stores the document and its compiled form, as well as some pointers to in-program versions of it. It also stores the page dimensions.
The constructor stores the following fields:
doc
pdf
ptr
surf
dims
Note
This is a mutable struct
because the pointer to the Poppler handle can change. TODO: make this an immutable struct with a Ref to the handle?? OR maybe even the surface itself...
Note
It is also possible to manually construct a CachedTypst
with nothing
in the doc
field, if you just want to insert a pre-rendered PDF into your figure.
EPSDocument(eps::AbstractString, [page = 0])
A document type which holds an EPS string.
Is converted to CachedPDF
for use in plotting.
MakieTeX.LTeX <: Block
No docstring defined.
Attributes
(type ?MakieTeX.LTeX.x
in the REPL for more information about attribute x
)
alignmode
, halign
, height
, padding
, render_density
, rotation
, scale
, tellheight
, tellwidth
, tex
, valign
, visible
, width
TEXDocument(contents::AbstractString, add_defaults::Bool; requires, preamble, class, classoptions)
This constructor function creates a struct
of type TEXDocument
which can be passed to teximg
. All arguments are to be passed as strings.
If add_defaults
is false
, then we will not automatically add document structure. Note that in this case, keyword arguments will be disregarded and contents
must be a complete LaTeX document.
Available keyword arguments are:
requires
: code which comes before documentclass
in the preamble. Default: raw"\\RequirePackage{luatex85}"
.
class
: the document class. Default (and what you should use): "standalone"
.
classoptions
: the options you should pass to the class, i.e., \\documentclass[$classoptions]{$class}
. Default: "preview, tightpage, 12pt"
.
preamble
: arbitrary code for the preamble (between \\documentclass
and \\begin{document}
). Default: raw"\\usepackage{amsmath, xcolor} \\pagestyle{empty}"
.
See also CachedTEX
, compile_latex
, etc.
TypstDocument(contents::AbstractString, add_defaults::Bool; preamble)
This constructor function creates a struct
of type TypstDocument
. All arguments are to be passed as strings.
If add_defaults
is false
, then we will not automatically add document structure. Note that in this case, keyword arguments will be disregarded and contents
must be a complete Typst document.
Available keyword arguments are:
preamble
: arbitrary code inserted prior to the contents
. Default: ""
.See also CachedTypst
, compile_typst
, etc.
compile_latex(document::AbstractString; tex_engine = CURRENT_TEX_ENGINE[], options = `-file-line-error`)
Compile the given document as a String and return the resulting PDF (also as a String).
',3))]),s("details",q,[s("summary",null,[e[93]||(e[93]=s("a",{id:"MakieTeX.compile_typst-Tuple{AbstractString}",href:"#MakieTeX.compile_typst-Tuple{AbstractString}"},[s("span",{class:"jlbinding"},"MakieTeX.compile_typst")],-1)),e[94]||(e[94]=i()),t(a,{type:"info",class:"jlObjectType jlMethod",text:"Method"})]),e[95]||(e[95]=l('compile_typst(document::AbstractString)
Compile the given document as a String and return the resulting PDF (also as a String).
',3))]),s("details",G,[s("summary",null,[e[96]||(e[96]=s("a",{id:"MakieTeX.crop_pdf-Tuple{String}",href:"#MakieTeX.crop_pdf-Tuple{String}"},[s("span",{class:"jlbinding"},"MakieTeX.crop_pdf")],-1)),e[97]||(e[97]=i()),t(a,{type:"info",class:"jlObjectType jlMethod",text:"Method"})]),e[98]||(e[98]=l('crop_pdf(path; margin = (0, 0, 0, 0))
Crop a PDF file using Ghostscript. This alters the crop box but does not actually remove elements.
',3))]),s("details",V,[s("summary",null,[e[99]||(e[99]=s("a",{id:"MakieTeX.get_pdf_bbox-Tuple{String}",href:"#MakieTeX.get_pdf_bbox-Tuple{String}"},[s("span",{class:"jlbinding"},"MakieTeX.get_pdf_bbox")],-1)),e[100]||(e[100]=i()),t(a,{type:"info",class:"jlObjectType jlMethod",text:"Method"})]),e[101]||(e[101]=l('get_pdf_bbox(path)
Get the bounding box of a PDF file using Ghostscript. Returns a tuple representing the (xmin, ymin, xmax, ymax) of the bounding box.
',3))]),s("details",U,[s("summary",null,[e[102]||(e[102]=s("a",{id:"MakieTeX.handle_render_document-Tuple{Cairo.CairoContext, Rsvg.RsvgHandle, MakieTeX._RsvgRectangle}",href:"#MakieTeX.handle_render_document-Tuple{Cairo.CairoContext, Rsvg.RsvgHandle, MakieTeX._RsvgRectangle}"},[s("span",{class:"jlbinding"},"MakieTeX.handle_render_document")],-1)),e[103]||(e[103]=i()),t(a,{type:"info",class:"jlObjectType jlMethod",text:"Method"})]),e[104]||(e[104]=s("p",null,"handle_render_document(cr::CairoContext, handle::RsvgHandle, viewport::_RsvgRectangle)",-1)),e[105]||(e[105]=s("p",null,[s("a",{href:"https://github.com/MakieOrg/MakieTeX.jl/blob/e63f98a532ae0f2ffaf2259d34ce4caf98896575/src/rendering/svg.jl#L45-L47",target:"_blank",rel:"noreferrer"},"source")],-1))]),s("details",_,[s("summary",null,[e[106]||(e[106]=s("a",{id:"MakieTeX.load_pdf-Tuple{String}",href:"#MakieTeX.load_pdf-Tuple{String}"},[s("span",{class:"jlbinding"},"MakieTeX.load_pdf")],-1)),e[107]||(e[107]=i()),t(a,{type:"info",class:"jlObjectType jlMethod",text:"Method"})]),e[108]||(e[108]=l(`load_pdf(pdf::String)::Ptr{Cvoid}
+load_pdf(pdf::Vector{UInt8})::Ptr{Cvoid}
Loads a PDF file into a Poppler document handle.
Input may be either a String or a Vector{UInt8}
, each representing the PDF file in memory.
Warn
The String input does NOT represent a filename!
page2img(ct::Union{CachedTeX, CachedTypst}, page::Int; scale = 1, render_density = 1)
Renders the page
of the given CachedTeX
or CachedTypst
object to an image, with the given scale
and render_density
.
This function reads the PDF using Poppler and renders it to a Cairo surface, which is then read as an image.
',4))]),s("details",$,[s("summary",null,[e[112]||(e[112]=s("a",{id:"MakieTeX.pdf_get_page_size-Tuple{Ptr{Nothing}, Int64}",href:"#MakieTeX.pdf_get_page_size-Tuple{Ptr{Nothing}, Int64}"},[s("span",{class:"jlbinding"},"MakieTeX.pdf_get_page_size")],-1)),e[113]||(e[113]=i()),t(a,{type:"info",class:"jlObjectType jlMethod",text:"Method"})]),e[114]||(e[114]=l('pdf_get_page_size(document::Ptr{Cvoid}, page_number::Int)::Tuple{Float64, Float64}
document
must be a Poppler document handle. Returns a tuple of width, height
.
pdf_num_pages(document::Ptr{Cvoid})::Int
document
must be a Poppler document handle. Returns the number of pages in the document.
pdf_num_pages(filename::String)::Int
Returns the number of pages in a PDF file located at filename
, using the Poppler executable.
split_pdf(pdf::Union{Vector{UInt8}, String})::Vector{UInt8}
Splits a PDF into its constituent pages, returning a Vector of UInt8 arrays, each representing a page.
The input must be a PDF file, either as a String or as a Vector{UInt8} of the PDF's bytes.
Warn
The input String does NOT represent a filename!
This uses Ghostscript to actually split the PDF and return PDF files. If you just want to render the PDF, use load_pdf
and page2img
instead.
texdoc(contents::AbstractString; kwargs...)
A shorthand for TEXDocument(contents, add_defaults=true; kwargs...)
.
Available keyword arguments are:
requires
: code which comes before documentclass
in the preamble. Default: raw"\\RequirePackage{luatex85}"
.
class
: the document class. Default (and what you should use): "standalone"
.
classoptions
: the options you should pass to the class, i.e., \\documentclass[$classoptions]{$class}
. Default: "preview, tightpage, 12pt"
.
preamble
: arbitrary code for the preamble (between \\documentclass
and \\begin{document}
). Default: raw"\\usepackage{amsmath, xcolor} \\pagestyle{empty}"
.
teximg(tex; position, ...)
+teximg!(ax_or_scene, tex; position, ...)
This recipe plots rendered TeX
to your Figure or Scene.
There are three types of input you can provide:
Any String
, which is rendered to LaTeX cognizant of the figure's overall theme,
A TeXDocument
object, which is rendered to LaTeX directly, and can be customized by the user,
A CachedTeX
object, which is a pre-rendered LaTeX document.
tex
may be a single one of these objects, or an array of them.
Attributes
Available attributes and their defaults for MakieCore.Plot{MakieTeX.teximg}
are:
align (:center, :center)
+ clip_planes MakieCore.Automatic()
+ depth_shift 0.0f0
+ inspectable true
+ inspector_clear MakieCore.Automatic()
+ inspector_hover MakieCore.Automatic()
+ inspector_label MakieCore.Automatic()
+ markerspace :pixel
+ overdraw false
+ position GeometryBasics.Point{2, Float32}[[0.0, 0.0]]
+ render_density 2
+ rotation Float32[0.0]
+ scale 1.0
+ space :data
+ ssao false
+ transparency false
+ visible true
typstdoc(contents::AbstractString; kwargs...)
A shorthand for TypstDocument(contents, add_defaults=true; kwargs...)
.
Available keyword arguments are:
preamble
: arbitrary code inserted prior to the contents
. Default: ""
.MakieTeX allows rendering PDF, SVG, and TeX documents in Makie. The easiest way to construct these is to use the constructors of the form:
using MakieTeX, CairoMakie
+# Any of the below things could be used in place of the other.
+# However, \`scatter\` will not accept LaTeXStrings as markers.
+latex_string = L"\\int_0^\\pi \\sin(x)^2 dx"
+tex_document = TEXDocument(latex_string)
+cached_tex = CachedTEX(tex_document)
+
+fig = Figure()
+# use the teximg recipe
+teximg(fig[1, 1], latex_string)
+# use the LTeX block
+LTeX(fig[1, 2], tex_document)
+# use the latex as a scatter marker
+scatter(fig[2, 1], rand(10), rand(10), marker=cached_tex, markersize = 50)
+fig
You can also pass a full LaTeX document if you wish:
using MakieTeX, CairoMakie
+doc = raw"""
+% A Venn diagram with PDF blending
+% Author: Stefan Kottwitz
+% https://www.packtpub.com/hardware-and-creative/latex-cookbook
+\\documentclass[border=10pt]{standalone}
+\\usepackage{tikz}
+\\begin{document}
+\\begin{tikzpicture}
+ \\begin{scope}[blend group = soft light]
+ \\fill[red!30!white] ( 90:1.2) circle (2);
+ \\fill[green!30!white] (210:1.2) circle (2);
+ \\fill[blue!30!white] (330:1.2) circle (2);
+ \\end{scope}
+ \\node at ( 90:2) {Typography};
+ \\node at ( 210:2) {Design};
+ \\node at ( 330:2) {Coding};
+ \\node [font=\\Large] {\\LaTeX};
+\\end{tikzpicture}
+\\end{document}
+"""
+
+tex_document = TEXDocument(doc)
+
+fig = Figure()
+# use the teximg recipe
+teximg(fig[1, 1], tex_document)
+# use the LTeX block
+LTeX(fig[1, 2], tex_document)
+# use the latex as a scatter marker
+scatter(fig[2, 1], rand(10), rand(10), marker=tex_document, markersize = 50)
+fig
using MakieTeX, CairoMakie
+
+typst_string = typst"$ integral_0^pi sin(x)^2 dif x $";
+typst_document = TypstDocument(typst_string);
+cached_typst = CachedTypst(typst_document);
+
+fig = Figure();
+LTeX(fig[1, 1], typst_document; scale = 2);
+scatter(fig[2, 1], rand(10), rand(10), marker=cached_typst, markersize = 50)
+fig
using MakieTeX, CairoMakie
+pdf_doc = PDFDocument(read(download("https://upload.wikimedia.org/wikipedia/commons/0/05/Wikipedia-logo-big-fr.pdf")));
+fig = Figure()
+# use the teximg recipe
+teximg(fig[1, 1], pdf_doc)
+# use the LTeX block
+# LTeX(fig[1, 2], pdf_doc)
+# use the latex as a scatter marker
+scatter(fig[2, 1], rand(5), rand(5), marker=Cached(pdf_doc), markersize = 50)
+fig
The same thing as PDF applies to SVG.
However, if you are using scatter in CairoMakie, then the SVG will be colored by the color of the marker. This is not the case in WGLMakie or GLMakie.
See below for an example:
using MakieTeX, CairoMakie
+svg = SVGDocument(read(download("https://raw.githubusercontent.com/file-icons/icons/master/svg/Go-Old.svg"), String));
+fig = Figure()
+scatter(fig[1, 1], rand(10), rand(10), marker=Cached(svg), markersize = 50)
+scatter!(rand(5), rand(5), marker=Cached(svg), markersize = 50, strokecolor = :green, strokewidth = 7)
+fig
MakieTeX allows rendering PDF, SVG, and TeX documents in Makie. The easiest way to construct these is to use the constructors of the form:
using MakieTeX, CairoMakie
+# Any of the below things could be used in place of the other.
+# However, \`scatter\` will not accept LaTeXStrings as markers.
+latex_string = L"\\int_0^\\pi \\sin(x)^2 dx"
+tex_document = TEXDocument(latex_string)
+cached_tex = CachedTEX(tex_document)
+
+fig = Figure()
+# use the teximg recipe
+teximg(fig[1, 1], latex_string)
+# use the LTeX block
+LTeX(fig[1, 2], tex_document)
+# use the latex as a scatter marker
+scatter(fig[2, 1], rand(10), rand(10), marker=cached_tex, markersize = 50)
+fig
You can also pass a full LaTeX document if you wish:
using MakieTeX, CairoMakie
+doc = raw"""
+% A Venn diagram with PDF blending
+% Author: Stefan Kottwitz
+% https://www.packtpub.com/hardware-and-creative/latex-cookbook
+\\documentclass[border=10pt]{standalone}
+\\usepackage{tikz}
+\\begin{document}
+\\begin{tikzpicture}
+ \\begin{scope}[blend group = soft light]
+ \\fill[red!30!white] ( 90:1.2) circle (2);
+ \\fill[green!30!white] (210:1.2) circle (2);
+ \\fill[blue!30!white] (330:1.2) circle (2);
+ \\end{scope}
+ \\node at ( 90:2) {Typography};
+ \\node at ( 210:2) {Design};
+ \\node at ( 330:2) {Coding};
+ \\node [font=\\Large] {\\LaTeX};
+\\end{tikzpicture}
+\\end{document}
+"""
+
+tex_document = TEXDocument(doc)
+
+fig = Figure()
+# use the teximg recipe
+teximg(fig[1, 1], tex_document)
+# use the LTeX block
+LTeX(fig[1, 2], tex_document)
+# use the latex as a scatter marker
+scatter(fig[2, 1], rand(10), rand(10), marker=tex_document, markersize = 50)
+fig
using MakieTeX, CairoMakie
+
+typst_string = typst"$ integral_0^pi sin(x)^2 dif x $";
+typst_document = TypstDocument(typst_string);
+cached_typst = CachedTypst(typst_document);
+
+fig = Figure();
+LTeX(fig[1, 1], typst_document; scale = 2);
+scatter(fig[2, 1], rand(10), rand(10), marker=cached_typst, markersize = 50)
+fig
using MakieTeX, CairoMakie
+pdf_doc = PDFDocument(read(download("https://upload.wikimedia.org/wikipedia/commons/0/05/Wikipedia-logo-big-fr.pdf")));
+fig = Figure()
+# use the teximg recipe
+teximg(fig[1, 1], pdf_doc)
+# use the LTeX block
+# LTeX(fig[1, 2], pdf_doc)
+# use the latex as a scatter marker
+scatter(fig[2, 1], rand(5), rand(5), marker=Cached(pdf_doc), markersize = 50)
+fig
The same thing as PDF applies to SVG.
However, if you are using scatter in CairoMakie, then the SVG will be colored by the color of the marker. This is not the case in WGLMakie or GLMakie.
See below for an example:
using MakieTeX, CairoMakie
+svg = SVGDocument(read(download("https://raw.githubusercontent.com/file-icons/icons/master/svg/Go-Old.svg"), String));
+fig = Figure()
+scatter(fig[1, 1], rand(10), rand(10), marker=Cached(svg), markersize = 50)
+scatter!(rand(5), rand(5), marker=Cached(svg), markersize = 50, strokecolor = :green, strokewidth = 7)
+fig
MakieTeX is a package that allows users to plot vector images - PDF, SVG, and TeX (which compiles to PDF) directly in Makie. It exposes two approaches: the teximg
recipe which plots any LaTeX-like object, and the CachedDocument
API which allows users to plot documents directly as scatter
markers.
To see a list of all exported functions, types, and macros, see the API page.
using MakieTeX, CairoMakie
+
+teximg(raw"""
+\\begin{align*}
+\\frac{1}{2} \\times \\frac{1}{2} = \\frac{1}{4}
+\\end{align*}
+""")
Rendering can occur either to a bitmap (for GL backends) or to a Cairo surface (for CairoMakie). Both of these have APIs (rasterize
and draw_to_cairo_surface
).
Each rendering format has its own complexities, so the rendering pipelines are usually separate. SVG uses librsvg while PDF and EPS use Poppler directly. TeX uses the available local TeX renderer (if not, tectonic
is bundled with MakieTeX) and Typst uses Typst_jll.jl to render to a PDF, which then each follow the Poppler pipeline.
When rendering to Makie, MakieTeX rasterizes the document to a bitmap by default via the Makie attribute conversion pipeline (specifically Makie.to_spritemarker
), and then Makie treats it like a general image scatter marker.
HOWEVER, when rendering with CairoMakie, there is a function hook to get the correct marker for Cairo specifically, ignoring the default Makie conversion pipeline. This is CairoMakie.cairo_scatter_marker
, and we overload it in MakieTeX.MakieTeXCairoMakieExt
to get the correct marker. This also allows us to apply styling to SVG elements, but again ONLY IN CAIROMAKIE! This is a bit of an incompatibility and a breaking of the implicit promise from Makie that rendering should be the same across backends, but the tradeoff is (to me, at least) worth it.
MakieTeX is a package that allows users to plot vector images - PDF, SVG, and TeX (which compiles to PDF) directly in Makie. It exposes two approaches: the teximg
recipe which plots any LaTeX-like object, and the CachedDocument
API which allows users to plot documents directly as scatter
markers.
To see a list of all exported functions, types, and macros, see the API page.
using MakieTeX, CairoMakie
+
+teximg(raw"""
+\\begin{align*}
+\\frac{1}{2} \\times \\frac{1}{2} = \\frac{1}{4}
+\\end{align*}
+""")
Rendering can occur either to a bitmap (for GL backends) or to a Cairo surface (for CairoMakie). Both of these have APIs (rasterize
and draw_to_cairo_surface
).
Each rendering format has its own complexities, so the rendering pipelines are usually separate. SVG uses librsvg while PDF and EPS use Poppler directly. TeX uses the available local TeX renderer (if not, tectonic
is bundled with MakieTeX) and Typst uses Typst_jll.jl to render to a PDF, which then each follow the Poppler pipeline.
When rendering to Makie, MakieTeX rasterizes the document to a bitmap by default via the Makie attribute conversion pipeline (specifically Makie.to_spritemarker
), and then Makie treats it like a general image scatter marker.
HOWEVER, when rendering with CairoMakie, there is a function hook to get the correct marker for Cairo specifically, ignoring the default Makie conversion pipeline. This is CairoMakie.cairo_scatter_marker
, and we overload it in MakieTeX.MakieTeXCairoMakieExt
to get the correct marker. This also allows us to apply styling to SVG elements, but again ONLY IN CAIROMAKIE! This is a bit of an incompatibility and a breaking of the implicit promise from Makie that rendering should be the same across backends, but the tradeoff is (to me, at least) worth it.
MakieTeX is a package that allows users to plot vector images - PDF, SVG, and TeX (which compiles to PDF) directly in Makie. It exposes two approaches: the teximg
recipe which plots any LaTeX-like object, and the CachedDocument
API which allows users to plot documents directly as scatter
markers.
To see a list of all exported functions, types, and macros, see the API page.
using MakieTeX, CairoMakie
+
+teximg(raw"""
+\begin{align*}
+\frac{1}{2} \times \frac{1}{2} = \frac{1}{4}
+\end{align*}
+""")
Rendering can occur either to a bitmap (for GL backends) or to a Cairo surface (for CairoMakie). Both of these have APIs (rasterize
and draw_to_cairo_surface
).
Each rendering format has its own complexities, so the rendering pipelines are usually separate. SVG uses librsvg while PDF and EPS use Poppler directly. TeX uses the available local TeX renderer (if not, tectonic
is bundled with MakieTeX) and Typst uses Typst_jll.jl to render to a PDF, which then each follow the Poppler pipeline.
When rendering to Makie, MakieTeX rasterizes the document to a bitmap by default via the Makie attribute conversion pipeline (specifically Makie.to_spritemarker
), and then Makie treats it like a general image scatter marker.
HOWEVER, when rendering with CairoMakie, there is a function hook to get the correct marker for Cairo specifically, ignoring the default Makie conversion pipeline. This is CairoMakie.cairo_scatter_marker
, and we overload it in MakieTeX.MakieTeXCairoMakieExt
to get the correct marker. This also allows us to apply styling to SVG elements, but again ONLY IN CAIROMAKIE! This is a bit of an incompatibility and a breaking of the implicit promise from Makie that rendering should be the same across backends, but the tradeoff is (to me, at least) worth it.
Render with Poppler pipeline (true) or Cairo pipeline (false)
Default margins for pdfcrop
. Private, try not to touch!
AbstractDocument
abstract type AbstractDocument
An AbstractDocument
must contain a document as a String or Vector{UInt8} of the full contents of whichever file it is using. It may contain additional fields - for example, PDFDocument
s contain a page number to indicate which page to display, in the case where a PDF has multiple pages.
AbstractDocument
s must implement the following functions:
getdoc(doc::AbstractDocument)::Union{Vector{UInt8}, String}
mimetype(doc::AbstractDocument)::Base.MIME
Cached(doc::AbstractDocument)::AbstractCachedDocument
getdoc(doc::AbstractDocument)::Union{Vector{UInt8}, String}
Return the document data (contents of the file) as a Vector{UInt8}
or String
. This must be the full file, i.e., if it was saved, the file should be immediately openable.
mimetype(::AbstractDocument)::Base.MIME
Return the MIME type of the document. For example, mimetype(::SVGDocument) == MIME("image/svg+xml")
.
Cached(doc::AbstractDocument)::AbstractCachedDocument
Generic interface to cache a document and return it.
AbstractCachedDocument
abstract type AbstractCachedDocument
Cached documents are "loaded" versions of AbstractDocuments, and store a pointer/reference to the loaded version of the document (a Poppler handle for PDFs, or Rsvg handle for SVGs).
They also contain a Cairo surface to which the document has been rendered, as well as a cache of a rasterized PNG and its scale for performance reasons. See the documentation of rasterize
for more.
AbstractCachedDocument
s must implement the AbstractDocument
API, as well as the following:
rasterize(doc::AbstractCachedDocument, [scale::Real = 1])::Matrix{ARGB32}
draw_to_cairo_surface(doc::AbstractCachedDocument, surf::CairoSurface)
update_handle!(doc::AbstractCachedDocument)::<some_handle_type>
rasterize(doc::AbstractCachedDocument, scale::Real = 1)
Render a CachedDocument
to an image at a given scale. This is a convenience function which calls the appropriate rendering function for the document type. Returns an image as a Matrix{ARGB32}
.
draw_to_cairo_surface(doc::AbstractCachedDocument, surf::CairoSurface)
Render a CachedDocument
to a Cairo surface. This is a convenience function which calls the appropriate rendering function for the document type.
update_handle!(doc::AbstractCachedDocument)
Update the internal handle/pointer to the loaded document in a CachedDocument
, and returns it.
This function is used to refresh the handle/pointer to the loaded document in case it has been garbage collected or invalidated. It should return the updated handle/pointer.
For example, in CachedPDF
, this function would reload the PDF document using the doc.doc
field and update the ptr
field with the new Poppler handle, if it is found to be invalid.
Note that this function needs to be implemented for each concrete subtype of AbstractCachedDocument
, as the handle/pointer type and the method to load/update it will be different for different document types (e.g., PDF, SVG, etc.).
SVGDocument(svg::AbstractString)
A document type which stores an SVG string.
Is converted to CachedSVG
for use in plotting.
PDFDocument(pdf::AbstractString, [page = 0])
A document type which holds a raw PDF as a string.
Is converted to CachedPDF
for use in plotting.
Missing docstring.
Missing docstring for EPSDocument
. Check Documenter's build log for details.
Missing docstring.
Missing docstring for TEXDocument
. Check Documenter's build log for details.
Missing docstring.
Missing docstring for CachedTEX
. Check Documenter's build log for details.
CachedPDF(pdf::PDFDocument)
Holds a PDF document along with a Poppler handle and a Cairo surface to which it has already been rendered.
Usage
CachedPDF(read("path/to/pdf.pdf"), [page = 0])
+CachedPDF(read("path/to/pdf.pdf", String), [page = 0])
+CachedPDF(PDFDocument(...), [page = 0])
Fields
doc
: A reference to the PDFDocument
which is cached here.
ptr
: A pointer to the Poppler handle of the PDF. May be randomly GC'ed by Poppler.
dims
: The dimensions of the PDF page in points, for ease of access.
surf
: A Cairo surface to which Poppler has drawn the PDF. Permanent and cached.
image_cache
: A cache for a (rendered_image, scale_factor) pair. This is used to avoid re-rendering the PDF.
CachedSVG(svg::SVGDocument)
Holds an SVG document along with an Rsvg handle and a Cairo surface to which it has already been rendered.
Usage
CachedSVG(read("path/to/svg.svg"))
+CachedSVG(read("path/to/svg.svg", String))
+CachedSVG(SVGDocument(...))
Fields
doc
: The original SVGDocument
which is cached here, i.e., the text of that SVG.
handle
: A pointer to the Rsvg handle of the SVG. May be randomly GC'ed by Rsvg, so is stored as a Ref
in case it has to be refreshed.
dims
: The dimensions of the SVG in points, for ease of access.
surf
: A Cairo surface to which Rsvg has drawn the SVG. Permanent and cached.
image_cache
: A cache for a (rendered_image, scale_factor) pair. This is used to avoid re-rendering the PDF.
Missing docstring.
Missing docstring for CachedEPS
. Check Documenter's build log for details.
TODO: add documentation about the LaTeX (compile_latex
), PDF and SVG handling utils here, in case they are of use to anyone.
CachedTeX(doc::TeXDocument; kwargs...)
Compile a TeXDocument
, compile it and return the cached TeX object.
A CachedTeX
struct stores the document and its compiled form, as well as some pointers to in-program versions of it. It also stores the page dimensions.
In kwargs
, one can pass anything which goes to the internal function compile_latex
. These are primarily:
engine =
lualatex/
xelatex/...
: the LaTeX engine to use when rendering
options=
-file-line-error\`\`: the options to pass tolatexmk
.
The constructor stores the following fields:
doc
pdf
ptr
surf
dims
Note
This is a mutable struct
because the pointer to the Poppler handle can change. TODO: make this an immutable struct with a Ref to the handle?? OR maybe even the surface itself...
Note
It is also possible to manually construct a CachedTeX
with nothing
in the doc
field, if you just want to insert a pre-rendered PDF into your figure.
EPSDocument(eps::AbstractString, [page = 0])
A document type which holds an EPS string.
Is converted to CachedPDF
for use in plotting.
TeXDocument(contents::AbstractString, add_defaults::Bool; requires, preamble, class, classoptions)
This constructor function creates a struct
of type TeXDocument
which can be passed to teximg
. All arguments are to be passed as strings.
If add_defaults
is false
, then we will not automatically add document structure. Note that in this case, keyword arguments will be disregarded and contents
must be a complete LaTeX document.
Available keyword arguments are:
requires
: code which comes before documentclass
in the preamble. Default: raw"\\RequirePackage{luatex85}"
.
class
: the document class. Default (and what you should use): "standalone"
.
classoptions
: the options you should pass to the class, i.e., \\documentclass[$classoptions]{$class}
. Default: "preview, tightpage, 12pt"
.
preamble
: arbitrary code for the preamble (between \\documentclass
and \\begin{document}
). Default: raw"\\usepackage{amsmath, xcolor} \\pagestyle{empty}"
.
See also CachedTeX
, compile_latex
, etc.
RsvgRectangle is a simple struct of: height::Float64 width::Float64 x::Float64 y::Float64
compile_latex(document::AbstractString; tex_engine = CURRENT_TEX_ENGINE[], options = \`-file-line-error\`)
Compile the given document as a String and return the resulting PDF (also as a String).
crop_pdf(path; margin = (0, 0, 0, 0))
Crop a PDF file using Ghostscript. This alters the crop box but does not actually remove elements.
get_pdf_bbox(path)
Get the bounding box of a PDF file using Ghostscript. Returns a tuple representing the (xmin, ymin, xmax, ymax) of the bounding box.
handle_render_document(cr::CairoContext, handle::RsvgHandle, viewport::_RsvgRectangle)
load_pdf(pdf::String)::Ptr{Cvoid}
+load_pdf(pdf::Vector{UInt8})::Ptr{Cvoid}
Loads a PDF file into a Poppler document handle.
Input may be either a String or a Vector{UInt8}
, each representing the PDF file in memory.
Warn
The String input does NOT represent a filename!
page2img(tex::CachedTeX, page::Int; scale = 1, render_density = 1)
Renders the page
of the given CachedTeX
object to an image, with the given scale
and render_density
.
This function reads the PDF using Poppler and renders it to a Cairo surface, which is then read as an image.
pdf_get_page_size(document::Ptr{Cvoid}, page_number::Int)::Tuple{Float64, Float64}
document
must be a Poppler document handle. Returns a tuple of width, height
.
pdf_num_pages(document::Ptr{Cvoid})::Int
document
must be a Poppler document handle. Returns the number of pages in the document.
pdf_num_pages(filename::String)::Int
Returns the number of pages in a PDF file located at filename
, using the Poppler executable.
Calculate an approximation of a tight rectangle around a 2D rectangle rotated by angle
radians. This is not perfect but works well enough. Check an A vs X to see the difference.
split_pdf(pdf::Union{Vector{UInt8}, String})::Vector{UInt8}
Splits a PDF into its constituent pages, returning a Vector of UInt8 arrays, each representing a page.
The input must be a PDF file, either as a String or as a Vector{UInt8} of the PDF's bytes.
Warn
The input String does NOT represent a filename!
This uses Ghostscript to actually split the PDF and return PDF files. If you just want to render the PDF, use load_pdf
and page2img
instead.
texdoc(contents::AbstractString; kwargs...)
A shorthand for TeXDocument(contents, add_defaults=true; kwargs...)
.
Available keyword arguments are:
requires
: code which comes before documentclass
in the preamble. Default: raw"\\RequirePackage{luatex85}"
.
class
: the document class. Default (and what you should use): "standalone"
.
classoptions
: the options you should pass to the class, i.e., \\documentclass[$classoptions]{$class}
. Default: "preview, tightpage, 12pt"
.
preamble
: arbitrary code for the preamble (between \\documentclass
and \\begin{document}
). Default: raw"\\usepackage{amsmath, xcolor} \\pagestyle{empty}"
.
teximg(tex; position, ...)
+teximg!(ax_or_scene, tex; position, ...)
This recipe plots rendered TeX
to your Figure or Scene.
There are three types of input you can provide:
Any String
, which is rendered to LaTeX cognizant of the figure's overall theme,
A TeXDocument
object, which is rendered to LaTeX directly, and can be customized by the user,
A CachedTeX
object, which is a pre-rendered LaTeX document.
tex
may be a single one of these objects, or an array of them.
Attributes
Available attributes and their defaults for MakieCore.Plot{MakieTeX.teximg}
are:
align (:center, :center)
+ depth_shift 0.0f0
+ inspectable true
+ inspector_clear MakieCore.Automatic()
+ inspector_hover MakieCore.Automatic()
+ inspector_label MakieCore.Automatic()
+ markerspace :pixel
+ overdraw false
+ position GeometryBasics.Point{2, Float32}[[0.0, 0.0]]
+ render_density 2
+ rotation Float32[0.0]
+ scale 1.0
+ space :data
+ ssao false
+ transparency false
+ visible true
=0)c=r.activeElement;else{var f=i.tabbableGroups[0],p=f&&f.firstTabbableNode;c=p||h("fallbackFocus")}if(!c)throw new Error("Your focus-trap needs to have at least one focusable element");return c},v=function(){if(i.containerGroups=i.containers.map(function(c){var f=br(c,a.tabbableOptions),p=wr(c,a.tabbableOptions),C=f.length>0?f[0]:void 0,I=f.length>0?f[f.length-1]:void 0,M=p.find(function(m){return le(m)}),z=p.slice().reverse().find(function(m){return le(m)}),P=!!f.find(function(m){return se(m)>0});return{container:c,tabbableNodes:f,focusableNodes:p,posTabIndexesFound:P,firstTabbableNode:C,lastTabbableNode:I,firstDomTabbableNode:M,lastDomTabbableNode:z,nextTabbableNode:function(x){var $=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,K=f.indexOf(x);return K<0?$?p.slice(p.indexOf(x)+1).find(function(Q){return le(Q)}):p.slice(0,p.indexOf(x)).reverse().find(function(Q){return le(Q)}):f[K+($?1:-1)]}}}),i.tabbableGroups=i.containerGroups.filter(function(c){return c.tabbableNodes.length>0}),i.tabbableGroups.length<=0&&!h("fallbackFocus"))throw new Error("Your focus-trap must have at least one container with at least one tabbable node in it at all times");if(i.containerGroups.find(function(c){return c.posTabIndexesFound})&&i.containerGroups.length>1)throw new Error("At least one node with a positive tabindex was found in one of your focus-trap's multiple containers. Positive tabindexes are only supported in single-container focus-traps.")},y=function w(c){var f=c.activeElement;if(f)return f.shadowRoot&&f.shadowRoot.activeElement!==null?w(f.shadowRoot):f},b=function w(c){if(c!==!1&&c!==y(document)){if(!c||!c.focus){w(d());return}c.focus({preventScroll:!!a.preventScroll}),i.mostRecentlyFocusedNode=c,Ar(c)&&c.select()}},E=function(c){var f=h("setReturnFocus",c);return f||(f===!1?!1:c)},g=function(c){var f=c.target,p=c.event,C=c.isBackward,I=C===void 0?!1:C;f=f||Ae(p),v();var M=null;if(i.tabbableGroups.length>0){var z=l(f,p),P=z>=0?i.containerGroups[z]:void 0;if(z<0)I?M=i.tabbableGroups[i.tabbableGroups.length-1].lastTabbableNode:M=i.tabbableGroups[0].firstTabbableNode;else if(I){var m=ft(i.tabbableGroups,function(B){var U=B.firstTabbableNode;return f===U});if(m<0&&(P.container===f||_e(f,a.tabbableOptions)&&!le(f,a.tabbableOptions)&&!P.nextTabbableNode(f,!1))&&(m=z),m>=0){var x=m===0?i.tabbableGroups.length-1:m-1,$=i.tabbableGroups[x];M=se(f)>=0?$.lastTabbableNode:$.lastDomTabbableNode}else ge(p)||(M=P.nextTabbableNode(f,!1))}else{var K=ft(i.tabbableGroups,function(B){var U=B.lastTabbableNode;return f===U});if(K<0&&(P.container===f||_e(f,a.tabbableOptions)&&!le(f,a.tabbableOptions)&&!P.nextTabbableNode(f))&&(K=z),K>=0){var Q=K===i.tabbableGroups.length-1?0:K+1,q=i.tabbableGroups[Q];M=se(f)>=0?q.firstTabbableNode:q.firstDomTabbableNode}else ge(p)||(M=P.nextTabbableNode(f))}}else M=h("fallbackFocus");return M},S=function(c){var f=Ae(c);if(!(l(f,c)>=0)){if(ye(a.clickOutsideDeactivates,c)){s.deactivate({returnFocus:a.returnFocusOnDeactivate});return}ye(a.allowOutsideClick,c)||c.preventDefault()}},T=function(c){var f=Ae(c),p=l(f,c)>=0;if(p||f instanceof Document)p&&(i.mostRecentlyFocusedNode=f);else{c.stopImmediatePropagation();var C,I=!0;if(i.mostRecentlyFocusedNode)if(se(i.mostRecentlyFocusedNode)>0){var M=l(i.mostRecentlyFocusedNode),z=i.containerGroups[M].tabbableNodes;if(z.length>0){var P=z.findIndex(function(m){return m===i.mostRecentlyFocusedNode});P>=0&&(a.isKeyForward(i.recentNavEvent)?P+1 H)for(;E<=B;)Le(u[E],b,S,!0),E++;else{const W=E,X=E,Q=new Map;for(E=X;E<=H;E++){const be=d[E]=R?Ge(d[E]):Ae(d[E]);be.key!=null&&Q.set(be.key,E)}let te,ae=0;const Te=H-X+1;let pt=!1,Xr=0;const St=new Array(Te);for(E=0;E {const{el:S,type:L,transition:x,children:R,shapeFlag:E}=u;if(E&6){tt(u.component.subTree,d,g,_);return}if(E&128){u.suspense.move(d,g,_);return}if(E&64){L.move(u,d,g,ht);return}if(L===ye){r(S,d,g);for(let B=0;B MakieTeX is a package that allows users to plot vector images - PDF, SVG, and TeX (which compiles to PDF) directly in Makie. It exposes two approaches: the To see a list of all exported functions, types, and macros, see the API page. Rendering can occur either to a bitmap (for GL backends) or to a Cairo surface (for CairoMakie). Both of these have APIs ( Each rendering format has its own complexities, so the rendering pipelines are usually separate. SVG uses librsvg, PDF and EPS use Poppler directly, and TeX uses the available local TeX render (if not, A hypothetical future Typst backend would likely also be a Typst -> PDF -> Poppler pipeline. Typst_jll already exists, so it would be fairly easy to bundle. When rendering to Makie, MakieTeX rasterizes the document to a bitmap by default via the Makie attribute conversion pipeline (specifically HOWEVER, when rendering with CairoMakie, there is a function hook to get the correct marker for Cairo specifically, ignoring the default Makie conversion pipeline. This is Render with Poppler pipeline (true) or Cairo pipeline (false) Default margins for An Return the document data (contents of the file) as a Return the MIME type of the document. For example, Note This is generally defined for the type, and there is a generic overload when passing a constructed object. Generic interface to cache a document and return it. Cached documents are "loaded" versions of AbstractDocuments, and store a pointer/reference to the loaded version of the document (a Poppler handle for PDFs, or Rsvg handle for SVGs). They also contain a Cairo surface to which the document has been rendered, as well as a cache of a rasterized PNG and its scale for performance reasons. See the documentation of Render a Render a Update the internal handle/pointer to the loaded document in a This function is used to refresh the handle/pointer to the loaded document in case it has been garbage collected or invalidated. It should return the updated handle/pointer. For example, in Note that this function needs to be implemented for each concrete subtype of A document type which stores an SVG string. Is converted to A document type which holds a raw PDF as a string. Is converted to Missing docstring. Missing docstring for This constructor function creates a If Available keyword arguments are: See also This constructor function creates a If Available keyword arguments are: See also Compile a A In The constructor stores the following fields: Note This is a Note It is also possible to manually construct a Compile a A The constructor stores the following fields: Note This is a Note It is also possible to manually construct a Holds a PDF document along with a Poppler handle and a Cairo surface to which it has already been rendered. Usage Fields Holds an SVG document along with an Rsvg handle and a Cairo surface to which it has already been rendered. Usage Fields Missing docstring. Missing docstring for TODO: add documentation about the LaTeX ( Compile a A In The constructor stores the following fields: Note This is a Note It is also possible to manually construct a Compile a A The constructor stores the following fields: Note This is a Note It is also possible to manually construct a A document type which holds an EPS string. Is converted to This constructor function creates a If Available keyword arguments are: See also This constructor function creates a If Available keyword arguments are: See also RsvgRectangle is a simple struct of: height::Float64 width::Float64 x::Float64 y::Float64 Compile the given document as a String and return the resulting PDF (also as a String). Compile the given document as a String and return the resulting PDF (also as a String). Crop a PDF file using Ghostscript. This alters the crop box but does not actually remove elements. Get the bounding box of a PDF file using Ghostscript. Returns a tuple representing the (xmin, ymin, xmax, ymax) of the bounding box. handle_render_document(cr::CairoContext, handle::RsvgHandle, viewport::_RsvgRectangle) Loads a PDF file into a Poppler document handle. Input may be either a String or a Warn The String input does NOT represent a filename! Renders the This function reads the PDF using Poppler and renders it to a Cairo surface, which is then read as an image. Returns the number of pages in a PDF file located at Calculate an approximation of a tight rectangle around a 2D rectangle rotated by Splits a PDF into its constituent pages, returning a Vector of UInt8 arrays, each representing a page. The input must be a PDF file, either as a String or as a Vector{UInt8} of the PDF's bytes. Warn The input String does NOT represent a filename! This uses Ghostscript to actually split the PDF and return PDF files. If you just want to render the PDF, use A shorthand for Available keyword arguments are: This recipe plots rendered There are three types of input you can provide: Any A A Attributes Available attributes and their defaults for A shorthand for Available keyword arguments are: =0)c=r.activeElement;else{var f=i.tabbableGroups[0],p=f&&f.firstTabbableNode;c=p||h("fallbackFocus")}if(!c)throw new Error("Your focus-trap needs to have at least one focusable element");return c},v=function(){if(i.containerGroups=i.containers.map(function(c){var f=br(c,a.tabbableOptions),p=wr(c,a.tabbableOptions),C=f.length>0?f[0]:void 0,I=f.length>0?f[f.length-1]:void 0,M=p.find(function(m){return le(m)}),z=p.slice().reverse().find(function(m){return le(m)}),P=!!f.find(function(m){return se(m)>0});return{container:c,tabbableNodes:f,focusableNodes:p,posTabIndexesFound:P,firstTabbableNode:C,lastTabbableNode:I,firstDomTabbableNode:M,lastDomTabbableNode:z,nextTabbableNode:function(x){var $=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,K=f.indexOf(x);return K<0?$?p.slice(p.indexOf(x)+1).find(function(Q){return le(Q)}):p.slice(0,p.indexOf(x)).reverse().find(function(Q){return le(Q)}):f[K+($?1:-1)]}}}),i.tabbableGroups=i.containerGroups.filter(function(c){return c.tabbableNodes.length>0}),i.tabbableGroups.length<=0&&!h("fallbackFocus"))throw new Error("Your focus-trap must have at least one container with at least one tabbable node in it at all times");if(i.containerGroups.find(function(c){return c.posTabIndexesFound})&&i.containerGroups.length>1)throw new Error("At least one node with a positive tabindex was found in one of your focus-trap's multiple containers. Positive tabindexes are only supported in single-container focus-traps.")},y=function w(c){var f=c.activeElement;if(f)return f.shadowRoot&&f.shadowRoot.activeElement!==null?w(f.shadowRoot):f},b=function w(c){if(c!==!1&&c!==y(document)){if(!c||!c.focus){w(d());return}c.focus({preventScroll:!!a.preventScroll}),i.mostRecentlyFocusedNode=c,Ar(c)&&c.select()}},E=function(c){var f=h("setReturnFocus",c);return f||(f===!1?!1:c)},g=function(c){var f=c.target,p=c.event,C=c.isBackward,I=C===void 0?!1:C;f=f||Ae(p),v();var M=null;if(i.tabbableGroups.length>0){var z=l(f,p),P=z>=0?i.containerGroups[z]:void 0;if(z<0)I?M=i.tabbableGroups[i.tabbableGroups.length-1].lastTabbableNode:M=i.tabbableGroups[0].firstTabbableNode;else if(I){var m=ft(i.tabbableGroups,function(B){var U=B.firstTabbableNode;return f===U});if(m<0&&(P.container===f||_e(f,a.tabbableOptions)&&!le(f,a.tabbableOptions)&&!P.nextTabbableNode(f,!1))&&(m=z),m>=0){var x=m===0?i.tabbableGroups.length-1:m-1,$=i.tabbableGroups[x];M=se(f)>=0?$.lastTabbableNode:$.lastDomTabbableNode}else ge(p)||(M=P.nextTabbableNode(f,!1))}else{var K=ft(i.tabbableGroups,function(B){var U=B.lastTabbableNode;return f===U});if(K<0&&(P.container===f||_e(f,a.tabbableOptions)&&!le(f,a.tabbableOptions)&&!P.nextTabbableNode(f))&&(K=z),K>=0){var Q=K===i.tabbableGroups.length-1?0:K+1,q=i.tabbableGroups[Q];M=se(f)>=0?q.firstTabbableNode:q.firstDomTabbableNode}else ge(p)||(M=P.nextTabbableNode(f))}}else M=h("fallbackFocus");return M},S=function(c){var f=Ae(c);if(!(l(f,c)>=0)){if(ye(a.clickOutsideDeactivates,c)){s.deactivate({returnFocus:a.returnFocusOnDeactivate});return}ye(a.allowOutsideClick,c)||c.preventDefault()}},T=function(c){var f=Ae(c),p=l(f,c)>=0;if(p||f instanceof Document)p&&(i.mostRecentlyFocusedNode=f);else{c.stopImmediatePropagation();var C,I=!0;if(i.mostRecentlyFocusedNode)if(se(i.mostRecentlyFocusedNode)>0){var M=l(i.mostRecentlyFocusedNode),z=i.containerGroups[M].tabbableNodes;if(z.length>0){var P=z.findIndex(function(m){return m===i.mostRecentlyFocusedNode});P>=0&&(a.isKeyForward(i.recentNavEvent)?P+1 H)for(;E<=B;)Le(u[E],b,S,!0),E++;else{const W=E,X=E,Q=new Map;for(E=X;E<=H;E++){const be=d[E]=R?Ge(d[E]):Ae(d[E]);be.key!=null&&Q.set(be.key,E)}let te,ae=0;const Te=H-X+1;let pt=!1,Xr=0;const St=new Array(Te);for(E=0;E {const{el:S,type:L,transition:x,children:R,shapeFlag:E}=u;if(E&6){tt(u.component.subTree,d,g,_);return}if(E&128){u.suspense.move(d,g,_);return}if(E&64){L.move(u,d,g,ht);return}if(L===ye){r(S,d,g);for(let B=0;B MakieTeX allows rendering PDF, SVG, and TeX documents in Makie. The easiest way to construct these is to use the constructors of the form: You can also pass a full LaTeX document if you wish: The same thing as PDF applies to SVG. However, if you are using scatter in CairoMakie, then the SVG will be colored by the color of the marker. This is not the case in WGLMakie or GLMakie. See below for an example: MakieTeX is a package that allows users to plot vector images - PDF, SVG, and TeX (which compiles to PDF) directly in Makie. It exposes two approaches: the To see a list of all exported functions, types, and macros, see the API page. Rendering can occur either to a bitmap (for GL backends) or to a Cairo surface (for CairoMakie). Both of these have APIs ( Each rendering format has its own complexities, so the rendering pipelines are usually separate. SVG uses librsvg while PDF and EPS use Poppler directly. TeX uses the available local TeX renderer (if not, When rendering to Makie, MakieTeX rasterizes the document to a bitmap by default via the Makie attribute conversion pipeline (specifically HOWEVER, when rendering with CairoMakie, there is a function hook to get the correct marker for Cairo specifically, ignoring the default Makie conversion pipeline. This is MakieTeX is a package that allows users to plot vector images - PDF, SVG, and TeX (which compiles to PDF) directly in Makie. It exposes two approaches: the To see a list of all exported functions, types, and macros, see the API page. Rendering can occur either to a bitmap (for GL backends) or to a Cairo surface (for CairoMakie). Both of these have APIs ( Each rendering format has its own complexities, so the rendering pipelines are usually separate. SVG uses librsvg while PDF and EPS use Poppler directly. TeX uses the available local TeX renderer (if not, When rendering to Makie, MakieTeX rasterizes the document to a bitmap by default via the Makie attribute conversion pipeline (specifically HOWEVER, when rendering with CairoMakie, there is a function hook to get the correct marker for Cairo specifically, ignoring the default Makie conversion pipeline. This is Render with Poppler pipeline (true) or Cairo pipeline (false) Default margins for An Return the document data (contents of the file) as a Return the MIME type of the document. For example, Note This is generally defined for the type, and there is a generic overload when passing a constructed object. Generic interface to cache a document and return it. Cached documents are "loaded" versions of AbstractDocuments, and store a pointer/reference to the loaded version of the document (a Poppler handle for PDFs, or Rsvg handle for SVGs). They also contain a Cairo surface to which the document has been rendered, as well as a cache of a rasterized PNG and its scale for performance reasons. See the documentation of Render a Render a Update the internal handle/pointer to the loaded document in a This function is used to refresh the handle/pointer to the loaded document in case it has been garbage collected or invalidated. It should return the updated handle/pointer. For example, in Note that this function needs to be implemented for each concrete subtype of A document type which stores an SVG string. Is converted to A document type which holds a raw PDF as a string. Is converted to Missing docstring. Missing docstring for This constructor function creates a If Available keyword arguments are: See also This constructor function creates a If Available keyword arguments are: See also Compile a A In The constructor stores the following fields: Note This is a Note It is also possible to manually construct a Compile a A The constructor stores the following fields: Note This is a Note It is also possible to manually construct a Holds a PDF document along with a Poppler handle and a Cairo surface to which it has already been rendered. Usage Fields Holds an SVG document along with an Rsvg handle and a Cairo surface to which it has already been rendered. Usage Fields Missing docstring. Missing docstring for TODO: add documentation about the LaTeX ( Compile a A In The constructor stores the following fields: Note This is a Note It is also possible to manually construct a Compile a A The constructor stores the following fields: Note This is a Note It is also possible to manually construct a A document type which holds an EPS string. Is converted to This constructor function creates a If Available keyword arguments are: See also This constructor function creates a If Available keyword arguments are: See also RsvgRectangle is a simple struct of: height::Float64 width::Float64 x::Float64 y::Float64 Compile the given document as a String and return the resulting PDF (also as a String). Compile the given document as a String and return the resulting PDF (also as a String). Crop a PDF file using Ghostscript. This alters the crop box but does not actually remove elements. Get the bounding box of a PDF file using Ghostscript. Returns a tuple representing the (xmin, ymin, xmax, ymax) of the bounding box. handle_render_document(cr::CairoContext, handle::RsvgHandle, viewport::_RsvgRectangle) Loads a PDF file into a Poppler document handle. Input may be either a String or a Warn The String input does NOT represent a filename! Renders the This function reads the PDF using Poppler and renders it to a Cairo surface, which is then read as an image. Returns the number of pages in a PDF file located at Calculate an approximation of a tight rectangle around a 2D rectangle rotated by Splits a PDF into its constituent pages, returning a Vector of UInt8 arrays, each representing a page. The input must be a PDF file, either as a String or as a Vector{UInt8} of the PDF's bytes. Warn The input String does NOT represent a filename! This uses Ghostscript to actually split the PDF and return PDF files. If you just want to render the PDF, use A shorthand for Available keyword arguments are: This recipe plots rendered There are three types of input you can provide: Any A A Attributes Available attributes and their defaults for A shorthand for Available keyword arguments are: =0)c=r.activeElement;else{var f=i.tabbableGroups[0],p=f&&f.firstTabbableNode;c=p||h("fallbackFocus")}if(!c)throw new Error("Your focus-trap needs to have at least one focusable element");return c},v=function(){if(i.containerGroups=i.containers.map(function(c){var f=br(c,a.tabbableOptions),p=wr(c,a.tabbableOptions),C=f.length>0?f[0]:void 0,I=f.length>0?f[f.length-1]:void 0,M=p.find(function(m){return le(m)}),z=p.slice().reverse().find(function(m){return le(m)}),P=!!f.find(function(m){return se(m)>0});return{container:c,tabbableNodes:f,focusableNodes:p,posTabIndexesFound:P,firstTabbableNode:C,lastTabbableNode:I,firstDomTabbableNode:M,lastDomTabbableNode:z,nextTabbableNode:function(x){var $=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,K=f.indexOf(x);return K<0?$?p.slice(p.indexOf(x)+1).find(function(Q){return le(Q)}):p.slice(0,p.indexOf(x)).reverse().find(function(Q){return le(Q)}):f[K+($?1:-1)]}}}),i.tabbableGroups=i.containerGroups.filter(function(c){return c.tabbableNodes.length>0}),i.tabbableGroups.length<=0&&!h("fallbackFocus"))throw new Error("Your focus-trap must have at least one container with at least one tabbable node in it at all times");if(i.containerGroups.find(function(c){return c.posTabIndexesFound})&&i.containerGroups.length>1)throw new Error("At least one node with a positive tabindex was found in one of your focus-trap's multiple containers. Positive tabindexes are only supported in single-container focus-traps.")},y=function w(c){var f=c.activeElement;if(f)return f.shadowRoot&&f.shadowRoot.activeElement!==null?w(f.shadowRoot):f},b=function w(c){if(c!==!1&&c!==y(document)){if(!c||!c.focus){w(d());return}c.focus({preventScroll:!!a.preventScroll}),i.mostRecentlyFocusedNode=c,Ar(c)&&c.select()}},E=function(c){var f=h("setReturnFocus",c);return f||(f===!1?!1:c)},g=function(c){var f=c.target,p=c.event,C=c.isBackward,I=C===void 0?!1:C;f=f||Ae(p),v();var M=null;if(i.tabbableGroups.length>0){var z=l(f,p),P=z>=0?i.containerGroups[z]:void 0;if(z<0)I?M=i.tabbableGroups[i.tabbableGroups.length-1].lastTabbableNode:M=i.tabbableGroups[0].firstTabbableNode;else if(I){var m=ft(i.tabbableGroups,function(B){var U=B.firstTabbableNode;return f===U});if(m<0&&(P.container===f||_e(f,a.tabbableOptions)&&!le(f,a.tabbableOptions)&&!P.nextTabbableNode(f,!1))&&(m=z),m>=0){var x=m===0?i.tabbableGroups.length-1:m-1,$=i.tabbableGroups[x];M=se(f)>=0?$.lastTabbableNode:$.lastDomTabbableNode}else ge(p)||(M=P.nextTabbableNode(f,!1))}else{var K=ft(i.tabbableGroups,function(B){var U=B.lastTabbableNode;return f===U});if(K<0&&(P.container===f||_e(f,a.tabbableOptions)&&!le(f,a.tabbableOptions)&&!P.nextTabbableNode(f))&&(K=z),K>=0){var Q=K===i.tabbableGroups.length-1?0:K+1,q=i.tabbableGroups[Q];M=se(f)>=0?q.firstTabbableNode:q.firstDomTabbableNode}else ge(p)||(M=P.nextTabbableNode(f))}}else M=h("fallbackFocus");return M},S=function(c){var f=Ae(c);if(!(l(f,c)>=0)){if(ye(a.clickOutsideDeactivates,c)){s.deactivate({returnFocus:a.returnFocusOnDeactivate});return}ye(a.allowOutsideClick,c)||c.preventDefault()}},T=function(c){var f=Ae(c),p=l(f,c)>=0;if(p||f instanceof Document)p&&(i.mostRecentlyFocusedNode=f);else{c.stopImmediatePropagation();var C,I=!0;if(i.mostRecentlyFocusedNode)if(se(i.mostRecentlyFocusedNode)>0){var M=l(i.mostRecentlyFocusedNode),z=i.containerGroups[M].tabbableNodes;if(z.length>0){var P=z.findIndex(function(m){return m===i.mostRecentlyFocusedNode});P>=0&&(a.isKeyForward(i.recentNavEvent)?P+1 j)for(;E<=B;)Le(u[E],b,S,!0),E++;else{const q=E,X=E,ee=new Map;for(E=X;E<=j;E++){const be=d[E]=R?Ge(d[E]):Ae(d[E]);be.key!=null&&ee.set(be.key,E)}let Q,ae=0;const Te=j-X+1;let ht=!1,Xr=0;const St=new Array(Te);for(E=0;E {const{el:S,type:O,transition:x,children:R,shapeFlag:E}=u;if(E&6){tt(u.component.subTree,d,g,v);return}if(E&128){u.suspense.move(d,g,v);return}if(E&64){O.move(u,d,g,dt);return}if(O===_e){r(S,d,g);for(let B=0;B MakieTeX allows rendering PDF, SVG, and TeX documents in Makie. The easiest way to construct these is to use the constructors of the form: You can also pass a full LaTeX document if you wish: The same thing as PDF applies to SVG. However, if you are using scatter in CairoMakie, then the SVG will be colored by the color of the marker. This is not the case in WGLMakie or GLMakie. See below for an example: MakieTeX is a package that allows users to plot vector images - PDF, SVG, and TeX (which compiles to PDF) directly in Makie. It exposes two approaches: the To see a list of all exported functions, types, and macros, see the API page. Rendering can occur either to a bitmap (for GL backends) or to a Cairo surface (for CairoMakie). Both of these have APIs ( Each rendering format has its own complexities, so the rendering pipelines are usually separate. SVG uses librsvg while PDF and EPS use Poppler directly. TeX uses the available local TeX renderer (if not, When rendering to Makie, MakieTeX rasterizes the document to a bitmap by default via the Makie attribute conversion pipeline (specifically HOWEVER, when rendering with CairoMakie, there is a function hook to get the correct marker for Cairo specifically, ignoring the default Makie conversion pipeline. This is MakieTeX is a package that allows users to plot vector images - PDF, SVG, and TeX (which compiles to PDF) directly in Makie. It exposes two approaches: the To see a list of all exported functions, types, and macros, see the API page. Rendering can occur either to a bitmap (for GL backends) or to a Cairo surface (for CairoMakie). Both of these have APIs ( Each rendering format has its own complexities, so the rendering pipelines are usually separate. SVG uses librsvg while PDF and EPS use Poppler directly. TeX uses the available local TeX renderer (if not, When rendering to Makie, MakieTeX rasterizes the document to a bitmap by default via the Makie attribute conversion pipeline (specifically HOWEVER, when rendering with CairoMakie, there is a function hook to get the correct marker for Cairo specifically, ignoring the default Makie conversion pipeline. This is Render with Poppler pipeline (true) or Cairo pipeline (false) Default margins for An Return the document data (contents of the file) as a Return the MIME type of the document. For example, Note This is generally defined for the type, and there is a generic overload when passing a constructed object. Generic interface to cache a document and return it. Cached documents are "loaded" versions of AbstractDocuments, and store a pointer/reference to the loaded version of the document (a Poppler handle for PDFs, or Rsvg handle for SVGs). They also contain a Cairo surface to which the document has been rendered, as well as a cache of a rasterized PNG and its scale for performance reasons. See the documentation of Render a Render a Update the internal handle/pointer to the loaded document in a This function is used to refresh the handle/pointer to the loaded document in case it has been garbage collected or invalidated. It should return the updated handle/pointer. For example, in Note that this function needs to be implemented for each concrete subtype of A document type which stores an SVG string. Is converted to A document type which holds a raw PDF as a string. Is converted to Missing docstring. Missing docstring for This constructor function creates a If Available keyword arguments are: See also This constructor function creates a If Available keyword arguments are: See also Compile a A In The constructor stores the following fields: Note This is a Note It is also possible to manually construct a Compile a A The constructor stores the following fields: Note This is a Note It is also possible to manually construct a Holds a PDF document along with a Poppler handle and a Cairo surface to which it has already been rendered. Usage Fields Holds an SVG document along with an Rsvg handle and a Cairo surface to which it has already been rendered. Usage Fields Missing docstring. Missing docstring for TODO: add documentation about the LaTeX ( Compile a A In The constructor stores the following fields: Note This is a Note It is also possible to manually construct a Compile a A The constructor stores the following fields: Note This is a Note It is also possible to manually construct a A document type which holds an EPS string. Is converted to No docstring defined. Attributes (type This constructor function creates a If Available keyword arguments are: See also This constructor function creates a If Available keyword arguments are: See also RsvgRectangle is a simple struct of: height::Float64 width::Float64 x::Float64 y::Float64 Compile the given document as a String and return the resulting PDF (also as a String). Compile the given document as a String and return the resulting PDF (also as a String). Crop a PDF file using Ghostscript. This alters the crop box but does not actually remove elements. Get the bounding box of a PDF file using Ghostscript. Returns a tuple representing the (xmin, ymin, xmax, ymax) of the bounding box. handle_render_document(cr::CairoContext, handle::RsvgHandle, viewport::_RsvgRectangle) Loads a PDF file into a Poppler document handle. Input may be either a String or a Warn The String input does NOT represent a filename! Renders the This function reads the PDF using Poppler and renders it to a Cairo surface, which is then read as an image. Returns the number of pages in a PDF file located at Calculate an approximation of a tight rectangle around a 2D rectangle rotated by Splits a PDF into its constituent pages, returning a Vector of UInt8 arrays, each representing a page. The input must be a PDF file, either as a String or as a Vector{UInt8} of the PDF's bytes. Warn The input String does NOT represent a filename! This uses Ghostscript to actually split the PDF and return PDF files. If you just want to render the PDF, use A shorthand for Available keyword arguments are: This recipe plots rendered There are three types of input you can provide: Any A A Attributes Available attributes and their defaults for A shorthand for Available keyword arguments are: =0)c=r.activeElement;else{var f=i.tabbableGroups[0],p=f&&f.firstTabbableNode;c=p||h("fallbackFocus")}if(!c)throw new Error("Your focus-trap needs to have at least one focusable element");return c},v=function(){if(i.containerGroups=i.containers.map(function(c){var f=br(c,a.tabbableOptions),p=wr(c,a.tabbableOptions),C=f.length>0?f[0]:void 0,I=f.length>0?f[f.length-1]:void 0,M=p.find(function(m){return le(m)}),z=p.slice().reverse().find(function(m){return le(m)}),P=!!f.find(function(m){return se(m)>0});return{container:c,tabbableNodes:f,focusableNodes:p,posTabIndexesFound:P,firstTabbableNode:C,lastTabbableNode:I,firstDomTabbableNode:M,lastDomTabbableNode:z,nextTabbableNode:function(x){var $=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,K=f.indexOf(x);return K<0?$?p.slice(p.indexOf(x)+1).find(function(Q){return le(Q)}):p.slice(0,p.indexOf(x)).reverse().find(function(Q){return le(Q)}):f[K+($?1:-1)]}}}),i.tabbableGroups=i.containerGroups.filter(function(c){return c.tabbableNodes.length>0}),i.tabbableGroups.length<=0&&!h("fallbackFocus"))throw new Error("Your focus-trap must have at least one container with at least one tabbable node in it at all times");if(i.containerGroups.find(function(c){return c.posTabIndexesFound})&&i.containerGroups.length>1)throw new Error("At least one node with a positive tabindex was found in one of your focus-trap's multiple containers. Positive tabindexes are only supported in single-container focus-traps.")},y=function w(c){var f=c.activeElement;if(f)return f.shadowRoot&&f.shadowRoot.activeElement!==null?w(f.shadowRoot):f},b=function w(c){if(c!==!1&&c!==y(document)){if(!c||!c.focus){w(d());return}c.focus({preventScroll:!!a.preventScroll}),i.mostRecentlyFocusedNode=c,Ar(c)&&c.select()}},E=function(c){var f=h("setReturnFocus",c);return f||(f===!1?!1:c)},g=function(c){var f=c.target,p=c.event,C=c.isBackward,I=C===void 0?!1:C;f=f||Ae(p),v();var M=null;if(i.tabbableGroups.length>0){var z=l(f,p),P=z>=0?i.containerGroups[z]:void 0;if(z<0)I?M=i.tabbableGroups[i.tabbableGroups.length-1].lastTabbableNode:M=i.tabbableGroups[0].firstTabbableNode;else if(I){var m=ft(i.tabbableGroups,function(B){var U=B.firstTabbableNode;return f===U});if(m<0&&(P.container===f||_e(f,a.tabbableOptions)&&!le(f,a.tabbableOptions)&&!P.nextTabbableNode(f,!1))&&(m=z),m>=0){var x=m===0?i.tabbableGroups.length-1:m-1,$=i.tabbableGroups[x];M=se(f)>=0?$.lastTabbableNode:$.lastDomTabbableNode}else ge(p)||(M=P.nextTabbableNode(f,!1))}else{var K=ft(i.tabbableGroups,function(B){var U=B.lastTabbableNode;return f===U});if(K<0&&(P.container===f||_e(f,a.tabbableOptions)&&!le(f,a.tabbableOptions)&&!P.nextTabbableNode(f))&&(K=z),K>=0){var Q=K===i.tabbableGroups.length-1?0:K+1,q=i.tabbableGroups[Q];M=se(f)>=0?q.firstTabbableNode:q.firstDomTabbableNode}else ge(p)||(M=P.nextTabbableNode(f))}}else M=h("fallbackFocus");return M},S=function(c){var f=Ae(c);if(!(l(f,c)>=0)){if(ye(a.clickOutsideDeactivates,c)){s.deactivate({returnFocus:a.returnFocusOnDeactivate});return}ye(a.allowOutsideClick,c)||c.preventDefault()}},T=function(c){var f=Ae(c),p=l(f,c)>=0;if(p||f instanceof Document)p&&(i.mostRecentlyFocusedNode=f);else{c.stopImmediatePropagation();var C,I=!0;if(i.mostRecentlyFocusedNode)if(se(i.mostRecentlyFocusedNode)>0){var M=l(i.mostRecentlyFocusedNode),z=i.containerGroups[M].tabbableNodes;if(z.length>0){var P=z.findIndex(function(m){return m===i.mostRecentlyFocusedNode});P>=0&&(a.isKeyForward(i.recentNavEvent)?P+1MakieTeX.jl
teximg
recipe which plots any LaTeX-like object, and the CachedDocument
API which allows users to plot documents directly as scatter
markers.using MakieTeX, CairoMakie
+
+teximg(raw"""
+\\begin{align*}
+\\frac{1}{2} \\times \\frac{1}{2} = \\frac{1}{4}
+\\end{align*}
+""")
Principle of operation
Rendering
rasterize
and draw_to_cairo_surface
).tectonic
is bundled with MakieTeX) to render to a PDF, which then follows the Poppler pipeline.Makie
Makie.to_spritemarker
), and then Makie treats it like a general image scatter marker.CairoMakie.cairo_scatter_marker
, and we overload it in MakieTeX.MakieTeXCairoMakieExt
to get the correct marker. This also allows us to apply styling to SVG elements, but again ONLY IN CAIROMAKIE! This is a bit of an incompatibility and a breaking of the implicit promise from Makie that rendering should be the same across backends, but the tradeoff is (to me, at least) worth it.API documentation
Constants
pdfcrop
. Private, try not to touch!Interfaces
AbstractDocument
abstract type AbstractDocument
AbstractDocument
must contain a document as a String or Vector{UInt8} of the full contents of whichever file it is using. It may contain additional fields - for example, PDFDocument
s contain a page number to indicate which page to display, in the case where a PDF has multiple pages.AbstractDocument
s must implement the following functions:getdoc(doc::AbstractDocument)::Union{Vector{UInt8}, String}
mimetype(doc::AbstractDocument)::Base.MIME
Cached(doc::AbstractDocument)::AbstractCachedDocument
getdoc(doc::AbstractDocument)::Union{Vector{UInt8}, String}
Vector{UInt8}
or String
. This must be the full file, i.e., if it was saved, the file should be immediately openable.mimetype(::Type{<: AbstractDocument})::Base.MIME
+mimetype(::AbstractDocument)::Base.MIME
mimetype(::SVGDocument) == MIME("image/svg+xml")
.Cached(doc::AbstractDocument)::AbstractCachedDocument
AbstractCachedDocument
abstract type AbstractCachedDocument
rasterize
for more.AbstractCachedDocument
s must implement the AbstractDocument
API, as well as the following:rasterize(doc::AbstractCachedDocument, [scale::Real = 1])::Matrix{ARGB32}
draw_to_cairo_surface(doc::AbstractCachedDocument, surf::CairoSurface)
update_handle!(doc::AbstractCachedDocument)::<some_handle_type>
rasterize(doc::AbstractCachedDocument, scale::Real = 1)
CachedDocument
to an image at a given scale. This is a convenience function which calls the appropriate rendering function for the document type. Returns an image as a Matrix{ARGB32}
.draw_to_cairo_surface(doc::AbstractCachedDocument, surf::CairoSurface)
CachedDocument
to a Cairo surface. This is a convenience function which calls the appropriate rendering function for the document type.update_handle!(doc::AbstractCachedDocument)
CachedDocument
, and returns it.CachedPDF
, this function would reload the PDF document using the doc.doc
field and update the ptr
field with the new Poppler handle, if it is found to be invalid.AbstractCachedDocument
, as the handle/pointer type and the method to load/update it will be different for different document types (e.g., PDF, SVG, etc.).Document types
Raw document types
SVGDocument(svg::AbstractString)
CachedSVG
for use in plotting.PDFDocument(pdf::AbstractString, [page = 0])
CachedPDF
for use in plotting.EPSDocument
. Check Documenter's build log for details.TEXDocument(contents::AbstractString, add_defaults::Bool; requires, preamble, class, classoptions)
struct
of type TEXDocument
which can be passed to teximg
. All arguments are to be passed as strings.add_defaults
is false
, then we will not automatically add document structure. Note that in this case, keyword arguments will be disregarded and contents
must be a complete LaTeX document.requires
: code which comes before documentclass
in the preamble. Default: raw"\\RequirePackage{luatex85}"
.class
: the document class. Default (and what you should use): "standalone"
.classoptions
: the options you should pass to the class, i.e., \\documentclass[$classoptions]{$class}
. Default: "preview, tightpage, 12pt"
.preamble
: arbitrary code for the preamble (between \\documentclass
and \\begin{document}
). Default: raw"\\usepackage{amsmath, xcolor} \\pagestyle{empty}"
.CachedTEX
, compile_latex
, etc.TypstDocument(contents::AbstractString, add_defaults::Bool; preamble)
struct
of type TypstDocument
. All arguments are to be passed as strings.add_defaults
is false
, then we will not automatically add document structure. Note that in this case, keyword arguments will be disregarded and contents
must be a complete Typst document.preamble
: arbitrary code inserted prior to the contents
. Default: ""
.CachedTypst
, compile_typst
, etc.Cached document types
CachedTEX(doc::TEXDocument; kwargs...)
TEXDocument
, compile it and return the cached TeX object.CachedTEX
struct stores the document and its compiled form, as well as some pointers to in-program versions of it. It also stores the page dimensions.kwargs
, one can pass anything which goes to the internal function compile_latex
. These are primarily:engine =
lualatex/
xelatex/...
: the LaTeX engine to use when renderingoptions=
-file-line-error\`\`: the options to pass tolatexmk
.doc
pdf
ptr
surf
dims
mutable struct
because the pointer to the Poppler handle can change. TODO: make this an immutable struct with a Ref to the handle?? OR maybe even the surface itself...CachedTEX
with nothing
in the doc
field, if you just want to insert a pre-rendered PDF into your figure.CachedTypst(doc::TypstDocument)
TypstDocument
, compile it and return the cached Typst object.CachedTypst
struct stores the document and its compiled form, as well as some pointers to in-program versions of it. It also stores the page dimensions.doc
pdf
ptr
surf
dims
mutable struct
because the pointer to the Poppler handle can change. TODO: make this an immutable struct with a Ref to the handle?? OR maybe even the surface itself...CachedTypst
with nothing
in the doc
field, if you just want to insert a pre-rendered PDF into your figure.CachedPDF(pdf::PDFDocument)
CachedPDF(read("path/to/pdf.pdf"), [page = 0])
+CachedPDF(read("path/to/pdf.pdf", String), [page = 0])
+CachedPDF(PDFDocument(...), [page = 0])
doc
: A reference to the PDFDocument
which is cached here.ptr
: A pointer to the Poppler handle of the PDF. May be randomly GC'ed by Poppler.dims
: The dimensions of the PDF page in points, for ease of access.surf
: A Cairo surface to which Poppler has drawn the PDF. Permanent and cached.image_cache
: A cache for a (rendered_image, scale_factor) pair. This is used to avoid re-rendering the PDF.CachedSVG(svg::SVGDocument)
CachedSVG(read("path/to/svg.svg"))
+CachedSVG(read("path/to/svg.svg", String))
+CachedSVG(SVGDocument(...))
doc
: The original SVGDocument
which is cached here, i.e., the text of that SVG.handle
: A pointer to the Rsvg handle of the SVG. May be randomly GC'ed by Rsvg, so is stored as a Ref
in case it has to be refreshed.dims
: The dimensions of the SVG in points, for ease of access.surf
: A Cairo surface to which Rsvg has drawn the SVG. Permanent and cached.image_cache
: A cache for a (rendered_image, scale_factor) pair. This is used to avoid re-rendering the PDF.CachedEPS
. Check Documenter's build log for details.compile_latex
), PDF and SVG handling utils here, in case they are of use to anyone.All other methods and functions
CachedTEX(doc::TEXDocument; kwargs...)
TEXDocument
, compile it and return the cached TeX object.CachedTEX
struct stores the document and its compiled form, as well as some pointers to in-program versions of it. It also stores the page dimensions.kwargs
, one can pass anything which goes to the internal function compile_latex
. These are primarily:engine =
lualatex/
xelatex/...
: the LaTeX engine to use when renderingoptions=
-file-line-error\`\`: the options to pass tolatexmk
.doc
pdf
ptr
surf
dims
mutable struct
because the pointer to the Poppler handle can change. TODO: make this an immutable struct with a Ref to the handle?? OR maybe even the surface itself...CachedTEX
with nothing
in the doc
field, if you just want to insert a pre-rendered PDF into your figure.CachedTypst(doc::TypstDocument)
TypstDocument
, compile it and return the cached Typst object.CachedTypst
struct stores the document and its compiled form, as well as some pointers to in-program versions of it. It also stores the page dimensions.doc
pdf
ptr
surf
dims
mutable struct
because the pointer to the Poppler handle can change. TODO: make this an immutable struct with a Ref to the handle?? OR maybe even the surface itself...CachedTypst
with nothing
in the doc
field, if you just want to insert a pre-rendered PDF into your figure.EPSDocument(eps::AbstractString, [page = 0])
CachedPDF
for use in plotting.TEXDocument(contents::AbstractString, add_defaults::Bool; requires, preamble, class, classoptions)
struct
of type TEXDocument
which can be passed to teximg
. All arguments are to be passed as strings.add_defaults
is false
, then we will not automatically add document structure. Note that in this case, keyword arguments will be disregarded and contents
must be a complete LaTeX document.requires
: code which comes before documentclass
in the preamble. Default: raw"\\RequirePackage{luatex85}"
.class
: the document class. Default (and what you should use): "standalone"
.classoptions
: the options you should pass to the class, i.e., \\documentclass[$classoptions]{$class}
. Default: "preview, tightpage, 12pt"
.preamble
: arbitrary code for the preamble (between \\documentclass
and \\begin{document}
). Default: raw"\\usepackage{amsmath, xcolor} \\pagestyle{empty}"
.CachedTEX
, compile_latex
, etc.TypstDocument(contents::AbstractString, add_defaults::Bool; preamble)
struct
of type TypstDocument
. All arguments are to be passed as strings.add_defaults
is false
, then we will not automatically add document structure. Note that in this case, keyword arguments will be disregarded and contents
must be a complete Typst document.preamble
: arbitrary code inserted prior to the contents
. Default: ""
.CachedTypst
, compile_typst
, etc.compile_latex(document::AbstractString; tex_engine = CURRENT_TEX_ENGINE[], options = \`-file-line-error\`)
compile_typst(document::AbstractString)
crop_pdf(path; margin = (0, 0, 0, 0))
get_pdf_bbox(path)
load_pdf(pdf::String)::Ptr{Cvoid}
+load_pdf(pdf::Vector{UInt8})::Ptr{Cvoid}
Vector{UInt8}
, each representing the PDF file in memory.page2img(ct::Union{CachedTeX, CachedTypst}, page::Int; scale = 1, render_density = 1)
page
of the given CachedTeX
or CachedTypst
object to an image, with the given scale
and render_density
.pdf_get_page_size(document::Ptr{Cvoid}, page_number::Int)::Tuple{Float64, Float64}
document
must be a Poppler document handle. Returns a tuple of width, height
.pdf_num_pages(document::Ptr{Cvoid})::Int
document
must be a Poppler document handle. Returns the number of pages in the document.pdf_num_pages(filename::String)::Int
filename
, using the Poppler executable.angle
radians. This is not perfect but works well enough. Check an A vs X to see the difference.split_pdf(pdf::Union{Vector{UInt8}, String})::Vector{UInt8}
load_pdf
and page2img
instead.texdoc(contents::AbstractString; kwargs...)
TEXDocument(contents, add_defaults=true; kwargs...)
.requires
: code which comes before documentclass
in the preamble. Default: raw"\\RequirePackage{luatex85}"
.class
: the document class. Default (and what you should use): "standalone"
.classoptions
: the options you should pass to the class, i.e., \\documentclass[$classoptions]{$class}
. Default: "preview, tightpage, 12pt"
.preamble
: arbitrary code for the preamble (between \\documentclass
and \\begin{document}
). Default: raw"\\usepackage{amsmath, xcolor} \\pagestyle{empty}"
.teximg(tex; position, ...)
+teximg!(ax_or_scene, tex; position, ...)
TeX
to your Figure or Scene.String
, which is rendered to LaTeX cognizant of the figure's overall theme,TeXDocument
object, which is rendered to LaTeX directly, and can be customized by the user,CachedTeX
object, which is a pre-rendered LaTeX document.tex
may be a single one of these objects, or an array of them.MakieCore.Plot{MakieTeX.teximg}
are: align (:center, :center)
+ depth_shift 0.0f0
+ inspectable true
+ inspector_clear MakieCore.Automatic()
+ inspector_hover MakieCore.Automatic()
+ inspector_label MakieCore.Automatic()
+ markerspace :pixel
+ overdraw false
+ position GeometryBasics.Point{2, Float32}[[0.0, 0.0]]
+ render_density 2
+ rotation Float32[0.0]
+ scale 1.0
+ space :data
+ ssao false
+ transparency false
+ visible true
typstdoc(contents::AbstractString; kwargs...)
TypstDocument(contents, add_defaults=true; kwargs...)
.preamble
: arbitrary code inserted prior to the contents
. Default: ""
.
`,98),d=[l];function o(n,p,r,c,h,k){return s(),i("div",null,d)}const b=e(t,[["render",o]]);export{g as __pageData,b as default};
diff --git a/previews/PR49/assets/api.md.D0QsWSOu.lean.js b/previews/PR49/assets/api.md.D0QsWSOu.lean.js
new file mode 100644
index 0000000..49dd4d6
--- /dev/null
+++ b/previews/PR49/assets/api.md.D0QsWSOu.lean.js
@@ -0,0 +1 @@
+import{_ as e,c as i,o as s,a6 as a}from"./chunks/framework.D9_xqL9a.js";const g=JSON.parse('{"title":"API documentation","description":"","frontmatter":{},"headers":[],"relativePath":"api.md","filePath":"api.md","lastUpdated":null}'),t={name:"api.md"},l=a("",98),d=[l];function o(n,p,r,c,h,k){return s(),i("div",null,d)}const b=e(t,[["render",o]]);export{g as __pageData,b as default};
diff --git a/previews/PR49/assets/app.BrjxpGac.js b/previews/PR49/assets/app.BrjxpGac.js
new file mode 100644
index 0000000..da16e24
--- /dev/null
+++ b/previews/PR49/assets/app.BrjxpGac.js
@@ -0,0 +1 @@
+import{U as o,a7 as p,a8 as u,a9 as l,aa as c,ab as f,ac as d,ad as m,ae as h,af as g,ag as A,d as P,u as v,y,x as w,ah as C,ai as R,aj as b,a5 as E}from"./chunks/framework.D9_xqL9a.js";import{R as S}from"./chunks/theme.BBO8d6__.js";function i(e){if(e.extends){const a=i(e.extends);return{...a,...e,async enhanceApp(t){a.enhanceApp&&await a.enhanceApp(t),e.enhanceApp&&await e.enhanceApp(t)}}}return e}const s=i(S),T=P({name:"VitePressApp",setup(){const{site:e,lang:a,dir:t}=v();return y(()=>{w(()=>{document.documentElement.lang=a.value,document.documentElement.dir=t.value})}),e.value.router.prefetchLinks&&C(),R(),b(),s.setup&&s.setup(),()=>E(s.Layout)}});async function _(){globalThis.__VITEPRESS__=!0;const e=x(),a=j();a.provide(u,e);const t=l(e.route);return a.provide(c,t),a.component("Content",f),a.component("ClientOnly",d),Object.defineProperties(a.config.globalProperties,{$frontmatter:{get(){return t.frontmatter.value}},$params:{get(){return t.page.value.params}}}),s.enhanceApp&&await s.enhanceApp({app:a,router:e,siteData:m}),{app:a,router:e,data:t}}function j(){return h(T)}function x(){let e=o,a;return g(t=>{let n=A(t),r=null;return n&&(e&&(a=n),(e||a===n)&&(n=n.replace(/\.js$/,".lean.js")),r=import(n)),o&&(e=!1),r},s.NotFound)}o&&_().then(({app:e,router:a,data:t})=>{a.go().then(()=>{p(a.route,t.site),e.mount("#app")})});export{_ as createApp};
diff --git a/previews/PR49/assets/chunks/@localSearchIndexroot.B_DrN0ZY.js b/previews/PR49/assets/chunks/@localSearchIndexroot.B_DrN0ZY.js
new file mode 100644
index 0000000..ffe41db
--- /dev/null
+++ b/previews/PR49/assets/chunks/@localSearchIndexroot.B_DrN0ZY.js
@@ -0,0 +1 @@
+const e='{"documentCount":18,"nextId":18,"documentIds":{"0":"/MakieTeX.jl/previews/PR49/api#API-documentation","1":"/MakieTeX.jl/previews/PR49/api#Constants","2":"/MakieTeX.jl/previews/PR49/api#Interfaces","3":"/MakieTeX.jl/previews/PR49/api#AbstractDocument","4":"/MakieTeX.jl/previews/PR49/api#AbstractCachedDocument","5":"/MakieTeX.jl/previews/PR49/api#Document-types","6":"/MakieTeX.jl/previews/PR49/api#Raw-document-types","7":"/MakieTeX.jl/previews/PR49/api#Cached-document-types","8":"/MakieTeX.jl/previews/PR49/api#All-other-methods-and-functions","9":"/MakieTeX.jl/previews/PR49/formats#Available-formats","10":"/MakieTeX.jl/previews/PR49/formats#TeX","11":"/MakieTeX.jl/previews/PR49/formats#Typst","12":"/MakieTeX.jl/previews/PR49/formats#PDF","13":"/MakieTeX.jl/previews/PR49/formats#SVG","14":"/MakieTeX.jl/previews/PR49/#MakieTeX.jl","15":"/MakieTeX.jl/previews/PR49/#Principle-of-operation","16":"/MakieTeX.jl/previews/PR49/#Rendering","17":"/MakieTeX.jl/previews/PR49/#Makie"},"fieldIds":{"title":0,"titles":1,"text":2},"fieldLength":{"0":[2,1,1],"1":[1,2,42],"2":[1,2,1],"3":[1,3,98],"4":[1,3,140],"5":[2,2,1],"6":[3,4,135],"7":[3,4,186],"8":[5,2,386],"9":[2,1,23],"10":[1,2,115],"11":[1,2,27],"12":[1,2,42],"13":[1,2,68],"14":[2,1,61],"15":[3,2,1],"16":[1,5,66],"17":[1,5,78]},"averageFieldLength":[1.7777777777777777,2.5,81.72222222222223],"storedFields":{"0":{"title":"API documentation","titles":[]},"1":{"title":"Constants","titles":["API documentation"]},"2":{"title":"Interfaces","titles":["API documentation"]},"3":{"title":"AbstractDocument","titles":["API documentation","Interfaces"]},"4":{"title":"AbstractCachedDocument","titles":["API documentation","Interfaces"]},"5":{"title":"Document types","titles":["API documentation"]},"6":{"title":"Raw document types","titles":["API documentation","Document types"]},"7":{"title":"Cached document types","titles":["API documentation","Document types"]},"8":{"title":"All other methods and functions","titles":["API documentation"]},"9":{"title":"Available formats","titles":[]},"10":{"title":"TeX","titles":["Available formats"]},"11":{"title":"Typst","titles":["Available formats"]},"12":{"title":"PDF","titles":["Available formats"]},"13":{"title":"SVG","titles":["Available formats"]},"14":{"title":"MakieTeX.jl","titles":[]},"15":{"title":"Principle of operation","titles":["MakieTeX.jl"]},"16":{"title":"Rendering","titles":["MakieTeX.jl","Principle of operation"]},"17":{"title":"Makie","titles":["MakieTeX.jl","Principle of operation"]}},"dirtCount":0,"index":[["4",{"2":{"14":1}}],["jll",{"2":{"16":1}}],["jl",{"0":{"14":1},"1":{"15":1,"16":1,"17":1},"2":{"16":1}}],["just",{"2":{"7":2,"8":3}}],["juliausing",{"2":{"10":2,"11":1,"12":1,"13":1,"14":1}}],["juliaupdate",{"2":{"4":1}}],["juliasplit",{"2":{"8":1}}],["juliasvgdocument",{"2":{"6":1}}],["juliapdf",{"2":{"8":3}}],["juliapdfdocument",{"2":{"6":1}}],["juliapage2img",{"2":{"8":1}}],["juliaload",{"2":{"8":1}}],["juliaget",{"2":{"8":1}}],["juliagetdoc",{"2":{"3":1}}],["juliacrop",{"2":{"8":1}}],["juliacompile",{"2":{"8":2}}],["juliacachedsvg",{"2":{"7":2}}],["juliacachedpdf",{"2":{"7":2}}],["juliacachedtypst",{"2":{"7":1,"8":1}}],["juliacachedtex",{"2":{"7":1,"8":1}}],["juliacached",{"2":{"3":1}}],["juliaepsdocument",{"2":{"8":1}}],["juliatypstdoc",{"2":{"8":1}}],["juliatypstdocument",{"2":{"6":1,"8":1}}],["juliateximg",{"2":{"8":1}}],["juliatexdoc",{"2":{"8":1}}],["juliatexdocument",{"2":{"6":1,"8":1}}],["juliadraw",{"2":{"4":1}}],["juliarasterize",{"2":{"4":1}}],["juliamimetype",{"2":{"3":1}}],["juliaabstract",{"2":{"3":1,"4":1}}],["7",{"2":{"13":1}}],["5",{"2":{"12":2,"13":2}}],["50",{"2":{"10":2,"12":1,"13":2}}],["$",{"2":{"11":2}}],["$class",{"2":{"6":1,"8":2}}],["$classoptions",{"2":{"6":1,"8":2}}],["90",{"2":{"10":2}}],["330",{"2":{"10":2}}],["30",{"2":{"10":3}}],["39",{"2":{"6":1,"7":3,"8":2}}],["^2",{"2":{"10":1,"11":1}}],["210",{"2":{"10":2}}],["2",{"2":{"8":2,"10":13,"12":2,"14":2}}],["2d",{"2":{"8":1}}],["via",{"2":{"17":1}}],["visible",{"2":{"8":1}}],["viewport",{"2":{"8":1}}],["vs",{"2":{"8":1}}],["venn",{"2":{"10":1}}],["version",{"2":{"4":1}}],["versions",{"2":{"4":1,"7":2,"8":2}}],["vector",{"2":{"3":4,"8":6,"14":1}}],["`scatter`",{"2":{"10":1}}],["`",{"2":{"8":1}}],["ymax",{"2":{"8":1}}],["ymin",{"2":{"8":1}}],["y",{"2":{"8":1}}],["your",{"2":{"7":2,"8":3}}],["you",{"2":{"6":2,"7":2,"8":8,"10":2,"13":1}}],["kottwitz",{"2":{"10":1}}],["kwargs",{"2":{"7":2,"8":6}}],["keyword",{"2":{"6":4,"8":6}}],["xmax",{"2":{"8":1}}],["xmin",{"2":{"8":1}}],["x",{"2":{"8":2,"10":1,"11":2}}],["xelatex",{"2":{"7":1,"8":1}}],["xcolor",{"2":{"6":1,"8":2}}],["x3c",{"2":{"3":1}}],["https",{"2":{"10":1,"12":1,"13":1}}],["hook",{"2":{"17":1}}],["however",{"2":{"10":1,"13":1,"17":1}}],["hover",{"2":{"8":1}}],["holds",{"2":{"6":1,"7":2,"8":1}}],["height",{"2":{"8":2}}],["here",{"2":{"7":3}}],["have",{"2":{"16":1}}],["hardware",{"2":{"10":1}}],["happens",{"2":{"8":1}}],["handling",{"2":{"7":1}}],["handle",{"2":{"4":11,"7":9,"8":10}}],["has",{"2":{"3":1,"4":2,"7":5,"16":1}}],["05",{"2":{"12":1}}],["0^pi",{"2":{"11":1}}],["0^",{"2":{"10":1}}],["0f0",{"2":{"8":1}}],["0",{"2":{"6":1,"7":3,"8":13,"12":1}}],["gl",{"2":{"16":1}}],["glmakie",{"2":{"13":1}}],["go",{"2":{"13":1}}],["goes",{"2":{"7":1,"8":1}}],["githubusercontent",{"2":{"13":1}}],["given",{"2":{"4":1,"8":4}}],["green",{"2":{"10":1,"13":1}}],["group",{"2":{"10":1}}],["ghostscript",{"2":{"8":3}}],["gc",{"2":{"7":2}}],["g",{"2":{"4":1}}],["garbage",{"2":{"4":1}}],["gt",{"2":{"4":1}}],["geometrybasics",{"2":{"8":1}}],["get",{"2":{"8":4,"17":2}}],["getdoc",{"2":{"3":2}}],["general",{"2":{"17":1}}],["generally",{"2":{"3":1}}],["generic",{"2":{"3":2}}],["least",{"2":{"17":1}}],["librsvg",{"2":{"16":1}}],["list",{"2":{"14":1}}],["like",{"2":{"14":1,"17":1}}],["light",{"2":{"10":1}}],["line",{"2":{"7":1,"8":2}}],["l",{"2":{"10":1}}],["large",{"2":{"10":1}}],["label",{"2":{"8":1}}],["latexstrings",{"2":{"10":1}}],["latex",{"2":{"6":2,"7":4,"8":10,"10":8,"12":1,"14":1}}],["luatex85",{"2":{"6":1,"8":2}}],["local",{"2":{"16":1}}],["located",{"2":{"8":1}}],["logo",{"2":{"12":1}}],["log",{"2":{"6":1,"7":1}}],["loads",{"2":{"8":1}}],["load",{"2":{"4":1,"8":3}}],["loaded",{"2":{"4":4}}],["ltex",{"2":{"10":4,"11":1,"12":2}}],["lt",{"2":{"4":1}}],["100",{"2":{"11":2}}],["10",{"2":{"10":4,"13":2}}],["12pt",{"2":{"6":1,"8":2}}],["1",{"2":{"4":2,"8":3,"10":11,"11":2,"12":4,"13":2,"14":3}}],["=lualatex",{"2":{"7":1,"8":1}}],["=",{"2":{"4":2,"6":1,"7":3,"8":6,"10":10,"11":5,"12":3,"13":6,"14":1}}],["==",{"2":{"3":1}}],["rotation",{"2":{"8":1}}],["rotated",{"2":{"8":1}}],["rotatedrect",{"2":{"8":1}}],["rand",{"2":{"10":4,"12":2,"13":4}}],["randomly",{"2":{"7":2}}],["radians",{"2":{"8":1}}],["raw",{"0":{"6":1},"2":{"6":3,"8":4,"10":1,"13":1,"14":1}}],["rasterizes",{"2":{"17":1}}],["rasterize",{"2":{"4":3,"16":1}}],["rasterized",{"2":{"4":1}}],["rsvghandle",{"2":{"8":1}}],["rsvgrectangle",{"2":{"8":3}}],["rsvg",{"2":{"4":1,"7":4}}],["red",{"2":{"10":1}}],["recipe",{"2":{"8":1,"10":2,"12":1,"14":1}}],["rectangle",{"2":{"8":2}}],["represent",{"2":{"8":2}}],["representing",{"2":{"8":3}}],["remove",{"2":{"8":1}}],["resulting",{"2":{"8":2}}],["re",{"2":{"7":2}}],["requirepackage",{"2":{"6":1,"8":2}}],["requires",{"2":{"6":2,"8":3}}],["reload",{"2":{"4":1}}],["ref",{"2":{"7":3,"8":2}}],["refreshed",{"2":{"7":1}}],["refresh",{"2":{"4":1}}],["reference",{"2":{"4":1,"7":1}}],["reads",{"2":{"8":1}}],["read",{"2":{"7":4,"8":1,"12":1,"13":1}}],["real",{"2":{"4":2}}],["reasons",{"2":{"4":1}}],["returning",{"2":{"8":1}}],["returns",{"2":{"4":2,"8":4}}],["return",{"2":{"3":3,"4":1,"7":2,"8":5}}],["renderer",{"2":{"16":1}}],["rendered",{"2":{"4":1,"7":6,"8":6}}],["renders",{"2":{"8":2}}],["rendering",{"0":{"16":1},"2":{"1":1,"4":2,"7":3,"8":1,"9":1,"16":3,"17":3}}],["render",{"2":{"1":3,"4":2,"8":6,"16":1}}],["quot",{"2":{"3":2,"4":2,"6":10,"8":20}}],["breaking",{"2":{"17":1}}],["backends",{"2":{"16":1,"17":1}}],["base",{"2":{"3":3}}],["bit",{"2":{"17":1}}],["bitmap",{"2":{"16":1,"17":1}}],["big",{"2":{"12":1}}],["blue",{"2":{"10":1}}],["blend",{"2":{"10":1}}],["blending",{"2":{"10":1}}],["block",{"2":{"10":2,"12":1}}],["bbox",{"2":{"8":2}}],["bundled",{"2":{"16":1}}],["but",{"2":{"8":2,"17":2}}],["build",{"2":{"6":1,"7":1}}],["both",{"2":{"16":1}}],["border=10pt",{"2":{"10":1}}],["bounding",{"2":{"8":2}}],["box",{"2":{"8":3}}],["bool",{"2":{"6":2,"8":2}}],["bytes",{"2":{"8":1}}],["by",{"2":{"7":2,"8":2,"13":1,"17":1}}],["below",{"2":{"10":1,"13":1}}],["because",{"2":{"7":2,"8":2}}],["begin",{"2":{"6":1,"8":2,"10":3,"14":1}}],["between",{"2":{"6":1,"8":2}}],["before",{"2":{"6":1,"8":2}}],["been",{"2":{"4":2,"7":2}}],["be",{"2":{"3":2,"4":3,"6":7,"7":3,"8":13,"10":1,"13":1,"17":1}}],["only",{"2":{"17":1}}],["one",{"2":{"7":1,"8":2}}],["own",{"2":{"16":1}}],["occur",{"2":{"16":1}}],["old",{"2":{"13":1}}],["overdraw",{"2":{"8":1}}],["overall",{"2":{"8":1}}],["overload",{"2":{"3":1,"17":1}}],["other",{"0":{"8":1},"2":{"10":1}}],["operation",{"0":{"15":1},"1":{"16":1,"17":1}}],["openable",{"2":{"3":1}}],["options=",{"2":{"7":1,"8":1}}],["options",{"2":{"6":1,"7":1,"8":4}}],["objects",{"2":{"8":1}}],["object",{"2":{"3":1,"7":2,"8":5,"14":1}}],["of",{"0":{"15":1},"1":{"16":1,"17":1},"2":{"3":4,"4":5,"6":2,"7":10,"8":18,"9":1,"10":2,"13":1,"14":1,"16":1,"17":2}}],["org",{"2":{"12":1}}],["original",{"2":{"7":1}}],["or",{"2":{"1":1,"3":2,"4":2,"7":2,"8":8,"13":1,"16":1}}],["upload",{"2":{"12":1}}],["updated",{"2":{"4":1}}],["update",{"2":{"4":5}}],["utils",{"2":{"7":1}}],["union",{"2":{"3":2,"8":2}}],["us",{"2":{"17":1}}],["usually",{"2":{"16":1}}],["usage",{"2":{"7":2}}],["users",{"2":{"14":2}}],["user",{"2":{"8":1}}],["usepackage",{"2":{"6":1,"8":2,"10":1}}],["use",{"2":{"6":3,"7":2,"8":5,"9":1,"10":6,"12":3,"16":1}}],["used",{"2":{"4":1,"7":2,"10":1}}],["uses",{"2":{"1":1,"8":1,"16":3}}],["using",{"2":{"3":1,"4":1,"8":4,"13":1}}],["uint8",{"2":{"3":4,"8":6}}],["separate",{"2":{"16":1}}],["see",{"2":{"4":1,"6":2,"8":4,"13":1,"14":2}}],["same",{"2":{"13":1,"17":1}}],["saved",{"2":{"3":1}}],["ssao",{"2":{"8":1}}],["spritemarker",{"2":{"17":1}}],["specifically",{"2":{"17":2}}],["space",{"2":{"8":1}}],["splits",{"2":{"8":1}}],["split",{"2":{"8":2}}],["shift",{"2":{"8":1}}],["shorthand",{"2":{"8":2}}],["should",{"2":{"3":1,"4":1,"6":2,"8":4,"17":1}}],["scope",{"2":{"10":2}}],["scatter",{"2":{"10":4,"12":2,"13":3,"14":1,"17":2}}],["scale",{"2":{"4":4,"7":2,"8":3}}],["scene",{"2":{"8":2}}],["sin",{"2":{"10":1,"11":1}}],["single",{"2":{"8":1}}],["size=",{"2":{"11":1}}],["size",{"2":{"8":2}}],["simple",{"2":{"8":1}}],["s",{"2":{"6":1,"7":1,"8":2}}],["subtype",{"2":{"4":1}}],["surf",{"2":{"4":2,"7":4,"8":2}}],["surface",{"2":{"4":5,"7":6,"8":3,"16":2}}],["soft",{"2":{"10":1}}],["so",{"2":{"7":1,"16":1}}],["some",{"2":{"4":1,"7":2,"8":2}}],["source",{"2":{"1":4,"3":4,"4":4,"6":4,"7":4,"8":23}}],["styling",{"2":{"17":1}}],["stefan",{"2":{"10":1}}],["standalone",{"2":{"6":1,"8":2,"10":1}}],["strokewidth",{"2":{"13":1}}],["strokecolor",{"2":{"13":1}}],["structure",{"2":{"6":2,"8":2}}],["struct",{"2":{"6":2,"7":6,"8":9}}],["strings",{"2":{"6":2,"8":2}}],["string",{"2":{"3":4,"6":2,"7":2,"8":13,"10":3,"11":2,"13":1}}],["stored",{"2":{"7":1}}],["stores",{"2":{"6":1,"7":6,"8":6}}],["store",{"2":{"4":1}}],["svg",{"0":{"13":1},"2":{"4":1,"6":2,"7":11,"9":1,"13":7,"14":1,"16":1,"17":1}}],["svgs",{"2":{"4":1}}],["svg+xml",{"2":{"3":1}}],["svgdocument",{"2":{"3":1,"6":1,"7":3,"13":1}}],["again",{"2":{"17":1}}],["author",{"2":{"10":1}}],["automatic",{"2":{"8":3}}],["automatically",{"2":{"6":2,"8":2}}],["ax",{"2":{"8":1}}],["across",{"2":{"17":1}}],["accept",{"2":{"10":1}}],["access",{"2":{"7":2}}],["actually",{"2":{"8":2}}],["about",{"2":{"7":1}}],["abstractstring",{"2":{"6":4,"8":7}}],["abstractcacheddocuments",{"2":{"4":1}}],["abstractcacheddocument",{"0":{"4":1},"2":{"3":2,"4":9}}],["abstractdocuments",{"2":{"3":1,"4":1}}],["abstractdocument",{"0":{"3":1},"2":{"3":10,"4":1}}],["avoid",{"2":{"7":2}}],["available",{"0":{"9":1},"1":{"10":1,"11":1,"12":1,"13":1},"2":{"6":2,"8":5,"16":1}}],["amsmath",{"2":{"6":1,"8":2}}],["align",{"2":{"8":1,"14":2}}],["alters",{"2":{"8":1}}],["already",{"2":{"7":2}}],["along",{"2":{"7":2}}],["allows",{"2":{"9":1,"14":2,"17":1}}],["all",{"0":{"8":1},"2":{"6":2,"8":2,"14":1}}],["also",{"2":{"4":1,"6":2,"7":4,"8":8,"10":1,"17":1}}],["add",{"2":{"6":6,"7":1,"8":8}}],["additional",{"2":{"3":1}}],["apply",{"2":{"17":1}}],["applies",{"2":{"13":1}}],["approaches",{"2":{"14":1}}],["approximation",{"2":{"8":1}}],["appropriate",{"2":{"4":2}}],["apis",{"2":{"16":1}}],["api",{"0":{"0":1},"1":{"1":1,"2":1,"3":1,"4":1,"5":1,"6":1,"7":1,"8":1},"2":{"4":1,"14":2}}],["attribute",{"2":{"17":1}}],["attributes",{"2":{"8":2}}],["at",{"2":{"4":1,"8":1,"10":3,"17":1}}],["array",{"2":{"8":1}}],["arrays",{"2":{"8":1}}],["around",{"2":{"8":1}}],["arbitrary",{"2":{"6":2,"8":4}}],["arguments",{"2":{"6":6,"8":8}}],["argb32",{"2":{"4":2}}],["are",{"2":{"4":1,"6":4,"7":2,"8":9,"13":1,"16":1}}],["as",{"2":{"3":2,"4":6,"6":3,"7":5,"8":13,"10":3,"12":1,"13":1,"14":1}}],["a",{"2":{"3":8,"4":13,"6":8,"7":26,"8":51,"10":4,"12":1,"14":2,"16":3,"17":5}}],["angle",{"2":{"8":1}}],["any",{"2":{"8":1,"10":1,"14":1}}],["anyone",{"2":{"7":1}}],["anything",{"2":{"7":1,"8":1}}],["and",{"0":{"8":1},"2":{"3":2,"4":5,"6":4,"7":9,"8":19,"9":1,"10":1,"14":3,"16":3,"17":3}}],["an",{"2":{"3":1,"4":2,"6":1,"7":4,"8":8,"13":1,"17":1}}],["ignoring",{"2":{"17":1}}],["icons",{"2":{"13":2}}],["if",{"2":{"3":1,"4":1,"6":2,"7":2,"8":5,"10":1,"13":1,"16":1}}],["i",{"2":{"3":1,"6":1,"7":1,"8":2}}],["implicit",{"2":{"17":1}}],["implemented",{"2":{"4":1}}],["implement",{"2":{"3":1,"4":1}}],["immutable",{"2":{"7":2,"8":2}}],["immediately",{"2":{"3":1}}],["image",{"2":{"3":1,"4":2,"7":4,"8":2,"17":1}}],["images",{"2":{"1":1,"14":1}}],["incompatibility",{"2":{"17":1}}],["inspector",{"2":{"8":3}}],["inspectable",{"2":{"8":1}}],["instead",{"2":{"8":1}}],["insert",{"2":{"7":2,"8":2}}],["inserted",{"2":{"6":1,"8":2}}],["input",{"2":{"8":5}}],["init",{"2":{"8":1}}],["integral",{"2":{"11":1}}],["internal",{"2":{"4":1,"7":1,"8":1}}],["interface",{"2":{"3":1}}],["interfaces",{"0":{"2":1},"1":{"3":1,"4":1}}],["int",{"2":{"8":4,"10":1}}],["into",{"2":{"7":2,"8":4}}],["invalid",{"2":{"4":1}}],["invalidated",{"2":{"4":1}}],["in",{"2":{"3":1,"4":3,"6":5,"7":9,"8":13,"9":1,"10":1,"13":2,"14":1,"17":2}}],["indicate",{"2":{"3":1}}],["is",{"2":{"3":3,"4":4,"6":4,"7":9,"8":14,"9":1,"13":1,"14":1,"16":1,"17":4}}],["itself",{"2":{"7":2,"8":2}}],["its",{"2":{"4":1,"7":2,"8":3,"16":1}}],["it",{"2":{"3":4,"4":5,"7":11,"8":9,"14":1,"17":3}}],["node",{"2":{"10":4}}],["nothing",{"2":{"7":2,"8":2}}],["note",{"2":{"3":1,"4":1,"6":2,"7":4,"8":6}}],["not",{"2":{"1":1,"6":2,"8":6,"10":1,"13":1,"16":1}}],["num",{"2":{"8":4}}],["number",{"2":{"3":1,"8":3}}],["needs",{"2":{"4":1}}],["new",{"2":{"4":1}}],["nbsp",{"2":{"1":4,"3":4,"4":4,"6":4,"7":4,"8":23}}],["from",{"2":{"17":1}}],["frac",{"2":{"14":3}}],["fr",{"2":{"12":1}}],["float32",{"2":{"8":2}}],["float64",{"2":{"8":6}}],["factor",{"2":{"7":2}}],["false",{"2":{"1":1,"6":2,"8":5}}],["function",{"2":{"3":3,"4":10,"6":2,"7":1,"8":4,"17":1}}],["functions",{"0":{"8":1},"2":{"3":1,"14":1}}],["full",{"2":{"3":2,"10":1}}],["follow",{"2":{"16":1}}],["following",{"2":{"3":1,"4":1,"7":2,"8":2}}],["font=",{"2":{"10":1}}],["found",{"2":{"4":1}}],["format",{"2":{"16":1}}],["formats",{"0":{"9":1},"1":{"10":1,"11":1,"12":1,"13":1}}],["form",{"2":{"7":2,"8":2,"9":1}}],["for",{"2":{"1":1,"3":3,"4":9,"6":5,"7":6,"8":6,"13":1,"16":2,"17":1}}],["fill",{"2":{"10":3}}],["files",{"2":{"8":1}}],["filename",{"2":{"8":4}}],["file",{"2":{"3":4,"7":1,"8":8,"13":1}}],["fig",{"2":{"10":10,"11":3,"12":5,"13":3}}],["figure",{"2":{"7":2,"8":4,"10":2,"11":1,"12":1,"13":1}}],["field",{"2":{"4":2,"7":2,"8":2}}],["fields",{"2":{"3":1,"7":4,"8":2}}],["end",{"2":{"10":3,"14":1}}],["enough",{"2":{"8":1}}],["engine",{"2":{"1":2,"7":2,"8":7}}],["either",{"2":{"8":2,"16":1}}],["elements",{"2":{"8":1,"17":1}}],["error`",{"2":{"8":1}}],["error``",{"2":{"7":1,"8":1}}],["eps",{"2":{"8":2,"16":1}}],["epsdocument",{"2":{"6":1,"8":1}}],["easiest",{"2":{"9":1}}],["ease",{"2":{"7":2}}],["each",{"2":{"4":1,"8":2,"16":2}}],["ed",{"2":{"7":2}}],["even",{"2":{"7":2,"8":2}}],["empty",{"2":{"6":1,"8":2}}],["etc",{"2":{"4":1,"6":2,"8":2}}],["e",{"2":{"3":1,"4":1,"6":1,"7":1,"8":2}}],["exported",{"2":{"14":1}}],["exposes",{"2":{"14":1}}],["executable",{"2":{"8":1}}],["example",{"2":{"3":2,"4":1,"13":1}}],["extrasafe",{"2":{"1":1}}],["tectonic",{"2":{"16":1}}],["texdoc",{"2":{"8":1}}],["texdocument",{"2":{"6":2,"7":2,"8":6,"10":2}}],["text",{"2":{"7":1}}],["teximg",{"2":{"6":1,"8":4,"10":4,"12":2,"14":2}}],["tex",{"0":{"10":1},"2":{"1":2,"7":1,"8":8,"9":1,"10":8,"14":1,"16":2}}],["two",{"2":{"14":1}}],["times",{"2":{"14":1}}],["tikzpicture",{"2":{"10":2}}],["tikz",{"2":{"10":1}}],["tight",{"2":{"8":1}}],["tightpage",{"2":{"6":1,"8":2}}],["tuple",{"2":{"8":3}}],["typography",{"2":{"10":1}}],["typst",{"0":{"11":1},"2":{"6":2,"7":1,"8":6,"11":7,"16":2}}],["typstdocument",{"2":{"6":2,"7":2,"8":5,"11":1}}],["types",{"0":{"5":1,"6":1,"7":1},"1":{"6":1,"7":1},"2":{"4":1,"8":1,"14":1}}],["type",{"2":{"3":5,"4":6,"6":8,"7":4,"8":5}}],["thing",{"2":{"13":1}}],["things",{"2":{"10":1}}],["this",{"2":{"3":2,"4":5,"6":4,"7":6,"8":13,"13":1,"17":3}}],["three",{"2":{"8":1}}],["that",{"2":{"4":1,"6":2,"7":1,"8":2,"14":1,"17":1}}],["their",{"2":{"8":1}}],["them",{"2":{"8":1}}],["theme",{"2":{"8":1}}],["these",{"2":{"7":1,"8":2,"9":1,"16":1}}],["then",{"2":{"6":2,"8":3,"13":1,"16":1,"17":1}}],["they",{"2":{"4":1,"7":1}}],["there",{"2":{"3":1,"8":1,"17":1}}],["the",{"2":{"1":1,"3":10,"4":21,"6":6,"7":39,"8":62,"9":3,"10":8,"12":3,"13":5,"14":3,"16":3,"17":8}}],["todo",{"2":{"7":3,"8":2}}],["tolatexmk",{"2":{"7":1,"8":1}}],["touch",{"2":{"1":1}}],["to",{"2":{"1":1,"3":3,"4":13,"6":7,"7":28,"8":31,"9":2,"13":1,"14":4,"16":5,"17":8}}],["tradeoff",{"2":{"17":1}}],["transparency",{"2":{"8":1}}],["treats",{"2":{"17":1}}],["try",{"2":{"1":1,"8":2}}],["true",{"2":{"1":1,"8":2}}],["circle",{"2":{"10":3}}],["clear",{"2":{"8":1}}],["classoptions",{"2":{"6":2,"8":3}}],["class",{"2":{"6":4,"8":7}}],["center",{"2":{"8":2}}],["customized",{"2":{"8":1}}],["current",{"2":{"1":2,"8":1}}],["ct",{"2":{"8":1}}],["cvoid",{"2":{"8":4}}],["creative",{"2":{"10":1}}],["creates",{"2":{"6":2,"8":2}}],["cr",{"2":{"8":1}}],["crop",{"2":{"8":3}}],["change",{"2":{"7":2,"8":2}}],["checks",{"2":{"8":1}}],["check",{"2":{"6":1,"7":1,"8":1}}],["color",{"2":{"13":1}}],["colored",{"2":{"13":1}}],["collected",{"2":{"4":1}}],["coding",{"2":{"10":1}}],["code",{"2":{"6":3,"8":6}}],["cookbook",{"2":{"10":1}}],["could",{"2":{"10":1}}],["cognizant",{"2":{"8":1}}],["correct",{"2":{"8":1,"17":2}}],["commons",{"2":{"12":1}}],["com",{"2":{"10":1,"13":1}}],["complexities",{"2":{"16":1}}],["complete",{"2":{"6":2,"8":2}}],["compiles",{"2":{"14":1}}],["compiled",{"2":{"7":2,"8":2}}],["compile",{"2":{"6":2,"7":6,"8":11}}],["comes",{"2":{"6":1,"8":2}}],["conversion",{"2":{"17":2}}],["convert",{"2":{"11":1}}],["converted",{"2":{"6":2,"8":1}}],["convenience",{"2":{"4":2}}],["concrete",{"2":{"4":1}}],["constituent",{"2":{"8":1}}],["construct",{"2":{"7":2,"8":2,"9":1}}],["constructors",{"2":{"9":1}}],["constructor",{"2":{"6":2,"7":2,"8":4}}],["constructed",{"2":{"3":1}}],["constant",{"2":{"1":4}}],["constants",{"0":{"1":1}}],["contents",{"2":{"3":2,"6":5,"8":10}}],["contain",{"2":{"3":3,"4":1}}],["calculate",{"2":{"8":1}}],["calls",{"2":{"4":2}}],["can",{"2":{"6":1,"7":3,"8":6,"10":1,"16":1}}],["cache",{"2":{"3":1,"4":1,"7":4}}],["cachedeps",{"2":{"7":1}}],["cachedtypst",{"2":{"6":1,"7":3,"8":6,"11":1}}],["cachedtex",{"2":{"6":1,"7":3,"8":7,"10":1}}],["cachedsvg",{"2":{"6":1,"7":3}}],["cachedpdf",{"2":{"4":1,"6":1,"7":3,"8":1,"11":1}}],["cacheddocument",{"2":{"4":3,"14":1}}],["cached",{"0":{"7":1},"2":{"3":2,"4":1,"7":6,"8":2,"10":1,"11":4}}],["case",{"2":{"3":1,"4":1,"6":2,"7":2,"8":2,"13":1}}],["cairomakie",{"2":{"10":2,"11":1,"12":1,"13":2,"14":1,"16":1,"17":3}}],["cairocontext",{"2":{"8":1}}],["cairosurface",{"2":{"4":2}}],["cairo",{"2":{"1":1,"4":5,"7":4,"8":1,"16":2,"17":2}}],["place",{"2":{"10":1}}],["plot",{"2":{"8":1,"14":2}}],["plots",{"2":{"8":1,"14":1}}],["plotting",{"2":{"6":2,"8":1}}],["pi",{"2":{"10":1}}],["pixel",{"2":{"8":1}}],["pipelines",{"2":{"16":1}}],["pipeline",{"2":{"1":2,"16":1,"17":2}}],["perfect",{"2":{"8":1}}],["performance",{"2":{"4":1}}],["permanent",{"2":{"7":2}}],["promise",{"2":{"17":1}}],["provide",{"2":{"8":1}}],["program",{"2":{"7":2,"8":2}}],["principle",{"0":{"15":1},"1":{"16":1,"17":1}}],["primarily",{"2":{"7":1,"8":1}}],["prior",{"2":{"6":1,"8":2}}],["private",{"2":{"1":1}}],["pre",{"2":{"7":2,"8":3}}],["preview",{"2":{"6":1,"8":2}}],["preamble",{"2":{"6":6,"8":10}}],["ptr",{"2":{"4":1,"7":3,"8":6}}],["png",{"2":{"4":1}}],["position",{"2":{"8":3}}],["possible",{"2":{"7":2,"8":2}}],["point",{"2":{"8":1}}],["points",{"2":{"7":2}}],["pointers",{"2":{"7":2,"8":2}}],["pointer",{"2":{"4":5,"7":4,"8":2}}],["poppler",{"2":{"1":1,"4":2,"7":6,"8":7,"16":2}}],["package",{"2":{"14":1}}],["packtpub",{"2":{"10":1}}],["pair",{"2":{"7":2}}],["path",{"2":{"7":4,"8":2}}],["pass",{"2":{"6":1,"7":2,"8":4,"10":1}}],["passed",{"2":{"6":3,"8":3}}],["passing",{"2":{"3":1}}],["page2img",{"2":{"8":2}}],["pagestyle",{"2":{"6":1,"8":2}}],["pages",{"2":{"3":1,"8":7}}],["page",{"2":{"3":2,"6":1,"7":6,"8":9,"14":1}}],["pdfdocument",{"2":{"6":1,"7":3,"12":1}}],["pdfdocuments",{"2":{"3":1}}],["pdfs",{"2":{"4":1}}],["pdf",{"0":{"12":1},"2":{"3":1,"4":2,"6":2,"7":16,"8":34,"9":1,"10":1,"11":2,"12":5,"13":1,"14":2,"16":2}}],["pdfcrop",{"2":{"1":2}}],["wglmakie",{"2":{"13":1}}],["www",{"2":{"10":1}}],["write",{"2":{"8":1}}],["worth",{"2":{"17":1}}],["works",{"2":{"8":1}}],["would",{"2":{"4":1}}],["way",{"2":{"9":1}}],["warn",{"2":{"8":2}}],["want",{"2":{"7":2,"8":3}}],["was",{"2":{"3":1}}],["we",{"2":{"6":2,"8":2,"17":1}}],["well",{"2":{"4":2,"7":2,"8":3}}],["wikipedia",{"2":{"12":2}}],["wikimedia",{"2":{"12":1}}],["wish",{"2":{"10":1}}],["width",{"2":{"8":2}}],["will",{"2":{"4":1,"6":4,"8":4,"10":1,"13":1}}],["with",{"2":{"1":1,"4":1,"7":6,"8":5,"10":1,"16":1,"17":1}}],["while",{"2":{"16":1}}],["white",{"2":{"10":3}}],["whichever",{"2":{"3":1}}],["which",{"2":{"1":1,"3":1,"4":3,"6":4,"7":7,"8":9,"14":3,"16":1}}],["what",{"2":{"6":1,"8":3}}],["whether",{"2":{"8":1}}],["where",{"2":{"3":1}}],["when",{"2":{"1":1,"3":1,"7":1,"8":1,"17":2}}],["me",{"2":{"17":1}}],["memory",{"2":{"8":1}}],["methods",{"0":{"8":1}}],["method",{"2":{"4":1,"8":21}}],["missing",{"2":{"6":2,"7":2}}],["mime",{"2":{"3":5}}],["mimetype",{"2":{"3":4}}],["more",{"2":{"4":1}}],["mutable",{"2":{"7":2,"8":2}}],["multiple",{"2":{"3":1}}],["must",{"2":{"3":3,"4":1,"6":2,"8":5}}],["macros",{"2":{"14":1}}],["master",{"2":{"13":1}}],["marker=tex",{"2":{"10":1}}],["marker=cached",{"2":{"10":1,"12":1,"13":2}}],["marker",{"2":{"10":2,"12":1,"13":1,"17":4}}],["markersize",{"2":{"10":2,"12":1,"13":2}}],["markers",{"2":{"10":1,"14":1}}],["markerspace",{"2":{"8":1}}],["margin",{"2":{"8":1}}],["margins",{"2":{"1":2}}],["manually",{"2":{"7":2,"8":2}}],["makie",{"0":{"17":1},"2":{"9":1,"14":1,"17":6}}],["makiecore",{"2":{"8":4}}],["makietexcairomakieext",{"2":{"17":1}}],["makietex",{"0":{"14":1},"1":{"15":1,"16":1,"17":1},"2":{"1":5,"3":4,"4":4,"6":4,"7":4,"8":24,"9":1,"10":2,"11":1,"12":1,"13":1,"14":2,"16":1,"17":2}}],["make",{"2":{"7":2,"8":2}}],["matrix",{"2":{"4":2}}],["maybe",{"2":{"7":2,"8":2}}],["may",{"2":{"3":1,"7":2,"8":2}}],["mdash",{"2":{"1":4,"3":4,"4":4,"6":4,"7":4,"8":23}}],["dx",{"2":{"10":1}}],["download",{"2":{"12":1,"13":1}}],["does",{"2":{"8":3}}],["docstring",{"2":{"6":2,"7":2}}],["doc",{"2":{"3":5,"4":8,"7":8,"8":7,"10":2,"12":4}}],["documentclass",{"2":{"6":3,"8":6,"10":1}}],["documenter",{"2":{"6":1,"7":1}}],["documents",{"2":{"4":1,"9":1,"14":1}}],["document",{"0":{"5":1,"6":1,"7":1},"1":{"6":1,"7":1},"2":{"3":4,"4":8,"6":8,"7":4,"8":26,"10":10,"11":2,"17":1}}],["documentation",{"0":{"0":1},"1":{"1":1,"2":1,"3":1,"4":1,"5":1,"6":1,"7":1,"8":1},"2":{"4":1,"7":1}}],["diff",{"2":{"11":1}}],["difference",{"2":{"8":1}}],["different",{"2":{"4":2}}],["diagram",{"2":{"10":1}}],["directly",{"2":{"8":1,"14":2,"16":1}}],["dims",{"2":{"7":4,"8":2}}],["dimensions",{"2":{"7":4,"8":2}}],["disregarded",{"2":{"6":2,"8":2}}],["display",{"2":{"3":1}}],["drawn",{"2":{"7":2}}],["draw",{"2":{"4":2,"16":1}}],["data",{"2":{"3":1,"8":1}}],["design",{"2":{"10":1}}],["depth",{"2":{"8":1}}],["details",{"2":{"6":1,"7":1}}],["defined",{"2":{"3":1}}],["defaults=true",{"2":{"8":2}}],["defaults",{"2":{"6":4,"8":5}}],["default",{"2":{"1":3,"6":5,"8":11,"17":2}}],["density",{"2":{"1":2,"8":3}}]],"serializationVersion":2}';export{e as default};
diff --git a/previews/PR49/assets/chunks/VPLocalSearchBox.Cc3Rl635.js b/previews/PR49/assets/chunks/VPLocalSearchBox.Cc3Rl635.js
new file mode 100644
index 0000000..5c449b1
--- /dev/null
+++ b/previews/PR49/assets/chunks/VPLocalSearchBox.Cc3Rl635.js
@@ -0,0 +1,7 @@
+var Ct=Object.defineProperty;var It=(o,e,t)=>e in o?Ct(o,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):o[e]=t;var Oe=(o,e,t)=>(It(o,typeof e!="symbol"?e+"":e,t),t);import{X as Dt,s as oe,v as $e,ak as kt,al as Ot,d as Rt,G as xe,am as tt,h as Fe,an as _t,ao as Mt,x as Lt,ap as zt,y as Re,R as de,Q as Ee,aq as Pt,ar as Bt,Y as Vt,U as $t,as as Wt,o as ee,b as Kt,j as k,a1 as Jt,k as j,at as Ut,au as jt,av as Gt,c as re,n as rt,e as Se,E as at,F as nt,a as ve,t as pe,aw as Qt,p as qt,l as Ht,ax as it,ay as Yt,aa as Zt,ag as Xt,az as er,_ as tr}from"./framework.D9_xqL9a.js";import{u as rr,c as ar}from"./theme.BBO8d6__.js";const nr={root:()=>Dt(()=>import("./@localSearchIndexroot.B_DrN0ZY.js"),[])};/*!
+* tabbable 6.2.0
+* @license MIT, https://github.com/focus-trap/tabbable/blob/master/LICENSE
+*/var yt=["input:not([inert])","select:not([inert])","textarea:not([inert])","a[href]:not([inert])","button:not([inert])","[tabindex]:not(slot):not([inert])","audio[controls]:not([inert])","video[controls]:not([inert])",'[contenteditable]:not([contenteditable="false"]):not([inert])',"details>summary:first-of-type:not([inert])","details:not([inert])"],Ne=yt.join(","),mt=typeof Element>"u",ue=mt?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,Ce=!mt&&Element.prototype.getRootNode?function(o){var e;return o==null||(e=o.getRootNode)===null||e===void 0?void 0:e.call(o)}:function(o){return o==null?void 0:o.ownerDocument},Ie=function o(e,t){var r;t===void 0&&(t=!0);var n=e==null||(r=e.getAttribute)===null||r===void 0?void 0:r.call(e,"inert"),a=n===""||n==="true",i=a||t&&e&&o(e.parentNode);return i},ir=function(e){var t,r=e==null||(t=e.getAttribute)===null||t===void 0?void 0:t.call(e,"contenteditable");return r===""||r==="true"},gt=function(e,t,r){if(Ie(e))return[];var n=Array.prototype.slice.apply(e.querySelectorAll(Ne));return t&&ue.call(e,Ne)&&n.unshift(e),n=n.filter(r),n},bt=function o(e,t,r){for(var n=[],a=Array.from(e);a.length;){var i=a.shift();if(!Ie(i,!1))if(i.tagName==="SLOT"){var s=i.assignedElements(),u=s.length?s:i.children,l=o(u,!0,r);r.flatten?n.push.apply(n,l):n.push({scopeParent:i,candidates:l})}else{var h=ue.call(i,Ne);h&&r.filter(i)&&(t||!e.includes(i))&&n.push(i);var d=i.shadowRoot||typeof r.getShadowRoot=="function"&&r.getShadowRoot(i),v=!Ie(d,!1)&&(!r.shadowRootFilter||r.shadowRootFilter(i));if(d&&v){var y=o(d===!0?i.children:d.children,!0,r);r.flatten?n.push.apply(n,y):n.push({scopeParent:i,candidates:y})}else a.unshift.apply(a,i.children)}}return n},wt=function(e){return!isNaN(parseInt(e.getAttribute("tabindex"),10))},se=function(e){if(!e)throw new Error("No node provided");return e.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(e.tagName)||ir(e))&&!wt(e)?0:e.tabIndex},or=function(e,t){var r=se(e);return r<0&&t&&!wt(e)?0:r},sr=function(e,t){return e.tabIndex===t.tabIndex?e.documentOrder-t.documentOrder:e.tabIndex-t.tabIndex},xt=function(e){return e.tagName==="INPUT"},ur=function(e){return xt(e)&&e.type==="hidden"},lr=function(e){var t=e.tagName==="DETAILS"&&Array.prototype.slice.apply(e.children).some(function(r){return r.tagName==="SUMMARY"});return t},cr=function(e,t){for(var r=0;rAvailable formats
TeX
using MakieTeX, CairoMakie
+# Any of the below things could be used in place of the other.
+# However, \`scatter\` will not accept LaTeXStrings as markers.
+latex_string = L"\\int_0^\\pi \\sin(x)^2 dx"
+tex_document = TEXDocument(latex_string)
+cached_tex = CachedTEX(tex_document)
+
+fig = Figure()
+# use the teximg recipe
+teximg(fig[1, 1], latex_string)
+# use the LTeX block
+LTeX(fig[1, 2], tex_document)
+# use the latex as a scatter marker
+scatter(fig[2, 1], rand(10), rand(10), marker=cached_tex, markersize = 50)
+fig
using MakieTeX, CairoMakie
+doc = raw"""
+% A Venn diagram with PDF blending
+% Author: Stefan Kottwitz
+% https://www.packtpub.com/hardware-and-creative/latex-cookbook
+\\documentclass[border=10pt]{standalone}
+\\usepackage{tikz}
+\\begin{document}
+\\begin{tikzpicture}
+ \\begin{scope}[blend group = soft light]
+ \\fill[red!30!white] ( 90:1.2) circle (2);
+ \\fill[green!30!white] (210:1.2) circle (2);
+ \\fill[blue!30!white] (330:1.2) circle (2);
+ \\end{scope}
+ \\node at ( 90:2) {Typography};
+ \\node at ( 210:2) {Design};
+ \\node at ( 330:2) {Coding};
+ \\node [font=\\Large] {\\LaTeX};
+\\end{tikzpicture}
+\\end{document}
+"""
+
+tex_document = TEXDocument(doc)
+
+fig = Figure()
+# use the teximg recipe
+teximg(fig[1, 1], tex_document)
+# use the LTeX block
+LTeX(fig[1, 2], tex_document)
+# use the latex as a scatter marker
+scatter(fig[2, 1], rand(10), rand(10), marker=tex_document, markersize = 50)
+fig
Typst
using MakieTeX, CairoMakie
+
+typst_string = typst"$ integral_0^pi sin(x)^2 diff x $";
+typst_document = TypstDocument(typst_string);
+cached_typst = CachedTypst(typst_document);
+cached_pdf = convert(CachedPDF, cached_typst);
+
+fig = Figure(size=(100, 100));
+LTeX(fig[1, 1], cached_pdf);
+fig
PDF
using MakieTeX, CairoMakie
+pdf_doc = PDFDocument(read(download("https://upload.wikimedia.org/wikipedia/commons/0/05/Wikipedia-logo-big-fr.pdf")));
+fig = Figure()
+# use the teximg recipe
+teximg(fig[1, 1], pdf_doc)
+# use the LTeX block
+# LTeX(fig[1, 2], pdf_doc)
+# use the latex as a scatter marker
+scatter(fig[2, 1], rand(5), rand(5), marker=Cached(pdf_doc), markersize = 50)
+fig
SVG
using MakieTeX, CairoMakie
+svg = SVGDocument(read(download("https://raw.githubusercontent.com/file-icons/icons/master/svg/Go-Old.svg"), String));
+fig = Figure()
+scatter(fig[1, 1], rand(10), rand(10), marker=Cached(svg), markersize = 50)
+scatter!(rand(5), rand(5), marker=Cached(svg), markersize = 50, strokecolor = :green, strokewidth = 7)
+fig
MakieTeX.jl
teximg
recipe which plots any LaTeX-like object, and the CachedDocument
API which allows users to plot documents directly as scatter
markers.using MakieTeX, CairoMakie
+
+teximg(raw"""
+\\begin{align*}
+\\frac{1}{2} \\times \\frac{1}{2} = \\frac{1}{4}
+\\end{align*}
+""")
Principle of operation
Rendering
rasterize
and draw_to_cairo_surface
).tectonic
is bundled with MakieTeX) and Typst uses Typst_jll.jl to render to a PDF, which then each follow the Poppler pipeline.Makie
Makie.to_spritemarker
), and then Makie treats it like a general image scatter marker.CairoMakie.cairo_scatter_marker
, and we overload it in MakieTeX.MakieTeXCairoMakieExt
to get the correct marker. This also allows us to apply styling to SVG elements, but again ONLY IN CAIROMAKIE! This is a bit of an incompatibility and a breaking of the implicit promise from Makie that rendering should be the same across backends, but the tradeoff is (to me, at least) worth it.MakieTeX.jl
teximg
recipe which plots any LaTeX-like object, and the CachedDocument
API which allows users to plot documents directly as scatter
markers.using MakieTeX, CairoMakie
+
+teximg(raw"""
+\begin{align*}
+\frac{1}{2} \times \frac{1}{2} = \frac{1}{4}
+\end{align*}
+""")
Principle of operation
Rendering
rasterize
and draw_to_cairo_surface
).tectonic
is bundled with MakieTeX) and Typst uses Typst_jll.jl to render to a PDF, which then each follow the Poppler pipeline.Makie
Makie.to_spritemarker
), and then Makie treats it like a general image scatter marker.CairoMakie.cairo_scatter_marker
, and we overload it in MakieTeX.MakieTeXCairoMakieExt
to get the correct marker. This also allows us to apply styling to SVG elements, but again ONLY IN CAIROMAKIE! This is a bit of an incompatibility and a breaking of the implicit promise from Makie that rendering should be the same across backends, but the tradeoff is (to me, at least) worth it.API documentation
Constants
pdfcrop
. Private, try not to touch!Interfaces
AbstractDocument
abstract type AbstractDocument
AbstractDocument
must contain a document as a String or Vector{UInt8} of the full contents of whichever file it is using. It may contain additional fields - for example, PDFDocument
s contain a page number to indicate which page to display, in the case where a PDF has multiple pages.AbstractDocument
s must implement the following functions:getdoc(doc::AbstractDocument)::Union{Vector{UInt8}, String}
mimetype(doc::AbstractDocument)::Base.MIME
Cached(doc::AbstractDocument)::AbstractCachedDocument
getdoc(doc::AbstractDocument)::Union{Vector{UInt8}, String}
Vector{UInt8}
or String
. This must be the full file, i.e., if it was saved, the file should be immediately openable.mimetype(::Type{<: AbstractDocument})::Base.MIME
+mimetype(::AbstractDocument)::Base.MIME
mimetype(::SVGDocument) == MIME("image/svg+xml")
.Cached(doc::AbstractDocument)::AbstractCachedDocument
AbstractCachedDocument
abstract type AbstractCachedDocument
rasterize
for more.AbstractCachedDocument
s must implement the AbstractDocument
API, as well as the following:rasterize(doc::AbstractCachedDocument, [scale::Real = 1])::Matrix{ARGB32}
draw_to_cairo_surface(doc::AbstractCachedDocument, surf::CairoSurface)
update_handle!(doc::AbstractCachedDocument)::<some_handle_type>
rasterize(doc::AbstractCachedDocument, scale::Real = 1)
CachedDocument
to an image at a given scale. This is a convenience function which calls the appropriate rendering function for the document type. Returns an image as a Matrix{ARGB32}
.draw_to_cairo_surface(doc::AbstractCachedDocument, surf::CairoSurface)
CachedDocument
to a Cairo surface. This is a convenience function which calls the appropriate rendering function for the document type.update_handle!(doc::AbstractCachedDocument)
CachedDocument
, and returns it.CachedPDF
, this function would reload the PDF document using the doc.doc
field and update the ptr
field with the new Poppler handle, if it is found to be invalid.AbstractCachedDocument
, as the handle/pointer type and the method to load/update it will be different for different document types (e.g., PDF, SVG, etc.).Document types
Raw document types
SVGDocument(svg::AbstractString)
CachedSVG
for use in plotting.PDFDocument(pdf::AbstractString, [page = 0])
CachedPDF
for use in plotting.EPSDocument
. Check Documenter's build log for details.TEXDocument(contents::AbstractString, add_defaults::Bool; requires, preamble, class, classoptions)
struct
of type TEXDocument
which can be passed to teximg
. All arguments are to be passed as strings.add_defaults
is false
, then we will not automatically add document structure. Note that in this case, keyword arguments will be disregarded and contents
must be a complete LaTeX document.requires
: code which comes before documentclass
in the preamble. Default: raw"\\RequirePackage{luatex85}"
.class
: the document class. Default (and what you should use): "standalone"
.classoptions
: the options you should pass to the class, i.e., \\documentclass[$classoptions]{$class}
. Default: "preview, tightpage, 12pt"
.preamble
: arbitrary code for the preamble (between \\documentclass
and \\begin{document}
). Default: raw"\\usepackage{amsmath, xcolor} \\pagestyle{empty}"
.CachedTEX
, compile_latex
, etc.TypstDocument(contents::AbstractString, add_defaults::Bool; preamble)
struct
of type TypstDocument
. All arguments are to be passed as strings.add_defaults
is false
, then we will not automatically add document structure. Note that in this case, keyword arguments will be disregarded and contents
must be a complete Typst document.preamble
: arbitrary code inserted prior to the contents
. Default: ""
.CachedTypst
, compile_typst
, etc.Cached document types
CachedTEX(doc::TEXDocument; kwargs...)
TEXDocument
, compile it and return the cached TeX object.CachedTEX
struct stores the document and its compiled form, as well as some pointers to in-program versions of it. It also stores the page dimensions.kwargs
, one can pass anything which goes to the internal function compile_latex
. These are primarily:engine =
lualatex/
xelatex/...
: the LaTeX engine to use when renderingoptions=
-file-line-error\`\`: the options to pass tolatexmk
.doc
pdf
ptr
surf
dims
mutable struct
because the pointer to the Poppler handle can change. TODO: make this an immutable struct with a Ref to the handle?? OR maybe even the surface itself...CachedTEX
with nothing
in the doc
field, if you just want to insert a pre-rendered PDF into your figure.CachedTypst(doc::TypstDocument)
TypstDocument
, compile it and return the cached Typst object.CachedTypst
struct stores the document and its compiled form, as well as some pointers to in-program versions of it. It also stores the page dimensions.doc
pdf
ptr
surf
dims
mutable struct
because the pointer to the Poppler handle can change. TODO: make this an immutable struct with a Ref to the handle?? OR maybe even the surface itself...CachedTypst
with nothing
in the doc
field, if you just want to insert a pre-rendered PDF into your figure.CachedPDF(pdf::PDFDocument)
CachedPDF(read("path/to/pdf.pdf"), [page = 0])
+CachedPDF(read("path/to/pdf.pdf", String), [page = 0])
+CachedPDF(PDFDocument(...), [page = 0])
doc
: A reference to the PDFDocument
which is cached here.ptr
: A pointer to the Poppler handle of the PDF. May be randomly GC'ed by Poppler.dims
: The dimensions of the PDF page in points, for ease of access.surf
: A Cairo surface to which Poppler has drawn the PDF. Permanent and cached.image_cache
: A cache for a (rendered_image, scale_factor) pair. This is used to avoid re-rendering the PDF.CachedSVG(svg::SVGDocument)
CachedSVG(read("path/to/svg.svg"))
+CachedSVG(read("path/to/svg.svg", String))
+CachedSVG(SVGDocument(...))
doc
: The original SVGDocument
which is cached here, i.e., the text of that SVG.handle
: A pointer to the Rsvg handle of the SVG. May be randomly GC'ed by Rsvg, so is stored as a Ref
in case it has to be refreshed.dims
: The dimensions of the SVG in points, for ease of access.surf
: A Cairo surface to which Rsvg has drawn the SVG. Permanent and cached.image_cache
: A cache for a (rendered_image, scale_factor) pair. This is used to avoid re-rendering the PDF.CachedEPS
. Check Documenter's build log for details.compile_latex
), PDF and SVG handling utils here, in case they are of use to anyone.All other methods and functions
CachedTEX(doc::TEXDocument; kwargs...)
TEXDocument
, compile it and return the cached TeX object.CachedTEX
struct stores the document and its compiled form, as well as some pointers to in-program versions of it. It also stores the page dimensions.kwargs
, one can pass anything which goes to the internal function compile_latex
. These are primarily:engine =
lualatex/
xelatex/...
: the LaTeX engine to use when renderingoptions=
-file-line-error\`\`: the options to pass tolatexmk
.doc
pdf
ptr
surf
dims
mutable struct
because the pointer to the Poppler handle can change. TODO: make this an immutable struct with a Ref to the handle?? OR maybe even the surface itself...CachedTEX
with nothing
in the doc
field, if you just want to insert a pre-rendered PDF into your figure.CachedTypst(doc::TypstDocument)
TypstDocument
, compile it and return the cached Typst object.CachedTypst
struct stores the document and its compiled form, as well as some pointers to in-program versions of it. It also stores the page dimensions.doc
pdf
ptr
surf
dims
mutable struct
because the pointer to the Poppler handle can change. TODO: make this an immutable struct with a Ref to the handle?? OR maybe even the surface itself...CachedTypst
with nothing
in the doc
field, if you just want to insert a pre-rendered PDF into your figure.EPSDocument(eps::AbstractString, [page = 0])
CachedPDF
for use in plotting.TEXDocument(contents::AbstractString, add_defaults::Bool; requires, preamble, class, classoptions)
struct
of type TEXDocument
which can be passed to teximg
. All arguments are to be passed as strings.add_defaults
is false
, then we will not automatically add document structure. Note that in this case, keyword arguments will be disregarded and contents
must be a complete LaTeX document.requires
: code which comes before documentclass
in the preamble. Default: raw"\\RequirePackage{luatex85}"
.class
: the document class. Default (and what you should use): "standalone"
.classoptions
: the options you should pass to the class, i.e., \\documentclass[$classoptions]{$class}
. Default: "preview, tightpage, 12pt"
.preamble
: arbitrary code for the preamble (between \\documentclass
and \\begin{document}
). Default: raw"\\usepackage{amsmath, xcolor} \\pagestyle{empty}"
.CachedTEX
, compile_latex
, etc.TypstDocument(contents::AbstractString, add_defaults::Bool; preamble)
struct
of type TypstDocument
. All arguments are to be passed as strings.add_defaults
is false
, then we will not automatically add document structure. Note that in this case, keyword arguments will be disregarded and contents
must be a complete Typst document.preamble
: arbitrary code inserted prior to the contents
. Default: ""
.CachedTypst
, compile_typst
, etc.compile_latex(document::AbstractString; tex_engine = CURRENT_TEX_ENGINE[], options = \`-file-line-error\`)
compile_typst(document::AbstractString)
crop_pdf(path; margin = (0, 0, 0, 0))
get_pdf_bbox(path)
load_pdf(pdf::String)::Ptr{Cvoid}
+load_pdf(pdf::Vector{UInt8})::Ptr{Cvoid}
Vector{UInt8}
, each representing the PDF file in memory.page2img(ct::Union{CachedTeX, CachedTypst}, page::Int; scale = 1, render_density = 1)
page
of the given CachedTeX
or CachedTypst
object to an image, with the given scale
and render_density
.pdf_get_page_size(document::Ptr{Cvoid}, page_number::Int)::Tuple{Float64, Float64}
document
must be a Poppler document handle. Returns a tuple of width, height
.pdf_num_pages(document::Ptr{Cvoid})::Int
document
must be a Poppler document handle. Returns the number of pages in the document.pdf_num_pages(filename::String)::Int
filename
, using the Poppler executable.angle
radians. This is not perfect but works well enough. Check an A vs X to see the difference.split_pdf(pdf::Union{Vector{UInt8}, String})::Vector{UInt8}
load_pdf
and page2img
instead.texdoc(contents::AbstractString; kwargs...)
TEXDocument(contents, add_defaults=true; kwargs...)
.requires
: code which comes before documentclass
in the preamble. Default: raw"\\RequirePackage{luatex85}"
.class
: the document class. Default (and what you should use): "standalone"
.classoptions
: the options you should pass to the class, i.e., \\documentclass[$classoptions]{$class}
. Default: "preview, tightpage, 12pt"
.preamble
: arbitrary code for the preamble (between \\documentclass
and \\begin{document}
). Default: raw"\\usepackage{amsmath, xcolor} \\pagestyle{empty}"
.teximg(tex; position, ...)
+teximg!(ax_or_scene, tex; position, ...)
TeX
to your Figure or Scene.String
, which is rendered to LaTeX cognizant of the figure's overall theme,TeXDocument
object, which is rendered to LaTeX directly, and can be customized by the user,CachedTeX
object, which is a pre-rendered LaTeX document.tex
may be a single one of these objects, or an array of them.MakieCore.Plot{MakieTeX.teximg}
are: align (:center, :center)
+ depth_shift 0.0f0
+ inspectable true
+ inspector_clear MakieCore.Automatic()
+ inspector_hover MakieCore.Automatic()
+ inspector_label MakieCore.Automatic()
+ markerspace :pixel
+ overdraw false
+ position GeometryBasics.Point{2, Float32}[[0.0, 0.0]]
+ render_density 2
+ rotation Float32[0.0]
+ scale 1.0
+ space :data
+ ssao false
+ transparency false
+ visible true
typstdoc(contents::AbstractString; kwargs...)
TypstDocument(contents, add_defaults=true; kwargs...)
.preamble
: arbitrary code inserted prior to the contents
. Default: ""
.
`,98),d=[l];function o(n,p,r,h,c,k){return a(),i("div",null,d)}const g=e(t,[["render",o]]);export{b as __pageData,g as default};
diff --git a/previews/PR52/assets/api.md.VdJybLJq.lean.js b/previews/PR52/assets/api.md.VdJybLJq.lean.js
new file mode 100644
index 0000000..df33160
--- /dev/null
+++ b/previews/PR52/assets/api.md.VdJybLJq.lean.js
@@ -0,0 +1 @@
+import{_ as e,c as i,o as a,a6 as s}from"./chunks/framework.BnT_u6rY.js";const b=JSON.parse('{"title":"API documentation","description":"","frontmatter":{},"headers":[],"relativePath":"api.md","filePath":"api.md","lastUpdated":null}'),t={name:"api.md"},l=s("",98),d=[l];function o(n,p,r,h,c,k){return a(),i("div",null,d)}const g=e(t,[["render",o]]);export{b as __pageData,g as default};
diff --git a/previews/PR52/assets/app.Celok-oG.js b/previews/PR52/assets/app.Celok-oG.js
new file mode 100644
index 0000000..fb8fe14
--- /dev/null
+++ b/previews/PR52/assets/app.Celok-oG.js
@@ -0,0 +1 @@
+import{U as o,a7 as p,a8 as u,a9 as l,aa as c,ab as f,ac as d,ad as m,ae as h,af as g,ag as A,d as P,u as v,y,x as w,ah as C,ai as R,aj as b,a5 as E}from"./chunks/framework.BnT_u6rY.js";import{R as S}from"./chunks/theme.CwF85aGa.js";function i(e){if(e.extends){const a=i(e.extends);return{...a,...e,async enhanceApp(t){a.enhanceApp&&await a.enhanceApp(t),e.enhanceApp&&await e.enhanceApp(t)}}}return e}const s=i(S),T=P({name:"VitePressApp",setup(){const{site:e,lang:a,dir:t}=v();return y(()=>{w(()=>{document.documentElement.lang=a.value,document.documentElement.dir=t.value})}),e.value.router.prefetchLinks&&C(),R(),b(),s.setup&&s.setup(),()=>E(s.Layout)}});async function _(){globalThis.__VITEPRESS__=!0;const e=x(),a=j();a.provide(u,e);const t=l(e.route);return a.provide(c,t),a.component("Content",f),a.component("ClientOnly",d),Object.defineProperties(a.config.globalProperties,{$frontmatter:{get(){return t.frontmatter.value}},$params:{get(){return t.page.value.params}}}),s.enhanceApp&&await s.enhanceApp({app:a,router:e,siteData:m}),{app:a,router:e,data:t}}function j(){return h(T)}function x(){let e=o,a;return g(t=>{let n=A(t),r=null;return n&&(e&&(a=n),(e||a===n)&&(n=n.replace(/\.js$/,".lean.js")),r=import(n)),o&&(e=!1),r},s.NotFound)}o&&_().then(({app:e,router:a,data:t})=>{a.go().then(()=>{p(a.route,t.site),e.mount("#app")})});export{_ as createApp};
diff --git a/previews/PR52/assets/chunks/@localSearchIndexroot.CuBxkV_4.js b/previews/PR52/assets/chunks/@localSearchIndexroot.CuBxkV_4.js
new file mode 100644
index 0000000..ceea73e
--- /dev/null
+++ b/previews/PR52/assets/chunks/@localSearchIndexroot.CuBxkV_4.js
@@ -0,0 +1 @@
+const e='{"documentCount":18,"nextId":18,"documentIds":{"0":"/MakieTeX.jl/previews/PR52/api#API-documentation","1":"/MakieTeX.jl/previews/PR52/api#Constants","2":"/MakieTeX.jl/previews/PR52/api#Interfaces","3":"/MakieTeX.jl/previews/PR52/api#AbstractDocument","4":"/MakieTeX.jl/previews/PR52/api#AbstractCachedDocument","5":"/MakieTeX.jl/previews/PR52/api#Document-types","6":"/MakieTeX.jl/previews/PR52/api#Raw-document-types","7":"/MakieTeX.jl/previews/PR52/api#Cached-document-types","8":"/MakieTeX.jl/previews/PR52/api#All-other-methods-and-functions","9":"/MakieTeX.jl/previews/PR52/formats#Available-formats","10":"/MakieTeX.jl/previews/PR52/formats#TeX","11":"/MakieTeX.jl/previews/PR52/formats#Typst","12":"/MakieTeX.jl/previews/PR52/formats#PDF","13":"/MakieTeX.jl/previews/PR52/formats#SVG","14":"/MakieTeX.jl/previews/PR52/#MakieTeX.jl","15":"/MakieTeX.jl/previews/PR52/#Principle-of-operation","16":"/MakieTeX.jl/previews/PR52/#Rendering","17":"/MakieTeX.jl/previews/PR52/#Makie"},"fieldIds":{"title":0,"titles":1,"text":2},"fieldLength":{"0":[2,1,1],"1":[1,2,42],"2":[1,2,1],"3":[1,3,98],"4":[1,3,140],"5":[2,2,1],"6":[3,4,135],"7":[3,4,186],"8":[5,2,386],"9":[2,1,23],"10":[1,2,115],"11":[1,2,30],"12":[1,2,42],"13":[1,2,68],"14":[2,1,61],"15":[3,2,1],"16":[1,5,66],"17":[1,5,78]},"averageFieldLength":[1.7777777777777777,2.5,81.88888888888889],"storedFields":{"0":{"title":"API documentation","titles":[]},"1":{"title":"Constants","titles":["API documentation"]},"2":{"title":"Interfaces","titles":["API documentation"]},"3":{"title":"AbstractDocument","titles":["API documentation","Interfaces"]},"4":{"title":"AbstractCachedDocument","titles":["API documentation","Interfaces"]},"5":{"title":"Document types","titles":["API documentation"]},"6":{"title":"Raw document types","titles":["API documentation","Document types"]},"7":{"title":"Cached document types","titles":["API documentation","Document types"]},"8":{"title":"All other methods and functions","titles":["API documentation"]},"9":{"title":"Available formats","titles":[]},"10":{"title":"TeX","titles":["Available formats"]},"11":{"title":"Typst","titles":["Available formats"]},"12":{"title":"PDF","titles":["Available formats"]},"13":{"title":"SVG","titles":["Available formats"]},"14":{"title":"MakieTeX.jl","titles":[]},"15":{"title":"Principle of operation","titles":["MakieTeX.jl"]},"16":{"title":"Rendering","titles":["MakieTeX.jl","Principle of operation"]},"17":{"title":"Makie","titles":["MakieTeX.jl","Principle of operation"]}},"dirtCount":0,"index":[["4",{"2":{"14":1}}],["jll",{"2":{"16":1}}],["jl",{"0":{"14":1},"1":{"15":1,"16":1,"17":1},"2":{"16":1}}],["just",{"2":{"7":2,"8":3}}],["juliausing",{"2":{"10":2,"11":1,"12":1,"13":1,"14":1}}],["juliaupdate",{"2":{"4":1}}],["juliasplit",{"2":{"8":1}}],["juliasvgdocument",{"2":{"6":1}}],["juliapdf",{"2":{"8":3}}],["juliapdfdocument",{"2":{"6":1}}],["juliapage2img",{"2":{"8":1}}],["juliaload",{"2":{"8":1}}],["juliaget",{"2":{"8":1}}],["juliagetdoc",{"2":{"3":1}}],["juliacrop",{"2":{"8":1}}],["juliacompile",{"2":{"8":2}}],["juliacachedsvg",{"2":{"7":2}}],["juliacachedpdf",{"2":{"7":2}}],["juliacachedtypst",{"2":{"7":1,"8":1}}],["juliacachedtex",{"2":{"7":1,"8":1}}],["juliacached",{"2":{"3":1}}],["juliaepsdocument",{"2":{"8":1}}],["juliatypstdoc",{"2":{"8":1}}],["juliatypstdocument",{"2":{"6":1,"8":1}}],["juliateximg",{"2":{"8":1}}],["juliatexdoc",{"2":{"8":1}}],["juliatexdocument",{"2":{"6":1,"8":1}}],["juliadraw",{"2":{"4":1}}],["juliarasterize",{"2":{"4":1}}],["juliamimetype",{"2":{"3":1}}],["juliaabstract",{"2":{"3":1,"4":1}}],["7",{"2":{"13":1}}],["5",{"2":{"12":2,"13":2}}],["50",{"2":{"10":2,"11":1,"12":1,"13":2}}],["$",{"2":{"11":2}}],["$class",{"2":{"6":1,"8":2}}],["$classoptions",{"2":{"6":1,"8":2}}],["90",{"2":{"10":2}}],["330",{"2":{"10":2}}],["30",{"2":{"10":3}}],["39",{"2":{"6":1,"7":3,"8":2}}],["^2",{"2":{"10":1,"11":1}}],["210",{"2":{"10":2}}],["2",{"2":{"8":2,"10":13,"11":2,"12":2,"14":2}}],["2d",{"2":{"8":1}}],["via",{"2":{"17":1}}],["visible",{"2":{"8":1}}],["viewport",{"2":{"8":1}}],["vs",{"2":{"8":1}}],["venn",{"2":{"10":1}}],["version",{"2":{"4":1}}],["versions",{"2":{"4":1,"7":2,"8":2}}],["vector",{"2":{"3":4,"8":6,"14":1}}],["`scatter`",{"2":{"10":1}}],["`",{"2":{"8":1}}],["ymax",{"2":{"8":1}}],["ymin",{"2":{"8":1}}],["y",{"2":{"8":1}}],["your",{"2":{"7":2,"8":3}}],["you",{"2":{"6":2,"7":2,"8":8,"10":2,"13":1}}],["kottwitz",{"2":{"10":1}}],["kwargs",{"2":{"7":2,"8":6}}],["keyword",{"2":{"6":4,"8":6}}],["xmax",{"2":{"8":1}}],["xmin",{"2":{"8":1}}],["x",{"2":{"8":2,"10":1,"11":2}}],["xelatex",{"2":{"7":1,"8":1}}],["xcolor",{"2":{"6":1,"8":2}}],["x3c",{"2":{"3":1}}],["https",{"2":{"10":1,"12":1,"13":1}}],["hook",{"2":{"17":1}}],["however",{"2":{"10":1,"13":1,"17":1}}],["hover",{"2":{"8":1}}],["holds",{"2":{"6":1,"7":2,"8":1}}],["height",{"2":{"8":2}}],["here",{"2":{"7":3}}],["have",{"2":{"16":1}}],["hardware",{"2":{"10":1}}],["happens",{"2":{"8":1}}],["handling",{"2":{"7":1}}],["handle",{"2":{"4":11,"7":9,"8":10}}],["has",{"2":{"3":1,"4":2,"7":5,"16":1}}],["05",{"2":{"12":1}}],["0^pi",{"2":{"11":1}}],["0^",{"2":{"10":1}}],["0f0",{"2":{"8":1}}],["0",{"2":{"6":1,"7":3,"8":13,"12":1}}],["gl",{"2":{"16":1}}],["glmakie",{"2":{"13":1}}],["go",{"2":{"13":1}}],["goes",{"2":{"7":1,"8":1}}],["githubusercontent",{"2":{"13":1}}],["given",{"2":{"4":1,"8":4}}],["green",{"2":{"10":1,"13":1}}],["group",{"2":{"10":1}}],["ghostscript",{"2":{"8":3}}],["gc",{"2":{"7":2}}],["g",{"2":{"4":1}}],["garbage",{"2":{"4":1}}],["gt",{"2":{"4":1}}],["geometrybasics",{"2":{"8":1}}],["get",{"2":{"8":4,"17":2}}],["getdoc",{"2":{"3":2}}],["general",{"2":{"17":1}}],["generally",{"2":{"3":1}}],["generic",{"2":{"3":2}}],["least",{"2":{"17":1}}],["librsvg",{"2":{"16":1}}],["list",{"2":{"14":1}}],["like",{"2":{"14":1,"17":1}}],["light",{"2":{"10":1}}],["line",{"2":{"7":1,"8":2}}],["l",{"2":{"10":1}}],["large",{"2":{"10":1}}],["label",{"2":{"8":1}}],["latexstrings",{"2":{"10":1}}],["latex",{"2":{"6":2,"7":4,"8":10,"10":8,"12":1,"14":1}}],["luatex85",{"2":{"6":1,"8":2}}],["local",{"2":{"16":1}}],["located",{"2":{"8":1}}],["logo",{"2":{"12":1}}],["log",{"2":{"6":1,"7":1}}],["loads",{"2":{"8":1}}],["load",{"2":{"4":1,"8":3}}],["loaded",{"2":{"4":4}}],["ltex",{"2":{"10":4,"11":1,"12":2}}],["lt",{"2":{"4":1}}],["10",{"2":{"10":4,"11":2,"13":2}}],["12pt",{"2":{"6":1,"8":2}}],["1",{"2":{"4":2,"8":3,"10":11,"11":3,"12":4,"13":2,"14":3}}],["=lualatex",{"2":{"7":1,"8":1}}],["=",{"2":{"4":2,"6":1,"7":3,"8":6,"10":10,"11":6,"12":3,"13":6,"14":1}}],["==",{"2":{"3":1}}],["rotation",{"2":{"8":1}}],["rotated",{"2":{"8":1}}],["rotatedrect",{"2":{"8":1}}],["rand",{"2":{"10":4,"11":2,"12":2,"13":4}}],["randomly",{"2":{"7":2}}],["radians",{"2":{"8":1}}],["raw",{"0":{"6":1},"2":{"6":3,"8":4,"10":1,"13":1,"14":1}}],["rasterizes",{"2":{"17":1}}],["rasterize",{"2":{"4":3,"16":1}}],["rasterized",{"2":{"4":1}}],["rsvghandle",{"2":{"8":1}}],["rsvgrectangle",{"2":{"8":3}}],["rsvg",{"2":{"4":1,"7":4}}],["red",{"2":{"10":1}}],["recipe",{"2":{"8":1,"10":2,"12":1,"14":1}}],["rectangle",{"2":{"8":2}}],["represent",{"2":{"8":2}}],["representing",{"2":{"8":3}}],["remove",{"2":{"8":1}}],["resulting",{"2":{"8":2}}],["re",{"2":{"7":2}}],["requirepackage",{"2":{"6":1,"8":2}}],["requires",{"2":{"6":2,"8":3}}],["reload",{"2":{"4":1}}],["ref",{"2":{"7":3,"8":2}}],["refreshed",{"2":{"7":1}}],["refresh",{"2":{"4":1}}],["reference",{"2":{"4":1,"7":1}}],["reads",{"2":{"8":1}}],["read",{"2":{"7":4,"8":1,"12":1,"13":1}}],["real",{"2":{"4":2}}],["reasons",{"2":{"4":1}}],["returning",{"2":{"8":1}}],["returns",{"2":{"4":2,"8":4}}],["return",{"2":{"3":3,"4":1,"7":2,"8":5}}],["renderer",{"2":{"16":1}}],["rendered",{"2":{"4":1,"7":6,"8":6}}],["renders",{"2":{"8":2}}],["rendering",{"0":{"16":1},"2":{"1":1,"4":2,"7":3,"8":1,"9":1,"16":3,"17":3}}],["render",{"2":{"1":3,"4":2,"8":6,"16":1}}],["quot",{"2":{"3":2,"4":2,"6":10,"8":20}}],["breaking",{"2":{"17":1}}],["backends",{"2":{"16":1,"17":1}}],["base",{"2":{"3":3}}],["bit",{"2":{"17":1}}],["bitmap",{"2":{"16":1,"17":1}}],["big",{"2":{"12":1}}],["blue",{"2":{"10":1}}],["blend",{"2":{"10":1}}],["blending",{"2":{"10":1}}],["block",{"2":{"10":2,"12":1}}],["bbox",{"2":{"8":2}}],["bundled",{"2":{"16":1}}],["but",{"2":{"8":2,"17":2}}],["build",{"2":{"6":1,"7":1}}],["both",{"2":{"16":1}}],["border=10pt",{"2":{"10":1}}],["bounding",{"2":{"8":2}}],["box",{"2":{"8":3}}],["bool",{"2":{"6":2,"8":2}}],["bytes",{"2":{"8":1}}],["by",{"2":{"7":2,"8":2,"13":1,"17":1}}],["below",{"2":{"10":1,"13":1}}],["because",{"2":{"7":2,"8":2}}],["begin",{"2":{"6":1,"8":2,"10":3,"14":1}}],["between",{"2":{"6":1,"8":2}}],["before",{"2":{"6":1,"8":2}}],["been",{"2":{"4":2,"7":2}}],["be",{"2":{"3":2,"4":3,"6":7,"7":3,"8":13,"10":1,"13":1,"17":1}}],["only",{"2":{"17":1}}],["one",{"2":{"7":1,"8":2}}],["own",{"2":{"16":1}}],["occur",{"2":{"16":1}}],["old",{"2":{"13":1}}],["overdraw",{"2":{"8":1}}],["overall",{"2":{"8":1}}],["overload",{"2":{"3":1,"17":1}}],["other",{"0":{"8":1},"2":{"10":1}}],["operation",{"0":{"15":1},"1":{"16":1,"17":1}}],["openable",{"2":{"3":1}}],["options=",{"2":{"7":1,"8":1}}],["options",{"2":{"6":1,"7":1,"8":4}}],["objects",{"2":{"8":1}}],["object",{"2":{"3":1,"7":2,"8":5,"14":1}}],["of",{"0":{"15":1},"1":{"16":1,"17":1},"2":{"3":4,"4":5,"6":2,"7":10,"8":18,"9":1,"10":2,"13":1,"14":1,"16":1,"17":2}}],["org",{"2":{"12":1}}],["original",{"2":{"7":1}}],["or",{"2":{"1":1,"3":2,"4":2,"7":2,"8":8,"13":1,"16":1}}],["upload",{"2":{"12":1}}],["updated",{"2":{"4":1}}],["update",{"2":{"4":5}}],["utils",{"2":{"7":1}}],["union",{"2":{"3":2,"8":2}}],["us",{"2":{"17":1}}],["usually",{"2":{"16":1}}],["usage",{"2":{"7":2}}],["users",{"2":{"14":2}}],["user",{"2":{"8":1}}],["usepackage",{"2":{"6":1,"8":2,"10":1}}],["use",{"2":{"6":3,"7":2,"8":5,"9":1,"10":6,"12":3,"16":1}}],["used",{"2":{"4":1,"7":2,"10":1}}],["uses",{"2":{"1":1,"8":1,"16":3}}],["using",{"2":{"3":1,"4":1,"8":4,"13":1}}],["uint8",{"2":{"3":4,"8":6}}],["separate",{"2":{"16":1}}],["see",{"2":{"4":1,"6":2,"8":4,"13":1,"14":2}}],["same",{"2":{"13":1,"17":1}}],["saved",{"2":{"3":1}}],["ssao",{"2":{"8":1}}],["spritemarker",{"2":{"17":1}}],["specifically",{"2":{"17":2}}],["space",{"2":{"8":1}}],["splits",{"2":{"8":1}}],["split",{"2":{"8":2}}],["shift",{"2":{"8":1}}],["shorthand",{"2":{"8":2}}],["should",{"2":{"3":1,"4":1,"6":2,"8":4,"17":1}}],["scope",{"2":{"10":2}}],["scatter",{"2":{"10":4,"11":1,"12":2,"13":3,"14":1,"17":2}}],["scale",{"2":{"4":4,"7":2,"8":3,"11":1}}],["scene",{"2":{"8":2}}],["sin",{"2":{"10":1,"11":1}}],["single",{"2":{"8":1}}],["size",{"2":{"8":2}}],["simple",{"2":{"8":1}}],["s",{"2":{"6":1,"7":1,"8":2}}],["subtype",{"2":{"4":1}}],["surf",{"2":{"4":2,"7":4,"8":2}}],["surface",{"2":{"4":5,"7":6,"8":3,"16":2}}],["soft",{"2":{"10":1}}],["so",{"2":{"7":1,"16":1}}],["some",{"2":{"4":1,"7":2,"8":2}}],["source",{"2":{"1":4,"3":4,"4":4,"6":4,"7":4,"8":23}}],["styling",{"2":{"17":1}}],["stefan",{"2":{"10":1}}],["standalone",{"2":{"6":1,"8":2,"10":1}}],["strokewidth",{"2":{"13":1}}],["strokecolor",{"2":{"13":1}}],["structure",{"2":{"6":2,"8":2}}],["struct",{"2":{"6":2,"7":6,"8":9}}],["strings",{"2":{"6":2,"8":2}}],["string",{"2":{"3":4,"6":2,"7":2,"8":13,"10":3,"11":2,"13":1}}],["stored",{"2":{"7":1}}],["stores",{"2":{"6":1,"7":6,"8":6}}],["store",{"2":{"4":1}}],["svg",{"0":{"13":1},"2":{"4":1,"6":2,"7":11,"9":1,"13":7,"14":1,"16":1,"17":1}}],["svgs",{"2":{"4":1}}],["svg+xml",{"2":{"3":1}}],["svgdocument",{"2":{"3":1,"6":1,"7":3,"13":1}}],["again",{"2":{"17":1}}],["author",{"2":{"10":1}}],["automatic",{"2":{"8":3}}],["automatically",{"2":{"6":2,"8":2}}],["ax",{"2":{"8":1}}],["across",{"2":{"17":1}}],["accept",{"2":{"10":1}}],["access",{"2":{"7":2}}],["actually",{"2":{"8":2}}],["about",{"2":{"7":1}}],["abstractstring",{"2":{"6":4,"8":7}}],["abstractcacheddocuments",{"2":{"4":1}}],["abstractcacheddocument",{"0":{"4":1},"2":{"3":2,"4":9}}],["abstractdocuments",{"2":{"3":1,"4":1}}],["abstractdocument",{"0":{"3":1},"2":{"3":10,"4":1}}],["avoid",{"2":{"7":2}}],["available",{"0":{"9":1},"1":{"10":1,"11":1,"12":1,"13":1},"2":{"6":2,"8":5,"16":1}}],["amsmath",{"2":{"6":1,"8":2}}],["align",{"2":{"8":1,"14":2}}],["alters",{"2":{"8":1}}],["already",{"2":{"7":2}}],["along",{"2":{"7":2}}],["allows",{"2":{"9":1,"14":2,"17":1}}],["all",{"0":{"8":1},"2":{"6":2,"8":2,"14":1}}],["also",{"2":{"4":1,"6":2,"7":4,"8":8,"10":1,"17":1}}],["add",{"2":{"6":6,"7":1,"8":8}}],["additional",{"2":{"3":1}}],["apply",{"2":{"17":1}}],["applies",{"2":{"13":1}}],["approaches",{"2":{"14":1}}],["approximation",{"2":{"8":1}}],["appropriate",{"2":{"4":2}}],["apis",{"2":{"16":1}}],["api",{"0":{"0":1},"1":{"1":1,"2":1,"3":1,"4":1,"5":1,"6":1,"7":1,"8":1},"2":{"4":1,"14":2}}],["attribute",{"2":{"17":1}}],["attributes",{"2":{"8":2}}],["at",{"2":{"4":1,"8":1,"10":3,"17":1}}],["array",{"2":{"8":1}}],["arrays",{"2":{"8":1}}],["around",{"2":{"8":1}}],["arbitrary",{"2":{"6":2,"8":4}}],["arguments",{"2":{"6":6,"8":8}}],["argb32",{"2":{"4":2}}],["are",{"2":{"4":1,"6":4,"7":2,"8":9,"13":1,"16":1}}],["as",{"2":{"3":2,"4":6,"6":3,"7":5,"8":13,"10":3,"12":1,"13":1,"14":1}}],["a",{"2":{"3":8,"4":13,"6":8,"7":26,"8":51,"10":4,"12":1,"14":2,"16":3,"17":5}}],["angle",{"2":{"8":1}}],["any",{"2":{"8":1,"10":1,"14":1}}],["anyone",{"2":{"7":1}}],["anything",{"2":{"7":1,"8":1}}],["and",{"0":{"8":1},"2":{"3":2,"4":5,"6":4,"7":9,"8":19,"9":1,"10":1,"14":3,"16":3,"17":3}}],["an",{"2":{"3":1,"4":2,"6":1,"7":4,"8":8,"13":1,"17":1}}],["ignoring",{"2":{"17":1}}],["icons",{"2":{"13":2}}],["if",{"2":{"3":1,"4":1,"6":2,"7":2,"8":5,"10":1,"13":1,"16":1}}],["i",{"2":{"3":1,"6":1,"7":1,"8":2}}],["implicit",{"2":{"17":1}}],["implemented",{"2":{"4":1}}],["implement",{"2":{"3":1,"4":1}}],["immutable",{"2":{"7":2,"8":2}}],["immediately",{"2":{"3":1}}],["image",{"2":{"3":1,"4":2,"7":4,"8":2,"17":1}}],["images",{"2":{"1":1,"14":1}}],["incompatibility",{"2":{"17":1}}],["inspector",{"2":{"8":3}}],["inspectable",{"2":{"8":1}}],["instead",{"2":{"8":1}}],["insert",{"2":{"7":2,"8":2}}],["inserted",{"2":{"6":1,"8":2}}],["input",{"2":{"8":5}}],["init",{"2":{"8":1}}],["integral",{"2":{"11":1}}],["internal",{"2":{"4":1,"7":1,"8":1}}],["interface",{"2":{"3":1}}],["interfaces",{"0":{"2":1},"1":{"3":1,"4":1}}],["int",{"2":{"8":4,"10":1}}],["into",{"2":{"7":2,"8":4}}],["invalid",{"2":{"4":1}}],["invalidated",{"2":{"4":1}}],["in",{"2":{"3":1,"4":3,"6":5,"7":9,"8":13,"9":1,"10":1,"13":2,"14":1,"17":2}}],["indicate",{"2":{"3":1}}],["is",{"2":{"3":3,"4":4,"6":4,"7":9,"8":14,"9":1,"13":1,"14":1,"16":1,"17":4}}],["itself",{"2":{"7":2,"8":2}}],["its",{"2":{"4":1,"7":2,"8":3,"16":1}}],["it",{"2":{"3":4,"4":5,"7":11,"8":9,"14":1,"17":3}}],["node",{"2":{"10":4}}],["nothing",{"2":{"7":2,"8":2}}],["note",{"2":{"3":1,"4":1,"6":2,"7":4,"8":6}}],["not",{"2":{"1":1,"6":2,"8":6,"10":1,"13":1,"16":1}}],["num",{"2":{"8":4}}],["number",{"2":{"3":1,"8":3}}],["needs",{"2":{"4":1}}],["new",{"2":{"4":1}}],["nbsp",{"2":{"1":4,"3":4,"4":4,"6":4,"7":4,"8":23}}],["from",{"2":{"17":1}}],["frac",{"2":{"14":3}}],["fr",{"2":{"12":1}}],["float32",{"2":{"8":2}}],["float64",{"2":{"8":6}}],["factor",{"2":{"7":2}}],["false",{"2":{"1":1,"6":2,"8":5}}],["function",{"2":{"3":3,"4":10,"6":2,"7":1,"8":4,"17":1}}],["functions",{"0":{"8":1},"2":{"3":1,"14":1}}],["full",{"2":{"3":2,"10":1}}],["follow",{"2":{"16":1}}],["following",{"2":{"3":1,"4":1,"7":2,"8":2}}],["font=",{"2":{"10":1}}],["found",{"2":{"4":1}}],["format",{"2":{"16":1}}],["formats",{"0":{"9":1},"1":{"10":1,"11":1,"12":1,"13":1}}],["form",{"2":{"7":2,"8":2,"9":1}}],["for",{"2":{"1":1,"3":3,"4":9,"6":5,"7":6,"8":6,"13":1,"16":2,"17":1}}],["fill",{"2":{"10":3}}],["files",{"2":{"8":1}}],["filename",{"2":{"8":4}}],["file",{"2":{"3":4,"7":1,"8":8,"13":1}}],["fig",{"2":{"10":10,"11":4,"12":5,"13":3}}],["figure",{"2":{"7":2,"8":4,"10":2,"11":1,"12":1,"13":1}}],["field",{"2":{"4":2,"7":2,"8":2}}],["fields",{"2":{"3":1,"7":4,"8":2}}],["end",{"2":{"10":3,"14":1}}],["enough",{"2":{"8":1}}],["engine",{"2":{"1":2,"7":2,"8":7}}],["either",{"2":{"8":2,"16":1}}],["elements",{"2":{"8":1,"17":1}}],["error`",{"2":{"8":1}}],["error``",{"2":{"7":1,"8":1}}],["eps",{"2":{"8":2,"16":1}}],["epsdocument",{"2":{"6":1,"8":1}}],["easiest",{"2":{"9":1}}],["ease",{"2":{"7":2}}],["each",{"2":{"4":1,"8":2,"16":2}}],["ed",{"2":{"7":2}}],["even",{"2":{"7":2,"8":2}}],["empty",{"2":{"6":1,"8":2}}],["etc",{"2":{"4":1,"6":2,"8":2}}],["e",{"2":{"3":1,"4":1,"6":1,"7":1,"8":2}}],["exported",{"2":{"14":1}}],["exposes",{"2":{"14":1}}],["executable",{"2":{"8":1}}],["example",{"2":{"3":2,"4":1,"13":1}}],["extrasafe",{"2":{"1":1}}],["tectonic",{"2":{"16":1}}],["texdoc",{"2":{"8":1}}],["texdocument",{"2":{"6":2,"7":2,"8":6,"10":2}}],["text",{"2":{"7":1}}],["teximg",{"2":{"6":1,"8":4,"10":4,"12":2,"14":2}}],["tex",{"0":{"10":1},"2":{"1":2,"7":1,"8":8,"9":1,"10":8,"14":1,"16":2}}],["two",{"2":{"14":1}}],["times",{"2":{"14":1}}],["tikzpicture",{"2":{"10":2}}],["tikz",{"2":{"10":1}}],["tight",{"2":{"8":1}}],["tightpage",{"2":{"6":1,"8":2}}],["tuple",{"2":{"8":3}}],["typography",{"2":{"10":1}}],["typst",{"0":{"11":1},"2":{"6":2,"7":1,"8":6,"11":8,"16":2}}],["typstdocument",{"2":{"6":2,"7":2,"8":5,"11":1}}],["types",{"0":{"5":1,"6":1,"7":1},"1":{"6":1,"7":1},"2":{"4":1,"8":1,"14":1}}],["type",{"2":{"3":5,"4":6,"6":8,"7":4,"8":5}}],["thing",{"2":{"13":1}}],["things",{"2":{"10":1}}],["this",{"2":{"3":2,"4":5,"6":4,"7":6,"8":13,"13":1,"17":3}}],["three",{"2":{"8":1}}],["that",{"2":{"4":1,"6":2,"7":1,"8":2,"14":1,"17":1}}],["their",{"2":{"8":1}}],["them",{"2":{"8":1}}],["theme",{"2":{"8":1}}],["these",{"2":{"7":1,"8":2,"9":1,"16":1}}],["then",{"2":{"6":2,"8":3,"13":1,"16":1,"17":1}}],["they",{"2":{"4":1,"7":1}}],["there",{"2":{"3":1,"8":1,"17":1}}],["the",{"2":{"1":1,"3":10,"4":21,"6":6,"7":39,"8":62,"9":3,"10":8,"12":3,"13":5,"14":3,"16":3,"17":8}}],["todo",{"2":{"7":3,"8":2}}],["tolatexmk",{"2":{"7":1,"8":1}}],["touch",{"2":{"1":1}}],["to",{"2":{"1":1,"3":3,"4":13,"6":7,"7":28,"8":31,"9":2,"13":1,"14":4,"16":5,"17":8}}],["tradeoff",{"2":{"17":1}}],["transparency",{"2":{"8":1}}],["treats",{"2":{"17":1}}],["try",{"2":{"1":1,"8":2}}],["true",{"2":{"1":1,"8":2}}],["circle",{"2":{"10":3}}],["clear",{"2":{"8":1}}],["classoptions",{"2":{"6":2,"8":3}}],["class",{"2":{"6":4,"8":7}}],["center",{"2":{"8":2}}],["customized",{"2":{"8":1}}],["current",{"2":{"1":2,"8":1}}],["ct",{"2":{"8":1}}],["cvoid",{"2":{"8":4}}],["creative",{"2":{"10":1}}],["creates",{"2":{"6":2,"8":2}}],["cr",{"2":{"8":1}}],["crop",{"2":{"8":3}}],["change",{"2":{"7":2,"8":2}}],["checks",{"2":{"8":1}}],["check",{"2":{"6":1,"7":1,"8":1}}],["color",{"2":{"13":1}}],["colored",{"2":{"13":1}}],["collected",{"2":{"4":1}}],["coding",{"2":{"10":1}}],["code",{"2":{"6":3,"8":6}}],["cookbook",{"2":{"10":1}}],["could",{"2":{"10":1}}],["cognizant",{"2":{"8":1}}],["correct",{"2":{"8":1,"17":2}}],["commons",{"2":{"12":1}}],["com",{"2":{"10":1,"13":1}}],["complexities",{"2":{"16":1}}],["complete",{"2":{"6":2,"8":2}}],["compiles",{"2":{"14":1}}],["compiled",{"2":{"7":2,"8":2}}],["compile",{"2":{"6":2,"7":6,"8":11}}],["comes",{"2":{"6":1,"8":2}}],["conversion",{"2":{"17":2}}],["converted",{"2":{"6":2,"8":1}}],["convenience",{"2":{"4":2}}],["concrete",{"2":{"4":1}}],["constituent",{"2":{"8":1}}],["construct",{"2":{"7":2,"8":2,"9":1}}],["constructors",{"2":{"9":1}}],["constructor",{"2":{"6":2,"7":2,"8":4}}],["constructed",{"2":{"3":1}}],["constant",{"2":{"1":4}}],["constants",{"0":{"1":1}}],["contents",{"2":{"3":2,"6":5,"8":10}}],["contain",{"2":{"3":3,"4":1}}],["calculate",{"2":{"8":1}}],["calls",{"2":{"4":2}}],["can",{"2":{"6":1,"7":3,"8":6,"10":1,"16":1}}],["cache",{"2":{"3":1,"4":1,"7":4}}],["cachedeps",{"2":{"7":1}}],["cachedtypst",{"2":{"6":1,"7":3,"8":6,"11":1}}],["cachedtex",{"2":{"6":1,"7":3,"8":7,"10":1}}],["cachedsvg",{"2":{"6":1,"7":3}}],["cachedpdf",{"2":{"4":1,"6":1,"7":3,"8":1}}],["cacheddocument",{"2":{"4":3,"14":1}}],["cached",{"0":{"7":1},"2":{"3":2,"4":1,"7":6,"8":2,"10":1,"11":1}}],["case",{"2":{"3":1,"4":1,"6":2,"7":2,"8":2,"13":1}}],["cairomakie",{"2":{"10":2,"11":1,"12":1,"13":2,"14":1,"16":1,"17":3}}],["cairocontext",{"2":{"8":1}}],["cairosurface",{"2":{"4":2}}],["cairo",{"2":{"1":1,"4":5,"7":4,"8":1,"16":2,"17":2}}],["place",{"2":{"10":1}}],["plot",{"2":{"8":1,"14":2}}],["plots",{"2":{"8":1,"14":1}}],["plotting",{"2":{"6":2,"8":1}}],["pi",{"2":{"10":1}}],["pixel",{"2":{"8":1}}],["pipelines",{"2":{"16":1}}],["pipeline",{"2":{"1":2,"16":1,"17":2}}],["perfect",{"2":{"8":1}}],["performance",{"2":{"4":1}}],["permanent",{"2":{"7":2}}],["promise",{"2":{"17":1}}],["provide",{"2":{"8":1}}],["program",{"2":{"7":2,"8":2}}],["principle",{"0":{"15":1},"1":{"16":1,"17":1}}],["primarily",{"2":{"7":1,"8":1}}],["prior",{"2":{"6":1,"8":2}}],["private",{"2":{"1":1}}],["pre",{"2":{"7":2,"8":3}}],["preview",{"2":{"6":1,"8":2}}],["preamble",{"2":{"6":6,"8":10}}],["ptr",{"2":{"4":1,"7":3,"8":6}}],["png",{"2":{"4":1}}],["position",{"2":{"8":3}}],["possible",{"2":{"7":2,"8":2}}],["point",{"2":{"8":1}}],["points",{"2":{"7":2}}],["pointers",{"2":{"7":2,"8":2}}],["pointer",{"2":{"4":5,"7":4,"8":2}}],["poppler",{"2":{"1":1,"4":2,"7":6,"8":7,"16":2}}],["package",{"2":{"14":1}}],["packtpub",{"2":{"10":1}}],["pair",{"2":{"7":2}}],["path",{"2":{"7":4,"8":2}}],["pass",{"2":{"6":1,"7":2,"8":4,"10":1}}],["passed",{"2":{"6":3,"8":3}}],["passing",{"2":{"3":1}}],["page2img",{"2":{"8":2}}],["pagestyle",{"2":{"6":1,"8":2}}],["pages",{"2":{"3":1,"8":7}}],["page",{"2":{"3":2,"6":1,"7":6,"8":9,"14":1}}],["pdfdocument",{"2":{"6":1,"7":3,"12":1}}],["pdfdocuments",{"2":{"3":1}}],["pdfs",{"2":{"4":1}}],["pdf",{"0":{"12":1},"2":{"3":1,"4":2,"6":2,"7":16,"8":34,"9":1,"10":1,"12":5,"13":1,"14":2,"16":2}}],["pdfcrop",{"2":{"1":2}}],["wglmakie",{"2":{"13":1}}],["www",{"2":{"10":1}}],["write",{"2":{"8":1}}],["worth",{"2":{"17":1}}],["works",{"2":{"8":1}}],["would",{"2":{"4":1}}],["way",{"2":{"9":1}}],["warn",{"2":{"8":2}}],["want",{"2":{"7":2,"8":3}}],["was",{"2":{"3":1}}],["we",{"2":{"6":2,"8":2,"17":1}}],["well",{"2":{"4":2,"7":2,"8":3}}],["wikipedia",{"2":{"12":2}}],["wikimedia",{"2":{"12":1}}],["wish",{"2":{"10":1}}],["width",{"2":{"8":2}}],["will",{"2":{"4":1,"6":4,"8":4,"10":1,"13":1}}],["with",{"2":{"1":1,"4":1,"7":6,"8":5,"10":1,"16":1,"17":1}}],["while",{"2":{"16":1}}],["white",{"2":{"10":3}}],["whichever",{"2":{"3":1}}],["which",{"2":{"1":1,"3":1,"4":3,"6":4,"7":7,"8":9,"14":3,"16":1}}],["what",{"2":{"6":1,"8":3}}],["whether",{"2":{"8":1}}],["where",{"2":{"3":1}}],["when",{"2":{"1":1,"3":1,"7":1,"8":1,"17":2}}],["me",{"2":{"17":1}}],["memory",{"2":{"8":1}}],["methods",{"0":{"8":1}}],["method",{"2":{"4":1,"8":21}}],["missing",{"2":{"6":2,"7":2}}],["mime",{"2":{"3":5}}],["mimetype",{"2":{"3":4}}],["more",{"2":{"4":1}}],["mutable",{"2":{"7":2,"8":2}}],["multiple",{"2":{"3":1}}],["must",{"2":{"3":3,"4":1,"6":2,"8":5}}],["macros",{"2":{"14":1}}],["master",{"2":{"13":1}}],["marker=tex",{"2":{"10":1}}],["marker=cached",{"2":{"10":1,"11":1,"12":1,"13":2}}],["marker",{"2":{"10":2,"12":1,"13":1,"17":4}}],["markersize",{"2":{"10":2,"11":1,"12":1,"13":2}}],["markers",{"2":{"10":1,"14":1}}],["markerspace",{"2":{"8":1}}],["margin",{"2":{"8":1}}],["margins",{"2":{"1":2}}],["manually",{"2":{"7":2,"8":2}}],["makie",{"0":{"17":1},"2":{"9":1,"14":1,"17":6}}],["makiecore",{"2":{"8":4}}],["makietexcairomakieext",{"2":{"17":1}}],["makietex",{"0":{"14":1},"1":{"15":1,"16":1,"17":1},"2":{"1":5,"3":4,"4":4,"6":4,"7":4,"8":24,"9":1,"10":2,"11":1,"12":1,"13":1,"14":2,"16":1,"17":2}}],["make",{"2":{"7":2,"8":2}}],["matrix",{"2":{"4":2}}],["maybe",{"2":{"7":2,"8":2}}],["may",{"2":{"3":1,"7":2,"8":2}}],["mdash",{"2":{"1":4,"3":4,"4":4,"6":4,"7":4,"8":23}}],["dx",{"2":{"10":1}}],["download",{"2":{"12":1,"13":1}}],["does",{"2":{"8":3}}],["docstring",{"2":{"6":2,"7":2}}],["doc",{"2":{"3":5,"4":8,"7":8,"8":7,"10":2,"12":4}}],["documentclass",{"2":{"6":3,"8":6,"10":1}}],["documenter",{"2":{"6":1,"7":1}}],["documents",{"2":{"4":1,"9":1,"14":1}}],["document",{"0":{"5":1,"6":1,"7":1},"1":{"6":1,"7":1},"2":{"3":4,"4":8,"6":8,"7":4,"8":26,"10":10,"11":3,"17":1}}],["documentation",{"0":{"0":1},"1":{"1":1,"2":1,"3":1,"4":1,"5":1,"6":1,"7":1,"8":1},"2":{"4":1,"7":1}}],["diff",{"2":{"11":1}}],["difference",{"2":{"8":1}}],["different",{"2":{"4":2}}],["diagram",{"2":{"10":1}}],["directly",{"2":{"8":1,"14":2,"16":1}}],["dims",{"2":{"7":4,"8":2}}],["dimensions",{"2":{"7":4,"8":2}}],["disregarded",{"2":{"6":2,"8":2}}],["display",{"2":{"3":1}}],["drawn",{"2":{"7":2}}],["draw",{"2":{"4":2,"16":1}}],["data",{"2":{"3":1,"8":1}}],["design",{"2":{"10":1}}],["depth",{"2":{"8":1}}],["details",{"2":{"6":1,"7":1}}],["defined",{"2":{"3":1}}],["defaults=true",{"2":{"8":2}}],["defaults",{"2":{"6":4,"8":5}}],["default",{"2":{"1":3,"6":5,"8":11,"17":2}}],["density",{"2":{"1":2,"8":3}}]],"serializationVersion":2}';export{e as default};
diff --git a/previews/PR52/assets/chunks/VPLocalSearchBox.DDnMMC8L.js b/previews/PR52/assets/chunks/VPLocalSearchBox.DDnMMC8L.js
new file mode 100644
index 0000000..fc26064
--- /dev/null
+++ b/previews/PR52/assets/chunks/VPLocalSearchBox.DDnMMC8L.js
@@ -0,0 +1,7 @@
+var Ct=Object.defineProperty;var It=(o,e,t)=>e in o?Ct(o,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):o[e]=t;var Oe=(o,e,t)=>It(o,typeof e!="symbol"?e+"":e,t);import{X as Dt,s as oe,v as $e,ak as kt,al as Ot,d as Rt,G as xe,am as tt,h as Fe,an as _t,ao as Mt,x as Lt,ap as zt,y as Re,R as de,Q as Ee,aq as Pt,ar as Bt,Y as Vt,U as $t,as as Wt,o as ee,b as Kt,j as k,a1 as Jt,k as j,at as Ut,au as jt,av as Gt,c as re,n as rt,e as Se,E as at,F as nt,a as ve,t as pe,aw as Qt,p as qt,l as Ht,ax as it,ay as Yt,aa as Zt,ag as Xt,az as er,_ as tr}from"./framework.BnT_u6rY.js";import{u as rr,c as ar}from"./theme.CwF85aGa.js";const nr={root:()=>Dt(()=>import("./@localSearchIndexroot.CuBxkV_4.js"),[])};/*!
+* tabbable 6.2.0
+* @license MIT, https://github.com/focus-trap/tabbable/blob/master/LICENSE
+*/var yt=["input:not([inert])","select:not([inert])","textarea:not([inert])","a[href]:not([inert])","button:not([inert])","[tabindex]:not(slot):not([inert])","audio[controls]:not([inert])","video[controls]:not([inert])",'[contenteditable]:not([contenteditable="false"]):not([inert])',"details>summary:first-of-type:not([inert])","details:not([inert])"],Ne=yt.join(","),mt=typeof Element>"u",ue=mt?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,Ce=!mt&&Element.prototype.getRootNode?function(o){var e;return o==null||(e=o.getRootNode)===null||e===void 0?void 0:e.call(o)}:function(o){return o==null?void 0:o.ownerDocument},Ie=function o(e,t){var r;t===void 0&&(t=!0);var n=e==null||(r=e.getAttribute)===null||r===void 0?void 0:r.call(e,"inert"),a=n===""||n==="true",i=a||t&&e&&o(e.parentNode);return i},ir=function(e){var t,r=e==null||(t=e.getAttribute)===null||t===void 0?void 0:t.call(e,"contenteditable");return r===""||r==="true"},gt=function(e,t,r){if(Ie(e))return[];var n=Array.prototype.slice.apply(e.querySelectorAll(Ne));return t&&ue.call(e,Ne)&&n.unshift(e),n=n.filter(r),n},bt=function o(e,t,r){for(var n=[],a=Array.from(e);a.length;){var i=a.shift();if(!Ie(i,!1))if(i.tagName==="SLOT"){var s=i.assignedElements(),u=s.length?s:i.children,l=o(u,!0,r);r.flatten?n.push.apply(n,l):n.push({scopeParent:i,candidates:l})}else{var h=ue.call(i,Ne);h&&r.filter(i)&&(t||!e.includes(i))&&n.push(i);var d=i.shadowRoot||typeof r.getShadowRoot=="function"&&r.getShadowRoot(i),v=!Ie(d,!1)&&(!r.shadowRootFilter||r.shadowRootFilter(i));if(d&&v){var y=o(d===!0?i.children:d.children,!0,r);r.flatten?n.push.apply(n,y):n.push({scopeParent:i,candidates:y})}else a.unshift.apply(a,i.children)}}return n},wt=function(e){return!isNaN(parseInt(e.getAttribute("tabindex"),10))},se=function(e){if(!e)throw new Error("No node provided");return e.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(e.tagName)||ir(e))&&!wt(e)?0:e.tabIndex},or=function(e,t){var r=se(e);return r<0&&t&&!wt(e)?0:r},sr=function(e,t){return e.tabIndex===t.tabIndex?e.documentOrder-t.documentOrder:e.tabIndex-t.tabIndex},xt=function(e){return e.tagName==="INPUT"},ur=function(e){return xt(e)&&e.type==="hidden"},lr=function(e){var t=e.tagName==="DETAILS"&&Array.prototype.slice.apply(e.children).some(function(r){return r.tagName==="SUMMARY"});return t},cr=function(e,t){for(var r=0;rAvailable formats
TeX
using MakieTeX, CairoMakie
+# Any of the below things could be used in place of the other.
+# However, \`scatter\` will not accept LaTeXStrings as markers.
+latex_string = L"\\int_0^\\pi \\sin(x)^2 dx"
+tex_document = TEXDocument(latex_string)
+cached_tex = CachedTEX(tex_document)
+
+fig = Figure()
+# use the teximg recipe
+teximg(fig[1, 1], latex_string)
+# use the LTeX block
+LTeX(fig[1, 2], tex_document)
+# use the latex as a scatter marker
+scatter(fig[2, 1], rand(10), rand(10), marker=cached_tex, markersize = 50)
+fig
using MakieTeX, CairoMakie
+doc = raw"""
+% A Venn diagram with PDF blending
+% Author: Stefan Kottwitz
+% https://www.packtpub.com/hardware-and-creative/latex-cookbook
+\\documentclass[border=10pt]{standalone}
+\\usepackage{tikz}
+\\begin{document}
+\\begin{tikzpicture}
+ \\begin{scope}[blend group = soft light]
+ \\fill[red!30!white] ( 90:1.2) circle (2);
+ \\fill[green!30!white] (210:1.2) circle (2);
+ \\fill[blue!30!white] (330:1.2) circle (2);
+ \\end{scope}
+ \\node at ( 90:2) {Typography};
+ \\node at ( 210:2) {Design};
+ \\node at ( 330:2) {Coding};
+ \\node [font=\\Large] {\\LaTeX};
+\\end{tikzpicture}
+\\end{document}
+"""
+
+tex_document = TEXDocument(doc)
+
+fig = Figure()
+# use the teximg recipe
+teximg(fig[1, 1], tex_document)
+# use the LTeX block
+LTeX(fig[1, 2], tex_document)
+# use the latex as a scatter marker
+scatter(fig[2, 1], rand(10), rand(10), marker=tex_document, markersize = 50)
+fig
Typst
using MakieTeX, CairoMakie
+
+typst_string = typst"$ integral_0^pi sin(x)^2 diff x $";
+typst_document = TypstDocument(typst_string);
+cached_typst = CachedTypst(typst_document);
+
+fig = Figure();
+LTeX(fig[1, 1], typst_document; scale = 2);
+scatter(fig[2, 1], rand(10), rand(10), marker=cached_typst, markersize = 50)
+fig
PDF
using MakieTeX, CairoMakie
+pdf_doc = PDFDocument(read(download("https://upload.wikimedia.org/wikipedia/commons/0/05/Wikipedia-logo-big-fr.pdf")));
+fig = Figure()
+# use the teximg recipe
+teximg(fig[1, 1], pdf_doc)
+# use the LTeX block
+# LTeX(fig[1, 2], pdf_doc)
+# use the latex as a scatter marker
+scatter(fig[2, 1], rand(5), rand(5), marker=Cached(pdf_doc), markersize = 50)
+fig
SVG
using MakieTeX, CairoMakie
+svg = SVGDocument(read(download("https://raw.githubusercontent.com/file-icons/icons/master/svg/Go-Old.svg"), String));
+fig = Figure()
+scatter(fig[1, 1], rand(10), rand(10), marker=Cached(svg), markersize = 50)
+scatter!(rand(5), rand(5), marker=Cached(svg), markersize = 50, strokecolor = :green, strokewidth = 7)
+fig
MakieTeX.jl
teximg
recipe which plots any LaTeX-like object, and the CachedDocument
API which allows users to plot documents directly as scatter
markers.using MakieTeX, CairoMakie
+
+teximg(raw"""
+\\begin{align*}
+\\frac{1}{2} \\times \\frac{1}{2} = \\frac{1}{4}
+\\end{align*}
+""")
Principle of operation
Rendering
rasterize
and draw_to_cairo_surface
).tectonic
is bundled with MakieTeX) and Typst uses Typst_jll.jl to render to a PDF, which then each follow the Poppler pipeline.Makie
Makie.to_spritemarker
), and then Makie treats it like a general image scatter marker.CairoMakie.cairo_scatter_marker
, and we overload it in MakieTeX.MakieTeXCairoMakieExt
to get the correct marker. This also allows us to apply styling to SVG elements, but again ONLY IN CAIROMAKIE! This is a bit of an incompatibility and a breaking of the implicit promise from Makie that rendering should be the same across backends, but the tradeoff is (to me, at least) worth it.MakieTeX.jl
teximg
recipe which plots any LaTeX-like object, and the CachedDocument
API which allows users to plot documents directly as scatter
markers.using MakieTeX, CairoMakie
+
+teximg(raw"""
+\begin{align*}
+\frac{1}{2} \times \frac{1}{2} = \frac{1}{4}
+\end{align*}
+""")
Principle of operation
Rendering
rasterize
and draw_to_cairo_surface
).tectonic
is bundled with MakieTeX) and Typst uses Typst_jll.jl to render to a PDF, which then each follow the Poppler pipeline.Makie
Makie.to_spritemarker
), and then Makie treats it like a general image scatter marker.CairoMakie.cairo_scatter_marker
, and we overload it in MakieTeX.MakieTeXCairoMakieExt
to get the correct marker. This also allows us to apply styling to SVG elements, but again ONLY IN CAIROMAKIE! This is a bit of an incompatibility and a breaking of the implicit promise from Makie that rendering should be the same across backends, but the tradeoff is (to me, at least) worth it.API documentation
Constants
pdfcrop
. Private, try not to touch!Interfaces
AbstractDocument
abstract type AbstractDocument
AbstractDocument
must contain a document as a String or Vector{UInt8} of the full contents of whichever file it is using. It may contain additional fields - for example, PDFDocument
s contain a page number to indicate which page to display, in the case where a PDF has multiple pages.AbstractDocument
s must implement the following functions:getdoc(doc::AbstractDocument)::Union{Vector{UInt8}, String}
mimetype(doc::AbstractDocument)::Base.MIME
Cached(doc::AbstractDocument)::AbstractCachedDocument
getdoc(doc::AbstractDocument)::Union{Vector{UInt8}, String}
Vector{UInt8}
or String
. This must be the full file, i.e., if it was saved, the file should be immediately openable.mimetype(::Type{<: AbstractDocument})::Base.MIME
+mimetype(::AbstractDocument)::Base.MIME
mimetype(::SVGDocument) == MIME("image/svg+xml")
.Cached(doc::AbstractDocument)::AbstractCachedDocument
AbstractCachedDocument
abstract type AbstractCachedDocument
rasterize
for more.AbstractCachedDocument
s must implement the AbstractDocument
API, as well as the following:rasterize(doc::AbstractCachedDocument, [scale::Real = 1])::Matrix{ARGB32}
draw_to_cairo_surface(doc::AbstractCachedDocument, surf::CairoSurface)
update_handle!(doc::AbstractCachedDocument)::<some_handle_type>
rasterize(doc::AbstractCachedDocument, scale::Real = 1)
CachedDocument
to an image at a given scale. This is a convenience function which calls the appropriate rendering function for the document type. Returns an image as a Matrix{ARGB32}
.draw_to_cairo_surface(doc::AbstractCachedDocument, surf::CairoSurface)
CachedDocument
to a Cairo surface. This is a convenience function which calls the appropriate rendering function for the document type.update_handle!(doc::AbstractCachedDocument)
CachedDocument
, and returns it.CachedPDF
, this function would reload the PDF document using the doc.doc
field and update the ptr
field with the new Poppler handle, if it is found to be invalid.AbstractCachedDocument
, as the handle/pointer type and the method to load/update it will be different for different document types (e.g., PDF, SVG, etc.).Document types
Raw document types
SVGDocument(svg::AbstractString)
CachedSVG
for use in plotting.PDFDocument(pdf::AbstractString, [page = 0])
CachedPDF
for use in plotting.EPSDocument
. Check Documenter's build log for details.TEXDocument(contents::AbstractString, add_defaults::Bool; requires, preamble, class, classoptions)
struct
of type TEXDocument
which can be passed to teximg
. All arguments are to be passed as strings.add_defaults
is false
, then we will not automatically add document structure. Note that in this case, keyword arguments will be disregarded and contents
must be a complete LaTeX document.requires
: code which comes before documentclass
in the preamble. Default: raw"\\RequirePackage{luatex85}"
.class
: the document class. Default (and what you should use): "standalone"
.classoptions
: the options you should pass to the class, i.e., \\documentclass[$classoptions]{$class}
. Default: "preview, tightpage, 12pt"
.preamble
: arbitrary code for the preamble (between \\documentclass
and \\begin{document}
). Default: raw"\\usepackage{amsmath, xcolor} \\pagestyle{empty}"
.CachedTEX
, compile_latex
, etc.TypstDocument(contents::AbstractString, add_defaults::Bool; preamble)
struct
of type TypstDocument
. All arguments are to be passed as strings.add_defaults
is false
, then we will not automatically add document structure. Note that in this case, keyword arguments will be disregarded and contents
must be a complete Typst document.preamble
: arbitrary code inserted prior to the contents
. Default: ""
.CachedTypst
, compile_typst
, etc.Cached document types
CachedTEX(doc::TEXDocument; kwargs...)
TEXDocument
, compile it and return the cached TeX object.CachedTEX
struct stores the document and its compiled form, as well as some pointers to in-program versions of it. It also stores the page dimensions.kwargs
, one can pass anything which goes to the internal function compile_latex
. These are primarily:engine =
lualatex/
xelatex/...
: the LaTeX engine to use when renderingoptions=
-file-line-error\`\`: the options to pass tolatexmk
.doc
pdf
ptr
surf
dims
mutable struct
because the pointer to the Poppler handle can change. TODO: make this an immutable struct with a Ref to the handle?? OR maybe even the surface itself...CachedTEX
with nothing
in the doc
field, if you just want to insert a pre-rendered PDF into your figure.CachedTypst(doc::TypstDocument)
TypstDocument
, compile it and return the cached Typst object.CachedTypst
struct stores the document and its compiled form, as well as some pointers to in-program versions of it. It also stores the page dimensions.doc
pdf
ptr
surf
dims
mutable struct
because the pointer to the Poppler handle can change. TODO: make this an immutable struct with a Ref to the handle?? OR maybe even the surface itself...CachedTypst
with nothing
in the doc
field, if you just want to insert a pre-rendered PDF into your figure.CachedPDF(pdf::PDFDocument)
CachedPDF(read("path/to/pdf.pdf"), [page = 0])
+CachedPDF(read("path/to/pdf.pdf", String), [page = 0])
+CachedPDF(PDFDocument(...), [page = 0])
doc
: A reference to the PDFDocument
which is cached here.ptr
: A pointer to the Poppler handle of the PDF. May be randomly GC'ed by Poppler.dims
: The dimensions of the PDF page in points, for ease of access.surf
: A Cairo surface to which Poppler has drawn the PDF. Permanent and cached.image_cache
: A cache for a (rendered_image, scale_factor) pair. This is used to avoid re-rendering the PDF.CachedSVG(svg::SVGDocument)
CachedSVG(read("path/to/svg.svg"))
+CachedSVG(read("path/to/svg.svg", String))
+CachedSVG(SVGDocument(...))
doc
: The original SVGDocument
which is cached here, i.e., the text of that SVG.handle
: A pointer to the Rsvg handle of the SVG. May be randomly GC'ed by Rsvg, so is stored as a Ref
in case it has to be refreshed.dims
: The dimensions of the SVG in points, for ease of access.surf
: A Cairo surface to which Rsvg has drawn the SVG. Permanent and cached.image_cache
: A cache for a (rendered_image, scale_factor) pair. This is used to avoid re-rendering the PDF.CachedEPS
. Check Documenter's build log for details.compile_latex
), PDF and SVG handling utils here, in case they are of use to anyone.All other methods and functions
CachedTEX(doc::TEXDocument; kwargs...)
TEXDocument
, compile it and return the cached TeX object.CachedTEX
struct stores the document and its compiled form, as well as some pointers to in-program versions of it. It also stores the page dimensions.kwargs
, one can pass anything which goes to the internal function compile_latex
. These are primarily:engine =
lualatex/
xelatex/...
: the LaTeX engine to use when renderingoptions=
-file-line-error\`\`: the options to pass tolatexmk
.doc
pdf
ptr
surf
dims
mutable struct
because the pointer to the Poppler handle can change. TODO: make this an immutable struct with a Ref to the handle?? OR maybe even the surface itself...CachedTEX
with nothing
in the doc
field, if you just want to insert a pre-rendered PDF into your figure.CachedTypst(doc::TypstDocument)
TypstDocument
, compile it and return the cached Typst object.CachedTypst
struct stores the document and its compiled form, as well as some pointers to in-program versions of it. It also stores the page dimensions.doc
pdf
ptr
surf
dims
mutable struct
because the pointer to the Poppler handle can change. TODO: make this an immutable struct with a Ref to the handle?? OR maybe even the surface itself...CachedTypst
with nothing
in the doc
field, if you just want to insert a pre-rendered PDF into your figure.EPSDocument(eps::AbstractString, [page = 0])
CachedPDF
for use in plotting.MakieTeX.LTeX <: Block
?MakieTeX.LTeX.x
in the REPL for more information about attribute x
)alignmode
, halign
, height
, padding
, render_density
, rotation
, scale
, tellheight
, tellwidth
, tex
, valign
, visible
, width
TEXDocument(contents::AbstractString, add_defaults::Bool; requires, preamble, class, classoptions)
struct
of type TEXDocument
which can be passed to teximg
. All arguments are to be passed as strings.add_defaults
is false
, then we will not automatically add document structure. Note that in this case, keyword arguments will be disregarded and contents
must be a complete LaTeX document.requires
: code which comes before documentclass
in the preamble. Default: raw"\\RequirePackage{luatex85}"
.class
: the document class. Default (and what you should use): "standalone"
.classoptions
: the options you should pass to the class, i.e., \\documentclass[$classoptions]{$class}
. Default: "preview, tightpage, 12pt"
.preamble
: arbitrary code for the preamble (between \\documentclass
and \\begin{document}
). Default: raw"\\usepackage{amsmath, xcolor} \\pagestyle{empty}"
.CachedTEX
, compile_latex
, etc.TypstDocument(contents::AbstractString, add_defaults::Bool; preamble)
struct
of type TypstDocument
. All arguments are to be passed as strings.add_defaults
is false
, then we will not automatically add document structure. Note that in this case, keyword arguments will be disregarded and contents
must be a complete Typst document.preamble
: arbitrary code inserted prior to the contents
. Default: ""
.CachedTypst
, compile_typst
, etc.compile_latex(document::AbstractString; tex_engine = CURRENT_TEX_ENGINE[], options = \`-file-line-error\`)
compile_typst(document::AbstractString)
crop_pdf(path; margin = (0, 0, 0, 0))
get_pdf_bbox(path)
load_pdf(pdf::String)::Ptr{Cvoid}
+load_pdf(pdf::Vector{UInt8})::Ptr{Cvoid}
Vector{UInt8}
, each representing the PDF file in memory.page2img(ct::Union{CachedTeX, CachedTypst}, page::Int; scale = 1, render_density = 1)
page
of the given CachedTeX
or CachedTypst
object to an image, with the given scale
and render_density
.pdf_get_page_size(document::Ptr{Cvoid}, page_number::Int)::Tuple{Float64, Float64}
document
must be a Poppler document handle. Returns a tuple of width, height
.pdf_num_pages(document::Ptr{Cvoid})::Int
document
must be a Poppler document handle. Returns the number of pages in the document.pdf_num_pages(filename::String)::Int
filename
, using the Poppler executable.angle
radians. This is not perfect but works well enough. Check an A vs X to see the difference.split_pdf(pdf::Union{Vector{UInt8}, String})::Vector{UInt8}
load_pdf
and page2img
instead.texdoc(contents::AbstractString; kwargs...)
TEXDocument(contents, add_defaults=true; kwargs...)
.requires
: code which comes before documentclass
in the preamble. Default: raw"\\RequirePackage{luatex85}"
.class
: the document class. Default (and what you should use): "standalone"
.classoptions
: the options you should pass to the class, i.e., \\documentclass[$classoptions]{$class}
. Default: "preview, tightpage, 12pt"
.preamble
: arbitrary code for the preamble (between \\documentclass
and \\begin{document}
). Default: raw"\\usepackage{amsmath, xcolor} \\pagestyle{empty}"
.teximg(tex; position, ...)
+teximg!(ax_or_scene, tex; position, ...)
TeX
to your Figure or Scene.String
, which is rendered to LaTeX cognizant of the figure's overall theme,TeXDocument
object, which is rendered to LaTeX directly, and can be customized by the user,CachedTeX
object, which is a pre-rendered LaTeX document.tex
may be a single one of these objects, or an array of them.MakieCore.Plot{MakieTeX.teximg}
are: align (:center, :center)
+ depth_shift 0.0f0
+ inspectable true
+ inspector_clear MakieCore.Automatic()
+ inspector_hover MakieCore.Automatic()
+ inspector_label MakieCore.Automatic()
+ markerspace :pixel
+ overdraw false
+ position GeometryBasics.Point{2, Float32}[[0.0, 0.0]]
+ render_density 2
+ rotation Float32[0.0]
+ scale 1.0
+ space :data
+ ssao false
+ transparency false
+ visible true
typstdoc(contents::AbstractString; kwargs...)
TypstDocument(contents, add_defaults=true; kwargs...)
.preamble
: arbitrary code inserted prior to the contents
. Default: ""
.
`,100),o=[l];function d(n,r,p,c,h,k){return i(),a("div",null,o)}const b=e(t,[["render",d]]);export{g as __pageData,b as default};
diff --git a/previews/PR53/assets/api.md.Dc2kh4gH.lean.js b/previews/PR53/assets/api.md.Dc2kh4gH.lean.js
new file mode 100644
index 0000000..3d4fc45
--- /dev/null
+++ b/previews/PR53/assets/api.md.Dc2kh4gH.lean.js
@@ -0,0 +1 @@
+import{_ as e,c as a,o as i,a6 as s}from"./chunks/framework.BMG0g3hY.js";const g=JSON.parse('{"title":"API documentation","description":"","frontmatter":{},"headers":[],"relativePath":"api.md","filePath":"api.md","lastUpdated":null}'),t={name:"api.md"},l=s("",100),o=[l];function d(n,r,p,c,h,k){return i(),a("div",null,o)}const b=e(t,[["render",d]]);export{g as __pageData,b as default};
diff --git a/previews/PR53/assets/app.DPkA8co_.js b/previews/PR53/assets/app.DPkA8co_.js
new file mode 100644
index 0000000..c0e8ac0
--- /dev/null
+++ b/previews/PR53/assets/app.DPkA8co_.js
@@ -0,0 +1 @@
+import{U as o,a7 as p,a8 as u,a9 as l,aa as c,ab as f,ac as d,ad as m,ae as h,af as g,ag as A,d as P,u as v,y,x as w,ah as C,ai as R,aj as b,a5 as E}from"./chunks/framework.BMG0g3hY.js";import{R as S}from"./chunks/theme.BO3mzHOP.js";function i(e){if(e.extends){const a=i(e.extends);return{...a,...e,async enhanceApp(t){a.enhanceApp&&await a.enhanceApp(t),e.enhanceApp&&await e.enhanceApp(t)}}}return e}const s=i(S),T=P({name:"VitePressApp",setup(){const{site:e,lang:a,dir:t}=v();return y(()=>{w(()=>{document.documentElement.lang=a.value,document.documentElement.dir=t.value})}),e.value.router.prefetchLinks&&C(),R(),b(),s.setup&&s.setup(),()=>E(s.Layout)}});async function _(){globalThis.__VITEPRESS__=!0;const e=x(),a=j();a.provide(u,e);const t=l(e.route);return a.provide(c,t),a.component("Content",f),a.component("ClientOnly",d),Object.defineProperties(a.config.globalProperties,{$frontmatter:{get(){return t.frontmatter.value}},$params:{get(){return t.page.value.params}}}),s.enhanceApp&&await s.enhanceApp({app:a,router:e,siteData:m}),{app:a,router:e,data:t}}function j(){return h(T)}function x(){let e=o,a;return g(t=>{let n=A(t),r=null;return n&&(e&&(a=n),(e||a===n)&&(n=n.replace(/\.js$/,".lean.js")),r=import(n)),o&&(e=!1),r},s.NotFound)}o&&_().then(({app:e,router:a,data:t})=>{a.go().then(()=>{p(a.route,t.site),e.mount("#app")})});export{_ as createApp};
diff --git a/previews/PR53/assets/bkchuca.BdV0g4gq.png b/previews/PR53/assets/bkchuca.BdV0g4gq.png
new file mode 100644
index 0000000..6e9c553
Binary files /dev/null and b/previews/PR53/assets/bkchuca.BdV0g4gq.png differ
diff --git a/previews/PR53/assets/chunks/@localSearchIndexroot.Dgo7Dk0c.js b/previews/PR53/assets/chunks/@localSearchIndexroot.Dgo7Dk0c.js
new file mode 100644
index 0000000..18fc827
--- /dev/null
+++ b/previews/PR53/assets/chunks/@localSearchIndexroot.Dgo7Dk0c.js
@@ -0,0 +1 @@
+const e='{"documentCount":18,"nextId":18,"documentIds":{"0":"/MakieTeX.jl/previews/PR53/api#API-documentation","1":"/MakieTeX.jl/previews/PR53/api#constants","2":"/MakieTeX.jl/previews/PR53/api#interfaces","3":"/MakieTeX.jl/previews/PR53/api#AbstractDocument","4":"/MakieTeX.jl/previews/PR53/api#AbstractCachedDocument","5":"/MakieTeX.jl/previews/PR53/api#Document-types","6":"/MakieTeX.jl/previews/PR53/api#Raw-document-types","7":"/MakieTeX.jl/previews/PR53/api#Cached-document-types","8":"/MakieTeX.jl/previews/PR53/api#All-other-methods-and-functions","9":"/MakieTeX.jl/previews/PR53/formats#Available-formats","10":"/MakieTeX.jl/previews/PR53/formats#tex","11":"/MakieTeX.jl/previews/PR53/formats#typst","12":"/MakieTeX.jl/previews/PR53/formats#pdf","13":"/MakieTeX.jl/previews/PR53/formats#svg","14":"/MakieTeX.jl/previews/PR53/#makietex-jl","15":"/MakieTeX.jl/previews/PR53/#Principle-of-operation","16":"/MakieTeX.jl/previews/PR53/#rendering","17":"/MakieTeX.jl/previews/PR53/#makie"},"fieldIds":{"title":0,"titles":1,"text":2},"fieldLength":{"0":[2,1,1],"1":[1,2,42],"2":[1,2,1],"3":[1,3,98],"4":[1,3,140],"5":[2,2,1],"6":[3,4,135],"7":[3,4,186],"8":[5,2,403],"9":[2,1,23],"10":[1,2,115],"11":[1,2,30],"12":[1,2,42],"13":[1,2,68],"14":[2,1,61],"15":[3,2,1],"16":[1,5,66],"17":[1,5,78]},"averageFieldLength":[1.7777777777777777,2.5,82.83333333333333],"storedFields":{"0":{"title":"API documentation","titles":[]},"1":{"title":"Constants","titles":["API documentation"]},"2":{"title":"Interfaces","titles":["API documentation"]},"3":{"title":"AbstractDocument","titles":["API documentation","Interfaces"]},"4":{"title":"AbstractCachedDocument","titles":["API documentation","Interfaces"]},"5":{"title":"Document types","titles":["API documentation"]},"6":{"title":"Raw document types","titles":["API documentation","Document types"]},"7":{"title":"Cached document types","titles":["API documentation","Document types"]},"8":{"title":"All other methods and functions","titles":["API documentation"]},"9":{"title":"Available formats","titles":[]},"10":{"title":"TeX","titles":["Available formats"]},"11":{"title":"Typst","titles":["Available formats"]},"12":{"title":"PDF","titles":["Available formats"]},"13":{"title":"SVG","titles":["Available formats"]},"14":{"title":"MakieTeX.jl","titles":[]},"15":{"title":"Principle of operation","titles":["MakieTeX.jl"]},"16":{"title":"Rendering","titles":["MakieTeX.jl","Principle of operation"]},"17":{"title":"Makie","titles":["MakieTeX.jl","Principle of operation"]}},"dirtCount":0,"index":[["4",{"2":{"14":1}}],["jll",{"2":{"16":1}}],["jl",{"0":{"14":1},"1":{"15":1,"16":1,"17":1},"2":{"16":1}}],["just",{"2":{"7":2,"8":3}}],["juliausing",{"2":{"10":2,"11":1,"12":1,"13":1,"14":1}}],["juliaupdate",{"2":{"4":1}}],["juliasplit",{"2":{"8":1}}],["juliasvgdocument",{"2":{"6":1}}],["juliapdf",{"2":{"8":3}}],["juliapdfdocument",{"2":{"6":1}}],["juliapage2img",{"2":{"8":1}}],["juliaload",{"2":{"8":1}}],["juliaget",{"2":{"8":1}}],["juliagetdoc",{"2":{"3":1}}],["juliacrop",{"2":{"8":1}}],["juliacompile",{"2":{"8":2}}],["juliacachedsvg",{"2":{"7":2}}],["juliacachedpdf",{"2":{"7":2}}],["juliacachedtypst",{"2":{"7":1,"8":1}}],["juliacachedtex",{"2":{"7":1,"8":1}}],["juliacached",{"2":{"3":1}}],["juliaepsdocument",{"2":{"8":1}}],["juliatypstdoc",{"2":{"8":1}}],["juliatypstdocument",{"2":{"6":1,"8":1}}],["juliateximg",{"2":{"8":1}}],["juliatexdoc",{"2":{"8":1}}],["juliatexdocument",{"2":{"6":1,"8":1}}],["juliadraw",{"2":{"4":1}}],["juliarasterize",{"2":{"4":1}}],["juliamimetype",{"2":{"3":1}}],["juliaabstract",{"2":{"3":1,"4":1}}],["7",{"2":{"13":1}}],["5",{"2":{"12":2,"13":2}}],["50",{"2":{"10":2,"11":1,"12":1,"13":2}}],["$",{"2":{"11":2}}],["$class",{"2":{"6":1,"8":2}}],["$classoptions",{"2":{"6":1,"8":2}}],["90",{"2":{"10":2}}],["330",{"2":{"10":2}}],["30",{"2":{"10":3}}],["39",{"2":{"6":1,"7":3,"8":2}}],["^2",{"2":{"10":1,"11":1}}],["210",{"2":{"10":2}}],["2",{"2":{"8":2,"10":13,"11":2,"12":2,"14":2}}],["2d",{"2":{"8":1}}],["`scatter`",{"2":{"10":1}}],["`",{"2":{"8":1}}],["ymax",{"2":{"8":1}}],["ymin",{"2":{"8":1}}],["y",{"2":{"8":1}}],["your",{"2":{"7":2,"8":3}}],["you",{"2":{"6":2,"7":2,"8":8,"10":2,"13":1}}],["vs",{"2":{"8":1}}],["via",{"2":{"17":1}}],["viewport",{"2":{"8":1}}],["visible",{"2":{"8":2}}],["valign",{"2":{"8":1}}],["venn",{"2":{"10":1}}],["version",{"2":{"4":1}}],["versions",{"2":{"4":1,"7":2,"8":2}}],["vector",{"2":{"3":4,"8":6,"14":1}}],["kottwitz",{"2":{"10":1}}],["kwargs",{"2":{"7":2,"8":6}}],["keyword",{"2":{"6":4,"8":6}}],["xmax",{"2":{"8":1}}],["xmin",{"2":{"8":1}}],["x",{"2":{"8":4,"10":1,"11":2}}],["xelatex",{"2":{"7":1,"8":1}}],["xcolor",{"2":{"6":1,"8":2}}],["x3c",{"2":{"3":1}}],["https",{"2":{"10":1,"12":1,"13":1}}],["hook",{"2":{"17":1}}],["however",{"2":{"10":1,"13":1,"17":1}}],["hover",{"2":{"8":1}}],["holds",{"2":{"6":1,"7":2,"8":1}}],["height",{"2":{"8":3}}],["here",{"2":{"7":3}}],["have",{"2":{"16":1}}],["hardware",{"2":{"10":1}}],["happens",{"2":{"8":1}}],["halign",{"2":{"8":1}}],["handling",{"2":{"7":1}}],["handle",{"2":{"4":11,"7":9,"8":10}}],["has",{"2":{"3":1,"4":2,"7":5,"16":1}}],["05",{"2":{"12":1}}],["0^pi",{"2":{"11":1}}],["0^",{"2":{"10":1}}],["0f0",{"2":{"8":1}}],["0",{"2":{"6":1,"7":3,"8":13,"12":1}}],["gl",{"2":{"16":1}}],["glmakie",{"2":{"13":1}}],["go",{"2":{"13":1}}],["goes",{"2":{"7":1,"8":1}}],["githubusercontent",{"2":{"13":1}}],["given",{"2":{"4":1,"8":4}}],["green",{"2":{"10":1,"13":1}}],["group",{"2":{"10":1}}],["ghostscript",{"2":{"8":3}}],["gc",{"2":{"7":2}}],["g",{"2":{"4":1}}],["garbage",{"2":{"4":1}}],["gt",{"2":{"4":1}}],["geometrybasics",{"2":{"8":1}}],["get",{"2":{"8":4,"17":2}}],["getdoc",{"2":{"3":2}}],["general",{"2":{"17":1}}],["generally",{"2":{"3":1}}],["generic",{"2":{"3":2}}],["least",{"2":{"17":1}}],["librsvg",{"2":{"16":1}}],["list",{"2":{"14":1}}],["like",{"2":{"14":1,"17":1}}],["light",{"2":{"10":1}}],["line",{"2":{"7":1,"8":2}}],["l",{"2":{"10":1}}],["large",{"2":{"10":1}}],["label",{"2":{"8":1}}],["latexstrings",{"2":{"10":1}}],["latex",{"2":{"6":2,"7":4,"8":10,"10":8,"12":1,"14":1}}],["luatex85",{"2":{"6":1,"8":2}}],["local",{"2":{"16":1}}],["located",{"2":{"8":1}}],["logo",{"2":{"12":1}}],["log",{"2":{"6":1,"7":1}}],["loads",{"2":{"8":1}}],["load",{"2":{"4":1,"8":3}}],["loaded",{"2":{"4":4}}],["ltex",{"2":{"8":3,"10":4,"11":1,"12":2}}],["lt",{"2":{"4":1,"8":1}}],["10",{"2":{"10":4,"11":2,"13":2}}],["12pt",{"2":{"6":1,"8":2}}],["1",{"2":{"4":2,"8":3,"10":11,"11":3,"12":4,"13":2,"14":3}}],["=lualatex",{"2":{"7":1,"8":1}}],["=",{"2":{"4":2,"6":1,"7":3,"8":6,"10":10,"11":6,"12":3,"13":6,"14":1}}],["==",{"2":{"3":1}}],["rotated",{"2":{"8":1}}],["rotatedrect",{"2":{"8":1}}],["rotation",{"2":{"8":2}}],["rand",{"2":{"10":4,"11":2,"12":2,"13":4}}],["randomly",{"2":{"7":2}}],["radians",{"2":{"8":1}}],["raw",{"0":{"6":1},"2":{"6":3,"8":4,"10":1,"13":1,"14":1}}],["rasterizes",{"2":{"17":1}}],["rasterize",{"2":{"4":3,"16":1}}],["rasterized",{"2":{"4":1}}],["rsvghandle",{"2":{"8":1}}],["rsvgrectangle",{"2":{"8":3}}],["rsvg",{"2":{"4":1,"7":4}}],["red",{"2":{"10":1}}],["recipe",{"2":{"8":1,"10":2,"12":1,"14":1}}],["rectangle",{"2":{"8":2}}],["represent",{"2":{"8":2}}],["representing",{"2":{"8":3}}],["repl",{"2":{"8":1}}],["remove",{"2":{"8":1}}],["resulting",{"2":{"8":2}}],["re",{"2":{"7":2}}],["requirepackage",{"2":{"6":1,"8":2}}],["requires",{"2":{"6":2,"8":3}}],["reload",{"2":{"4":1}}],["ref",{"2":{"7":3,"8":2}}],["refreshed",{"2":{"7":1}}],["refresh",{"2":{"4":1}}],["reference",{"2":{"4":1,"7":1}}],["reads",{"2":{"8":1}}],["read",{"2":{"7":4,"8":1,"12":1,"13":1}}],["real",{"2":{"4":2}}],["reasons",{"2":{"4":1}}],["returning",{"2":{"8":1}}],["returns",{"2":{"4":2,"8":4}}],["return",{"2":{"3":3,"4":1,"7":2,"8":5}}],["renderer",{"2":{"16":1}}],["rendered",{"2":{"4":1,"7":6,"8":6}}],["renders",{"2":{"8":2}}],["rendering",{"0":{"16":1},"2":{"1":1,"4":2,"7":3,"8":1,"9":1,"16":3,"17":3}}],["render",{"2":{"1":3,"4":2,"8":7,"16":1}}],["quot",{"2":{"3":2,"4":2,"6":10,"8":20}}],["breaking",{"2":{"17":1}}],["backends",{"2":{"16":1,"17":1}}],["base",{"2":{"3":3}}],["bit",{"2":{"17":1}}],["bitmap",{"2":{"16":1,"17":1}}],["big",{"2":{"12":1}}],["blue",{"2":{"10":1}}],["blend",{"2":{"10":1}}],["blending",{"2":{"10":1}}],["block",{"2":{"8":1,"10":2,"12":1}}],["bbox",{"2":{"8":2}}],["bundled",{"2":{"16":1}}],["but",{"2":{"8":2,"17":2}}],["build",{"2":{"6":1,"7":1}}],["both",{"2":{"16":1}}],["border=10pt",{"2":{"10":1}}],["bounding",{"2":{"8":2}}],["box",{"2":{"8":3}}],["bool",{"2":{"6":2,"8":2}}],["bytes",{"2":{"8":1}}],["by",{"2":{"7":2,"8":2,"13":1,"17":1}}],["below",{"2":{"10":1,"13":1}}],["because",{"2":{"7":2,"8":2}}],["begin",{"2":{"6":1,"8":2,"10":3,"14":1}}],["between",{"2":{"6":1,"8":2}}],["before",{"2":{"6":1,"8":2}}],["been",{"2":{"4":2,"7":2}}],["be",{"2":{"3":2,"4":3,"6":7,"7":3,"8":13,"10":1,"13":1,"17":1}}],["only",{"2":{"17":1}}],["one",{"2":{"7":1,"8":2}}],["own",{"2":{"16":1}}],["occur",{"2":{"16":1}}],["old",{"2":{"13":1}}],["overdraw",{"2":{"8":1}}],["overall",{"2":{"8":1}}],["overload",{"2":{"3":1,"17":1}}],["other",{"0":{"8":1},"2":{"10":1}}],["operation",{"0":{"15":1},"1":{"16":1,"17":1}}],["openable",{"2":{"3":1}}],["options=",{"2":{"7":1,"8":1}}],["options",{"2":{"6":1,"7":1,"8":4}}],["objects",{"2":{"8":1}}],["object",{"2":{"3":1,"7":2,"8":5,"14":1}}],["of",{"0":{"15":1},"1":{"16":1,"17":1},"2":{"3":4,"4":5,"6":2,"7":10,"8":18,"9":1,"10":2,"13":1,"14":1,"16":1,"17":2}}],["org",{"2":{"12":1}}],["original",{"2":{"7":1}}],["or",{"2":{"1":1,"3":2,"4":2,"7":2,"8":8,"13":1,"16":1}}],["upload",{"2":{"12":1}}],["updated",{"2":{"4":1}}],["update",{"2":{"4":5}}],["utils",{"2":{"7":1}}],["union",{"2":{"3":2,"8":2}}],["us",{"2":{"17":1}}],["usually",{"2":{"16":1}}],["usage",{"2":{"7":2}}],["users",{"2":{"14":2}}],["user",{"2":{"8":1}}],["usepackage",{"2":{"6":1,"8":2,"10":1}}],["use",{"2":{"6":3,"7":2,"8":5,"9":1,"10":6,"12":3,"16":1}}],["used",{"2":{"4":1,"7":2,"10":1}}],["uses",{"2":{"1":1,"8":1,"16":3}}],["using",{"2":{"3":1,"4":1,"8":4,"13":1}}],["uint8",{"2":{"3":4,"8":6}}],["separate",{"2":{"16":1}}],["see",{"2":{"4":1,"6":2,"8":4,"13":1,"14":2}}],["same",{"2":{"13":1,"17":1}}],["saved",{"2":{"3":1}}],["ssao",{"2":{"8":1}}],["spritemarker",{"2":{"17":1}}],["specifically",{"2":{"17":2}}],["space",{"2":{"8":1}}],["splits",{"2":{"8":1}}],["split",{"2":{"8":2}}],["shift",{"2":{"8":1}}],["shorthand",{"2":{"8":2}}],["should",{"2":{"3":1,"4":1,"6":2,"8":4,"17":1}}],["scope",{"2":{"10":2}}],["scatter",{"2":{"10":4,"11":1,"12":2,"13":3,"14":1,"17":2}}],["scale",{"2":{"4":4,"7":2,"8":4,"11":1}}],["scene",{"2":{"8":2}}],["sin",{"2":{"10":1,"11":1}}],["single",{"2":{"8":1}}],["size",{"2":{"8":2}}],["simple",{"2":{"8":1}}],["s",{"2":{"6":1,"7":1,"8":2}}],["subtype",{"2":{"4":1}}],["surf",{"2":{"4":2,"7":4,"8":2}}],["surface",{"2":{"4":5,"7":6,"8":3,"16":2}}],["soft",{"2":{"10":1}}],["so",{"2":{"7":1,"16":1}}],["some",{"2":{"4":1,"7":2,"8":2}}],["source",{"2":{"1":4,"3":4,"4":4,"6":4,"7":4,"8":24}}],["styling",{"2":{"17":1}}],["stefan",{"2":{"10":1}}],["standalone",{"2":{"6":1,"8":2,"10":1}}],["strokewidth",{"2":{"13":1}}],["strokecolor",{"2":{"13":1}}],["structure",{"2":{"6":2,"8":2}}],["struct",{"2":{"6":2,"7":6,"8":9}}],["strings",{"2":{"6":2,"8":2}}],["string",{"2":{"3":4,"6":2,"7":2,"8":13,"10":3,"11":2,"13":1}}],["stored",{"2":{"7":1}}],["stores",{"2":{"6":1,"7":6,"8":6}}],["store",{"2":{"4":1}}],["svg",{"0":{"13":1},"2":{"4":1,"6":2,"7":11,"9":1,"13":7,"14":1,"16":1,"17":1}}],["svgs",{"2":{"4":1}}],["svg+xml",{"2":{"3":1}}],["svgdocument",{"2":{"3":1,"6":1,"7":3,"13":1}}],["again",{"2":{"17":1}}],["author",{"2":{"10":1}}],["automatic",{"2":{"8":3}}],["automatically",{"2":{"6":2,"8":2}}],["ax",{"2":{"8":1}}],["across",{"2":{"17":1}}],["accept",{"2":{"10":1}}],["access",{"2":{"7":2}}],["actually",{"2":{"8":2}}],["about",{"2":{"7":1,"8":1}}],["abstractstring",{"2":{"6":4,"8":7}}],["abstractcacheddocuments",{"2":{"4":1}}],["abstractcacheddocument",{"0":{"4":1},"2":{"3":2,"4":9}}],["abstractdocuments",{"2":{"3":1,"4":1}}],["abstractdocument",{"0":{"3":1},"2":{"3":10,"4":1}}],["avoid",{"2":{"7":2}}],["available",{"0":{"9":1},"1":{"10":1,"11":1,"12":1,"13":1},"2":{"6":2,"8":5,"16":1}}],["amsmath",{"2":{"6":1,"8":2}}],["align",{"2":{"8":1,"14":2}}],["alignmode",{"2":{"8":1}}],["alters",{"2":{"8":1}}],["already",{"2":{"7":2}}],["along",{"2":{"7":2}}],["allows",{"2":{"9":1,"14":2,"17":1}}],["all",{"0":{"8":1},"2":{"6":2,"8":2,"14":1}}],["also",{"2":{"4":1,"6":2,"7":4,"8":8,"10":1,"17":1}}],["add",{"2":{"6":6,"7":1,"8":8}}],["additional",{"2":{"3":1}}],["apply",{"2":{"17":1}}],["applies",{"2":{"13":1}}],["approaches",{"2":{"14":1}}],["approximation",{"2":{"8":1}}],["appropriate",{"2":{"4":2}}],["apis",{"2":{"16":1}}],["api",{"0":{"0":1},"1":{"1":1,"2":1,"3":1,"4":1,"5":1,"6":1,"7":1,"8":1},"2":{"4":1,"14":2}}],["attribute",{"2":{"8":1,"17":1}}],["attributes",{"2":{"8":3}}],["at",{"2":{"4":1,"8":1,"10":3,"17":1}}],["array",{"2":{"8":1}}],["arrays",{"2":{"8":1}}],["around",{"2":{"8":1}}],["arbitrary",{"2":{"6":2,"8":4}}],["arguments",{"2":{"6":6,"8":8}}],["argb32",{"2":{"4":2}}],["are",{"2":{"4":1,"6":4,"7":2,"8":9,"13":1,"16":1}}],["as",{"2":{"3":2,"4":6,"6":3,"7":5,"8":13,"10":3,"12":1,"13":1,"14":1}}],["a",{"2":{"3":8,"4":13,"6":8,"7":26,"8":51,"10":4,"12":1,"14":2,"16":3,"17":5}}],["angle",{"2":{"8":1}}],["any",{"2":{"8":1,"10":1,"14":1}}],["anyone",{"2":{"7":1}}],["anything",{"2":{"7":1,"8":1}}],["and",{"0":{"8":1},"2":{"3":2,"4":5,"6":4,"7":9,"8":19,"9":1,"10":1,"14":3,"16":3,"17":3}}],["an",{"2":{"3":1,"4":2,"6":1,"7":4,"8":8,"13":1,"17":1}}],["ignoring",{"2":{"17":1}}],["icons",{"2":{"13":2}}],["if",{"2":{"3":1,"4":1,"6":2,"7":2,"8":5,"10":1,"13":1,"16":1}}],["i",{"2":{"3":1,"6":1,"7":1,"8":2}}],["implicit",{"2":{"17":1}}],["implemented",{"2":{"4":1}}],["implement",{"2":{"3":1,"4":1}}],["immutable",{"2":{"7":2,"8":2}}],["immediately",{"2":{"3":1}}],["image",{"2":{"3":1,"4":2,"7":4,"8":2,"17":1}}],["images",{"2":{"1":1,"14":1}}],["incompatibility",{"2":{"17":1}}],["inspector",{"2":{"8":3}}],["inspectable",{"2":{"8":1}}],["instead",{"2":{"8":1}}],["insert",{"2":{"7":2,"8":2}}],["inserted",{"2":{"6":1,"8":2}}],["input",{"2":{"8":5}}],["init",{"2":{"8":1}}],["information",{"2":{"8":1}}],["integral",{"2":{"11":1}}],["internal",{"2":{"4":1,"7":1,"8":1}}],["interface",{"2":{"3":1}}],["interfaces",{"0":{"2":1},"1":{"3":1,"4":1}}],["int",{"2":{"8":4,"10":1}}],["into",{"2":{"7":2,"8":4}}],["invalid",{"2":{"4":1}}],["invalidated",{"2":{"4":1}}],["in",{"2":{"3":1,"4":3,"6":5,"7":9,"8":14,"9":1,"10":1,"13":2,"14":1,"17":2}}],["indicate",{"2":{"3":1}}],["is",{"2":{"3":3,"4":4,"6":4,"7":9,"8":14,"9":1,"13":1,"14":1,"16":1,"17":4}}],["itself",{"2":{"7":2,"8":2}}],["its",{"2":{"4":1,"7":2,"8":3,"16":1}}],["it",{"2":{"3":4,"4":5,"7":11,"8":9,"14":1,"17":3}}],["num",{"2":{"8":4}}],["number",{"2":{"3":1,"8":3}}],["node",{"2":{"10":4}}],["no",{"2":{"8":1}}],["nothing",{"2":{"7":2,"8":2}}],["note",{"2":{"3":1,"4":1,"6":2,"7":4,"8":6}}],["not",{"2":{"1":1,"6":2,"8":6,"10":1,"13":1,"16":1}}],["needs",{"2":{"4":1}}],["new",{"2":{"4":1}}],["nbsp",{"2":{"1":4,"3":4,"4":4,"6":4,"7":4,"8":24}}],["from",{"2":{"17":1}}],["frac",{"2":{"14":3}}],["fr",{"2":{"12":1}}],["float32",{"2":{"8":2}}],["float64",{"2":{"8":6}}],["factor",{"2":{"7":2}}],["false",{"2":{"1":1,"6":2,"8":5}}],["function",{"2":{"3":3,"4":10,"6":2,"7":1,"8":4,"17":1}}],["functions",{"0":{"8":1},"2":{"3":1,"14":1}}],["full",{"2":{"3":2,"10":1}}],["follow",{"2":{"16":1}}],["following",{"2":{"3":1,"4":1,"7":2,"8":2}}],["font=",{"2":{"10":1}}],["found",{"2":{"4":1}}],["format",{"2":{"16":1}}],["formats",{"0":{"9":1},"1":{"10":1,"11":1,"12":1,"13":1}}],["form",{"2":{"7":2,"8":2,"9":1}}],["for",{"2":{"1":1,"3":3,"4":9,"6":5,"7":6,"8":7,"13":1,"16":2,"17":1}}],["fill",{"2":{"10":3}}],["files",{"2":{"8":1}}],["filename",{"2":{"8":4}}],["file",{"2":{"3":4,"7":1,"8":8,"13":1}}],["fig",{"2":{"10":10,"11":4,"12":5,"13":3}}],["figure",{"2":{"7":2,"8":4,"10":2,"11":1,"12":1,"13":1}}],["field",{"2":{"4":2,"7":2,"8":2}}],["fields",{"2":{"3":1,"7":4,"8":2}}],["end",{"2":{"10":3,"14":1}}],["enough",{"2":{"8":1}}],["engine",{"2":{"1":2,"7":2,"8":7}}],["either",{"2":{"8":2,"16":1}}],["elements",{"2":{"8":1,"17":1}}],["error`",{"2":{"8":1}}],["error``",{"2":{"7":1,"8":1}}],["eps",{"2":{"8":2,"16":1}}],["epsdocument",{"2":{"6":1,"8":1}}],["easiest",{"2":{"9":1}}],["ease",{"2":{"7":2}}],["each",{"2":{"4":1,"8":2,"16":2}}],["ed",{"2":{"7":2}}],["even",{"2":{"7":2,"8":2}}],["empty",{"2":{"6":1,"8":2}}],["etc",{"2":{"4":1,"6":2,"8":2}}],["e",{"2":{"3":1,"4":1,"6":1,"7":1,"8":2}}],["exported",{"2":{"14":1}}],["exposes",{"2":{"14":1}}],["executable",{"2":{"8":1}}],["example",{"2":{"3":2,"4":1,"13":1}}],["extrasafe",{"2":{"1":1}}],["two",{"2":{"14":1}}],["times",{"2":{"14":1}}],["tikzpicture",{"2":{"10":2}}],["tikz",{"2":{"10":1}}],["tight",{"2":{"8":1}}],["tightpage",{"2":{"6":1,"8":2}}],["tuple",{"2":{"8":3}}],["tectonic",{"2":{"16":1}}],["tellwidth",{"2":{"8":1}}],["tellheight",{"2":{"8":1}}],["texdoc",{"2":{"8":1}}],["texdocument",{"2":{"6":2,"7":2,"8":6,"10":2}}],["text",{"2":{"7":1}}],["teximg",{"2":{"6":1,"8":4,"10":4,"12":2,"14":2}}],["tex",{"0":{"10":1},"2":{"1":2,"7":1,"8":9,"9":1,"10":8,"14":1,"16":2}}],["typography",{"2":{"10":1}}],["typst",{"0":{"11":1},"2":{"6":2,"7":1,"8":6,"11":8,"16":2}}],["typstdocument",{"2":{"6":2,"7":2,"8":5,"11":1}}],["types",{"0":{"5":1,"6":1,"7":1},"1":{"6":1,"7":1},"2":{"4":1,"8":1,"14":1}}],["type",{"2":{"3":5,"4":6,"6":8,"7":4,"8":7}}],["thing",{"2":{"13":1}}],["things",{"2":{"10":1}}],["this",{"2":{"3":2,"4":5,"6":4,"7":6,"8":13,"13":1,"17":3}}],["three",{"2":{"8":1}}],["that",{"2":{"4":1,"6":2,"7":1,"8":2,"14":1,"17":1}}],["their",{"2":{"8":1}}],["them",{"2":{"8":1}}],["theme",{"2":{"8":1}}],["these",{"2":{"7":1,"8":2,"9":1,"16":1}}],["then",{"2":{"6":2,"8":3,"13":1,"16":1,"17":1}}],["they",{"2":{"4":1,"7":1}}],["there",{"2":{"3":1,"8":1,"17":1}}],["the",{"2":{"1":1,"3":10,"4":21,"6":6,"7":39,"8":63,"9":3,"10":8,"12":3,"13":5,"14":3,"16":3,"17":8}}],["todo",{"2":{"7":3,"8":2}}],["tolatexmk",{"2":{"7":1,"8":1}}],["touch",{"2":{"1":1}}],["to",{"2":{"1":1,"3":3,"4":13,"6":7,"7":28,"8":31,"9":2,"13":1,"14":4,"16":5,"17":8}}],["tradeoff",{"2":{"17":1}}],["transparency",{"2":{"8":1}}],["treats",{"2":{"17":1}}],["try",{"2":{"1":1,"8":2}}],["true",{"2":{"1":1,"8":2}}],["circle",{"2":{"10":3}}],["clear",{"2":{"8":1}}],["classoptions",{"2":{"6":2,"8":3}}],["class",{"2":{"6":4,"8":7}}],["center",{"2":{"8":2}}],["customized",{"2":{"8":1}}],["current",{"2":{"1":2,"8":1}}],["ct",{"2":{"8":1}}],["cvoid",{"2":{"8":4}}],["creative",{"2":{"10":1}}],["creates",{"2":{"6":2,"8":2}}],["cr",{"2":{"8":1}}],["crop",{"2":{"8":3}}],["change",{"2":{"7":2,"8":2}}],["checks",{"2":{"8":1}}],["check",{"2":{"6":1,"7":1,"8":1}}],["color",{"2":{"13":1}}],["colored",{"2":{"13":1}}],["collected",{"2":{"4":1}}],["coding",{"2":{"10":1}}],["code",{"2":{"6":3,"8":6}}],["cookbook",{"2":{"10":1}}],["could",{"2":{"10":1}}],["cognizant",{"2":{"8":1}}],["correct",{"2":{"8":1,"17":2}}],["commons",{"2":{"12":1}}],["com",{"2":{"10":1,"13":1}}],["complexities",{"2":{"16":1}}],["complete",{"2":{"6":2,"8":2}}],["compiles",{"2":{"14":1}}],["compiled",{"2":{"7":2,"8":2}}],["compile",{"2":{"6":2,"7":6,"8":11}}],["comes",{"2":{"6":1,"8":2}}],["conversion",{"2":{"17":2}}],["converted",{"2":{"6":2,"8":1}}],["convenience",{"2":{"4":2}}],["concrete",{"2":{"4":1}}],["constituent",{"2":{"8":1}}],["construct",{"2":{"7":2,"8":2,"9":1}}],["constructors",{"2":{"9":1}}],["constructor",{"2":{"6":2,"7":2,"8":4}}],["constructed",{"2":{"3":1}}],["constant",{"2":{"1":4}}],["constants",{"0":{"1":1}}],["contents",{"2":{"3":2,"6":5,"8":10}}],["contain",{"2":{"3":3,"4":1}}],["calculate",{"2":{"8":1}}],["calls",{"2":{"4":2}}],["can",{"2":{"6":1,"7":3,"8":6,"10":1,"16":1}}],["cache",{"2":{"3":1,"4":1,"7":4}}],["cachedeps",{"2":{"7":1}}],["cachedtypst",{"2":{"6":1,"7":3,"8":6,"11":1}}],["cachedtex",{"2":{"6":1,"7":3,"8":7,"10":1}}],["cachedsvg",{"2":{"6":1,"7":3}}],["cachedpdf",{"2":{"4":1,"6":1,"7":3,"8":1}}],["cacheddocument",{"2":{"4":3,"14":1}}],["cached",{"0":{"7":1},"2":{"3":2,"4":1,"7":6,"8":2,"10":1,"11":1}}],["case",{"2":{"3":1,"4":1,"6":2,"7":2,"8":2,"13":1}}],["cairomakie",{"2":{"10":2,"11":1,"12":1,"13":2,"14":1,"16":1,"17":3}}],["cairocontext",{"2":{"8":1}}],["cairosurface",{"2":{"4":2}}],["cairo",{"2":{"1":1,"4":5,"7":4,"8":1,"16":2,"17":2}}],["place",{"2":{"10":1}}],["plot",{"2":{"8":1,"14":2}}],["plots",{"2":{"8":1,"14":1}}],["plotting",{"2":{"6":2,"8":1}}],["pi",{"2":{"10":1}}],["pixel",{"2":{"8":1}}],["pipelines",{"2":{"16":1}}],["pipeline",{"2":{"1":2,"16":1,"17":2}}],["perfect",{"2":{"8":1}}],["performance",{"2":{"4":1}}],["permanent",{"2":{"7":2}}],["promise",{"2":{"17":1}}],["provide",{"2":{"8":1}}],["program",{"2":{"7":2,"8":2}}],["principle",{"0":{"15":1},"1":{"16":1,"17":1}}],["primarily",{"2":{"7":1,"8":1}}],["prior",{"2":{"6":1,"8":2}}],["private",{"2":{"1":1}}],["pre",{"2":{"7":2,"8":3}}],["preview",{"2":{"6":1,"8":2}}],["preamble",{"2":{"6":6,"8":10}}],["ptr",{"2":{"4":1,"7":3,"8":6}}],["png",{"2":{"4":1}}],["position",{"2":{"8":3}}],["possible",{"2":{"7":2,"8":2}}],["point",{"2":{"8":1}}],["points",{"2":{"7":2}}],["pointers",{"2":{"7":2,"8":2}}],["pointer",{"2":{"4":5,"7":4,"8":2}}],["poppler",{"2":{"1":1,"4":2,"7":6,"8":7,"16":2}}],["package",{"2":{"14":1}}],["packtpub",{"2":{"10":1}}],["padding",{"2":{"8":1}}],["pair",{"2":{"7":2}}],["path",{"2":{"7":4,"8":2}}],["pass",{"2":{"6":1,"7":2,"8":4,"10":1}}],["passed",{"2":{"6":3,"8":3}}],["passing",{"2":{"3":1}}],["page2img",{"2":{"8":2}}],["pagestyle",{"2":{"6":1,"8":2}}],["pages",{"2":{"3":1,"8":7}}],["page",{"2":{"3":2,"6":1,"7":6,"8":9,"14":1}}],["pdfdocument",{"2":{"6":1,"7":3,"12":1}}],["pdfdocuments",{"2":{"3":1}}],["pdfs",{"2":{"4":1}}],["pdf",{"0":{"12":1},"2":{"3":1,"4":2,"6":2,"7":16,"8":34,"9":1,"10":1,"12":5,"13":1,"14":2,"16":2}}],["pdfcrop",{"2":{"1":2}}],["wglmakie",{"2":{"13":1}}],["www",{"2":{"10":1}}],["write",{"2":{"8":1}}],["worth",{"2":{"17":1}}],["works",{"2":{"8":1}}],["would",{"2":{"4":1}}],["way",{"2":{"9":1}}],["warn",{"2":{"8":2}}],["want",{"2":{"7":2,"8":3}}],["was",{"2":{"3":1}}],["we",{"2":{"6":2,"8":2,"17":1}}],["well",{"2":{"4":2,"7":2,"8":3}}],["wikipedia",{"2":{"12":2}}],["wikimedia",{"2":{"12":1}}],["wish",{"2":{"10":1}}],["width",{"2":{"8":3}}],["will",{"2":{"4":1,"6":4,"8":4,"10":1,"13":1}}],["with",{"2":{"1":1,"4":1,"7":6,"8":5,"10":1,"16":1,"17":1}}],["while",{"2":{"16":1}}],["white",{"2":{"10":3}}],["whichever",{"2":{"3":1}}],["which",{"2":{"1":1,"3":1,"4":3,"6":4,"7":7,"8":9,"14":3,"16":1}}],["what",{"2":{"6":1,"8":3}}],["whether",{"2":{"8":1}}],["where",{"2":{"3":1}}],["when",{"2":{"1":1,"3":1,"7":1,"8":1,"17":2}}],["me",{"2":{"17":1}}],["memory",{"2":{"8":1}}],["methods",{"0":{"8":1}}],["method",{"2":{"4":1,"8":21}}],["missing",{"2":{"6":2,"7":2}}],["mime",{"2":{"3":5}}],["mimetype",{"2":{"3":4}}],["more",{"2":{"4":1,"8":1}}],["mutable",{"2":{"7":2,"8":2}}],["multiple",{"2":{"3":1}}],["must",{"2":{"3":3,"4":1,"6":2,"8":5}}],["macros",{"2":{"14":1}}],["master",{"2":{"13":1}}],["marker=tex",{"2":{"10":1}}],["marker=cached",{"2":{"10":1,"11":1,"12":1,"13":2}}],["marker",{"2":{"10":2,"12":1,"13":1,"17":4}}],["markersize",{"2":{"10":2,"11":1,"12":1,"13":2}}],["markers",{"2":{"10":1,"14":1}}],["markerspace",{"2":{"8":1}}],["margin",{"2":{"8":1}}],["margins",{"2":{"1":2}}],["manually",{"2":{"7":2,"8":2}}],["makie",{"0":{"17":1},"2":{"9":1,"14":1,"17":6}}],["makiecore",{"2":{"8":4}}],["makietexcairomakieext",{"2":{"17":1}}],["makietex",{"0":{"14":1},"1":{"15":1,"16":1,"17":1},"2":{"1":5,"3":4,"4":4,"6":4,"7":4,"8":27,"9":1,"10":2,"11":1,"12":1,"13":1,"14":2,"16":1,"17":2}}],["make",{"2":{"7":2,"8":2}}],["matrix",{"2":{"4":2}}],["maybe",{"2":{"7":2,"8":2}}],["may",{"2":{"3":1,"7":2,"8":2}}],["mdash",{"2":{"1":4,"3":4,"4":4,"6":4,"7":4,"8":24}}],["dx",{"2":{"10":1}}],["download",{"2":{"12":1,"13":1}}],["does",{"2":{"8":3}}],["docstring",{"2":{"6":2,"7":2,"8":1}}],["doc",{"2":{"3":5,"4":8,"7":8,"8":7,"10":2,"12":4}}],["documentclass",{"2":{"6":3,"8":6,"10":1}}],["documenter",{"2":{"6":1,"7":1}}],["documents",{"2":{"4":1,"9":1,"14":1}}],["document",{"0":{"5":1,"6":1,"7":1},"1":{"6":1,"7":1},"2":{"3":4,"4":8,"6":8,"7":4,"8":26,"10":10,"11":3,"17":1}}],["documentation",{"0":{"0":1},"1":{"1":1,"2":1,"3":1,"4":1,"5":1,"6":1,"7":1,"8":1},"2":{"4":1,"7":1}}],["diff",{"2":{"11":1}}],["difference",{"2":{"8":1}}],["different",{"2":{"4":2}}],["diagram",{"2":{"10":1}}],["directly",{"2":{"8":1,"14":2,"16":1}}],["dims",{"2":{"7":4,"8":2}}],["dimensions",{"2":{"7":4,"8":2}}],["disregarded",{"2":{"6":2,"8":2}}],["display",{"2":{"3":1}}],["drawn",{"2":{"7":2}}],["draw",{"2":{"4":2,"16":1}}],["data",{"2":{"3":1,"8":1}}],["design",{"2":{"10":1}}],["depth",{"2":{"8":1}}],["details",{"2":{"6":1,"7":1}}],["defined",{"2":{"3":1,"8":1}}],["defaults=true",{"2":{"8":2}}],["defaults",{"2":{"6":4,"8":5}}],["default",{"2":{"1":3,"6":5,"8":11,"17":2}}],["density",{"2":{"1":2,"8":4}}]],"serializationVersion":2}';export{e as default};
diff --git a/previews/PR53/assets/chunks/VPLocalSearchBox.D_NnHnce.js b/previews/PR53/assets/chunks/VPLocalSearchBox.D_NnHnce.js
new file mode 100644
index 0000000..7b204d9
--- /dev/null
+++ b/previews/PR53/assets/chunks/VPLocalSearchBox.D_NnHnce.js
@@ -0,0 +1,7 @@
+var Ct=Object.defineProperty;var It=(o,e,t)=>e in o?Ct(o,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):o[e]=t;var Oe=(o,e,t)=>It(o,typeof e!="symbol"?e+"":e,t);import{X as Dt,s as oe,v as $e,ak as kt,al as Ot,d as Rt,G as xe,am as tt,h as Fe,an as _t,ao as Mt,x as Lt,ap as zt,y as Re,R as de,Q as Ee,aq as Pt,ar as Bt,Y as Vt,U as $t,as as Wt,o as ee,b as Kt,j as k,a1 as Jt,k as j,at as Ut,au as jt,av as Gt,c as re,n as rt,e as Se,E as at,F as nt,a as ve,t as pe,aw as Qt,p as qt,l as Ht,ax as it,ay as Yt,aa as Zt,ag as Xt,az as er,_ as tr}from"./framework.BMG0g3hY.js";import{u as rr,c as ar}from"./theme.BO3mzHOP.js";const nr={root:()=>Dt(()=>import("./@localSearchIndexroot.Dgo7Dk0c.js"),[])};/*!
+* tabbable 6.2.0
+* @license MIT, https://github.com/focus-trap/tabbable/blob/master/LICENSE
+*/var yt=["input:not([inert])","select:not([inert])","textarea:not([inert])","a[href]:not([inert])","button:not([inert])","[tabindex]:not(slot):not([inert])","audio[controls]:not([inert])","video[controls]:not([inert])",'[contenteditable]:not([contenteditable="false"]):not([inert])',"details>summary:first-of-type:not([inert])","details:not([inert])"],Ne=yt.join(","),mt=typeof Element>"u",ue=mt?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,Ce=!mt&&Element.prototype.getRootNode?function(o){var e;return o==null||(e=o.getRootNode)===null||e===void 0?void 0:e.call(o)}:function(o){return o==null?void 0:o.ownerDocument},Ie=function o(e,t){var r;t===void 0&&(t=!0);var n=e==null||(r=e.getAttribute)===null||r===void 0?void 0:r.call(e,"inert"),a=n===""||n==="true",i=a||t&&e&&o(e.parentNode);return i},ir=function(e){var t,r=e==null||(t=e.getAttribute)===null||t===void 0?void 0:t.call(e,"contenteditable");return r===""||r==="true"},gt=function(e,t,r){if(Ie(e))return[];var n=Array.prototype.slice.apply(e.querySelectorAll(Ne));return t&&ue.call(e,Ne)&&n.unshift(e),n=n.filter(r),n},bt=function o(e,t,r){for(var n=[],a=Array.from(e);a.length;){var i=a.shift();if(!Ie(i,!1))if(i.tagName==="SLOT"){var s=i.assignedElements(),u=s.length?s:i.children,l=o(u,!0,r);r.flatten?n.push.apply(n,l):n.push({scopeParent:i,candidates:l})}else{var h=ue.call(i,Ne);h&&r.filter(i)&&(t||!e.includes(i))&&n.push(i);var d=i.shadowRoot||typeof r.getShadowRoot=="function"&&r.getShadowRoot(i),v=!Ie(d,!1)&&(!r.shadowRootFilter||r.shadowRootFilter(i));if(d&&v){var y=o(d===!0?i.children:d.children,!0,r);r.flatten?n.push.apply(n,y):n.push({scopeParent:i,candidates:y})}else a.unshift.apply(a,i.children)}}return n},wt=function(e){return!isNaN(parseInt(e.getAttribute("tabindex"),10))},se=function(e){if(!e)throw new Error("No node provided");return e.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(e.tagName)||ir(e))&&!wt(e)?0:e.tabIndex},or=function(e,t){var r=se(e);return r<0&&t&&!wt(e)?0:r},sr=function(e,t){return e.tabIndex===t.tabIndex?e.documentOrder-t.documentOrder:e.tabIndex-t.tabIndex},xt=function(e){return e.tagName==="INPUT"},ur=function(e){return xt(e)&&e.type==="hidden"},lr=function(e){var t=e.tagName==="DETAILS"&&Array.prototype.slice.apply(e.children).some(function(r){return r.tagName==="SUMMARY"});return t},cr=function(e,t){for(var r=0;r