-
Notifications
You must be signed in to change notification settings - Fork 411
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Work with AsciiMath #71
Comments
This is not really a solution but more an alternative. You could use bootmark. It doesn't require you to use
|
Hi, thanks for your suggestion. I tried bootmark this morning. It does not work What I did is like: <title>any tag - document</title> <script src=" https://obedm503.github.io/bootmark/dist/bootmark.bundle.min.js"></script> <script src=" https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=AM_HTMLorMML "></script>The first equation: `E = m c^2`
# First block of Markdown text goes in here
The second equation: `E = sum_i m_i c^2`
# Second block of Markdown text goes in here
Both equations are shown. But the second block of markdown text is gone Best Regards On Thu, Oct 6, 2016 at 3:53 AM, obedm503 [email protected] wrote:
|
as of now, bootmark is intended to work with a single block of markdown, and not different segments with other text in between. The good news is that I'm working on a new version that should fix stuff regarding polyfills, and I could fix your issue in there. I really never thought of that use case (several blocks of markdown instead of one), so thanks for bringing that up. It's a great idea. As for the navigation bar, you can disable that through config on the element with markdown. You simply need to add
to the element with the id of markdown (remember that id's have to be unique), or add
if your using the toc stands for Table Of Contents. Now that the idea came up of having multiple separated chunks of markdown, I might consider changin the requirement from Also, I know that the docs are pretty bad right now, that should also be fixed on the new release. |
So you will become the first to support AsciiMath along with markdown :) I am also thinking about another approach: can we have some markdown then you can figure out a way to use MathJax for further processing. In What do you think ? B.R. On Fri, Oct 7, 2016 at 1:58 AM, obedm503 [email protected] wrote:
|
So you will become the first to support AsciiMath along with markdown :) I am also thinking about another approach: can we have some markdown then you can figure out a way to use MathJax for further processing. In What do you think ? B.R. On Fri, Oct 7, 2016 at 1:58 AM, obedm503 [email protected] wrote:
|
though it would be cool, adding a custom code block language might be overkill. (is it even possible?) You could use normal
I'll look into having a custom code block language |
after digging through MathJax's documentation I couln't find a simple method which would take a string of math and return html. So I looked for alternatives, and the internet gave me KaTeX. It does just what I wanted, and is alot faster than mathjax. so, like you suggested, I created an extension for showdown (the parser used by bootmark) that uses katex to convert "latex code" to pretty math. the syntax works like you suggested it should but instead of
it uses
since the "code" is in latex. For a demo of the extension check this https://obedm503.github.io/katex-latex/ if you still need to use asciimath, it seems there are ways to convert asciimath to latex which would then be converted by the extension but it's not clear how to accomplish that. I'll look into this tho. TL;DR: katex-latex is a showdown extension for latex math in markdown. MathJax is slow, and KaTeX is fast (really fast compared to mathjax) with the tradeoff of latex instead of asciimath. what do you think of the use of |
It is certainly cool to be able to use Latex in Markdown. But it’s still better to use AsciiMath. The idea is to save time of writing (time of parsing is not a big issue here) There is a Latex package called asciimth (https://github.com/judah/asciimath-tex). It is old but it works. It use similar syntax to write math. Is it possible to use this package along with KaTeX? From: obedm503 after digging through MathJax's documentation I couln't find a simple method which would take a string of math and return html. So I looked for alternatives, and the internet gave me KaTeX. It does just what I wanted, and is alot faster than mathjax. so, like you suggested, I created an extension for showdown (the parser used by bootmark) that uses katex to convert "latex code" to pretty math. the syntax works like you suggested it should but instead of it uses some math here since the "code" is in latex. For a demo of the extension check this https://obedm503.github.io/katex-latex/ if you still need to use asciimath, it seems there are ways to convert asciimath to latex which would then be converted by the extension but it's not clear how to accomplish that. I'll look into this tho. TL;DR: katex-latex is a showdown extension for latex math in markdown. MathJax is slow, and KaTeX is fast (really fast compared to mathjax) with the tradeoff of latex instead of asciimath. what do you think of the use of latex instead of math ? — |
turns out it wasn't so complex to add asciimath support. check this for an example https://obedm503.github.io/katex-latex/ and it's source the example builds the webpage from 2 markdown files (README.md and CHANGELOG.md) and some inline markdown (the second It is the finest of bootmark + math examples. Let me know what you think. |
I just tried out.
It’s wonderful!
I will definitely tell my friends about this!
Thanks!!
From: obedm503
Sent: Monday, October 10, 2016 8:14 PM
To: arturadib/strapdown
Cc: TianBo-Timothy ; Author
Subject: Re: [arturadib/strapdown] Work with AsciiMath (#71)
turns out it wasn't so complex to add asciimath support.
check this for an example https://obedm503.github.io/katex-latex/ and it's source
the example builds the webpage from 2 markdown files (README.md and CHANGELOG.md) and some inline markdown (the second <bootmark> element), uses both the <bootmark> element and a div with class="bootmark", uses both latex and asciimath, uses a different code prettify theme than the default.
It is the finest of bootmark + math examples.
Let me know what you think.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or mute the thread.
|
just glad I could help |
Hi, I am in favor of Markdown and AsciiMath. AsciiMath is another javascript that enables something similar to Markdown that allows me to edit formula with text, see http://asciimath.org/. Unfortunately, strapdown and AsciiMath does not work properly together at the moment.
Currently, I can use AsciiMath only outside of <xmp> block, this is not convenient as I also want my text to come with formula.
I am not able to propose a solution. However, I will be grateful if strapdown can solve this issue. So that we can use simple text to write documents with formulas.
The text was updated successfully, but these errors were encountered: