No description
Find a file
2025-09-14 22:29:39 +08:00
examples/stlc MWE 2021-01-06 11:33:27 +01:00
.gitignore Implement setting for custom preamble location 2022-12-25 17:58:24 +08:00
LICENSE Create LICENSE 2023-01-13 13:43:43 +08:00
main.ts Implement setting for custom preamble location 2022-12-25 17:58:24 +08:00
manifest.json Release v0.4.1 2023-01-13 13:51:40 +08:00
package.json Upgrade Obsidian; Modify MathJax in onload; Fix preamble loading 2022-02-06 17:57:53 -06:00
README.md docs(README): change Obsidian plugin link to code 2025-09-14 22:29:39 +08:00
rollup.config.js Use rollup for bundling. 2020-10-26 12:02:41 -04:00
styles.css Patch MathJax loading 2020-12-18 07:58:17 -06:00
tsconfig.json Use rollup for bundling. 2020-10-26 12:02:41 -04:00
versions.json Upgrade Obsidian; Modify MathJax in onload; Fix preamble loading 2022-02-06 17:57:53 -06:00
yarn.lock Upgrade Obsidian; Modify MathJax in onload; Fix preamble loading 2022-02-06 17:57:53 -06:00

Obsidian Extended MathJax

This plugin extends the MathJax support in Obsidian with a MathJax preamble file which is loaded at startup. It also enables some additional MathJax extensions (notably mhchem and bussproofs).

The preamble is stored in a preamble.sty file in the root of the vault.

Installation

  1. Install 'Extended MathJax' from the Obsidian community plugin browser or by navigating to this link: obsidian://show-plugin?id=obsidian-latex.
  2. Create a preamble.sty file in the root of your vault using your choice of text editor.
  3. Add your macros to preamble.sty

Changing your preamble

If you make changes to your preamble you will need to run the command "Reload app without saving". This will reload all your Obsidian plugins and your preamble.

Help, my preamble is not read!

There are two common reasons why your preamble is not read:

  1. preamble.sty needs to be present before running "Reload app without saving". If it is not present on startup, the plugin will disable itself and you need to manually enable it again.
  2. Make sure the preamble is indeed named preamble.sty (with the correct file extension .sty).
    • Within Obsidian, check that the preamble matches the top row and not the bottom row: image
    • Check that your file browser does not hide file extensions (e.g. default behaviour in Windows' File Explorer).

Example

Look at examples/stlc for an example of an obsidian vault using a preamble to define custom macros.