Skip to content

KaTeX and SsKaTeX: Usage notes and comparison - #493

Merged
gettalong merged 1 commit into
gettalong:masterfrom
ccorn:katex-xdoc
Feb 4, 2018
Merged

gettalong merged 1 commit into
gettalong:masterfrom
ccorn:katex-xdoc

Conversation

@ccorn

@ccorn ccorn commented Feb 4, 2018

Copy link
Copy Markdown
Contributor

As promised, some usage notes and guidelines on where and whether to use KaTeX or SsKaTeX.

@gettalong
gettalong merged commit 4121c3c into gettalong:master Feb 4, 2018
@gettalong gettalong self-assigned this Feb 4, 2018
@gettalong

Copy link
Copy Markdown
Owner

Thanks - I have merged your changes!

@ccorn
ccorn deleted the katex-xdoc branch February 4, 2018 15:39
Requirements for running kramdown with math engine KaTeX:

- Ruby gem [`katex`][katex-gem],
- Ruby gem [`execjs`][ExecJS],

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.

This is a runtime_dependency of the gem so there is no need to install it separately:
https://github.com/glebm/katex-ruby/blob/e432853a5ae1122e8dc8ce96147bded41494baef/katex.gemspec#L25

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

That's just saying that the requirement usually gets fulfilled by dependency resolvers, but it's still a requirement. And it informs about what will (have to) be found in a functioning installation.

- Ruby gem [`katex`][katex-gem],
- Ruby gem [`execjs`][ExecJS],
- A Javascript engine supported by ExecJS, e.g. via one of
- Ruby gem [`therubyracer`][therubyracer],

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.

therubyracer is not a good choice for a runtime, mini_racer is better in every way.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Those are just examples of what is supported by ExecJS. I have chosen therubyracer mostly because of the naming similarity to therubyrhino which is suitable for Jruby.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Besides, ExecJS has a different view. Its autodetection prefers RubyRacer over MiniRacer, trying RubyRhino and Duktape in between. I do not suppose that that is an argument by itself; my actual point is that one should not interpret too much into that list of examples, because there is no way to satisfy all tastes anyway.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants