News for hackers. Stuff that matters.
Re:Show HN: TeXMe – Self-Rendering Markdown and LaTeX Documents by wahern on Friday October 26, 2018 @07:49PM (#18313525)
The browser still needs to recognize it as text/html. I use Markdeep (https://casual-effects.com/markdeep/) and to get Chrome to auto-render locally I need to hard link to a name with a .html extension.

Also, it doesn't technically need to be a preamble. Markdeep works by appending similar code to the end, which is much more innocuous when viewing the file outside a browser or when its rendered by other software (e.g. on Github).

Re:Show HN: TeXMe – Self-Rendering Markdown and LaTeX Documents by susam on Saturday October 27, 2018 @06:26AM (#18315160)
> Markdeep works by appending similar code to the end, which is much more innocuous when viewing the file outside a browser or when its rendered by other software (e.g. on Github).

Thank you for highlighting this feature of Markdeep. I have now added this feature in TeXMe and MdMe too. We can now put the `<script>` tag to load TeXMe or MdMe at the end of content. Here is an example:

  # Euler's Identity

  In mathematics, **Euler's identity** is the equality
  $$ e^{i \pi} + 1 = 0. $$

  <script src="https://cdn.jsdelivr.net/npm/texme"></script>
However, like I have explained in another comment[1], this method of writing content requires the content to not have any HTML syntax errors, otherwise the output would be mangled. Markdeep has this limitation too. There is a 'Caveats' section[2] in the README now that discusses this in detail.

The original method of writing content with a single line of HTML code at the beginning of the content does not have this limitation. But if the HTML code in the beginning feels distracting, we can now put the `<script>` tag in the end too.

[1]: https://news.ycombinator.com/item?id=18314175

[2]: https://github.com/susam/texme#caveats

Re:Show HN: TeXMe – Self-Rendering Markdown and LaTeX Documents by susam on Friday October 26, 2018 @11:44PM (#18314241)
> Also, it doesn't technically need to be a preamble.

For the kind of user input (e.g., code pasted verbatim) I was trying to handle, a preamble was technically necessary, at least a `<textarea>` start tag was necessary at the beginning of the document.

For more details about this, please see the comparison of TeXMe vs. Markdeep I have posted here: https://news.ycombinator.com/item?id=18314175