quartz-research-note/docs/features
Hrishikesh Barman b38d9322b1 feat: add transformations for latex in oxhugofm (#510)
ox-hugo currently supports the following syntax for latex equations:
- https://orgmode.org/manual/LaTeX-fragments.html
- https://ox-hugo.scripter.co/doc/equations

This syntax is supported by mathjax as is mentioned in the ox-hugo documentation.

But quartz uses remark-math which has some issues with the \( \) syntax.
See https://github.com/remarkjs/remark-math/issues/39

This change adds few more transformations to the OxHugoFlavouredMarkdown
plugin, which makes a best effort conversion of this syntax into what
the Quartz Latex transformer plugin supports.

With these changes, the generated files show latex formatting with
default quartz configuration.

Sidenote on `\_` escape by ox-hugo:

ox-hugo escapes, _ using \_, we match against it after we transform
equations into what quartz supports($$ and $).

This could be achieved using lookaround like regex as follows
```js
(?<=(\$|\$\$)[\s\S]*) -> Positive lookbehind for $ or $$
\\_ -> Matches \_
(?=[\s\S]*(?:\1)) Positive lookahead for $ or $$ if matched
const escapedUnderscoreRegex = new RegExp(/(?<=(\$|\$\$)[\s\S]*)\\_(?=[\s\S]*(?:\1))/, "g")
````

But since lookahead/behind can slow things down on large files, we just
look up all equations with $ and $$ delimiters and then try replacing \_
2023-09-29 11:35:26 -07:00
..
backlinks.md Fix #403 by moving documentation to separate directory to avoid merge conflicts (#405) 2023-08-23 12:09:04 -07:00
breadcrumbs.md docs: fix typo in breadcrumbs documentation (#513) 2023-09-29 08:19:10 -07:00
callouts.md Fix #403 by moving documentation to separate directory to avoid merge conflicts (#405) 2023-08-23 12:09:04 -07:00
darkmode.md Fix #403 by moving documentation to separate directory to avoid merge conflicts (#405) 2023-08-23 12:09:04 -07:00
explorer.md fix(explorer): default sortFn implementation (#511) 2023-09-28 08:39:44 -07:00
folder and tag listings.md Fix #403 by moving documentation to separate directory to avoid merge conflicts (#405) 2023-08-23 12:09:04 -07:00
full-text search.md docs: update full-text-search.md (#447) 2023-09-03 22:36:30 -07:00
graph view.md Fix #403 by moving documentation to separate directory to avoid merge conflicts (#405) 2023-08-23 12:09:04 -07:00
index.md Fix #403 by moving documentation to separate directory to avoid merge conflicts (#405) 2023-08-23 12:09:04 -07:00
Latex.md Fix #403 by moving documentation to separate directory to avoid merge conflicts (#405) 2023-08-23 12:09:04 -07:00
Mermaid diagrams.md Fix #403 by moving documentation to separate directory to avoid merge conflicts (#405) 2023-08-23 12:09:04 -07:00
Obsidian compatibility.md Fix #403 by moving documentation to separate directory to avoid merge conflicts (#405) 2023-08-23 12:09:04 -07:00
OxHugo compatibility.md feat: add transformations for latex in oxhugofm (#510) 2023-09-29 11:35:26 -07:00
popover previews.md Fix #403 by moving documentation to separate directory to avoid merge conflicts (#405) 2023-08-23 12:09:04 -07:00
private pages.md typo (it's draft, not drafts) (#456) 2023-09-07 08:13:41 -07:00
recent notes.md Fix #403 by moving documentation to separate directory to avoid merge conflicts (#405) 2023-08-23 12:09:04 -07:00
RSS Feed.md feat: rich html rss (closes #460) 2023-09-12 21:44:03 -07:00
SPA Routing.md Fix #403 by moving documentation to separate directory to avoid merge conflicts (#405) 2023-08-23 12:09:04 -07:00
syntax highlighting.md Fix #403 by moving documentation to separate directory to avoid merge conflicts (#405) 2023-08-23 12:09:04 -07:00
table of contents.md docs: document enableToc 2023-09-20 11:58:52 -07:00
upcoming features.md feat: 404 page emitter 2023-09-06 21:02:21 -07:00
wikilinks.md feat: note transclusion (#475) 2023-09-13 11:28:53 -07:00