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.

HTML as TeX replacement

35 pointsby epeusover 9 years ago

19 comments

dozzieover 9 years ago
&gt; [...] HTML doesn&#x27;t give as much typographic control as TEΧ, but when you compare to the full web suite, including CSS and SVG, that conclusion can&#x27;t be sustained<p>And the very formula that was a proof that HTML+CSS+SVG is enough shows that it <i>is not</i> enough. In my browser it looks terrible, subscripts and superscripts are mixed, font is uneven, and what not. The formula is simply unreadable, in the sense that I can&#x27;t decipher it, not merely it&#x27;s awful to look at.<p>Moving out of TeX ground to HTML+stuff, you instantly give up plenty of goods that were implemented in TeX well (kerning and hyphenation among the others), you give up consistency of behaviour (font rendering), and in exchange you get source code that looks obnoxious compared to pure TeX or LaTeX.
评论 #10525804 未加载
评论 #10525099 未加载
verandaguyover 9 years ago
<p><pre><code> His first example is eiπ = −1. Note how that was displayed fine inline, just by using &lt;sup&gt;, which has been in HTML for years, along with &lt;sub&gt; which I used to show the TEΧ e. Writing in utf8 means I don’t need a special sequence like \pi for π. </code></pre> ... So all that tells me that instead of doing `^{content}` for superscripts I have to use the longer and more painful `&lt;sup&gt;content&lt;&#x2F;sup&gt;`, and that I should always have a Unicode table on hand to copy&#x2F;paste from for special characters that I can&#x27;t write using my EN_US keyboard.<p>There&#x27;s currently no strong case to use HTML (even with full CSS3 and SVG support) as a replacement for LaTeX, mainly because HTML was made for web typesetting - which is normally focused around shorter blocks of text - while LaTeX was made for people who want to be able to typeset and read documents which are tens and sometimes hundreds of pages long. The two domains just have different requirements.
评论 #10525469 未加载
评论 #10526442 未加载
评论 #10526076 未加载
评论 #10526673 未加载
mixedmathover 9 years ago
One aspect Of TeX on the web (via mathJax, say) is that the source is meaningful. I maintain that in the not so distant future, someone is going to write a math-search engine (or at least they should), and the key will be interpreting the latex source behind documents and webpages. I do not think this would be possible if we used mathML or raw svg data.
评论 #10525445 未加载
评论 #10526653 未加载
jbssmover 9 years ago
I don&#x27;t really get the point of this article. The author claims that HTML is ready to replace TeX and then proceeds in presenting us 2 examples, and those two examples look great in TeX and awful in HTML.
cosarara97over 9 years ago
In the SVG Text version of ∫𝝨∇×𝐅∙𝑑𝝨 = ∮∂𝝨 𝐅∙𝑑𝐫, the r is invisible in firefox (at least on my machine). It is visible on chrome.<p><a href="http:&#x2F;&#x2F;i.imgur.com&#x2F;GhrHkbG.png" rel="nofollow">http:&#x2F;&#x2F;i.imgur.com&#x2F;GhrHkbG.png</a>
abritishguyover 9 years ago
No system that attempts to typeset from source in the browser will be able to compete.<p>It can easily take more than a second to compile a laTeX document with a moderate number of formulas. Sure, some of this could be optimised but not _that_ much - the best you can do is either force the user to wait for you to typeset accurately or show some close approximation that will never be on par with TeX.
SeanLukeover 9 years ago
&gt; Also, I took out the spaces around the em-dashes that Lee Phillips oddly put in.<p>Perhaps Kevin Marks isn&#x27;t an American? What he&#x27;s doing is restoring a fairly ill-considered British punctuation style.<p>Let&#x27;s go with the Brit theory. While the Bris may rightfully lecture Americans on grammar and other features of English, British punctuation is famously, notoriously atrocious. I like the Louis Menand quote (regarding Lynne Truss): &quot;An Englishwoman lecturing Americans on semicolons is a little like an American lecturing the French on sauces.&quot;<p><a href="http:&#x2F;&#x2F;www.newyorker.com&#x2F;magazine&#x2F;2004&#x2F;06&#x2F;28&#x2F;bad-comma" rel="nofollow">http:&#x2F;&#x2F;www.newyorker.com&#x2F;magazine&#x2F;2004&#x2F;06&#x2F;28&#x2F;bad-comma</a>
评论 #10525660 未加载
peedyover 9 years ago
One case where HTML won&#x27;t work as a TeX replacement is when you have to think in terms on a page. For example, if you&#x27;re making a resume and don&#x27;t want it go over one page, it becomes a tedious process to &quot;change CCS, Print preview, repeat&quot;.
评论 #10525736 未加载
wodenokotoover 9 years ago
While it&#x27;s micro see that html can render a lot of stuff on some devices, I find the comparison to Tex redicoulous.<p>I have yet to meet a Tex document that on the fly can reformat itself to fit anything from a phone to a large desktop screen, let alone link to documents all over the web, handle banking or playing games.<p>Tex is really good at getting your print document to look a special kind of way. Html is really good at getting text formatted to your current device, at the loss of pixel (or mm) precision.<p>And neither format is nice to type your documents in. I guess that&#x27;s the only place they are comparable :)
jwdunneover 9 years ago
Hrm. I write a lot of HTML&#x2F;CSS. I have 0 experience maintaining TeX code. I find the TeX code easier to read and prefer the end result. I&#x27;d learn TeX to translate if I ever needed to maintain the equivalent HTML.<p>I don&#x27;t actually think you can get a consistent result in HTML&#x2F;CSS across all browsers without a lot of effort. For me, the HTML version is missing characters and styling.<p>I think those wanting to see the formulae would be happy enough to wait a second for it to render than be at the whim of browser warts and the loss of information.
pyramationover 9 years ago
When expressing mathematics, you want to focus on the formulae and underlying principles, not styling and layout. TeX provides a design spec inherently to standardize and provide consistent published mathematical content.<p>HTML abstracts layout less, and TeX gives you more mathematical creative expression.<p>I personally like using HTML5 as a rendering engine, and TeX as the &quot;design&quot; spec. I built LaTeX2HTML5.com a while back for this purpose, so I could build all of diagrams and mathematics in TeX, but publish to both HTML5 and paper.
tha_melonballerover 9 years ago
Should be more like TeX as an HTML replacement.
评论 #10525313 未加载
mangecoeurover 9 years ago
I feel in truth it&#x27;s not quite there, but on the other hand it&#x27;s still worth pursuing just to escape the insanity that is Tex and it&#x27;s patchwork of packages to support everything from things-that-should be core (multi column) to oh-god-why-would-you-do-ath (drawing diagrams).
dredmorbiusover 9 years ago
What my experiments with various content creation and markup systems over the past 30 years have shown me is that it&#x27;s far less details of <i>presentation</i> which are crucial, but in <i>enforcing document structure itself</i>.<p>Presentation changes with technology -- I&#x27;ve seen <i>and used</i> systems with toggle-and-light outputs, true ttys (paper), glass ttys, various terminal and console outputs, the &quot;standard&quot; 24x80 terminal, desktop GUIs, and now handheld and mobile GUI devices with sizes from wristwatch to ledger. Other displays may be as large as a city block.<p>And that&#x27;s just <i>viewable</i> output. TTS (text to speech) and voice recognition are also increasingly present.<p>The same <i>presentation</i> systems don&#x27;t work across these. But <i>well-encoded semantic content</i> is amazingly robust. I remember learning of the &#x27;-man -Tps&#x27; (I think) nroff&#x2F;groff argument -- that is, apply manpage macros, and format for postscript output. The same manual page markup that is readable in a console suddenly becomes pretty-printed (and created a brief market in the late 1990s &#x2F; early 2000s for &quot;Linux Bible&quot; manpage dump books). Groff has more tricks up its sleeve, and as the Debian dwww package shows, manpages can be converted directly to viewable HTML.<p>But groff is grotty. I knew it (or precursors) once, well enough to turn in several Uni essays prepared via it. But those neural pathways have long since eroded.<p>I&#x27;d replaced it for quite some time with HTML, a reasonably versatile structured markup system, particularly given that most of what I was writing was intended for online Web publication at some point.<p>In the past few years I finally cracked the Lion book and started using LaTeX. I&#x27;d realised what the blocks were to my earlier attempts (ironically, &quot;easy-to-use&quot; tools such as Lyx actually had gotten in the way), and discovered that it was, as an <i>authoring</i> tool, often far <i>lighter</i> than HTML. Double carriage returns as paragraph breaks replaces seven discrete keystrokes per paragraph. Other constructs are a bit less lightweight, but remain clear.<p>But the real win is in how LaTeX is both a <i>structured</i> and <i>validated</i> document format. Screw up your HTML somehow, or follow some vendor&#x27;s proprietary extensions, and a browser will say &quot;eh, close enough&quot;. Omit a closing brace or backstroke or dollar sign, and your LaTeX compiler will scream at you until it&#x27;s blue in the face. Unsettling the first few times it happens, but you begin to realise it&#x27;s right.<p>The Web is an error condition: <a href="http:&#x2F;&#x2F;deirdre.net&#x2F;programming-sucks-why-i-quit&#x2F;" rel="nofollow">http:&#x2F;&#x2F;deirdre.net&#x2F;programming-sucks-why-i-quit&#x2F;</a><p>But deeper than that, LaTeX offers <i>structure</i>.<p>Documents have titles, and authors, and publication dates. They quite frequently have <i>references</i> and <i>bibliographic citations</i>.<p><i>Text notes -- foot, side, end, whate&#x27;er -- aren&#x27;t some fucking foreign bolted-on concept.</i><p><a href="http:&#x2F;&#x2F;codepen.io&#x2F;dredmorbius&#x2F;details&#x2F;OVmBaZ" rel="nofollow">http:&#x2F;&#x2F;codepen.io&#x2F;dredmorbius&#x2F;details&#x2F;OVmBaZ</a><p>There are other bits and pieces that are missing from both, and LaTeX, not <i>principally</i> oriented to online publication, is short on stuff as well. But then, HTML doesn&#x27;t have a native concept of reputation-ranked, hierarchical, collapsable comment streams either. Despite Usenet&#x27;s prior art staring it gloweringly in the face for 25 years.<p>And yes, LaTeX as a direct authoring environment has its downsides. I&#x27;ve actually taken to preferring Markdown for my intial pass through writing documents, and it&#x27;s a langauge which can readily be front-ended by the GUI-friendly tools most writers will want.<p>And HTML5&#x27;s semantic structures and the valient attempts by some (see Readability&#x27;s Developers section and the hNews microformats specs) <i>are</i> actually pretty cool. But until and unless someone steps in to <i>require</i> validated content before they&#x27;ll pass it (and &quot;someone&quot; tends to be spelled &quot;major search engine&quot;, which is spelled &quot;Google&quot; -- who <i>have</i> actually stepped in to police some standards of online behavior and presentation), we&#x27;re stuck with the fact that crap HTML is still blindly accepted.<p>But if anything, front-ended by Markdown or other simple markup languages, it&#x27;s HTML that should be replaced by TeX.
评论 #10526667 未加载
Avshalomover 9 years ago
Of course if you include SVG we can eventually create TeX quality... because SVG allows us to draw arbitrary images. If we&#x27;re going to be using SVG we don&#x27;t even need HTML and CSS.
mbrockover 9 years ago
I&#x27;ve had pretty good experiences with translating LaTeX into SVG via DVI. The tools for this come with TeXLive and they&#x27;re quite fast.
Kristine1975over 9 years ago
Hyphens and ligatures are not all modern incarnations of TeX can do. pdfTeX for example also supports margin kerning and font expansion.
Mimickover 9 years ago
Hmmm, why not take ideas from HTML&#x2F;CSS and that&#x27;s all for a next version...
jzdover 9 years ago
HELL NO.<p>If you need to, generate HTML et. al. from TeX. But HTML is not a substitute for TeX. Forget it.