An important difference between Markdeep and TeXMe is that in Markdeep, the Markdown + LaTeX code goes in the <body> element itself.
But in TeXMe, the Markdown + LaTeX code goes in a <textarea> element. This difference, in my opinion, leads to more robust parsing of the input. TeXMe handles some cases fine where Markdeep breaks. For example, this Markdown code breaks in Markdeep:
Here is a fenced code block that breaks in Markdeep:
```
print("unusual <string")
```
<!-- Markdeep: --><style class="fallback">body{visibility:hidden;white-space:pre;font-family:monospace}</style>
<script src="markdeep.min.js"></script>
<script src="https://casual-effects.com/markdeep/latest/markdeep.min.js"></script>
<script>window.alreadyProcessedMarkdeep||(document.body.style.visibility="visible")</script>
The `<string` in the above code is interpreted as the opening of an HTML start tag by the browser. So what looks like a fragment of Python code to a human ends up being parsed as an HTML tag by the browser that looks like:
Once the browser has mangled the input like this, there is no way for Markdeep to retrieve the original input entered by the user.
Markdeep's answer to this problem is to use HTML entity `>` instead of `<`. But that disrupts the natural flow of taking notes in a text file where we might want to paste verbatim code.
TeXMe's answer to this problem is to put the input inside a <textarea> element. So the same example works fine in TeXMe and MdMe:
<script src="https://cdn.jsdelivr.net/npm/texme"></script><textarea>
Here is a fenced code block that breaks in Markdeep:
```
print("unusual <string")
```
The user input is within <textarea> element, so the entire input can be retrieved verbatim and rendered correctly. This is precisely the reason why I wrote TeXMe. I was writing a lot of documents related to neural networks and I needed to paste code examples without having to bother about substituting special characters with their HTML entities.
The other minor difference I see is that Markdeep does not conform to CommonMark. It has several restrictions. For example, Markdeep does not support indented code blocks, two trailling spaces for hard linebreak, intra-word emphasis with asterisk, setext headings with one/two minus/equals characters as underline, and single line blockquote. TeXMe is not opinionated about CommonMark. It just hides math content, invokes commonmark.js to render CommonMark, then unhides math, and invokes MathJax to render math. MdMe is even simpler--it just invokes the commonmark.js processor on load. For example, the following code, although valid Markdown (CommonMark), does not do what we normally expect:
H1
==
Intra*word* emphasis.
> What I cannot create, I do not understand. -- Richard P. Feynman
print("hello")
Line
break
<!-- Markdeep: --><style class="fallback">body{visibility:hidden;white-space:pre;font-family:monospace}</style>
<script src="markdeep.min.js"></script>
<script src="https://casual-effects.com/markdeep/latest/markdeep.min.js"></script>
<script>window.alreadyProcessedMarkdeep||(document.body.style.visibility="visible")</script>
It works fine with TeXMe or MdMe:
<script src="https://cdn.jsdelivr.net/npm/texme"></script><textarea>
H1
==
Intra*word* emphasis.
> What I cannot create, I do not understand. -- Richard P. Feynman
print("hello")
Line
break
TeXMe or MdMe is a good choice if you care about conformance to CommonMark and pasting code verbatim in your files but do not need the additional features that Markdeep provides. Markdeep has a very impressive feature set that includes task lists, definition lists, tables, diagrams, syntax highlighting, etc. This makes writing many different types of documents possible in Markdeep.
TeXMe and MdMe, on the other hand, take a minimalist approach and focus only on getting the CommonMark and LaTeX (MathJax) rendering right by keeping CommonMark.js and MathJax out of each other's way.
By the way, to use MdMe instead of TeXMe, just replace "texme" in the CDN URL with "mdme".
TeXMe and MdMe (stripped down fork of TeXMe) now support Markdeep style of putting the content directly in the <body> element (i.e., without a <textarea> element) and then putting the <script> tag to load TeXMe/MdMe at the end of content.
But this method has the same caveats that Markdeep has, i.e., an HTML syntax error in the content can lead to broken rendering. Therefore, I recommend using TeXMe's original method of putting the content in textarea for more robust parsing and rendering.
* https://github.com/susam/texme#content-in-body (The new method of writing content in body that makes the content look neat but has some caveats. See the "Caveats" subsection in this section for details.)
But in TeXMe, the Markdown + LaTeX code goes in a <textarea> element. This difference, in my opinion, leads to more robust parsing of the input. TeXMe handles some cases fine where Markdeep breaks. For example, this Markdown code breaks in Markdeep:
The `<string` in the above code is interpreted as the opening of an HTML start tag by the browser. So what looks like a fragment of Python code to a human ends up being parsed as an HTML tag by the browser that looks like: Once the browser has mangled the input like this, there is no way for Markdeep to retrieve the original input entered by the user.Markdeep's answer to this problem is to use HTML entity `>` instead of `<`. But that disrupts the natural flow of taking notes in a text file where we might want to paste verbatim code.
TeXMe's answer to this problem is to put the input inside a <textarea> element. So the same example works fine in TeXMe and MdMe:
The user input is within <textarea> element, so the entire input can be retrieved verbatim and rendered correctly. This is precisely the reason why I wrote TeXMe. I was writing a lot of documents related to neural networks and I needed to paste code examples without having to bother about substituting special characters with their HTML entities.The other minor difference I see is that Markdeep does not conform to CommonMark. It has several restrictions. For example, Markdeep does not support indented code blocks, two trailling spaces for hard linebreak, intra-word emphasis with asterisk, setext headings with one/two minus/equals characters as underline, and single line blockquote. TeXMe is not opinionated about CommonMark. It just hides math content, invokes commonmark.js to render CommonMark, then unhides math, and invokes MathJax to render math. MdMe is even simpler--it just invokes the commonmark.js processor on load. For example, the following code, although valid Markdown (CommonMark), does not do what we normally expect:
It works fine with TeXMe or MdMe: TeXMe or MdMe is a good choice if you care about conformance to CommonMark and pasting code verbatim in your files but do not need the additional features that Markdeep provides. Markdeep has a very impressive feature set that includes task lists, definition lists, tables, diagrams, syntax highlighting, etc. This makes writing many different types of documents possible in Markdeep.TeXMe and MdMe, on the other hand, take a minimalist approach and focus only on getting the CommonMark and LaTeX (MathJax) rendering right by keeping CommonMark.js and MathJax out of each other's way.
By the way, to use MdMe instead of TeXMe, just replace "texme" in the CDN URL with "mdme".