### Complete Configuration Examples Source: https://github.com/yagarea/jektex/blob/master/README.md Provides examples of a recommended configuration and the default state. ```yaml jektex: cache_dir: ".jektex-cache" ignore: ["*.xml"] silent: false katex_options: trust: false macros: - ["\\Q", "\\mathbb{Q}"] - ["\\C", "\\mathbb{C}"] ``` ```yaml jektex: cache_dir: ".jekyll-cache" ignore: [] silent: false katex_options: {} macros: [] ``` -------------------------------- ### Configure KaTeX Options Source: https://github.com/yagarea/jektex/blob/master/README.md Passes specific rendering options directly to the KaTeX engine. ```yaml jektex: katex_options: trust: false output: htmlAndMathml strict: warn ``` -------------------------------- ### Define Macros with Parameters Source: https://github.com/yagarea/jektex/blob/master/README.md Configures macros that accept parameters, similar to LaTeX's \newcommand. ```yaml jektex: macros: - ["\\vec", "\\mathbf{#1}"] - ["\\addBar", "\\bar{#1}"] ``` -------------------------------- ### Include KaTeX CSS Source: https://github.com/yagarea/jektex/blob/master/README.md Add the KaTeX stylesheet to the HTML head to ensure proper rendering of mathematical expressions. ```html ``` -------------------------------- ### Define Global Macros Source: https://github.com/yagarea/jektex/blob/master/README.md Configures global LaTeX macros for use throughout the site. ```yaml jektex: macros: - ["\\Q", "\\mathbb{Q}"] - ["\\C", "\\mathbb{C}"] ``` -------------------------------- ### Render Display LaTeX Notation Source: https://github.com/yagarea/jektex/blob/master/README.md Use escaped square brackets for display math formulas. ```latex Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. \[ \left[ \frac{-\hbar^2}{2\mu}\nabla^2 + V(\mathbf{r},t)\right] \Psi(\mathbf{r},t) \] Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. ``` -------------------------------- ### Configure Jekyll Plugins Source: https://github.com/yagarea/jektex/blob/master/README.md Register the plugin in the _config.yml file to enable its functionality. ```yaml plugins: - jektex ``` -------------------------------- ### Render Inline LaTeX Notation Source: https://github.com/yagarea/jektex/blob/master/README.md Use escaped parentheses for inline math formulas. ```latex Lorem ipsum dolor sit amet, consectetur \(e^{i\theta}=\cos(\theta)+i\sin(\theta)\) adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. ``` -------------------------------- ### Add Jektex to Gemfile Source: https://github.com/yagarea/jektex/blob/master/README.md Include the gem within the jekyll_plugins group to ensure it is loaded by Jekyll. ```ruby group :jekyll_plugins do gem "jektex" end ``` -------------------------------- ### Render Inline Kramdown Formula Source: https://github.com/yagarea/jektex/blob/master/README.md Use double dollar signs for inline math within paragraphs. ```latex Lorem ipsum dolor sit amet, consectetur $$e^{i\theta}=\cos(\theta)+i\sin(\theta)$$ adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. ``` -------------------------------- ### Render Display Kramdown Formula Source: https://github.com/yagarea/jektex/blob/master/README.md Surround the double dollar sign formula with two empty lines to trigger display mode. ```latex Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. $$ \left[ \frac{-\hbar^2}{2\mu}\nabla^2 + V(\mathbf{r},t)\right] \Psi(\mathbf{r},t) $$ Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. ``` -------------------------------- ### Render Formulas in Raw HTML Source: https://github.com/yagarea/jektex/blob/master/README.md Jektex processes formulas inside block-level HTML tags that Kramdown typically ignores. ```html
The inline formula $$e^{i\theta}$$ sits in text flow. $$ \left[ \frac{-\hbar^2}{2\mu}\nabla^2 + V(\mathbf{r},t)\right] \Psi(\mathbf{r},t) $$
``` -------------------------------- ### Set Cache Directory Source: https://github.com/yagarea/jektex/blob/master/README.md Specifies a custom directory for Jektex cache to prevent deletion during jekyll clean. ```yaml jektex: cache_dir: ".jektex-cache" ``` -------------------------------- ### Ignore Files Source: https://github.com/yagarea/jektex/blob/master/README.md Prevents Jektex from rendering LaTeX in specified files or patterns. ```yaml jektex: ignore: ["*.xml", "README.md", "_drafts/*" ] ``` -------------------------------- ### Disable Disk Cache Source: https://github.com/yagarea/jektex/blob/master/README.md Disables caching at the top level of _config.yml. ```yaml disable_disk_cache: true ``` -------------------------------- ### Disable Jektex in Front Matter Source: https://github.com/yagarea/jektex/blob/master/README.md Disables Jektex rendering for a specific post or page. ```yaml --- title: "How Jektex works" category: "Development" jektex: false layout: post --- ``` -------------------------------- ### Silence Jektex Output Source: https://github.com/yagarea/jektex/blob/master/README.md Suppresses periodic information messages about rendered or cached equations. ```yaml jektex: silent: true ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.