TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

The lingua franca of LaTeX

246 点作者 JohnHammersley大约 6 年前

18 条评论

svat大约 6 年前
This is a good article! A couple of corrections to the early history in the introductory paragraphs:<p>• It is indeed true that the first edition of Volumes 1–3 of <i>The Art of Computer Programming</i> and the second edition of Volume 1 (1968, 1969, 1973, 1973) had been done with hot-metal typesetting (pieces of lead, laid out to form the page) with a human doing the typesetting&#x2F;compositing (with a Monotype machine). And that for the second edition of Volume 2 in 1977, the publisher Addison-Wesley was switching to a cheaper alternative. But the cheaper alternative was not electronic; it was <i>phototypesetting</i> (the letterforms made with light and lenses instead of metal). It was Knuth who noticed a book that <i>had</i> been electronically typeset (Patrick Winston&#x27;s AI book), realized that electronic typesetting machines actually had enough resolution to print like “real books” (unlike typewriters or printers of the time), and decided to solve his problem for himself (as he felt that he could make shapes with 0s and 1s).<p>• The summer of 1977, Knuth spent in China, thinking he&#x27;d specified his program in enough detail and his two students would be able to complete the program by the time he came back. He came back and saw they had only implemented a small subset, and decided to spend his sabbatical year writing the program himself. He mentions that as he started writing it he realized the students&#x27; proto-TeX was an impressive effort, because there was a lot missing from his specifications. Knuth&#x27;s article <i>The Errors of TeX</i> (reprinted in his collection <i>Literate Programming</i>) goes into excellent detail on the development process.<p>Also: a suggestion to try plain TeX (instead of LaTeX), if you haven&#x27;t tried it. The book <i>A Beginner&#x27;s Book of TeX</i> by Seroul and Levy is especially good. It might surprise you.
评论 #20007798 未加载
评论 #20008720 未加载
评论 #20007470 未加载
评论 #20008330 未加载
jedberg将近 6 年前
I used LaTex in college, to typeset all my essays. I also used it in my creative writing class, and people were amazed that I was able to add line numbers to my work so we could easily discuss it by referring to line numbers! I&#x27;m pretty sure I got better grades in all my writing based classes based solely on the fact that I used LaTex to typeset my work.<p>The last time I wrote a resume[0] I used LaTex to do it too, and I provide the LaTex source[1] on my website. I&#x27;ve seen bits of it show up in other people&#x27;s resumes, which is exactly what I want to happen! But what was funny was how often people would say &quot;boy this looks so clean and professional!&quot;. Pretty sure I got some interviews just because of how &quot;pretty&quot; my resume was.<p>[0] <a href="https:&#x2F;&#x2F;www.jedberg.net&#x2F;Jeremy_Edberg_Resume.pdf" rel="nofollow">https:&#x2F;&#x2F;www.jedberg.net&#x2F;Jeremy_Edberg_Resume.pdf</a><p>[1] <a href="https:&#x2F;&#x2F;www.jedberg.net&#x2F;Jeremy_Edberg_Resume.tex" rel="nofollow">https:&#x2F;&#x2F;www.jedberg.net&#x2F;Jeremy_Edberg_Resume.tex</a>
评论 #20009472 未加载
ggm大约 6 年前
As a t&#x2F;roff and eqn and tbl user I never found the story compelling. The uplift cost to latex in 1982 was north of my painpoint and in 1990 I managed to do things in tbl and eqn I never imagined possible. Tex font fascism was also a bummer. A phototypesetting expert I knew preferred the actual type to digital type, the microfilm typeset stuff was amazing (I saw galley proofs in bromide and they were crisp and clean)<p>I think I &quot;get&quot; it better now. It&#x27;s just at that time there was another school of more pragmatic engineering aligned thought in Unix using Dec10 RUNOFF derived concepts which morphd into t&#x2F;roff and stuck there.<p>Maybe it&#x27;s like Emacs and vi? Dec 10 SOS editor was like ed which led to ex and vi. If you walked into the TECO door you went lisp and Emacs.<p>To launch into Tex and latex you needed a professor leading you there rather than an engineer doing nroff and t&#x2F;roff
评论 #20008010 未加载
评论 #20008212 未加载
btrettel大约 6 年前
Random LaTeX question: Does anyone have any tips for writing LaTeX code to avoid typos or other mistakes? I.e., using the fact that LaTeX is a programming language and not just markup language to catch mistakes?<p>I started adding what basically are assertions to my TeX files. These have caught a fair number of errors. I also periodically run &quot;static analysis&quot; scripts to catch writing and coding errors but these tends to have many false positives in my experience. E.g., chktex and these: <a href="http:&#x2F;&#x2F;matt.might.net&#x2F;articles&#x2F;shell-scripts-for-passive-voice-weasel-words-duplicates&#x2F;" rel="nofollow">http:&#x2F;&#x2F;matt.might.net&#x2F;articles&#x2F;shell-scripts-for-passive-voi...</a><p>But I&#x27;m thinking there may be good coding styles or habits that could prevent errors too. Any ideas?
评论 #20009123 未加载
评论 #20007591 未加载
评论 #20008165 未加载
评论 #20007593 未加载
lyxfan大约 6 年前
Let&#x27;s not forget to show some love for the tool that makes LaTeX usable by mere mortals:<p><a href="https:&#x2F;&#x2F;www.lyx.org&#x2F;" rel="nofollow">https:&#x2F;&#x2F;www.lyx.org&#x2F;</a><p>Lyx is so useful that I am sometimes amazed it is not more popular. All the power of LaTeX with the ease of use of MS Word. And free and opensource. What&#x27;s not to love?
评论 #20008031 未加载
评论 #20009645 未加载
评论 #20008440 未加载
评论 #20008305 未加载
评论 #20008331 未加载
评论 #20008286 未加载
zzo38computer大约 6 年前
I use Plain TeX with .dvi output. One advantage is that it can use the DVI format, which is in many ways much better than PDF for many things. (You can also convert DVI to PDF and to other formats; I wrote a program to convert DVI to PBM (without using PostScript), and use that to print out the documents (through foo2zjs, which converts the PBM into the format needed by the printer).)
评论 #20007047 未加载
JohnHammersley大约 6 年前
And whilst this is shameless self-promotion, if you want to try out LaTeX without installing it yourself, please check out <a href="https:&#x2F;&#x2F;www.overleaf.com" rel="nofollow">https:&#x2F;&#x2F;www.overleaf.com</a> (I&#x27;m one of the founders)
评论 #20006962 未加载
评论 #20006845 未加载
评论 #20007352 未加载
评论 #20024919 未加载
评论 #20009949 未加载
评论 #20007122 未加载
评论 #20007665 未加载
评论 #20006867 未加载
xorand将近 6 年前
This quote is amusing:<p>&quot;there’s even an open archive maintained by Cornell University where authors of papers in physics, chemistry, and other disciplines can directly submit their LaTeX manuscripts for open viewing.&quot;<p>for two reasons:<p>1) sounds like &#x27;there&#x27;s even a church at Vatican&#x27; seen that arXiv.org is the biggest ever collection of scientific articles submitted by their authors<p>2) and there&#x27;s no chemistry section in arXiv.org, but a half is mathematics and some computer science
ai_ia大约 6 年前
Just a curious question. I love LaTeX. Can we build a programming language for the web which just focusses on the writing and takes care of the styling for Web, Mobile etc. I mean Markdown is already there doing somewhat similar but it still needs to set up properly and styled to use it correctly. Can LaTeX type tool be developed for web where the user writes what he wants to write and generates a static web book or blog post or article confirming to the same style?<p>Apologies if this is stupid question.
评论 #20007347 未加载
评论 #20008587 未加载
评论 #20007797 未加载
jermaink大约 6 年前
Just curious with regard to presentations: Does any known tech corp use beamer for presentations?
评论 #20015659 未加载
segfaultbuserr大约 6 年前
I know there&#x27;s a smaller but vocal group in tech that openly attacks LaTeX, e.g. &quot;LaTeX considered harmful&quot;. While I don&#x27;t completely agree with them, but I think there are some legitimate and genuine criticisms here.<p>Personally, I find LaTeX is great due to its native programmability - it facilitates a natural separation of content and presentation, combined with its markup language, can be very powerful. It also enables extensibility - community packages for almost every single type of content, e.g. organic chemistry, Feynman diagram, even music. A typical user only needs to \usepackage and stop worrying. It&#x27;s CTAN ecosystem is just like a programming language like Perl, or recently, Node.js or Go, which is great.<p>But I find all hell breaks loose when you want to get a slightly different formatting than what&#x27;s offered. Then suddenly the entire system becomes something you need to fight against. Previously, you could be a happy \usepackage code monkey, but now you need to know the system inside-out and hack a path ahead. Just like what happens when you use a software library in a slightly different way than the author expected, then suddenly you find yourself in a battle with the entire library, unfortunately, the same thing occurs in typesetting...<p>For example, with LaTeX you can add footnotes to essentially anywhere with guaranteed aesthetics. UNLESS you want to add a footnote for your title, then it turns out the existing infrastructure in the &quot;article&quot; template doesn&#x27;t allow it at all, and you need to define and redefine and undefine some internal macros in your document to implement it, as I learned from <a href="https:&#x2F;&#x2F;tex.stackexchange.com&#x2F;" rel="nofollow">https:&#x2F;&#x2F;tex.stackexchange.com&#x2F;</a><p>And all the separation of content and presentation and its benefits ends at this point. It&#x27;s no longer &quot;what you think is what you get&quot;.<p>The same issue also occurs when you are trying to make a Beamer slideshow, most &quot;environments&quot; in LaTeX are designed for papers, not a slide. For example, when I want to put some images to the slide, often not fits in a &quot;regular&quot; geometric position, I find I have to keep hacking the width and position of the images and keep compiling until the result is acceptable. I don&#x27;t know if there are better packages for typesetting slideshow, recommendations are welcome.<p>Another problem I&#x27;ve noticed is the phenomenon of confusing and outdated packages. Often there are more than one package for a specific task, some are old and limited but still used in many documents, others are new, the rest are competing implementations. Old ones are frequently mentioned in the old guides, it works for a while until you have a corner case, then it takes a few attempts before moving to the newer packages. Again, just like programming languages. A recent trend in programming is writing new, cleaner implementations for basic tasks, I don&#x27;t know if the same thing is happening in the LaTeX community, if it is, I think it would be great.<p>On the other hand, I&#x27;ve yet to see a word processor which allows users to extend it and automate formatting and typesetting without doing some ugly macros hacked together and written in VBScript. So I see LaTeX as a valuable tool and I&#x27;ll keep using LaTeX in the foreseeable future.<p>The final words, having <a href="https:&#x2F;&#x2F;tex.stackexchange.com&#x2F;" rel="nofollow">https:&#x2F;&#x2F;tex.stackexchange.com&#x2F;</a> is a great contribution to the LaTeX community, just like how <a href="https:&#x2F;&#x2F;stackoverflow.com&#x2F;" rel="nofollow">https:&#x2F;&#x2F;stackoverflow.com&#x2F;</a> helps for programming.
评论 #20007146 未加载
评论 #20007129 未加载
评论 #20009579 未加载
capnrefsmmat大约 6 年前
I&#x27;m a little sad that there still doesn&#x27;t seem to be a &quot;LaTeX for the Web&quot;, a document markup system with similar philosophy as LaTeX but for HTML output. LaTeX is basically only suited for static PDF output, which only survives because there don&#x27;t seem to be tools that do an equally good job generating HTML documents.<p>There are a lot of special-purpose markup languages, like Markdown and AsciiDoc. They involve toolchains written in other languages to convert them to HTML. If you want to add features, you have to hack the toolchain.<p>For blog posts and simple websites, that&#x27;s fine. But sometimes I want to build something nontrivial -- as an academic, the first thing that comes to mind is an academic paper, where I might want to have special markup for theorems, proofs, examples, figures, and tables, and have ways to automatically cross-reference them, generate tables of contents, embed automatically formatted bibliographies, and so on. Or generate figures from code (like TiKZ), or embed data analysis code right in the source and embed the results (via knitr or Sweave).<p>With pandoc, bookdown, and knitr, you can get pretty close to this. But what made LaTeX so powerful is that it is programmable <i>in LaTeX</i>. It can be extended: you can define new types of environments (example problems! homework exercises! every example shows equivalent source code in three different languages! category diagrams generated automatically! musical notation is typeset!), you can make new commands to automate drudgery (typesetting chemical equations! building complicated equations!), and you can do it all with at least some basic separation between content and presentation style. Converting the larger LaTeX documents I&#x27;ve made to Markdown or Org would be basically impossible without writing a bunch of scripts to extend the Markdown renderer and hack everything together. There&#x27;s no equivalent of just writing a LaTeX package.<p>I&#x27;m not aware of another document preparation system that comes close to LaTeX. Org mode is probably the closest, since it has tools to embed code blocks in other languages and include their output, but after a week of fighting with conversions between markup languages I can really see the appeal of LaTeX&#x27;s uniform syntax and built-in programmability.<p>The other promising option seems to be Pollen[0], a Racket-based programmable system. But it seems more like TeX than LaTeX: it provides the very basic tools to build a programmable document system, but not the higher-level conveniences (like cross-referencing commands and standard sectioning and environment commands) you would need to build yourself. Maybe someday...<p>[0] <a href="https:&#x2F;&#x2F;docs.racket-lang.org&#x2F;pollen&#x2F;" rel="nofollow">https:&#x2F;&#x2F;docs.racket-lang.org&#x2F;pollen&#x2F;</a>
评论 #20006983 未加载
评论 #20010192 未加载
评论 #20006980 未加载
评论 #20006949 未加载
chess93将近 6 年前
Note for any college students (especially undergrad): Do your STEM presentations in Beamer to get extra brownie points.
jermaink大约 6 年前
Just curious with regard to presentations: Does any known tech corp use beamer?
Wistar大约 6 年前
Maybe I dreamed it but I could swear that I read that Gödel, Escher, Bach: An Eternal Golden Braid was typeset by Hofstadter in TeX. That, by itself, although fairly amazing, wasn&#x27;t the most noteworthy thing to me but that he had first read—uploaded to his brain—all the docs for TeX before he wrote a single word and let the experience of using it call forth from memory the relevant documentation.
评论 #20007112 未加载
评论 #20009847 未加载
mymythisisthis将近 6 年前
Good tutorial for Latex?
评论 #20009463 未加载
pjmlp大约 6 年前
While I was big into LaTeX during the university, even wrote my thesis with it, using the MikTeX distribution, nowadays I rather use the likes of Word, FrameMaker, DocBook or DITA based tooling.
评论 #20007936 未加载
j-pb大约 6 年前
If we want to get remotely intelligent machines, LaTeX needs to die.<p>It&#x27;s a visual description based on a turing complete language, 95% of semantic meaning is lost once it&#x27;s poured into a TeX document, end the last 5% are gone once it&#x27;s compiled into a mess of pdf text boxes that ignore text flow and just look correct.<p>Literally any other document description language would be a better lingua franca than LaTeX, because a language should be used to communicate, and TeX is meant to print curves.
评论 #20011981 未加载