From fe96395f09823b7e46145c84204c95824e2e0fc3 Mon Sep 17 00:00:00 2001 From: Anshul Singhvi Date: Wed, 5 Jun 2024 20:02:28 -0400 Subject: [PATCH] Add vitepress header --- docs/src/index.md | 43 ++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 42 insertions(+), 1 deletion(-) diff --git a/docs/src/index.md b/docs/src/index.md index 0cbb272..3e5b096 100644 --- a/docs/src/index.md +++ b/docs/src/index.md @@ -1,3 +1,40 @@ +```@raw html +--- +# https://vitepress.dev/reference/default-theme-home-page +layout: home + +hero: + name: "MakieTeX" + text: "" + tagline: Plotting vector images in Makie + image: + src: /logo.png + alt: MakieTeX logo + actions: + - theme: brand + text: Introduction + link: /index + - theme: alt + text: View on Github + link: https://github.com/JuliaPlots/MakieTeX.jl + - theme: alt + text: Available formats + link: /formats + +features: + - icon: Julia code + title: TeX, PDF, SVG + details: Renders vector formats like TeX, PDF and SVG with no external dependencies + link: /formats +--- + + +

+ +
+ +``` + # MakieTeX.jl 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. @@ -29,4 +66,8 @@ A hypothetical future Typst backend would likely also be a Typst -> PDF -> Poppl 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. \ No newline at end of file +**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. + +```@raw html +
+``` \ No newline at end of file