SveltexConfiguration
Sveltex configuration options.
Properties
code? CodeConfiguration<C> | undefinedtypes/SveltexConfiguration.ts:247
See CodeConfiguration.
Configuration options for the syntax highlighter.
Warning These options, and their meaning, depend on the specific "code backend" (i.e., syntax highlighter) in use. For documentation of the options beyond what IntelliSense may provide, please refer to the documentation of the backend in question:
extensions? `.${string}`[] | undefinedtypes/SveltexConfiguration.ts:330
File extensions which will be processed by the preprocessor.
Default ['.sveltex']
Be sure to include these in your svelte.config.js file.
frontmatter? boolean | FrontmatterConfiguration | undefinedtypes/SveltexConfiguration.ts:354
Controls how SvelTeX processes the frontmatter block at the top of a .sveltex file.
true(default): perform every frontmatter-processing step.false: disable frontmatter processing entirely. The block is still parsed and stripped from the output, and still handed to your transformers — but no code is generated from it.- an object: enable or disable each step individually. See
FrontmatterConfiguration.
Default true
Example
Keep the frontmatter usable from your markup and load functions, but stop SvelTeX from injecting a <svelte:head> — so you can build the document's <head> yourself:
{ frontmatter: { head: false } }markdown? MarkdownConfiguration<M> | undefinedtypes/SveltexConfiguration.ts:230
Configuration options for the markdown processor.
Warning These options, and their meaning, depend on the specific markdown backend in use. For documentation of the options beyond what IntelliSense may provide, please refer to the documentation of the backend in question:
math? MathConfiguration<T> | undefinedtypes/SveltexConfiguration.ts:265
See MathConfiguration.
Configuration options for the math processor (KaTeX or MathJax).
Warning These options depend on the specific TeX backend in use. For example, if you are using KaTeX, different options will be available than if you are using MathJax. Similarly, the meanings of the options may differ between backends, since they are taken directly from the backend in question (or at most slightly adapted). For documentation of the options beyond what IntelliSense may provide, please refer to the documentation of the backend in question:
tex? TexConfiguration | undefinedtypes/SveltexConfiguration.ts:284
See TexConfiguration.
Configuration options for the TeX-to-SVG pipeline — the full TeX toolchain SvelTeX uses to render tex-type verbatim environments (TikZ diagrams, commutative diagrams, anything you would put inside a standalone document) to static SVGs at build time. Distinct from the math backend, which renders inline / display math inside markdown with KaTeX or MathJax.
Covers the TeX engine (pdflatex, lualatex, xelatex, …) and its arguments; the SVG conversion step (dvisvgm or Poppler); the output and cache directories; SVG optimisation (via SVGO); and console output verbosity. See the TeX page for the full reference.
verbatim? VerbatimConfiguration | undefinedtypes/SveltexConfiguration.ts:321
Define "verbatim" environments. These are environments in which the content is processed in a specified way by SvelTeX before being passed on to the Svelte compiler. The content will not be processed by the markdown, code, or math processor (with the exception that it may be passed on to the code processor if the verbatim environment's type is 'code').
Define verbatim environments by providing a key-value pair where the key is the name of the environment and the value is an object describing how to process the content of the environment. The key will be used as the HTML tag with which to identify the environment, though aliases can also be configured.
Example
{
Example: {
type: 'tex',
},
}Now, you can write the following in any Svelte file on which SvelTeX will run:
<Example ref="figure-1">
\begin{tikzpicture}
\draw (0, 0) circle (1);
\end{tikzpicture}
</Example>