TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

TeXMe Self-rendering Markdown and LaTeX documents

77 pointsby harporoederover 4 years ago

6 comments

sxpover 4 years ago
Another similar script is <a href="http:&#x2F;&#x2F;casual-effects.com&#x2F;markdeep&#x2F;" rel="nofollow">http:&#x2F;&#x2F;casual-effects.com&#x2F;markdeep&#x2F;</a> which has a pretty wide set of features for ASCII art. With some slight tweaking, it can be used to embed markdown inside normal HTML+JS docs so I&#x27;ve been using it for some of my personal notes.
评论 #24531733 未加载
rahimialiover 4 years ago
What a great idea. This lets me skip the md-&gt;html conversion step. Which means I can edit equations interactively by just cmd-R&#x27;ing in the browser, and share md files with people without telling them what tool to use to render.
Cyykratahkover 4 years ago
This script could be automatically injected before .md files using the nginx directive add_before_body. An instant static site of markdown files with no preprocessing step.<p><pre><code> location ~* &#x2F;markdown&#x2F;.*\.md$ { add_before_body &quot;&#x2F;markdown&#x2F;header.html&quot;; types {} default_type text&#x2F;html; } </code></pre> And a little bit of CSS to keep the line breaks if the JS is disabled:<p><pre><code> &lt;!DOCTYPE html&gt;&lt;script src=&quot;https:&#x2F;&#x2F;cdn.jsdelivr.net&#x2F;npm&#x2F;texme@0.7.0&quot;&gt;&lt;&#x2F;script&gt; &lt;style&gt;body &gt; main { white-space: normal; }&lt;&#x2F;style&gt; &lt;body style=&quot;white-space: pre-line;&quot;&gt;</code></pre>
fspeechover 4 years ago
A lot of these scripts that focus on rendering just wrap around mathjax&#x2F;katex and md processors that do the actual heavy lifting. To me the real innovation needed to advance math authoring lies in processing cross references. Browser tech has yet to be fully utilized to present arguments in a manner that best facilitates reading instead of the linear fashion that comes from the constraint of printed documents. To be sure there are some work done in this direction in online open textbooks, but the tools and formats are too heavy for wide adoption.
评论 #24531008 未加载
bachmeierover 4 years ago
I really liked this because it&#x27;s easy to save that line as a snippet in your text editor. It&#x27;s a process of creating a new html file, inserting the snippet, and typing away.<p>Unfortunately, my usage came to a quick end when I discovered dollar signs in code are treated as math. It would have to switch from the Commonmark library to something like markdown-it that has a full set of features.
评论 #24598251 未加载
pcarbonnover 4 years ago
Does it support linking to another file in the same directory ?
评论 #24532370 未加载