Skip to content
This repository was archived by the owner on May 12, 2026. It is now read-only.

Add custom LaTeX delimiters to preferences#1221

Merged
kazup01 merged 4 commits into
BoostIO:masterfrom
Paalon:master
Dec 4, 2017
Merged

Add custom LaTeX delimiters to preferences#1221
kazup01 merged 4 commits into
BoostIO:masterfrom
Paalon:master

Conversation

@Paalon

@Paalon Paalon commented Dec 1, 2017

Copy link
Copy Markdown
Contributor

See #1201. This add optional LaTeX delimiters.
2017-12-02 7 31 54
2017-12-02 7 33 42
However, currently this has a bug that LaTeX preference value seems not to be saved but I cannot understand. I want help to solve.

@kazup01 kazup01 requested a review from sosukesuzuki December 2, 2017 02:08
@kazup01 kazup01 added the awaiting review ❇️ Pull request is awaiting a review. label Dec 2, 2017

@sosukesuzuki sosukesuzuki left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please fix the commented place. 🙏
And, is yarn.lock necessary? Please delete it if you do not need it. 👍

Comment thread browser/lib/markdown.js Outdated

// FIXME We should not depend on global variable.
const katex = window.katex
var config = ConfigManager.get()

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please use const instead of var.
In a modern browser, please use let or const.

@Paalon

Paalon commented Dec 2, 2017

Copy link
Copy Markdown
Contributor Author

The bug was fixed. That was only my mistake of property names.

@sosukesuzuki

Copy link
Copy Markdown
Contributor

Thanks for your fixing! 👍

@Paalon

Paalon commented Dec 2, 2017

Copy link
Copy Markdown
Contributor Author

There are something to note.

  1. The change of delimiters seems not reflected unless restarting.
  2. I set the default delimiters {inline: $, block: $$}, but the current master version's default setting is {inline: $$, block: $$$} because it uses default setting of @rokt33r/markdown-it-math. I don't know what delimiters are most used (e.g. Original LaTeX: {inline: $ and $ or \( and \), block: $$ and $$ or \[ and \] or \begin{something} and \end{somthing}}, KaTeX, Typora, Quiver default: {inline: $, block: $$}, MacDown default: {inline: \( and \), block: $$}, @rokt33r/markdown-it-math's default: {inline: $$, block: $$$}). I like {inline: $, block: $$}, but someone will prefer others.
@Paalon Paalon changed the title Add LaTeX delimiters preferences Dec 2, 2017
@Paalon Paalon changed the title Add LaTeX delimiters Dec 2, 2017
@Paalon Paalon changed the title Add custom LaTeX delimiters Dec 2, 2017
@kazup01 kazup01 merged commit 391bb09 into BoostIO:master Dec 4, 2017
@kazup01 kazup01 added next release (v0.8.19) and removed awaiting review ❇️ Pull request is awaiting a review. labels Dec 6, 2017
@kohei-takata kohei-takata mentioned this pull request Dec 23, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

4 participants