Live data from Hacker News

The Art of LaTeX: Common mistakes and advice for typesetting proofs

fanpu.io

41–50 of 149 posts

Re: The Art of LaTeX: Common mistakes and advice for typesetting proofs

#41
post #27
post #25

Earlier quoted context omitted.

What a great summary! Unfortunately, many discussions of TeX vs alternatives are somewhat thin on details and are instead trading on emotions. As you mentioned in your comment, the choices made by Knuth are far from random. He even made it possible for anyone to change them! Not many people using TeX know that the choice of the backslash as an 'escape' character may be easily changed. Even the necessity of curly brac…

Asciidoc, TexMacs, LyX, reStructuredText, Markdown (admittedly, only ish). None of them have become the standard. But some of the ones above - though excluding Markdown - are a complete replacement. Actually, even Markdown stands a chance if supplemented with enough HTML and CSS. HTML and CSS have practically replaced most non-maths uses of Latex.

The way I see it, this only proves my point. As you write: '...None of them have become the standard...' and this is at the center of the argument. TeX may not be ideal but it strikes the correct balance to become and stay standard for so many years. One can do pretty much anything in bare Postscript (and I am ashamed to admit, I have) or even 'handmade' PDF but it does not make it a good alternative to TeX. I have experimented with alternative syntaxes (apologies it this is not the correct plural of 'syntax') but had to give all of them up due to a number of flaws. These experiments gave me a new appreciation for Knuth's choices.

Re: The Art of LaTeX: Common mistakes and advice for typesetting proofs

#42

I have a question: if what you have to write in order to create your beautiful and aesthetically pleasing proof, and thereby "establish your ethos and character" (presumably as a righteous and good), is an ugly and fragile instance of a poorly designed, inherently unreadable, archaic language that embodies none of the characteristics you are after, can the result really be "a work of art that combines both the precis…

You're crapping on a thing that Knuth and friends made and gave you for free.

Are you about to go write something better?

Re: The Art of LaTeX: Common mistakes and advice for typesetting proofs

#43
post #19
post #9

TeXmacs allows you to typeset beautiful proofs via a WYSIWYG editor without the pain of TeX/LaTeX. Note that its name is doubly misleading since it is not based on TeX nor Emacs. It is however inspired by both. TeXmacs produces documents of similar quality to TeX/LaTeX.

Is there an equivalent of \NewCommand in TexMacs? I can't find anything by Googling.

TeXmacs has its own macro language. The equivalent of \newcommand is \assign together with \macro (yes, TeXmacs has proper first class macros, like any respectable language, e.g. Lisp). And macros arguments can be edited visually, here's an example: https://twitter.com/gnu_texmacs/status/1251554336842407938

Re: The Art of LaTeX: Common mistakes and advice for typesetting proofs

#44
post #24
post #21

Some of the images don't appear to render for me. Also, the author includes an example of \int xyzdx and makes a note of using appropriate spacing. It is my impression that commonly the differential operator is typeset differently, that is: \mathrm{d}x . Otherwise, great tips.

In physics, it's \mathrm dx. In mathematics, it's dx.

In my mathematics is \d x .

Re: The Art of LaTeX: Common mistakes and advice for typesetting proofs

#45
post #21

Some of the images don't appear to render for me. Also, the author includes an example of \int xyzdx and makes a note of using appropriate spacing. It is my impression that commonly the differential operator is typeset differently, that is: \mathrm{d}x . Otherwise, great tips.

It also doesn't mention the spacing after the dx. You need spacing afterwards, but also not unconditionally if the thing afterwards also has a space before (that sounds obvious but I can imagine a macro that has \,\mathrm{d}#1\,).

There is a better way to do this, which is to use LaTeX's built in spacing adjustment, which is different around different types of object (e.g. notice how ab+cd already looks right). To do that, use: \mathop{\mathrm{d}#1}

Even if you carefully do the "right thing", the spacing in LaTeX is by no means perfect. E.g. just look at f(x)g\left(\frac{x}{y}\right) - it looks like g is more associated with f's arguments than its own.

Re: The Art of LaTeX: Common mistakes and advice for typesetting proofs

#46
post #43
post #19

Earlier quoted context omitted.

Is there an equivalent of \NewCommand in TexMacs? I can't find anything by Googling.

TeXmacs has its own macro language. The equivalent of \newcommand is \assign together with \macro (yes, TeXmacs has proper first class macros, like any respectable language, e.g. Lisp). And macros arguments can be edited visually, here's an example: https://twitter.com/gnu_texmacs/status/1251554336842407938

you can check also the manual which comes with the program, in the menu Help->Manuals.

Re: The Art of LaTeX: Common mistakes and advice for typesetting proofs

#47

Most of this is good advice, but I don't see the \mathbbm vs. \mathbb distinction as anything other than subjective taste. Also, I use things like \newcommand{\abs}[1]{\left| #1 \right|} in the preamble. This way, I can use \abs{...} without any asterisks, and it automatically adjusts its size. In the 1% situations where I don't want it to adjust the size, I write the delimiters manually. Making maths look good in La…

Both mathbbm and mathbb are wrong for number sets. These fonts look like the blackboard hack that you use to simulate boldface using chalk. On a computer you don't have this problem and you can simply use mathbf (actual boldface).

Re: The Art of LaTeX: Common mistakes and advice for typesetting proofs

#48
post #41
post #27

Earlier quoted context omitted.

Asciidoc, TexMacs, LyX, reStructuredText, Markdown (admittedly, only ish). None of them have become the standard. But some of the ones above - though excluding Markdown - are a complete replacement. Actually, even Markdown stands a chance if supplemented with enough HTML and CSS. HTML and CSS have practically replaced most non-maths uses of Latex.

The way I see it, this only proves my point. As you write: '...None of them have become the standard...' and this is at the center of the argument. TeX may not be ideal but it strikes the correct balance to become and stay standard for so many years. One can do pretty much anything in bare Postscript (and I am ashamed to admit, I have) or even 'handmade' PDF but it does not make it a good alternative to TeX. I have e…

I disagree. I think Latex will soon become legacy like Cobol.

HTML and CSS basically do a lot more than Latex does - except for maths things - and are far more widely known, and far more forgiving. Also importantly, they support hyperlinks, animations, and inline interactive scripts. It seems that HTML and CSS with the appropriate CSS styles and shorthands (like Markdown) could eat up everything that Latex does and much more. I don't know if Latex can survive the onslaught.

Re: The Art of LaTeX: Common mistakes and advice for typesetting proofs

#49

I have a question: if what you have to write in order to create your beautiful and aesthetically pleasing proof, and thereby "establish your ethos and character" (presumably as a righteous and good), is an ugly and fragile instance of a poorly designed, inherently unreadable, archaic language that embodies none of the characteristics you are after, can the result really be "a work of art that combines both the precis…

LaTeX is robust enough and has a consistent enough interface that with some macros and snippets you can take real-time notes of people giving graduate level math lectures on a blackboard. If LaTeX is ugly, it's in the same sense as APL is "ugly".

Re: The Art of LaTeX: Common mistakes and advice for typesetting proofs

#50

I have a question: if what you have to write in order to create your beautiful and aesthetically pleasing proof, and thereby "establish your ethos and character" (presumably as a righteous and good), is an ugly and fragile instance of a poorly designed, inherently unreadable, archaic language that embodies none of the characteristics you are after, can the result really be "a work of art that combines both the precis…

> RE: ugly and fragile instance of a poorly designed, inherently unreadable, archaic language That's a lot of hate for LaTeX, and some of it is warranted, but you have to think of the results, not the source... It's not the source code that people are in love with, but the result (rendered PDF or via MathJax/KaTeX on the web). The "ugly" markup syntax allows you to produce beautiful, versatile, well designed, readabl…

but the source is the problem. When you work with 100+ latex files and it is so difficult to reuse the code and every variable is in a giant global scope, you would waste so much time just to trying to figuring out how it works.
Post reply on HN