From 3ab9d7dfca132b9f5768daeac9c1494b1718f2b7 Mon Sep 17 00:00:00 2001 From: "Documenter.jl" Date: Mon, 1 Jul 2024 11:56:00 +0000 Subject: [PATCH] build based on fd6208e --- dev/404.html | 2 +- dev/api.html | 6 +++--- .../{api.md.DV-bSc9j.js => api.md.C-oxDGDx.js} | 2 +- ....md.DV-bSc9j.lean.js => api.md.C-oxDGDx.lean.js} | 2 +- .../{jqsndvj.C-W3LInb.gif => dutyvgj.C-W3LInb.gif} | Bin ...d.BRmKPXkw.js => getting_started.md.BSQ6ODQW.js} | 6 +++--- ....lean.js => getting_started.md.BSQ6ODQW.lean.js} | 0 .../{ervdgfy.Drfs-ROQ.svg => kvjmvof.Drfs-ROQ.svg} | 0 ...BPHkN5Q0.js => markdown-examples.md.z5JN13o6.js} | 4 ++-- ...ean.js => markdown-examples.md.z5JN13o6.lean.js} | 2 +- ....md.ftfe-v6Q.js => mime_examples.md.DhmXvl2I.js} | 2 +- ...6Q.lean.js => mime_examples.md.DhmXvl2I.lean.js} | 2 +- ...{jgzsdgs.yDDNeA3I.jpeg => pnttkoc.yDDNeA3I.jpeg} | Bin .../{jecpztw.CGGmtknr.png => urflwhw.CGGmtknr.png} | Bin dev/citations.html | 2 +- dev/code_example.html | 2 +- dev/documenter_to_vitepress_docs_example.html | 2 +- dev/getting_started.html | 10 +++++----- dev/hashmap.json | 2 +- dev/index.html | 2 +- dev/markdown-examples.html | 6 +++--- dev/mime_examples.html | 8 ++++---- dev/render_pipeline.html | 2 +- dev/style_css.html | 2 +- 24 files changed, 33 insertions(+), 33 deletions(-) rename dev/assets/{api.md.DV-bSc9j.js => api.md.C-oxDGDx.js} (95%) rename dev/assets/{api.md.DV-bSc9j.lean.js => api.md.C-oxDGDx.lean.js} (83%) rename dev/assets/{jqsndvj.C-W3LInb.gif => dutyvgj.C-W3LInb.gif} (100%) rename dev/assets/{getting_started.md.BRmKPXkw.js => getting_started.md.BSQ6ODQW.js} (71%) rename dev/assets/{getting_started.md.BRmKPXkw.lean.js => getting_started.md.BSQ6ODQW.lean.js} (100%) rename dev/assets/{ervdgfy.Drfs-ROQ.svg => kvjmvof.Drfs-ROQ.svg} (100%) rename dev/assets/{markdown-examples.md.BPHkN5Q0.js => markdown-examples.md.z5JN13o6.js} (99%) rename dev/assets/{markdown-examples.md.BPHkN5Q0.lean.js => markdown-examples.md.z5JN13o6.lean.js} (94%) rename dev/assets/{mime_examples.md.ftfe-v6Q.js => mime_examples.md.DhmXvl2I.js} (97%) rename dev/assets/{mime_examples.md.ftfe-v6Q.lean.js => mime_examples.md.DhmXvl2I.lean.js} (61%) rename dev/assets/{jgzsdgs.yDDNeA3I.jpeg => pnttkoc.yDDNeA3I.jpeg} (100%) rename dev/assets/{jecpztw.CGGmtknr.png => urflwhw.CGGmtknr.png} (100%) diff --git a/dev/404.html b/dev/404.html index 0027e047..70b60375 100644 --- a/dev/404.html +++ b/dev/404.html @@ -16,7 +16,7 @@
- + \ No newline at end of file diff --git a/dev/api.html b/dev/api.html index 4c849f19..b430221b 100644 --- a/dev/api.html +++ b/dev/api.html @@ -12,14 +12,14 @@ - + -
Skip to content

Public API

# DocumenterVitepress.DocumenterVitepressModule.
julia
DocumenterVitepress

Similar to DocumentationMarkdown.jl but designed to work with vitepress.

source


# DocumenterVitepress.MarkdownVitepressType.
julia
MarkdownVitepress(; repo, devbranch, devurl, kwargs...)

This is the main entry point for the Vitepress Markdown writer.

It is a config which can be passed to the format keyword argument in Documenter.makedocs, and causes it to emit a Vitepress site.

Quick start

When invoking Documenter.makedocs, replace the default format=Documenter.HTML(...) with:

julia
format=DocumenterVitepress.MarkdownVitepress(; repo = "...", devbranch = "...", devurl = "...")

Keyword arguments (config)

  • repo: Required: The full URL of the repository to which the documentation will be deployed.

  • devbranch: The name of the development branch, like master or main.

  • devurl: The URL path to the development site, like dev or dev-branch.

  • deploy_url: The URL of the repository to which the documentation will be deployed. This must be the full URL, including https://, like https://rafaqz.github.io/Rasters.jl or https://geo.makie.jl/.

  • description: A description of the website as a String.

  • build_vitepress: Determines whether to build the Vitepress site or only emit markdown files. Defaults to true, i.e., building the full Vitepress site.

  • install_npm: Determines whether to run npm install before building the Vitepress site. Defaults to true.

  • md_output_path: The path to which the Markdown files will be output. Defaults to $build/.documenter.

  • clean_md_output: Determines whether to clean up the Markdown assets after build, i.e., whether to remove the contents of md_output_path after the Vitepress site is built. Options are:

    • nothing: Default. Only remove the contents of md_output_path if the documentation will deploy, to save space.

    • true: Removes the contents of md_output_path after the Vitepress site is built.

    • false: Does not remove the contents of md_output_path after the Vitepress site is built.

  • deploy_decision: DeployDecision from Documenter.jl. This is used to determine whether to deploy the documentation or not. Options are:

    • nothing: Default. Automatically determine whether to deploy the documentation.

    • Documenter.DeployDecision: Override the automatic decision and deploy based on the passed config.

    It might be useful to use the latter if DocumenterVitepress fails to deploy automatically. You can pass a manually constructed Documenter.DeployDecision struct, or the output of Documenter.deploy_folder(Documenter.auto_detect_deploy_system(); repo, devbranch, devurl, push_preview).

  • assets: A list of assets, the same as what is provided to Documenter's HTMLWriter.

Extended help

The repo kwarg is used to set the edit link for the documentation.

The devbranch and devurl kwargs are used to set the path of the static site, which Vitepress expects in advance.

source


See e.g. DocumenterVitepress.DocumenterVitepress

- +
Skip to content

Public API

# DocumenterVitepress.DocumenterVitepressModule.
julia
DocumenterVitepress

Similar to DocumentationMarkdown.jl but designed to work with vitepress.

source


# DocumenterVitepress.MarkdownVitepressType.
julia
MarkdownVitepress(; repo, devbranch, devurl, kwargs...)

This is the main entry point for the Vitepress Markdown writer.

It is a config which can be passed to the format keyword argument in Documenter.makedocs, and causes it to emit a Vitepress site.

Quick start

When invoking Documenter.makedocs, replace the default format=Documenter.HTML(...) with:

julia
format=DocumenterVitepress.MarkdownVitepress(; repo = "...", devbranch = "...", devurl = "...")

Keyword arguments (config)

  • repo: Required: The full URL of the repository to which the documentation will be deployed.

  • devbranch: The name of the development branch, like master or main.

  • devurl: The URL path to the development site, like dev or dev-branch.

  • deploy_url: The URL of the repository to which the documentation will be deployed. This must be the full URL, including https://, like https://rafaqz.github.io/Rasters.jl or https://geo.makie.jl/.

  • description: A description of the website as a String.

  • build_vitepress: Determines whether to build the Vitepress site or only emit markdown files. Defaults to true, i.e., building the full Vitepress site.

  • install_npm: Determines whether to run npm install before building the Vitepress site. Defaults to true.

  • md_output_path: The path to which the Markdown files will be output. Defaults to $build/.documenter.

  • clean_md_output: Determines whether to clean up the Markdown assets after build, i.e., whether to remove the contents of md_output_path after the Vitepress site is built. Options are:

    • nothing: Default. Only remove the contents of md_output_path if the documentation will deploy, to save space.

    • true: Removes the contents of md_output_path after the Vitepress site is built.

    • false: Does not remove the contents of md_output_path after the Vitepress site is built.

  • deploy_decision: DeployDecision from Documenter.jl. This is used to determine whether to deploy the documentation or not. Options are:

    • nothing: Default. Automatically determine whether to deploy the documentation.

    • Documenter.DeployDecision: Override the automatic decision and deploy based on the passed config.

    It might be useful to use the latter if DocumenterVitepress fails to deploy automatically. You can pass a manually constructed Documenter.DeployDecision struct, or the output of Documenter.deploy_folder(Documenter.auto_detect_deploy_system(); repo, devbranch, devurl, push_preview).

  • assets: A list of assets, the same as what is provided to Documenter's HTMLWriter.

Extended help

The repo kwarg is used to set the edit link for the documentation.

The devbranch and devurl kwargs are used to set the path of the static site, which Vitepress expects in advance.

source


See e.g. DocumenterVitepress.DocumenterVitepress

+ \ No newline at end of file diff --git a/dev/assets/api.md.DV-bSc9j.js b/dev/assets/api.md.C-oxDGDx.js similarity index 95% rename from dev/assets/api.md.DV-bSc9j.js rename to dev/assets/api.md.C-oxDGDx.js index b455ed9c..a0d08c0e 100644 --- a/dev/assets/api.md.DV-bSc9j.js +++ b/dev/assets/api.md.C-oxDGDx.js @@ -1 +1 @@ -import{_ as e,c as t,o as i,a3 as s}from"./chunks/framework.BCUNrZnW.js";const k=JSON.parse('{"title":"","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"api.md","filePath":"api.md","lastUpdated":null}'),o={name:"api.md"},a=s('

Public API

# DocumenterVitepress.DocumenterVitepressModule.
julia
DocumenterVitepress

Similar to DocumentationMarkdown.jl but designed to work with vitepress.

source


# DocumenterVitepress.MarkdownVitepressType.
julia
MarkdownVitepress(; repo, devbranch, devurl, kwargs...)

This is the main entry point for the Vitepress Markdown writer.

It is a config which can be passed to the format keyword argument in Documenter.makedocs, and causes it to emit a Vitepress site.

Quick start

When invoking Documenter.makedocs, replace the default format=Documenter.HTML(...) with:

julia
format=DocumenterVitepress.MarkdownVitepress(; repo = "...", devbranch = "...", devurl = "...")

Keyword arguments (config)

Extended help

The repo kwarg is used to set the edit link for the documentation.

The devbranch and devurl kwargs are used to set the path of the static site, which Vitepress expects in advance.

source


See e.g. DocumenterVitepress.DocumenterVitepress

',6),r=[a];function d(p,l,n,c,h,u){return i(),t("div",null,r)}const b=e(o,[["render",d]]);export{k as __pageData,b as default}; +import{_ as e,c as t,o as i,a3 as s}from"./chunks/framework.BCUNrZnW.js";const k=JSON.parse('{"title":"","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"api.md","filePath":"api.md","lastUpdated":null}'),o={name:"api.md"},a=s('

Public API

# DocumenterVitepress.DocumenterVitepressModule.
julia
DocumenterVitepress

Similar to DocumentationMarkdown.jl but designed to work with vitepress.

source


# DocumenterVitepress.MarkdownVitepressType.
julia
MarkdownVitepress(; repo, devbranch, devurl, kwargs...)

This is the main entry point for the Vitepress Markdown writer.

It is a config which can be passed to the format keyword argument in Documenter.makedocs, and causes it to emit a Vitepress site.

Quick start

When invoking Documenter.makedocs, replace the default format=Documenter.HTML(...) with:

julia
format=DocumenterVitepress.MarkdownVitepress(; repo = "...", devbranch = "...", devurl = "...")

Keyword arguments (config)

Extended help

The repo kwarg is used to set the edit link for the documentation.

The devbranch and devurl kwargs are used to set the path of the static site, which Vitepress expects in advance.

source


See e.g. DocumenterVitepress.DocumenterVitepress

',6),r=[a];function d(p,l,n,c,h,u){return i(),t("div",null,r)}const g=e(o,[["render",d]]);export{k as __pageData,g as default}; diff --git a/dev/assets/api.md.DV-bSc9j.lean.js b/dev/assets/api.md.C-oxDGDx.lean.js similarity index 83% rename from dev/assets/api.md.DV-bSc9j.lean.js rename to dev/assets/api.md.C-oxDGDx.lean.js index 25f56b98..8f8bf657 100644 --- a/dev/assets/api.md.DV-bSc9j.lean.js +++ b/dev/assets/api.md.C-oxDGDx.lean.js @@ -1 +1 @@ -import{_ as e,c as t,o as i,a3 as s}from"./chunks/framework.BCUNrZnW.js";const k=JSON.parse('{"title":"","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"api.md","filePath":"api.md","lastUpdated":null}'),o={name:"api.md"},a=s("",6),r=[a];function d(p,l,n,c,h,u){return i(),t("div",null,r)}const b=e(o,[["render",d]]);export{k as __pageData,b as default}; +import{_ as e,c as t,o as i,a3 as s}from"./chunks/framework.BCUNrZnW.js";const k=JSON.parse('{"title":"","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"api.md","filePath":"api.md","lastUpdated":null}'),o={name:"api.md"},a=s("",6),r=[a];function d(p,l,n,c,h,u){return i(),t("div",null,r)}const g=e(o,[["render",d]]);export{k as __pageData,g as default}; diff --git a/dev/assets/jqsndvj.C-W3LInb.gif b/dev/assets/dutyvgj.C-W3LInb.gif similarity index 100% rename from dev/assets/jqsndvj.C-W3LInb.gif rename to dev/assets/dutyvgj.C-W3LInb.gif diff --git a/dev/assets/getting_started.md.BRmKPXkw.js b/dev/assets/getting_started.md.BSQ6ODQW.js similarity index 71% rename from dev/assets/getting_started.md.BRmKPXkw.js rename to dev/assets/getting_started.md.BSQ6ODQW.js index 7bb33e41..27f3272f 100644 --- a/dev/assets/getting_started.md.BRmKPXkw.js +++ b/dev/assets/getting_started.md.BSQ6ODQW.js @@ -2,9 +2,9 @@ import{_ as s,c as e,o as a,a3 as i}from"./chunks/framework.BCUNrZnW.js";const g format = MarkdownVitepress( repo = "<url_to_your_repo>", ) -)

and that should be it!

The section Advanced method describes how to get more control over your Vitepress build.

Preview Documentation Development Instantly

You can preview your documentation development changes locally, instantly by adding LiveServer.jl into your docs environment and making a few tweaks to your make.jl configuration.

Note: As of now, these tweaks must be removed from your make.jl before you deploy your documentation to whatever deployment service you use or your deployment will fail.

Here are the tweaks to add:

  1. Navigate into your docs directory and add LiveServer.jl with (docs)> add LiveServer

  2. Within the MarkdownVitepress configuration of your make.jl file, pass the following two key word arguments and their values:

i. md_output_path = "."

ii. build_vitepress = false

  1. Within the makedocs command within your make.jl file, pass the following key word argument:

i. clean = false

Then, to preview changes live, open two separate Julia instances both within the docs folder and activate the docs environment in both sessions. Within one session run using LiveServer; servedocs(foldername="/path/to/your/docs/folder") (this could be something like servedocs(foldername="docs/") or servedocs(foldername=pwd())). In the other session run DocumenterVitepress.dev_docs("build", md_output_path = "").

Now, with both these instances running, you can add your changes into your documentation and should see servedocs trigger a rebuild and dev_docs update as well which then leads to finally your browser being updated in real time.

Note: For some user set-ups, you may see your browser instead direct you to a page mentioning REPLACE_ME_DOCUMENTER_VITEPRESS and the output from dev_docs mentioning that page as well. If this happens to you, that is due to DocumenterVitepress not picking up servedocs changes fast enough (this comes from a quirk of the underlying JS vitepress library). To get around this, within your documentation, add a small sleep delay like so:

julia
\`\`\`@example
+)

and that should be it!

The section Advanced method describes how to get more control over your Vitepress build.

Preview Documentation Development Instantly

You can preview your documentation development changes locally, instantly by adding LiveServer.jl into your docs environment and making a few tweaks to your make.jl configuration.

Note

As of now, these tweaks must be removed from your make.jl before you deploy your documentation to whatever deployment service you use or your deployment will fail.

Here are the tweaks to add:

  1. Navigate into your docs directory and add LiveServer.jl with (docs)> add LiveServer

  2. Within the MarkdownVitepress configuration of your make.jl file, pass the following two key word arguments and their values:

i. md_output_path = "."

ii. build_vitepress = false

  1. Within the makedocs command within your make.jl file, pass the following key word argument:

i. clean = false

Then, to preview changes live, open two separate Julia instances both within the docs folder and activate the docs environment in both sessions. Within one session run using LiveServer; servedocs(foldername="/path/to/your/docs/folder") (this could be something like servedocs(foldername="docs/") or servedocs(foldername=pwd())). In the other session run DocumenterVitepress.dev_docs("build", md_output_path = "").

Now, with both these instances running, you can add your changes into your documentation and should see servedocs trigger a rebuild and dev_docs update as well which then leads to finally your browser being updated in real time.

Note

For some user set-ups, you may see your browser instead direct you to a page mentioning REPLACE_ME_DOCUMENTER_VITEPRESS and the output from dev_docs mentioning that page as well. If this happens to you, that is due to DocumenterVitepress not picking up servedocs changes fast enough (this comes from a quirk of the underlying JS vitepress library). To get around this, within your documentation, add a small sleep delay like so:

julia
\`\`\`@example
 sleep(0.1)
-\`\`\`

Generally, 0.1 seconds should be enough but you may need to adjust that delay timer if you still have the issue.

Advanced method

If you want to customize your Vitepress build, including CSS etc., you will want to add the necessary Vitepress files to your docs/src/.vitepress folder.

As a tutorial, we will go through and explain the folder and files structure used to generate this website. You could use this as a template for your project's documentation.

Quick start

In general, you can copy the template folder to your docs folder and the .github/Documenter.yml action file from DocumenterVitepress.jl to your repo, and be pretty much good to go and edit docs as usual!

Since we're concerned only with documentation, we'll specifically look at the docs folder of your Julia project or package here.

For more information on how to structure this, see the Documenter.jl guide! In this quick start, we will focus solely on how to set up DocumenterVitepress assuming you already have some basic docs (even just an index.md will do).

Project structure

In order to start as quickly as possible, we recommend you copy the Project.toml, make.jl, package.json, and src folders to your own documentation.

DocumenterVitepress/docs
+\`\`\`

Generally, 0.1 seconds should be enough but you may need to adjust that delay timer if you still have the issue.

Advanced method

If you want to customize your Vitepress build, including CSS etc., you will want to add the necessary Vitepress files to your docs/src/.vitepress folder.

As a tutorial, we will go through and explain the folder and files structure used to generate this website. You could use this as a template for your project's documentation.

Quick start

In general, you can copy the template folder to your docs folder and the .github/Documenter.yml action file from DocumenterVitepress.jl to your repo, and be pretty much good to go and edit docs as usual!

Since we're concerned only with documentation, we'll specifically look at the docs folder of your Julia project or package here.

For more information on how to structure this, see the Documenter.jl guide! In this quick start, we will focus solely on how to set up DocumenterVitepress assuming you already have some basic docs (even just an index.md will do).

Project structure

In order to start as quickly as possible, we recommend you copy the Project.toml, make.jl, package.json, and src folders to your own documentation.

DocumenterVitepress/docs
 ├── Project.toml
 ├── make.jl
 ├── package-lock.json
@@ -19,7 +19,7 @@ import{_ as s,c as e,o as a,a3 as i}from"./chunks/framework.BCUNrZnW.js";const g
         ├── config.mts
         └── theme
             └── index.ts
-            └── style.css

You can ignore the rest of the files which are actually in DocumenterVitepress/docs/src for now - those show how to use advanced APIs, like

VitePress Installation

Start at the docs level:

sh
docs $

Prerequisites

DocumenterVitepress.jl is completely self-contained and installs all of its dependencies (including its own isolated version of npm) automatically.

However, to view your documentation live when developing locally, you will need to install npm and instantiate the

VitePress can be used on its own, or be installed into an existing project. In both cases, you can install it with:

sh
npm add -D vitepress
sh
pnpm add -D vitepress
sh
yarn add -D vitepress
sh
bun add -D vitepress

Build new docs from docs/src

To start working on your docs do the following steps:

sh
$ cd docs
+            └── style.css

You can ignore the rest of the files which are actually in DocumenterVitepress/docs/src for now - those show how to use advanced APIs, like

VitePress Installation

Start at the docs level:

sh
docs $

Prerequisites

DocumenterVitepress.jl is completely self-contained and installs all of its dependencies (including its own isolated version of npm) automatically.

However, to view your documentation live when developing locally, you will need to install npm and instantiate the

VitePress can be used on its own, or be installed into an existing project. In both cases, you can install it with:

sh
npm add -D vitepress
sh
pnpm add -D vitepress
sh
yarn add -D vitepress
sh
bun add -D vitepress

Build new docs from docs/src

To start working on your docs do the following steps:

sh
$ cd docs
 docs $

Then, in docs start a julia session and activate a new environment.

sh
docs $ julia
 julia> ]
 pkg> activate .

Add packages as necessary. Here, we will need

julia
pkg> add DocumenterVitepress, Documenter

These packages will be used in the make.jl file.

Setting up the Folder Structure

The files for this page in the docs folder have the following structure:

docs/
diff --git a/dev/assets/getting_started.md.BRmKPXkw.lean.js b/dev/assets/getting_started.md.BSQ6ODQW.lean.js
similarity index 100%
rename from dev/assets/getting_started.md.BRmKPXkw.lean.js
rename to dev/assets/getting_started.md.BSQ6ODQW.lean.js
diff --git a/dev/assets/ervdgfy.Drfs-ROQ.svg b/dev/assets/kvjmvof.Drfs-ROQ.svg
similarity index 100%
rename from dev/assets/ervdgfy.Drfs-ROQ.svg
rename to dev/assets/kvjmvof.Drfs-ROQ.svg
diff --git a/dev/assets/markdown-examples.md.BPHkN5Q0.js b/dev/assets/markdown-examples.md.z5JN13o6.js
similarity index 99%
rename from dev/assets/markdown-examples.md.BPHkN5Q0.js
rename to dev/assets/markdown-examples.md.z5JN13o6.js
index 6dafbcdd..ecb42515 100644
--- a/dev/assets/markdown-examples.md.BPHkN5Q0.js
+++ b/dev/assets/markdown-examples.md.z5JN13o6.js
@@ -79,7 +79,7 @@ import{_ as o,D as k,c as p,I as a,w as i,j as s,a as h,a3 as t,o as e}from"./ch
 @gp :- x cos.(x) "w l t 'cos' lw 2 lc rgb '#E69F00'"
 \`\`\`
 
-:::

Output

julia
using Gnuplot
+:::

Output

julia
using Gnuplot
 t = 0:0.001:1
 @gp t sin.(10π*t) "w l tit 'sin' lc 'gray'"
julia
using Gnuplot
 x = -:0.001:
@@ -169,4 +169,4 @@ import{_ as o,D as k,c as p,I as a,w as i,j as s,a as h,a3 as t,o as e}from"./ch
 
 :::
 
-::::

Output

`,4),Q=s("p",null,"a content",-1),T=s("p",null,"b content",-1),m=s("p",null,"c content 2",-1),F=s("p",null,"d content 2",-1),b=t('

GitHub-flavored Alerts

See github-flavored-alerts

Input

> [!WARNING]\n> Critical content.

Output

Critical content.

Tables

See github-style-tables

Input

| Tables        |      Are      |  Cool |\n| ------------- | :-----------: | ----: |\n| col 3 is      | right-aligned | \\$1600 |\n| col 2 is      |   centered    |   \\$12 |\n| zebra stripes |   are neat    |    \\$1 |

Output

TablesAreCool
col 3 isright-aligned$1600
col 2 iscentered$12
zebra stripesare neat$1

Equations

Input

When ``a \\ne 0``, there are two solutions to ``ax^2 + bx + c = 0`` and they are\n\n$$x = {-b \\pm \\sqrt{b^2-4ac} \\over 2a}$$\n\nDon't type anything after the last double dollar sign, and make sure there are no spaces after the opening double dollar sign in the display math!\n\nYou can also use fenced code blocks with the `math` tag for equations!\n\n```math\n\\nabla^2 \\Phi = \\rho\n```

Output

',16),C={class:"MathJax",jax:"SVG",style:{direction:"ltr",position:"relative"}},x={style:{overflow:"visible","min-height":"1px","min-width":"1px","vertical-align":"-0.486ex"},xmlns:"http://www.w3.org/2000/svg",width:"5.345ex",height:"2.106ex",role:"img",focusable:"false",viewBox:"0 -716 2362.6 931","aria-hidden":"true"},v=t('',1),w=[v],_=s("mjx-assistive-mml",{unselectable:"on",display:"inline",style:{top:"0px",left:"0px",clip:"rect(1px, 1px, 1px, 1px)","-webkit-touch-callout":"none","-webkit-user-select":"none","-khtml-user-select":"none","-moz-user-select":"none","-ms-user-select":"none","user-select":"none",position:"absolute",padding:"1px 0px 0px 0px",border:"0px",display:"block",width:"auto",overflow:"hidden"}},[s("math",{xmlns:"http://www.w3.org/1998/Math/MathML"},[s("mi",null,"a"),s("mo",null,"≠"),s("mn",null,"0")])],-1),f={class:"MathJax",jax:"SVG",style:{direction:"ltr",position:"relative"}},B={style:{overflow:"visible","min-height":"1px","min-width":"1px","vertical-align":"-0.186ex"},xmlns:"http://www.w3.org/2000/svg",width:"16.403ex",height:"2.072ex",role:"img",focusable:"false",viewBox:"0 -833.9 7250 915.9","aria-hidden":"true"},A=t('',1),q=[A],D=s("mjx-assistive-mml",{unselectable:"on",display:"inline",style:{top:"0px",left:"0px",clip:"rect(1px, 1px, 1px, 1px)","-webkit-touch-callout":"none","-webkit-user-select":"none","-khtml-user-select":"none","-moz-user-select":"none","-ms-user-select":"none","user-select":"none",position:"absolute",padding:"1px 0px 0px 0px",border:"0px",display:"block",width:"auto",overflow:"hidden"}},[s("math",{xmlns:"http://www.w3.org/1998/Math/MathML"},[s("mi",null,"a"),s("msup",null,[s("mi",null,"x"),s("mn",null,"2")]),s("mo",null,"+"),s("mi",null,"b"),s("mi",null,"x"),s("mo",null,"+"),s("mi",null,"c"),s("mo",null,"="),s("mn",null,"0")])],-1),H={class:"MathJax",jax:"SVG",display:"true",style:{direction:"ltr",display:"block","text-align":"center",margin:"1em 0",position:"relative"}},V={style:{overflow:"visible","min-height":"1px","min-width":"1px","vertical-align":"-1.575ex"},xmlns:"http://www.w3.org/2000/svg",width:"20.765ex",height:"5.291ex",role:"img",focusable:"false",viewBox:"0 -1642.5 9178 2338.5","aria-hidden":"true"},M=t('',1),L=[M],Z=s("mjx-assistive-mml",{unselectable:"on",display:"block",style:{top:"0px",left:"0px",clip:"rect(1px, 1px, 1px, 1px)","-webkit-touch-callout":"none","-webkit-user-select":"none","-khtml-user-select":"none","-moz-user-select":"none","-ms-user-select":"none","user-select":"none",position:"absolute",padding:"1px 0px 0px 0px",border:"0px",display:"block",overflow:"hidden",width:"100%"}},[s("math",{xmlns:"http://www.w3.org/1998/Math/MathML",display:"block"},[s("mi",null,"x"),s("mo",null,"="),s("mrow",{"data-mjx-texclass":"ORD"},[s("mfrac",null,[s("mrow",null,[s("mo",null,"−"),s("mi",null,"b"),s("mo",null,"±"),s("msqrt",null,[s("msup",null,[s("mi",null,"b"),s("mn",null,"2")]),s("mo",null,"−"),s("mn",null,"4"),s("mi",null,"a"),s("mi",null,"c")])]),s("mrow",null,[s("mn",null,"2"),s("mi",null,"a")])])])])],-1),P=s("p",null,"Don't type anything after the last double dollar sign, and make sure there are no spaces after the opening double dollar sign in the display math!",-1),j=s("p",null,[h("You can also use fenced code blocks with the "),s("code",null,"math"),h(" tag for equations!")],-1),S={class:"MathJax",jax:"SVG",display:"true",style:{direction:"ltr",display:"block","text-align":"center",margin:"1em 0",position:"relative"}},I={style:{overflow:"visible","min-height":"1px","min-width":"1px","vertical-align":"-0.489ex"},xmlns:"http://www.w3.org/2000/svg",width:"8.693ex",height:"2.489ex",role:"img",focusable:"false",viewBox:"0 -883.9 3842.1 1099.9","aria-hidden":"true"},G=t('',1),N=[G],O=s("mjx-assistive-mml",{unselectable:"on",display:"block",style:{top:"0px",left:"0px",clip:"rect(1px, 1px, 1px, 1px)","-webkit-touch-callout":"none","-webkit-user-select":"none","-khtml-user-select":"none","-moz-user-select":"none","-ms-user-select":"none","user-select":"none",position:"absolute",padding:"1px 0px 0px 0px",border:"0px",display:"block",overflow:"hidden",width:"100%"}},[s("math",{xmlns:"http://www.w3.org/1998/Math/MathML",display:"block"},[s("msup",null,[s("mi",{mathvariant:"normal"},"∇"),s("mn",null,"2")]),s("mi",{mathvariant:"normal"},"Φ"),s("mo",null,"="),s("mi",null,"ρ")])],-1),$=t('

Footnotes (citation-style)

Input

Here is the link for the paper of Babushka[^1]
[^1]: This is Babushka's footnote!

Output

Here is the link for the paper of Babushka[1]

Escaping characters

Input

md
< `less` and `greater` > than, and the backtick \\`.

Output

< less and greater > than, and the backtick `.

And also, this <was> an <issue> before.

Let's see if this one works:

```\nsshflags=`-i <keyfile>`\n```

it does,

sshflags=`-i <keyfile>`

but within inline text it does not. Ideas for the escaping sequence?

This is the expected sequence by vitepress:

<code> sshflags= `` `-i <keyfile> ` `` </code>

More

Check out the documentation for the full list of markdown extensions.


  1. This is Babushka's footnote! ↩︎

',23);function R(z,J,W,U,X,Y){const n=k("PluginTabsTab"),l=k("PluginTabs");return e(),p("div",null,[r,a(l,null,{default:i(()=>[a(n,{label:"tab a"},{default:i(()=>[g]),_:1}),a(n,{label:"tab b"},{default:i(()=>[c]),_:1})]),_:1}),a(l,null,{default:i(()=>[a(n,{label:"tab a"},{default:i(()=>[u]),_:1}),a(n,{label:"tab b"},{default:i(()=>[E]),_:1})]),_:1}),y,a(l,null,{default:i(()=>[a(n,{label:"first one"},{default:i(()=>[a(l,null,{default:i(()=>[a(n,{label:"tab a"},{default:i(()=>[Q]),_:1}),a(n,{label:"tab b"},{default:i(()=>[T]),_:1})]),_:1})]),_:1}),a(n,{label:"second one"},{default:i(()=>[a(l,null,{default:i(()=>[a(n,{label:"tab c"},{default:i(()=>[m]),_:1}),a(n,{label:"tab d"},{default:i(()=>[F]),_:1})]),_:1})]),_:1})]),_:1}),b,s("p",null,[h("When "),s("mjx-container",C,[(e(),p("svg",x,w)),_]),h(", there are two solutions to "),s("mjx-container",f,[(e(),p("svg",B,q)),D]),h(" and they are")]),s("mjx-container",H,[(e(),p("svg",V,L)),Z]),P,j,s("mjx-container",S,[(e(),p("svg",I,N)),O]),$])}const as=o(d,[["render",R]]);export{ss as __pageData,as as default}; +::::

Output

`,4),Q=s("p",null,"a content",-1),T=s("p",null,"b content",-1),m=s("p",null,"c content 2",-1),F=s("p",null,"d content 2",-1),b=t('

GitHub-flavored Alerts

See github-flavored-alerts

Input

> [!WARNING]\n> Critical content.

Output

Critical content.

Tables

See github-style-tables

Input

| Tables        |      Are      |  Cool |\n| ------------- | :-----------: | ----: |\n| col 3 is      | right-aligned | \\$1600 |\n| col 2 is      |   centered    |   \\$12 |\n| zebra stripes |   are neat    |    \\$1 |

Output

TablesAreCool
col 3 isright-aligned$1600
col 2 iscentered$12
zebra stripesare neat$1

Equations

Input

When ``a \\ne 0``, there are two solutions to ``ax^2 + bx + c = 0`` and they are\n\n$$x = {-b \\pm \\sqrt{b^2-4ac} \\over 2a}$$\n\nDon't type anything after the last double dollar sign, and make sure there are no spaces after the opening double dollar sign in the display math!\n\nYou can also use fenced code blocks with the `math` tag for equations!\n\n```math\n\\nabla^2 \\Phi = \\rho\n```

Output

',16),C={class:"MathJax",jax:"SVG",style:{direction:"ltr",position:"relative"}},x={style:{overflow:"visible","min-height":"1px","min-width":"1px","vertical-align":"-0.486ex"},xmlns:"http://www.w3.org/2000/svg",width:"5.345ex",height:"2.106ex",role:"img",focusable:"false",viewBox:"0 -716 2362.6 931","aria-hidden":"true"},v=t('',1),w=[v],_=s("mjx-assistive-mml",{unselectable:"on",display:"inline",style:{top:"0px",left:"0px",clip:"rect(1px, 1px, 1px, 1px)","-webkit-touch-callout":"none","-webkit-user-select":"none","-khtml-user-select":"none","-moz-user-select":"none","-ms-user-select":"none","user-select":"none",position:"absolute",padding:"1px 0px 0px 0px",border:"0px",display:"block",width:"auto",overflow:"hidden"}},[s("math",{xmlns:"http://www.w3.org/1998/Math/MathML"},[s("mi",null,"a"),s("mo",null,"≠"),s("mn",null,"0")])],-1),f={class:"MathJax",jax:"SVG",style:{direction:"ltr",position:"relative"}},B={style:{overflow:"visible","min-height":"1px","min-width":"1px","vertical-align":"-0.186ex"},xmlns:"http://www.w3.org/2000/svg",width:"16.403ex",height:"2.072ex",role:"img",focusable:"false",viewBox:"0 -833.9 7250 915.9","aria-hidden":"true"},A=t('',1),q=[A],D=s("mjx-assistive-mml",{unselectable:"on",display:"inline",style:{top:"0px",left:"0px",clip:"rect(1px, 1px, 1px, 1px)","-webkit-touch-callout":"none","-webkit-user-select":"none","-khtml-user-select":"none","-moz-user-select":"none","-ms-user-select":"none","user-select":"none",position:"absolute",padding:"1px 0px 0px 0px",border:"0px",display:"block",width:"auto",overflow:"hidden"}},[s("math",{xmlns:"http://www.w3.org/1998/Math/MathML"},[s("mi",null,"a"),s("msup",null,[s("mi",null,"x"),s("mn",null,"2")]),s("mo",null,"+"),s("mi",null,"b"),s("mi",null,"x"),s("mo",null,"+"),s("mi",null,"c"),s("mo",null,"="),s("mn",null,"0")])],-1),H={class:"MathJax",jax:"SVG",display:"true",style:{direction:"ltr",display:"block","text-align":"center",margin:"1em 0",position:"relative"}},V={style:{overflow:"visible","min-height":"1px","min-width":"1px","vertical-align":"-1.575ex"},xmlns:"http://www.w3.org/2000/svg",width:"20.765ex",height:"5.291ex",role:"img",focusable:"false",viewBox:"0 -1642.5 9178 2338.5","aria-hidden":"true"},M=t('',1),L=[M],Z=s("mjx-assistive-mml",{unselectable:"on",display:"block",style:{top:"0px",left:"0px",clip:"rect(1px, 1px, 1px, 1px)","-webkit-touch-callout":"none","-webkit-user-select":"none","-khtml-user-select":"none","-moz-user-select":"none","-ms-user-select":"none","user-select":"none",position:"absolute",padding:"1px 0px 0px 0px",border:"0px",display:"block",overflow:"hidden",width:"100%"}},[s("math",{xmlns:"http://www.w3.org/1998/Math/MathML",display:"block"},[s("mi",null,"x"),s("mo",null,"="),s("mrow",{"data-mjx-texclass":"ORD"},[s("mfrac",null,[s("mrow",null,[s("mo",null,"−"),s("mi",null,"b"),s("mo",null,"±"),s("msqrt",null,[s("msup",null,[s("mi",null,"b"),s("mn",null,"2")]),s("mo",null,"−"),s("mn",null,"4"),s("mi",null,"a"),s("mi",null,"c")])]),s("mrow",null,[s("mn",null,"2"),s("mi",null,"a")])])])])],-1),P=s("p",null,"Don't type anything after the last double dollar sign, and make sure there are no spaces after the opening double dollar sign in the display math!",-1),S=s("p",null,[h("You can also use fenced code blocks with the "),s("code",null,"math"),h(" tag for equations!")],-1),j={class:"MathJax",jax:"SVG",display:"true",style:{direction:"ltr",display:"block","text-align":"center",margin:"1em 0",position:"relative"}},I={style:{overflow:"visible","min-height":"1px","min-width":"1px","vertical-align":"-0.489ex"},xmlns:"http://www.w3.org/2000/svg",width:"8.693ex",height:"2.489ex",role:"img",focusable:"false",viewBox:"0 -883.9 3842.1 1099.9","aria-hidden":"true"},G=t('',1),N=[G],O=s("mjx-assistive-mml",{unselectable:"on",display:"block",style:{top:"0px",left:"0px",clip:"rect(1px, 1px, 1px, 1px)","-webkit-touch-callout":"none","-webkit-user-select":"none","-khtml-user-select":"none","-moz-user-select":"none","-ms-user-select":"none","user-select":"none",position:"absolute",padding:"1px 0px 0px 0px",border:"0px",display:"block",overflow:"hidden",width:"100%"}},[s("math",{xmlns:"http://www.w3.org/1998/Math/MathML",display:"block"},[s("msup",null,[s("mi",{mathvariant:"normal"},"∇"),s("mn",null,"2")]),s("mi",{mathvariant:"normal"},"Φ"),s("mo",null,"="),s("mi",null,"ρ")])],-1),R=t('

Footnotes (citation-style)

Input

Here is the link for the paper of Babushka[^1]
[^1]: This is Babushka's footnote!

Output

Here is the link for the paper of Babushka[1]

Escaping characters

Input

md
< `less` and `greater` > than, and the backtick \\`.

Output

< less and greater > than, and the backtick `.

And also, this <was> an <issue> before.

Let's see if this one works:

```\nsshflags=`-i <keyfile>`\n```

it does,

sshflags=`-i <keyfile>`

but within inline text it does not. Ideas for the escaping sequence?

This is the expected sequence by vitepress:

<code> sshflags= `` `-i <keyfile> ` `` </code>

More

Check out the documentation for the full list of markdown extensions.


  1. This is Babushka's footnote! ↩︎

',23);function $(z,J,W,K,Y,U){const n=k("PluginTabsTab"),l=k("PluginTabs");return e(),p("div",null,[r,a(l,null,{default:i(()=>[a(n,{label:"tab a"},{default:i(()=>[g]),_:1}),a(n,{label:"tab b"},{default:i(()=>[c]),_:1})]),_:1}),a(l,null,{default:i(()=>[a(n,{label:"tab a"},{default:i(()=>[u]),_:1}),a(n,{label:"tab b"},{default:i(()=>[E]),_:1})]),_:1}),y,a(l,null,{default:i(()=>[a(n,{label:"first one"},{default:i(()=>[a(l,null,{default:i(()=>[a(n,{label:"tab a"},{default:i(()=>[Q]),_:1}),a(n,{label:"tab b"},{default:i(()=>[T]),_:1})]),_:1})]),_:1}),a(n,{label:"second one"},{default:i(()=>[a(l,null,{default:i(()=>[a(n,{label:"tab c"},{default:i(()=>[m]),_:1}),a(n,{label:"tab d"},{default:i(()=>[F]),_:1})]),_:1})]),_:1})]),_:1}),b,s("p",null,[h("When "),s("mjx-container",C,[(e(),p("svg",x,w)),_]),h(", there are two solutions to "),s("mjx-container",f,[(e(),p("svg",B,q)),D]),h(" and they are")]),s("mjx-container",H,[(e(),p("svg",V,L)),Z]),P,S,s("mjx-container",j,[(e(),p("svg",I,N)),O]),R])}const as=o(d,[["render",$]]);export{ss as __pageData,as as default}; diff --git a/dev/assets/markdown-examples.md.BPHkN5Q0.lean.js b/dev/assets/markdown-examples.md.z5JN13o6.lean.js similarity index 94% rename from dev/assets/markdown-examples.md.BPHkN5Q0.lean.js rename to dev/assets/markdown-examples.md.z5JN13o6.lean.js index c3ef83cf..ac067129 100644 --- a/dev/assets/markdown-examples.md.BPHkN5Q0.lean.js +++ b/dev/assets/markdown-examples.md.z5JN13o6.lean.js @@ -1 +1 @@ -import{_ as o,D as k,c as p,I as a,w as i,j as s,a as h,a3 as t,o as e}from"./chunks/framework.BCUNrZnW.js";const ss=JSON.parse('{"title":"Markdown Extension Examples","description":"","frontmatter":{},"headers":[],"relativePath":"markdown-examples.md","filePath":"markdown-examples.md","lastUpdated":null}'),d={name:"markdown-examples.md"},r=t("",61),g=s("p",null,"a content",-1),c=s("p",null,"b content",-1),u=s("p",null,"a content 2",-1),E=s("p",null,"b content 2",-1),y=t("",4),Q=s("p",null,"a content",-1),T=s("p",null,"b content",-1),m=s("p",null,"c content 2",-1),F=s("p",null,"d content 2",-1),b=t("",16),C={class:"MathJax",jax:"SVG",style:{direction:"ltr",position:"relative"}},x={style:{overflow:"visible","min-height":"1px","min-width":"1px","vertical-align":"-0.486ex"},xmlns:"http://www.w3.org/2000/svg",width:"5.345ex",height:"2.106ex",role:"img",focusable:"false",viewBox:"0 -716 2362.6 931","aria-hidden":"true"},v=t("",1),w=[v],_=s("mjx-assistive-mml",{unselectable:"on",display:"inline",style:{top:"0px",left:"0px",clip:"rect(1px, 1px, 1px, 1px)","-webkit-touch-callout":"none","-webkit-user-select":"none","-khtml-user-select":"none","-moz-user-select":"none","-ms-user-select":"none","user-select":"none",position:"absolute",padding:"1px 0px 0px 0px",border:"0px",display:"block",width:"auto",overflow:"hidden"}},[s("math",{xmlns:"http://www.w3.org/1998/Math/MathML"},[s("mi",null,"a"),s("mo",null,"≠"),s("mn",null,"0")])],-1),f={class:"MathJax",jax:"SVG",style:{direction:"ltr",position:"relative"}},B={style:{overflow:"visible","min-height":"1px","min-width":"1px","vertical-align":"-0.186ex"},xmlns:"http://www.w3.org/2000/svg",width:"16.403ex",height:"2.072ex",role:"img",focusable:"false",viewBox:"0 -833.9 7250 915.9","aria-hidden":"true"},A=t("",1),q=[A],D=s("mjx-assistive-mml",{unselectable:"on",display:"inline",style:{top:"0px",left:"0px",clip:"rect(1px, 1px, 1px, 1px)","-webkit-touch-callout":"none","-webkit-user-select":"none","-khtml-user-select":"none","-moz-user-select":"none","-ms-user-select":"none","user-select":"none",position:"absolute",padding:"1px 0px 0px 0px",border:"0px",display:"block",width:"auto",overflow:"hidden"}},[s("math",{xmlns:"http://www.w3.org/1998/Math/MathML"},[s("mi",null,"a"),s("msup",null,[s("mi",null,"x"),s("mn",null,"2")]),s("mo",null,"+"),s("mi",null,"b"),s("mi",null,"x"),s("mo",null,"+"),s("mi",null,"c"),s("mo",null,"="),s("mn",null,"0")])],-1),H={class:"MathJax",jax:"SVG",display:"true",style:{direction:"ltr",display:"block","text-align":"center",margin:"1em 0",position:"relative"}},V={style:{overflow:"visible","min-height":"1px","min-width":"1px","vertical-align":"-1.575ex"},xmlns:"http://www.w3.org/2000/svg",width:"20.765ex",height:"5.291ex",role:"img",focusable:"false",viewBox:"0 -1642.5 9178 2338.5","aria-hidden":"true"},M=t("",1),L=[M],Z=s("mjx-assistive-mml",{unselectable:"on",display:"block",style:{top:"0px",left:"0px",clip:"rect(1px, 1px, 1px, 1px)","-webkit-touch-callout":"none","-webkit-user-select":"none","-khtml-user-select":"none","-moz-user-select":"none","-ms-user-select":"none","user-select":"none",position:"absolute",padding:"1px 0px 0px 0px",border:"0px",display:"block",overflow:"hidden",width:"100%"}},[s("math",{xmlns:"http://www.w3.org/1998/Math/MathML",display:"block"},[s("mi",null,"x"),s("mo",null,"="),s("mrow",{"data-mjx-texclass":"ORD"},[s("mfrac",null,[s("mrow",null,[s("mo",null,"−"),s("mi",null,"b"),s("mo",null,"±"),s("msqrt",null,[s("msup",null,[s("mi",null,"b"),s("mn",null,"2")]),s("mo",null,"−"),s("mn",null,"4"),s("mi",null,"a"),s("mi",null,"c")])]),s("mrow",null,[s("mn",null,"2"),s("mi",null,"a")])])])])],-1),P=s("p",null,"Don't type anything after the last double dollar sign, and make sure there are no spaces after the opening double dollar sign in the display math!",-1),j=s("p",null,[h("You can also use fenced code blocks with the "),s("code",null,"math"),h(" tag for equations!")],-1),S={class:"MathJax",jax:"SVG",display:"true",style:{direction:"ltr",display:"block","text-align":"center",margin:"1em 0",position:"relative"}},I={style:{overflow:"visible","min-height":"1px","min-width":"1px","vertical-align":"-0.489ex"},xmlns:"http://www.w3.org/2000/svg",width:"8.693ex",height:"2.489ex",role:"img",focusable:"false",viewBox:"0 -883.9 3842.1 1099.9","aria-hidden":"true"},G=t("",1),N=[G],O=s("mjx-assistive-mml",{unselectable:"on",display:"block",style:{top:"0px",left:"0px",clip:"rect(1px, 1px, 1px, 1px)","-webkit-touch-callout":"none","-webkit-user-select":"none","-khtml-user-select":"none","-moz-user-select":"none","-ms-user-select":"none","user-select":"none",position:"absolute",padding:"1px 0px 0px 0px",border:"0px",display:"block",overflow:"hidden",width:"100%"}},[s("math",{xmlns:"http://www.w3.org/1998/Math/MathML",display:"block"},[s("msup",null,[s("mi",{mathvariant:"normal"},"∇"),s("mn",null,"2")]),s("mi",{mathvariant:"normal"},"Φ"),s("mo",null,"="),s("mi",null,"ρ")])],-1),$=t("",23);function R(z,J,W,U,X,Y){const n=k("PluginTabsTab"),l=k("PluginTabs");return e(),p("div",null,[r,a(l,null,{default:i(()=>[a(n,{label:"tab a"},{default:i(()=>[g]),_:1}),a(n,{label:"tab b"},{default:i(()=>[c]),_:1})]),_:1}),a(l,null,{default:i(()=>[a(n,{label:"tab a"},{default:i(()=>[u]),_:1}),a(n,{label:"tab b"},{default:i(()=>[E]),_:1})]),_:1}),y,a(l,null,{default:i(()=>[a(n,{label:"first one"},{default:i(()=>[a(l,null,{default:i(()=>[a(n,{label:"tab a"},{default:i(()=>[Q]),_:1}),a(n,{label:"tab b"},{default:i(()=>[T]),_:1})]),_:1})]),_:1}),a(n,{label:"second one"},{default:i(()=>[a(l,null,{default:i(()=>[a(n,{label:"tab c"},{default:i(()=>[m]),_:1}),a(n,{label:"tab d"},{default:i(()=>[F]),_:1})]),_:1})]),_:1})]),_:1}),b,s("p",null,[h("When "),s("mjx-container",C,[(e(),p("svg",x,w)),_]),h(", there are two solutions to "),s("mjx-container",f,[(e(),p("svg",B,q)),D]),h(" and they are")]),s("mjx-container",H,[(e(),p("svg",V,L)),Z]),P,j,s("mjx-container",S,[(e(),p("svg",I,N)),O]),$])}const as=o(d,[["render",R]]);export{ss as __pageData,as as default}; +import{_ as o,D as k,c as p,I as a,w as i,j as s,a as h,a3 as t,o as e}from"./chunks/framework.BCUNrZnW.js";const ss=JSON.parse('{"title":"Markdown Extension Examples","description":"","frontmatter":{},"headers":[],"relativePath":"markdown-examples.md","filePath":"markdown-examples.md","lastUpdated":null}'),d={name:"markdown-examples.md"},r=t("",61),g=s("p",null,"a content",-1),c=s("p",null,"b content",-1),u=s("p",null,"a content 2",-1),E=s("p",null,"b content 2",-1),y=t("",4),Q=s("p",null,"a content",-1),T=s("p",null,"b content",-1),m=s("p",null,"c content 2",-1),F=s("p",null,"d content 2",-1),b=t("",16),C={class:"MathJax",jax:"SVG",style:{direction:"ltr",position:"relative"}},x={style:{overflow:"visible","min-height":"1px","min-width":"1px","vertical-align":"-0.486ex"},xmlns:"http://www.w3.org/2000/svg",width:"5.345ex",height:"2.106ex",role:"img",focusable:"false",viewBox:"0 -716 2362.6 931","aria-hidden":"true"},v=t("",1),w=[v],_=s("mjx-assistive-mml",{unselectable:"on",display:"inline",style:{top:"0px",left:"0px",clip:"rect(1px, 1px, 1px, 1px)","-webkit-touch-callout":"none","-webkit-user-select":"none","-khtml-user-select":"none","-moz-user-select":"none","-ms-user-select":"none","user-select":"none",position:"absolute",padding:"1px 0px 0px 0px",border:"0px",display:"block",width:"auto",overflow:"hidden"}},[s("math",{xmlns:"http://www.w3.org/1998/Math/MathML"},[s("mi",null,"a"),s("mo",null,"≠"),s("mn",null,"0")])],-1),f={class:"MathJax",jax:"SVG",style:{direction:"ltr",position:"relative"}},B={style:{overflow:"visible","min-height":"1px","min-width":"1px","vertical-align":"-0.186ex"},xmlns:"http://www.w3.org/2000/svg",width:"16.403ex",height:"2.072ex",role:"img",focusable:"false",viewBox:"0 -833.9 7250 915.9","aria-hidden":"true"},A=t("",1),q=[A],D=s("mjx-assistive-mml",{unselectable:"on",display:"inline",style:{top:"0px",left:"0px",clip:"rect(1px, 1px, 1px, 1px)","-webkit-touch-callout":"none","-webkit-user-select":"none","-khtml-user-select":"none","-moz-user-select":"none","-ms-user-select":"none","user-select":"none",position:"absolute",padding:"1px 0px 0px 0px",border:"0px",display:"block",width:"auto",overflow:"hidden"}},[s("math",{xmlns:"http://www.w3.org/1998/Math/MathML"},[s("mi",null,"a"),s("msup",null,[s("mi",null,"x"),s("mn",null,"2")]),s("mo",null,"+"),s("mi",null,"b"),s("mi",null,"x"),s("mo",null,"+"),s("mi",null,"c"),s("mo",null,"="),s("mn",null,"0")])],-1),H={class:"MathJax",jax:"SVG",display:"true",style:{direction:"ltr",display:"block","text-align":"center",margin:"1em 0",position:"relative"}},V={style:{overflow:"visible","min-height":"1px","min-width":"1px","vertical-align":"-1.575ex"},xmlns:"http://www.w3.org/2000/svg",width:"20.765ex",height:"5.291ex",role:"img",focusable:"false",viewBox:"0 -1642.5 9178 2338.5","aria-hidden":"true"},M=t("",1),L=[M],Z=s("mjx-assistive-mml",{unselectable:"on",display:"block",style:{top:"0px",left:"0px",clip:"rect(1px, 1px, 1px, 1px)","-webkit-touch-callout":"none","-webkit-user-select":"none","-khtml-user-select":"none","-moz-user-select":"none","-ms-user-select":"none","user-select":"none",position:"absolute",padding:"1px 0px 0px 0px",border:"0px",display:"block",overflow:"hidden",width:"100%"}},[s("math",{xmlns:"http://www.w3.org/1998/Math/MathML",display:"block"},[s("mi",null,"x"),s("mo",null,"="),s("mrow",{"data-mjx-texclass":"ORD"},[s("mfrac",null,[s("mrow",null,[s("mo",null,"−"),s("mi",null,"b"),s("mo",null,"±"),s("msqrt",null,[s("msup",null,[s("mi",null,"b"),s("mn",null,"2")]),s("mo",null,"−"),s("mn",null,"4"),s("mi",null,"a"),s("mi",null,"c")])]),s("mrow",null,[s("mn",null,"2"),s("mi",null,"a")])])])])],-1),P=s("p",null,"Don't type anything after the last double dollar sign, and make sure there are no spaces after the opening double dollar sign in the display math!",-1),S=s("p",null,[h("You can also use fenced code blocks with the "),s("code",null,"math"),h(" tag for equations!")],-1),j={class:"MathJax",jax:"SVG",display:"true",style:{direction:"ltr",display:"block","text-align":"center",margin:"1em 0",position:"relative"}},I={style:{overflow:"visible","min-height":"1px","min-width":"1px","vertical-align":"-0.489ex"},xmlns:"http://www.w3.org/2000/svg",width:"8.693ex",height:"2.489ex",role:"img",focusable:"false",viewBox:"0 -883.9 3842.1 1099.9","aria-hidden":"true"},G=t("",1),N=[G],O=s("mjx-assistive-mml",{unselectable:"on",display:"block",style:{top:"0px",left:"0px",clip:"rect(1px, 1px, 1px, 1px)","-webkit-touch-callout":"none","-webkit-user-select":"none","-khtml-user-select":"none","-moz-user-select":"none","-ms-user-select":"none","user-select":"none",position:"absolute",padding:"1px 0px 0px 0px",border:"0px",display:"block",overflow:"hidden",width:"100%"}},[s("math",{xmlns:"http://www.w3.org/1998/Math/MathML",display:"block"},[s("msup",null,[s("mi",{mathvariant:"normal"},"∇"),s("mn",null,"2")]),s("mi",{mathvariant:"normal"},"Φ"),s("mo",null,"="),s("mi",null,"ρ")])],-1),R=t("",23);function $(z,J,W,K,Y,U){const n=k("PluginTabsTab"),l=k("PluginTabs");return e(),p("div",null,[r,a(l,null,{default:i(()=>[a(n,{label:"tab a"},{default:i(()=>[g]),_:1}),a(n,{label:"tab b"},{default:i(()=>[c]),_:1})]),_:1}),a(l,null,{default:i(()=>[a(n,{label:"tab a"},{default:i(()=>[u]),_:1}),a(n,{label:"tab b"},{default:i(()=>[E]),_:1})]),_:1}),y,a(l,null,{default:i(()=>[a(n,{label:"first one"},{default:i(()=>[a(l,null,{default:i(()=>[a(n,{label:"tab a"},{default:i(()=>[Q]),_:1}),a(n,{label:"tab b"},{default:i(()=>[T]),_:1})]),_:1})]),_:1}),a(n,{label:"second one"},{default:i(()=>[a(l,null,{default:i(()=>[a(n,{label:"tab c"},{default:i(()=>[m]),_:1}),a(n,{label:"tab d"},{default:i(()=>[F]),_:1})]),_:1})]),_:1})]),_:1}),b,s("p",null,[h("When "),s("mjx-container",C,[(e(),p("svg",x,w)),_]),h(", there are two solutions to "),s("mjx-container",f,[(e(),p("svg",B,q)),D]),h(" and they are")]),s("mjx-container",H,[(e(),p("svg",V,L)),Z]),P,S,s("mjx-container",j,[(e(),p("svg",I,N)),O]),R])}const as=o(d,[["render",$]]);export{ss as __pageData,as as default}; diff --git a/dev/assets/mime_examples.md.ftfe-v6Q.js b/dev/assets/mime_examples.md.DhmXvl2I.js similarity index 97% rename from dev/assets/mime_examples.md.ftfe-v6Q.js rename to dev/assets/mime_examples.md.DhmXvl2I.js index afeaa20a..ab4f4c63 100644 --- a/dev/assets/mime_examples.md.ftfe-v6Q.js +++ b/dev/assets/mime_examples.md.DhmXvl2I.js @@ -1,4 +1,4 @@ -import{_ as s,c as i,o as a,a3 as t}from"./chunks/framework.BCUNrZnW.js";const e="/DocumenterVitepress.jl/dev/assets/jecpztw.CGGmtknr.png",n="/DocumenterVitepress.jl/dev/assets/jgzsdgs.yDDNeA3I.jpeg",p="/DocumenterVitepress.jl/dev/assets/ervdgfy.Drfs-ROQ.svg",l="/DocumenterVitepress.jl/dev/assets/jqsndvj.C-W3LInb.gif",m=JSON.parse('{"title":"MIME-type examples","description":"","frontmatter":{},"headers":[],"relativePath":"mime_examples.md","filePath":"mime_examples.md","lastUpdated":null}'),h={name:"mime_examples.md"},k=t(`

MIME-type examples

This file tests the output for all available MIME-types.

julia
"""
+import{_ as s,c as i,o as a,a3 as t}from"./chunks/framework.BCUNrZnW.js";const e="/DocumenterVitepress.jl/dev/assets/urflwhw.CGGmtknr.png",n="/DocumenterVitepress.jl/dev/assets/pnttkoc.yDDNeA3I.jpeg",p="/DocumenterVitepress.jl/dev/assets/kvjmvof.Drfs-ROQ.svg",l="/DocumenterVitepress.jl/dev/assets/dutyvgj.C-W3LInb.gif",m=JSON.parse('{"title":"MIME-type examples","description":"","frontmatter":{},"headers":[],"relativePath":"mime_examples.md","filePath":"mime_examples.md","lastUpdated":null}'),h={name:"mime_examples.md"},k=t(`

MIME-type examples

This file tests the output for all available MIME-types.

julia
"""
     MediaOutput{MIME"..."}(contents::String)
 
 A struct representing media output with a specific MIME type.
diff --git a/dev/assets/mime_examples.md.ftfe-v6Q.lean.js b/dev/assets/mime_examples.md.DhmXvl2I.lean.js
similarity index 61%
rename from dev/assets/mime_examples.md.ftfe-v6Q.lean.js
rename to dev/assets/mime_examples.md.DhmXvl2I.lean.js
index f03aac6a..7f0be440 100644
--- a/dev/assets/mime_examples.md.ftfe-v6Q.lean.js
+++ b/dev/assets/mime_examples.md.DhmXvl2I.lean.js
@@ -1 +1 @@
-import{_ as s,c as i,o as a,a3 as t}from"./chunks/framework.BCUNrZnW.js";const e="/DocumenterVitepress.jl/dev/assets/jecpztw.CGGmtknr.png",n="/DocumenterVitepress.jl/dev/assets/jgzsdgs.yDDNeA3I.jpeg",p="/DocumenterVitepress.jl/dev/assets/ervdgfy.Drfs-ROQ.svg",l="/DocumenterVitepress.jl/dev/assets/jqsndvj.C-W3LInb.gif",m=JSON.parse('{"title":"MIME-type examples","description":"","frontmatter":{},"headers":[],"relativePath":"mime_examples.md","filePath":"mime_examples.md","lastUpdated":null}'),h={name:"mime_examples.md"},k=t("",13),d=[k];function r(o,E,g,c,u,y){return a(),i("div",null,d)}const C=s(h,[["render",r]]);export{m as __pageData,C as default};
+import{_ as s,c as i,o as a,a3 as t}from"./chunks/framework.BCUNrZnW.js";const e="/DocumenterVitepress.jl/dev/assets/urflwhw.CGGmtknr.png",n="/DocumenterVitepress.jl/dev/assets/pnttkoc.yDDNeA3I.jpeg",p="/DocumenterVitepress.jl/dev/assets/kvjmvof.Drfs-ROQ.svg",l="/DocumenterVitepress.jl/dev/assets/dutyvgj.C-W3LInb.gif",m=JSON.parse('{"title":"MIME-type examples","description":"","frontmatter":{},"headers":[],"relativePath":"mime_examples.md","filePath":"mime_examples.md","lastUpdated":null}'),h={name:"mime_examples.md"},k=t("",13),d=[k];function r(o,E,g,c,u,y){return a(),i("div",null,d)}const C=s(h,[["render",r]]);export{m as __pageData,C as default};
diff --git a/dev/assets/jgzsdgs.yDDNeA3I.jpeg b/dev/assets/pnttkoc.yDDNeA3I.jpeg
similarity index 100%
rename from dev/assets/jgzsdgs.yDDNeA3I.jpeg
rename to dev/assets/pnttkoc.yDDNeA3I.jpeg
diff --git a/dev/assets/jecpztw.CGGmtknr.png b/dev/assets/urflwhw.CGGmtknr.png
similarity index 100%
rename from dev/assets/jecpztw.CGGmtknr.png
rename to dev/assets/urflwhw.CGGmtknr.png
diff --git a/dev/citations.html b/dev/citations.html
index 20265da3..dcb22d7d 100644
--- a/dev/citations.html
+++ b/dev/citations.html
@@ -19,7 +19,7 @@
   
   
     
Skip to content

DocumenterCitations.jl integration

This page shows the DocumenterCitations.jl integration and what it looks like. You can use DocumenterCitations in DocumenterVitepress in the same way that you use them in Documenter!

This page's source was taken from the DocumenterCitations docs and rendered via DocumenterVitepress.

Citation Style Gallery

The citation style is determined when instantiating the CitationBibliography, via the style argument.

The built-in styles are:

Numeric style

This is the default style (style=:numeric) used throughout the other pages of this documentation, cf. the Syntax examples.

  • [GoerzQ2022](@cite) renders as "[1]"

  • [FuerstNJP2014,SolaAAMOP2018](@cite) renders as "[2, 3]"

  • [GoerzQ2022](@citet) renders as "Goerz et al. [1]"

  • [GoerzQ2022](@citep) renders as "[1]" — @citep is the same as @cite for this style

  • [GoerzQ2022; Eq. (1)](@cite) renders as "[1, Eq. (1)]"

  • [GoerzQ2022; Eq. (1)](@citet) renders as "Goerz et al. [1], Eq. (1)"

  • [GoerzQ2022](@citet*) renders as "Goerz, Carrasco and Malinovsky [1]"

  • [GoerzQ2022; Eq. (1)](@citet*) renders as "Goerz, Carrasco and Malinovsky [1], Eq. (1)"

  • [WinckelIP2008](@citet) renders as "von Winckel and Borzì [4]"

  • [WinckelIP2008](@Citet) renders as "Von Winckel and Borzì [4]"

  • [BrumerShapiro2003, BrifNJP2010, Shapiro2012, KochJPCM2016; and references therein](@cite) renders as "[5–8, and references therein]"

  • [BrumerShapiro2003, BrifNJP2010, Shapiro2012, KochJPCM2016; and references therein](@Citet) renders as "Brumer and Shapiro [5], Brif et al. [6], Shapiro and Brumer [7], Koch [8], and references therein"

  • [arbitrary text](@cite GoerzQ2022) renders as "arbitrary text"

References:


Bibliography

  1. M. H. Goerz, S. C. Carrasco and V. S. Malinovsky. Quantum Optimal Control via Semi-Automatic Differentiation. Quantum 6, 871 (2022).

  2. H. A. Fürst, M. H. Goerz, U. G. Poschinger, M. Murphy, S. Montangero, T. Calarco, F. Schmidt-Kaler, K. Singer and C. P. Koch. Controlling the transport of an ion: Classical and quantum mechanical solutions. New J. Phys. 16, 075007 (2014). Special issue on coherent control of complex quantum systems.

  3. I. R. Sola, B. Y. Chang, S. A. Malinovskaya and V. S. Malinovsky. Quantum Control in Multilevel Systems. In: Advances In Atomic, Molecular, and Optical Physics, Vol. 67, edited by E. Arimondo, L. F. DiMauro and S. F. Yelin (Academic Press, 2018); Chapter 3, pp. 151–256.

  4. G. von Winckel and A. Borzì. Computational techniques for a quantum control problem with H1-cost. Inverse Problems 24, 034007 (2008).

  5. P. Brumer and M. Shapiro. Principles and Applications of the Quantum Control of Molecular Processes (Wiley Interscience, 2003).

  6. C. Brif, R. Chakrabarti and H. Rabitz. Control of quantum phenomena: past, present and future. New J. Phys. 12, 075008 (2010).

  7. M. Shapiro and P. Brumer. Quantum Control of Molecular Processes. Second Edition (Wiley and Sons, 2012).

  8. C. P. Koch. Controlling open quantum systems: tools, achievements, and limitations. J. Phys.: Condens. Matter 28, 213001 (2016).

Author-year style

The author-year style (style=:authoryear) formats citations with the author name and publication year. This is the citation style used, e.g., in Rev. Mod. Phys. (rmp option in REVTeX). The bibliography is sorted alphabetically by author name. The default @cite command is parenthetical (@cite and @citep are equivalent) which is different from the authoryear style in natbib.

  • [GoerzQ2022](@cite) renders as "(Goerz et al., 2022)"

  • [FuerstNJP2014,SolaAAMOP2018](@cite) renders as "(Fürst et al., 2014; Sola et al., 2018)"

  • [GoerzQ2022](@citet) renders as "Goerz et al. (2022)"

  • [GoerzQ2022](@citep) renders as "(Goerz et al., 2022)" — @citep is the same as @cite for this style

  • [GoerzQ2022; Eq. (1)](@cite) renders as "(Goerz et al., 2022; Eq. (1))"

  • [GoerzQ2022; Eq. (1)](@citet) renders as "Goerz et al. (2022), Eq. (1)"

  • [GoerzQ2022](@cite*) renders as "(Goerz, Carrasco and Malinovsky, 2022)"

  • [GoerzQ2022](@citet*) renders as "Goerz, Carrasco and Malinovsky (2022)"

  • [GoerzQ2022; Eq. (1)](@cite*) renders as "(Goerz, Carrasco and Malinovsky, 2022; Eq. (1))"

  • [GoerzQ2022; Eq. (1)](@citet*) renders as "Goerz, Carrasco and Malinovsky (2022), Eq. (1)"

  • [WinckelIP2008](@citet) renders as "von Winckel and Borzì (2008)"

  • [WinckelIP2008](@Citet) renders as "Von Winckel and Borzì (2008)"

  • [BrumerShapiro2003, BrifNJP2010, Shapiro2012, KochJPCM2016; and references therein](@cite) renders as "(Brumer and Shapiro, 2003; Brif et al., 2010; Shapiro and Brumer, 2012; Koch, 2016; and references therein)"

  • [BrumerShapiro2003, BrifNJP2010, Shapiro2012, KochJPCM2016; and references therein](@Citet) renders as "Brumer and Shapiro (2003), Brif et al. (2010), Shapiro and Brumer (2012), Koch (2016), and references therein"

  • [arbitrary text](@cite GoerzQ2022) renders as "arbitrary text"

References:


Bibliography

  • Brif, C.; Chakrabarti, R. and Rabitz, H. (2010). Control of quantum phenomena: past, present and future. New J. Phys. 12, 075008.

  • Brumer, P. and Shapiro, M. (2003). Principles and Applications of the Quantum Control of Molecular Processes (Wiley Interscience).

  • Fürst, H. A.; Goerz, M. H.; Poschinger, U. G.; Murphy, M.; Montangero, S.; Calarco, T.; Schmidt-Kaler, F.; Singer, K. and Koch, C. P. (2014). Controlling the transport of an ion: Classical and quantum mechanical solutions. New J. Phys. 16, 075007. Special issue on coherent control of complex quantum systems.

  • Goerz, M. H.; Carrasco, S. C. and Malinovsky, V. S. (2022). Quantum Optimal Control via Semi-Automatic Differentiation. Quantum 6, 871.

  • Koch, C. P. (2016). Controlling open quantum systems: tools, achievements, and limitations. J. Phys.: Condens. Matter 28, 213001.

  • Shapiro, M. and Brumer, P. (2012). Quantum Control of Molecular Processes. Second Edition (Wiley and Sons).

  • Sola, I. R.; Chang, B. Y.; Malinovskaya, S. A. and Malinovsky, V. S. (2018). Quantum Control in Multilevel Systems. In: Advances In Atomic, Molecular, and Optical Physics, Vol. 67, edited by Arimondo, E.; DiMauro, L. F. and Yelin, S. F. (Academic Press); Chapter 3, pp. 151–256.

  • von Winckel, G. and Borzì, A. (2008). Computational techniques for a quantum control problem with H1-cost. Inverse Problems 24, 034007.

Alphabetic style

The style=:alpha formats citations and references like :numeric, except that it uses labels derived from the author names and publication year and sorts the references alphabetically.

  • [GoerzQ2022](@cite) renders as "[GCM22]"

  • [FuerstNJP2014,SolaAAMOP2018](@cite) renders as "[FGP+14, SCMM18]"

  • [GoerzQ2022](@citet) renders as "Goerz et al. [GCM22]"

  • [GoerzQ2022](@citep) renders as "[GCM22]" — @citep is the same as @cite for this style

  • [GoerzQ2022; Eq. (1)](@cite) renders as "[GCM22, Eq. (1)]"

  • [GoerzQ2022; Eq. (1)](@citet) renders as "Goerz et al. [GCM22], Eq. (1)"

  • [GoerzQ2022](@citet*) renders as "Goerz, Carrasco and Malinovsky [GCM22]"

  • [GoerzQ2022; Eq. (1)](@citet*) renders as "Goerz, Carrasco and Malinovsky [GCM22], Eq. (1)"

  • [WinckelIP2008](@citet) renders as "von Winckel and Borzì [vWB08]"

  • [WinckelIP2008](@Citet) renders as "Von Winckel and Borzì [vWB08]"

  • [BrumerShapiro2003, BrifNJP2010, Shapiro2012, KochJPCM2016; and references therein](@cite) renders as "[BS03, BCR10, SB12, Koc16, and references therein]". Note that unlike for style=:numeric, the citations are not compressed.

  • [BrumerShapiro2003, BrifNJP2010, Shapiro2012, KochJPCM2016; and references therein](@Citet) renders as "Brumer and Shapiro [BS03], Brif et al. [BCR10], Shapiro and Brumer [SB12], Koch [Koc16], and references therein"

  • [arbitrary text](@cite GoerzQ2022) renders as "arbitrary text"

References:


Bibliography

  1. C. Brif, R. Chakrabarti and H. Rabitz. Control of quantum phenomena: past, present and future. New J. Phys. 12, 075008 (2010).

  2. P. Brumer and M. Shapiro. Principles and Applications of the Quantum Control of Molecular Processes (Wiley Interscience, 2003).

  3. H. A. Fürst, M. H. Goerz, U. G. Poschinger, M. Murphy, S. Montangero, T. Calarco, F. Schmidt-Kaler, K. Singer and C. P. Koch. Controlling the transport of an ion: Classical and quantum mechanical solutions. New J. Phys. 16, 075007 (2014). Special issue on coherent control of complex quantum systems.

  4. M. H. Goerz, S. C. Carrasco and V. S. Malinovsky. Quantum Optimal Control via Semi-Automatic Differentiation. Quantum 6, 871 (2022).

  5. C. P. Koch. Controlling open quantum systems: tools, achievements, and limitations. J. Phys.: Condens. Matter 28, 213001 (2016).

  6. M. Shapiro and P. Brumer. Quantum Control of Molecular Processes. Second Edition (Wiley and Sons, 2012).

  7. I. R. Sola, B. Y. Chang, S. A. Malinovskaya and V. S. Malinovsky. Quantum Control in Multilevel Systems. In: Advances In Atomic, Molecular, and Optical Physics, Vol. 67, edited by E. Arimondo, L. F. DiMauro and S. F. Yelin (Academic Press, 2018); Chapter 3, pp. 151–256.

  8. G. von Winckel and A. Borzì. Computational techniques for a quantum control problem with H1-cost. Inverse Problems 24, 034007 (2008).

Note that the :alpha style is able to automatically disambiguate labels:


Bibliography

  1. M. Grace, C. Brif, H. Rabitz, I. A. Walmsley, R. L. Kosut and D. A. Lidar. Optimal control of quantum gates and suppression of decoherence in a system of interacting two-level particles. J. Phys. B 40, S103 (2007), arXiv:quant-ph/0702147.

  2. M. D. Grace, C. Brif, H. Rabitz, D. A. Lidar, I. A. Walmsley and R. L. Kosut. Fidelity of optimally controlled quantum gates with randomly coupled multiparticle environments. J. Mod. Opt. 54, 2339 (2007), arXiv:0712.2935.

This works because the DocumenterCitations plugin automatically upgrades style=:alpha to the internal

DocumenterCitations.AlphaStyle

Custom styles

In the following, we show two examples for user-defined styles. See the notes on customization on how to generally define a custom style.

Custom style: enumerated author-year

In this example, the :authoryear style is used, but the references are shown in an enumerated list.

The important part of the definition is in the last line, indicating that the References should be shown as an enumeration (ordered list, <ol>, in HTML), see below. Meanwhile, citations render exactly as with style=:authoryear:

  • [GoerzQ2022](@cite) renders as "(Goerz et al., 2022)"

  • [FuerstNJP2014,SolaAAMOP2018](@cite) renders as "(Fürst et al., 2014; Sola et al., 2018)"

  • [WinckelIP2008](@Citet) renders as "Von Winckel and Borzì (2008)"

References:


Bibliography

  1. Brif, C.; Chakrabarti, R. and Rabitz, H. (2010). Control of quantum phenomena: past, present and future. New J. Phys. 12, 075008.

  2. Brumer, P. and Shapiro, M. (2003). Principles and Applications of the Quantum Control of Molecular Processes (Wiley Interscience).

  3. Fürst, H. A.; Goerz, M. H.; Poschinger, U. G.; Murphy, M.; Montangero, S.; Calarco, T.; Schmidt-Kaler, F.; Singer, K. and Koch, C. P. (2014). Controlling the transport of an ion: Classical and quantum mechanical solutions. New J. Phys. 16, 075007. Special issue on coherent control of complex quantum systems.

  4. Goerz, M. H.; Carrasco, S. C. and Malinovsky, V. S. (2022). Quantum Optimal Control via Semi-Automatic Differentiation. Quantum 6, 871.

  5. Koch, C. P. (2016). Controlling open quantum systems: tools, achievements, and limitations. J. Phys.: Condens. Matter 28, 213001.

  6. Shapiro, M. and Brumer, P. (2012). Quantum Control of Molecular Processes. Second Edition (Wiley and Sons).

  7. Sola, I. R.; Chang, B. Y.; Malinovskaya, S. A. and Malinovsky, V. S. (2018). Quantum Control in Multilevel Systems. In: Advances In Atomic, Molecular, and Optical Physics, Vol. 67, edited by Arimondo, E.; DiMauro, L. F. and Yelin, S. F. (Academic Press); Chapter 3, pp. 151–256.

  8. Von Winckel, G. and Borzì, A. (2008). Computational techniques for a quantum control problem with H1-cost. Inverse Problems 24, 034007.

Custom style: Citation-key labels

In this less trivial example, a style similar to :alpha is used, using the citation keys in the .bib file as labels. This would be somewhat more appropriate with citation keys that are shorter that the ones used here (keys similar to those automatically generated with the :alpha style).

  • [GoerzQ2022](@cite) renders as "[GoerzQ2022]"

  • [FuerstNJP2014,SolaAAMOP2018](@cite) renders as "[FuerstNJP2014, SolaAAMOP2018]"

  • [GoerzQ2022](@citet) renders as "Goerz et al. [GoerzQ2022]"

  • [GoerzQ2022](@citep) renders as "[GoerzQ2022]" — @citep is the same as @cite for this style

  • [GoerzQ2022; Eq. (1)](@cite) renders as "[GoerzQ2022, Eq. (1)]"

  • [GoerzQ2022; Eq. (1)](@citet) renders as "Goerz et al. [GoerzQ2022], Eq. (1)"

  • [GoerzQ2022](@citet*) renders as "Goerz, Carrasco and Malinovsky [GoerzQ2022]"

  • [GoerzQ2022; Eq. (1)](@citet*) renders as "Goerz, Carrasco and Malinovsky [GoerzQ2022], Eq. (1)"

  • [WinckelIP2008](@citet) renders as "von Winckel and Borzì [WinckelIP2008]"

  • [WinckelIP2008](@Citet) renders as "Von Winckel and Borzì [WinckelIP2008]"

  • [arbitrary text](@cite GoerzQ2022) renders as "arbitrary text"

References:


Bibliography

  1. C. Brif, R. Chakrabarti and H. Rabitz. Control of quantum phenomena: past, present and future. New J. Phys. 12, 075008 (2010).

  2. P. Brumer and M. Shapiro. Principles and Applications of the Quantum Control of Molecular Processes (Wiley Interscience, 2003).

  3. H. A. Fürst, M. H. Goerz, U. G. Poschinger, M. Murphy, S. Montangero, T. Calarco, F. Schmidt-Kaler, K. Singer and C. P. Koch. Controlling the transport of an ion: Classical and quantum mechanical solutions. New J. Phys. 16, 075007 (2014). Special issue on coherent control of complex quantum systems.

  4. M. H. Goerz, S. C. Carrasco and V. S. Malinovsky. Quantum Optimal Control via Semi-Automatic Differentiation. Quantum 6, 871 (2022).

  5. C. P. Koch. Controlling open quantum systems: tools, achievements, and limitations. J. Phys.: Condens. Matter 28, 213001 (2016).

  6. M. Shapiro and P. Brumer. Quantum Control of Molecular Processes. Second Edition (Wiley and Sons, 2012).

  7. I. R. Sola, B. Y. Chang, S. A. Malinovskaya and V. S. Malinovsky. Quantum Control in Multilevel Systems. In: Advances In Atomic, Molecular, and Optical Physics, Vol. 67, edited by E. Arimondo, L. F. DiMauro and S. F. Yelin (Academic Press, 2018); Chapter 3, pp. 151–256.

  8. G. von Winckel and A. Borzì. Computational techniques for a quantum control problem with H1-cost. Inverse Problems 24, 034007 (2008).

- + \ No newline at end of file diff --git a/dev/code_example.html b/dev/code_example.html index 5542a1c0..c2ec8238 100644 --- a/dev/code_example.html +++ b/dev/code_example.html @@ -92,7 +92,7 @@ ```

Output

julia
julia> 1 + 1
 2
- + \ No newline at end of file diff --git a/dev/documenter_to_vitepress_docs_example.html b/dev/documenter_to_vitepress_docs_example.html index 7d7479e5..0c10a97a 100644 --- a/dev/documenter_to_vitepress_docs_example.html +++ b/dev/documenter_to_vitepress_docs_example.html @@ -48,7 +48,7 @@ docs $
  1. Then, in docs/, start a julia session and activate a new environment.
sh
docs $ julia
 julia> ]
 pkg> activate .
  1. Add packages as necessary. Here, we will need
julia
pkg> add DocumenterVitepress, Documenter
  1. Then run the make.jl file to build the documentation.
julia
julia> include("make.jl")
  1. Finally, hit ; to enter the shell mode and run:
sh
shell> npm i

The above command shall create a folder named node_modules and package-lock.json in your docs folder.

  1. Next, hit 'Backspace' to get back to the Julia REPL and run:
julia
juila> DocumenterVitepress.dev_docs("build")
  1. Finally the live preview of your documentation at http://localhost:5173/Example.jl/ in your browser.
- + \ No newline at end of file diff --git a/dev/getting_started.html b/dev/getting_started.html index e03b1443..46e52007 100644 --- a/dev/getting_started.html +++ b/dev/getting_started.html @@ -12,7 +12,7 @@ - + @@ -22,9 +22,9 @@ format = MarkdownVitepress( repo = "<url_to_your_repo>", ) -)

and that should be it!

The section Advanced method describes how to get more control over your Vitepress build.

Preview Documentation Development Instantly

You can preview your documentation development changes locally, instantly by adding LiveServer.jl into your docs environment and making a few tweaks to your make.jl configuration.

Note: As of now, these tweaks must be removed from your make.jl before you deploy your documentation to whatever deployment service you use or your deployment will fail.

Here are the tweaks to add:

  1. Navigate into your docs directory and add LiveServer.jl with (docs)> add LiveServer

  2. Within the MarkdownVitepress configuration of your make.jl file, pass the following two key word arguments and their values:

i. md_output_path = "."

ii. build_vitepress = false

  1. Within the makedocs command within your make.jl file, pass the following key word argument:

i. clean = false

Then, to preview changes live, open two separate Julia instances both within the docs folder and activate the docs environment in both sessions. Within one session run using LiveServer; servedocs(foldername="/path/to/your/docs/folder") (this could be something like servedocs(foldername="docs/") or servedocs(foldername=pwd())). In the other session run DocumenterVitepress.dev_docs("build", md_output_path = "").

Now, with both these instances running, you can add your changes into your documentation and should see servedocs trigger a rebuild and dev_docs update as well which then leads to finally your browser being updated in real time.

Note: For some user set-ups, you may see your browser instead direct you to a page mentioning REPLACE_ME_DOCUMENTER_VITEPRESS and the output from dev_docs mentioning that page as well. If this happens to you, that is due to DocumenterVitepress not picking up servedocs changes fast enough (this comes from a quirk of the underlying JS vitepress library). To get around this, within your documentation, add a small sleep delay like so:

julia
```@example
+)

and that should be it!

The section Advanced method describes how to get more control over your Vitepress build.

Preview Documentation Development Instantly

You can preview your documentation development changes locally, instantly by adding LiveServer.jl into your docs environment and making a few tweaks to your make.jl configuration.

Note

As of now, these tweaks must be removed from your make.jl before you deploy your documentation to whatever deployment service you use or your deployment will fail.

Here are the tweaks to add:

  1. Navigate into your docs directory and add LiveServer.jl with (docs)> add LiveServer

  2. Within the MarkdownVitepress configuration of your make.jl file, pass the following two key word arguments and their values:

i. md_output_path = "."

ii. build_vitepress = false

  1. Within the makedocs command within your make.jl file, pass the following key word argument:

i. clean = false

Then, to preview changes live, open two separate Julia instances both within the docs folder and activate the docs environment in both sessions. Within one session run using LiveServer; servedocs(foldername="/path/to/your/docs/folder") (this could be something like servedocs(foldername="docs/") or servedocs(foldername=pwd())). In the other session run DocumenterVitepress.dev_docs("build", md_output_path = "").

Now, with both these instances running, you can add your changes into your documentation and should see servedocs trigger a rebuild and dev_docs update as well which then leads to finally your browser being updated in real time.

Note

For some user set-ups, you may see your browser instead direct you to a page mentioning REPLACE_ME_DOCUMENTER_VITEPRESS and the output from dev_docs mentioning that page as well. If this happens to you, that is due to DocumenterVitepress not picking up servedocs changes fast enough (this comes from a quirk of the underlying JS vitepress library). To get around this, within your documentation, add a small sleep delay like so:

julia
```@example
 sleep(0.1)
-```

Generally, 0.1 seconds should be enough but you may need to adjust that delay timer if you still have the issue.

Advanced method

If you want to customize your Vitepress build, including CSS etc., you will want to add the necessary Vitepress files to your docs/src/.vitepress folder.

As a tutorial, we will go through and explain the folder and files structure used to generate this website. You could use this as a template for your project's documentation.

Quick start

In general, you can copy the template folder to your docs folder and the .github/Documenter.yml action file from DocumenterVitepress.jl to your repo, and be pretty much good to go and edit docs as usual!

Since we're concerned only with documentation, we'll specifically look at the docs folder of your Julia project or package here.

For more information on how to structure this, see the Documenter.jl guide! In this quick start, we will focus solely on how to set up DocumenterVitepress assuming you already have some basic docs (even just an index.md will do).

Project structure

In order to start as quickly as possible, we recommend you copy the Project.toml, make.jl, package.json, and src folders to your own documentation.

DocumenterVitepress/docs
+```

Generally, 0.1 seconds should be enough but you may need to adjust that delay timer if you still have the issue.

Advanced method

If you want to customize your Vitepress build, including CSS etc., you will want to add the necessary Vitepress files to your docs/src/.vitepress folder.

As a tutorial, we will go through and explain the folder and files structure used to generate this website. You could use this as a template for your project's documentation.

Quick start

In general, you can copy the template folder to your docs folder and the .github/Documenter.yml action file from DocumenterVitepress.jl to your repo, and be pretty much good to go and edit docs as usual!

Since we're concerned only with documentation, we'll specifically look at the docs folder of your Julia project or package here.

For more information on how to structure this, see the Documenter.jl guide! In this quick start, we will focus solely on how to set up DocumenterVitepress assuming you already have some basic docs (even just an index.md will do).

Project structure

In order to start as quickly as possible, we recommend you copy the Project.toml, make.jl, package.json, and src folders to your own documentation.

DocumenterVitepress/docs
 ├── Project.toml
 ├── make.jl
 ├── package-lock.json
@@ -39,7 +39,7 @@
         ├── config.mts
         └── theme
             └── index.ts
-            └── style.css

You can ignore the rest of the files which are actually in DocumenterVitepress/docs/src for now - those show how to use advanced APIs, like

VitePress Installation

Start at the docs level:

sh
docs $

Prerequisites

DocumenterVitepress.jl is completely self-contained and installs all of its dependencies (including its own isolated version of npm) automatically.

However, to view your documentation live when developing locally, you will need to install npm and instantiate the

VitePress can be used on its own, or be installed into an existing project. In both cases, you can install it with:

sh
npm add -D vitepress
sh
pnpm add -D vitepress
sh
yarn add -D vitepress
sh
bun add -D vitepress

Build new docs from docs/src

To start working on your docs do the following steps:

sh
$ cd docs
+            └── style.css

You can ignore the rest of the files which are actually in DocumenterVitepress/docs/src for now - those show how to use advanced APIs, like

VitePress Installation

Start at the docs level:

sh
docs $

Prerequisites

DocumenterVitepress.jl is completely self-contained and installs all of its dependencies (including its own isolated version of npm) automatically.

However, to view your documentation live when developing locally, you will need to install npm and instantiate the

VitePress can be used on its own, or be installed into an existing project. In both cases, you can install it with:

sh
npm add -D vitepress
sh
pnpm add -D vitepress
sh
yarn add -D vitepress
sh
bun add -D vitepress

Build new docs from docs/src

To start working on your docs do the following steps:

sh
$ cd docs
 docs $

Then, in docs start a julia session and activate a new environment.

sh
docs $ julia
 julia> ]
 pkg> activate .

Add packages as necessary. Here, we will need

julia
pkg> add DocumenterVitepress, Documenter

These packages will be used in the make.jl file.

Setting up the Folder Structure

The files for this page in the docs folder have the following structure:

docs/
@@ -58,7 +58,7 @@
         └── theme
             └── index.ts
             └── style.css

Then, run docs/make.jl, and in another terminal in the docs directory, run:

sh
docs $ npm run docs:dev

This will deploy your documentation locally on a webserver. See here to know more.

- + \ No newline at end of file diff --git a/dev/hashmap.json b/dev/hashmap.json index 95b37a03..b686f6ae 100644 --- a/dev/hashmap.json +++ b/dev/hashmap.json @@ -1 +1 @@ -{"api.md":"DV-bSc9j","getting_started.md":"BRmKPXkw","render_pipeline.md":"C6GvE8sW","code_example.md":"DVvDsSME","citations.md":"CQRYUQk9","mime_examples.md":"ftfe-v6Q","index.md":"C6MuILwv","markdown-examples.md":"BPHkN5Q0","documenter_to_vitepress_docs_example.md":"CTwpS16k","style_css.md":"D2Kwq6iv"} +{"render_pipeline.md":"C6GvE8sW","getting_started.md":"BSQ6ODQW","documenter_to_vitepress_docs_example.md":"CTwpS16k","citations.md":"CQRYUQk9","code_example.md":"DVvDsSME","index.md":"C6MuILwv","style_css.md":"D2Kwq6iv","mime_examples.md":"DhmXvl2I","api.md":"C-oxDGDx","markdown-examples.md":"z5JN13o6"} diff --git a/dev/index.html b/dev/index.html index 33f772e5..b932edd7 100644 --- a/dev/index.html +++ b/dev/index.html @@ -19,7 +19,7 @@
Skip to content

DocumenterVitepress.jl

Document your code

A Markdown backend designed to work with VitePress and Documenter.jl

DocumenterVitepress

What is DocumenterVitepress.jl?

DocumenterVitepress is a Markdown backend for Documenter.jl which is designed to work with the VitePress site generator, which is built off Vue.js.

It is meant to be used in conjunction with the vitepress Node.js package, which is why so much customization is required!

Basic usage

If you copy the contents of the template/ directory into your docs/ and the .github/Documenter.yml file to your repo, you should be good to go and edit docs as usual!

Just remember to edit the navbar in docs/src/.vitepress/config.mts, if you want it to be different from the sidebar.

To install a logo or favicon, you can put logo.png and favicon.ico in docs/src/assets, and they will be automatically detected.

- + \ No newline at end of file diff --git a/dev/markdown-examples.html b/dev/markdown-examples.html index 3a70bf2b..e994903f 100644 --- a/dev/markdown-examples.html +++ b/dev/markdown-examples.html @@ -12,7 +12,7 @@ - + @@ -99,7 +99,7 @@ @gp :- x cos.(x) "w l t 'cos' lw 2 lc rgb '#E69F00'" ``` -:::

Output

julia
using Gnuplot
+:::

Output

julia
using Gnuplot
 t = 0:0.001:1
 @gp t sin.(10π*t) "w l tit 'sin' lc 'gray'"
julia
using Gnuplot
 x = -:0.001:
@@ -207,7 +207,7 @@
 ```

Output

When a0, there are two solutions to ax2+bx+c=0 and they are

x=b±b24ac2a

Don't type anything after the last double dollar sign, and make sure there are no spaces after the opening double dollar sign in the display math!

You can also use fenced code blocks with the math tag for equations!

2Φ=ρ

Footnotes (citation-style)

Input

Here is the link for the paper of Babushka[^1]
[^1]: This is Babushka's footnote!

Output

Here is the link for the paper of Babushka[1]

Escaping characters

Input

md
< `less` and `greater` > than, and the backtick \`.

Output

< less and greater > than, and the backtick `.

And also, this <was> an <issue> before.

Let's see if this one works:

```
 sshflags=`-i <keyfile>`
 ```

it does,

sshflags=`-i <keyfile>`

but within inline text it does not. Ideas for the escaping sequence?

This is the expected sequence by vitepress:

<code> sshflags= `` `-i <keyfile> ` `` </code>

More

Check out the documentation for the full list of markdown extensions.


  1. This is Babushka's footnote! ↩︎

- + \ No newline at end of file diff --git a/dev/mime_examples.html b/dev/mime_examples.html index e6270c92..2a978ec9 100644 --- a/dev/mime_examples.html +++ b/dev/mime_examples.html @@ -12,7 +12,7 @@ - + @@ -33,12 +33,12 @@ # This defines the show method for the target MIME type only! Base.show(io, ::MimeType, media::MediaOutput{MimeType}) where MimeType = write(io, media.contents) # MediaOutput{MIME"text/plain"}("Hello there!")
julia
using DocumenterVitepress
-MediaOutput{MIME"image/png"}(read(joinpath(pathof(DocumenterVitepress) |> dirname |> dirname, "docs", "src", "assets", "logo.png")))

julia
MediaOutput{MIME"image/jpeg"}(read(download("https://upload.wikimedia.org/wikipedia/commons/thumb/0/0e/Felis_silvestris_silvestris.jpg/519px-Felis_silvestris_silvestris.jpg")))

Vite automatically inlines assets under 4KB by default, if this causes issues with your SVG files you can disable this behavior by adding the following to your vitepress configuration:

config.mts

vite: {
+MediaOutput{MIME"image/png"}(read(joinpath(pathof(DocumenterVitepress) |> dirname |> dirname, "docs", "src", "assets", "logo.png")))

julia
MediaOutput{MIME"image/jpeg"}(read(download("https://upload.wikimedia.org/wikipedia/commons/thumb/0/0e/Felis_silvestris_silvestris.jpg/519px-Felis_silvestris_silvestris.jpg")))

Vite automatically inlines assets under 4KB by default, if this causes issues with your SVG files you can disable this behavior by adding the following to your vitepress configuration:

config.mts

vite: {
     build: {
         assetsInlineLimit: 0, // so we can tell whether we have created inlined images or not, we don't let vite inline them
     }
-},
julia
MediaOutput{MIME"image/svg+xml"}("https://upload.wikimedia.org/wikipedia/commons/6/6c/SVG_Simple_Icon.svg" |> download |> read)

julia
MediaOutput{MIME"image/gif"}(read(download("https://upload.wikimedia.org/wikipedia/commons/2/2c/Rotating_earth_%28large%29.gif")))

- +},
julia
MediaOutput{MIME"image/svg+xml"}("https://upload.wikimedia.org/wikipedia/commons/6/6c/SVG_Simple_Icon.svg" |> download |> read)

julia
MediaOutput{MIME"image/gif"}(read(download("https://upload.wikimedia.org/wikipedia/commons/2/2c/Rotating_earth_%28large%29.gif")))

+ \ No newline at end of file diff --git a/dev/render_pipeline.html b/dev/render_pipeline.html index da5a28fc..65f9d3dd 100644 --- a/dev/render_pipeline.html +++ b/dev/render_pipeline.html @@ -19,7 +19,7 @@
Skip to content

The rendering process

DocumenterVitepress combines two formidable packages - Documenter.jl, which consumes documentation from Markdown files and Julia packages, and VitePress, which generates websites from Markdown files.

Documentation is therefore generated in two "stages". These are both executed by the first and main render function, in src/writers.jl.

Documenter.jl

First, the Documenter.jl pipeline is run. It takes as input the concerned Julia modules and Markdown files, and excecutes all doctests and runnable blocks.

From there, Documenter uses a plugin provided to the format keyword of makedocs to render to some viewable form. This is where DocumenterVitepress.jl steps in, with the MarkdownVitepress plugin.

That plugin takes in the Documenter Document which is generated once Documenter has parsed, run and expanded all the input Markdown files, and converts it to VitePress-flavoured Markdown, which is saved in docs/build/.documenter by default.

This conversion is done by the sometimes-recursive multiple dispatch based render function.

VitePress

VitePress is a NodeJS package which takes in Markdown files and generates a static site.

The first step we take is to replace several options in VitePress's configuration file by our own, if the user has not explicitly specified them. Notable ones are:

  • base: the base path of the website. This is required, because Vitepress cannot generate relocatable websites - so we must know the exact path to our index.html when building.

  • sidebar: the sidebar of the page, autogenerated from pages in makedocs.

Then, we simply ensure that all Node packages are installed, and run npm run docs:build, which builds a website.

In order to locally develop, run npm run docs:dev in another terminal. This will create a server.

Finalization

Finally, if deploying, we move files around such that the only thing deployed is the rendered webpage.

This means that the contents of build/.documenter are deleted, and the contents of build/final_site are moved into build proper. This allows the complete site to be committed directly.

Warning

This will probably not work if using a custom, non-detectable deployment configuration!

- + \ No newline at end of file diff --git a/dev/style_css.html b/dev/style_css.html index 972ad528..edafefca 100644 --- a/dev/style_css.html +++ b/dev/style_css.html @@ -120,7 +120,7 @@ overflow: hidden; white-space: nowrap; }

More

Other attributes can also be modified there, i.e., text colors, link colors, font family, etc.

- + \ No newline at end of file