Live data from Hacker News

I hate LaTeX, I love LaTeX

commutative.xyz

231–240 of 245 posts

Re: I hate LaTeX, I love LaTeX

#231
Hey all, the giant code block in the article is quite intimidating to read, so I figured I'd post another example here for something developers might be more familiar. See below for FizzBuzz in plain TeX:

   % Save to fizzbuzz.tex and compile with pdftex, not pdflatex
   
   \def\modulo#1#2{(#1-(#1/#2)*#2)}    % a mod n = a-(a/n)*n   where / is integer division

   \newcount\X
   \X=1
   \loop
       \ifnum \numexpr\modulo{\X}{15} = 0
           FizzBuzz
       \else
           \ifnum \numexpr\modulo{\X}{3} = 0
               Fizz
           \else
               \ifnum \numexpr\modulo{\X}{5} = 0
                   Buzz
               \else
                   \the\X
               \fi
           \fi
       \fi
       \endgraf
       \advance \X by 1
       \unless \ifnum \X>100
       \repeat
   \bye

Re: I hate LaTeX, I love LaTeX

#232

I despise LaTeX for two reasons: It's offensively inelegant, and there's no such thing as "LaTeX". The offensively inelegant point is purely a matter of taste so I won't belabor it. The second point means that every author writes their document with their own particular suite of LaTeX add-ons, and if you don't have all of them you have no hope of compiling the document. There's Joe's LaTeX and Sally's LaTeX and Jenni…

There's no such thing as Python because other people write code that imports dependencies.

Re: I hate LaTeX, I love LaTeX

#233

Earlier quoted context omitted.

Another poster just finished saying images and tables are hard. Why the disconnect do you think?

Basic LaTeX is easy; ramping up has a significant learning curve, but once that mount has been scaled, things level off quickly. Doing tables in straight LaTeX is miserable — CTAN, however, is filled with fantastic packages that make them easy. XeLaTeX makes inserting images pretty easy without packages. I will say that what may cause difficulty with images for people new to LaTeX are floats — tables, images, and the…

What's an example of a good tables package? Thanks

Re: I hate LaTeX, I love LaTeX

#234

Earlier quoted context omitted.

> It has superb output quality but the programming is awful TeXmacs ( http://www.texmacs.org/ ) has better output quality and nicer programming (it is Scheme :-) ) and it is easier to use.

In which sense “better output quality”?

Various senses that concur. It has, in addition to the line-breaking algorithm, a global page-breaking algorithm ... and for the rest may I suggest reading (it's brief) section 4.2 of GNU TeXmacs, A free, structured, wysiwyg and technical text editor, J. Van der Hoeven, Cahiers GUTenberg, no. 39-40 (2001), pp. 39-50, that you can find at the official website of the journal at http://www.numdam.org/article/CG_2001___39-40_39_0.pdf

And also looking at https://www.jonmsterling.com/papers/sterling:2022:wg6.pdf, I find it beautiful ... but perhaps there are better judges.

Re: I hate LaTeX, I love LaTeX

#235

I despise LaTeX for two reasons: It's offensively inelegant, and there's no such thing as "LaTeX". The offensively inelegant point is purely a matter of taste so I won't belabor it. The second point means that every author writes their document with their own particular suite of LaTeX add-ons, and if you don't have all of them you have no hope of compiling the document. There's Joe's LaTeX and Sally's LaTeX and Jenni…

There's no such thing as Python because other people write code that imports dependencies.

The pain of deploying Python applications is a leading complaint about the language, so maybe you could pick a better example :).

Re: I hate LaTeX, I love LaTeX

#236

Earlier quoted context omitted.

No, its definitely relevant. Hands were not designed with any specific function in mind. There was not evolutionary pressure to "throw rocks at the eye of a mammoth" Did orangutans evolve hands to throw rocks at mammoths? No, they did not The parent comment is making ridiculous claims without evidence https://www.worldatlas.com/articles/what-do-orangutans-eat.h...

I think you're assigning too much weight to the word itself. In informal settings, or even quasi-formal ones, it's not uncommon to use "designed" when we don't mean "literally designed".

The use of "design" in the context of the structure and capability of human bodies means precisely "literally designed" to many religious people, including many readers of HN.

So I don't think it's out of place for the GP to address this.

Re: I hate LaTeX, I love LaTeX

#237

Earlier quoted context omitted.

Basic LaTeX is easy; ramping up has a significant learning curve, but once that mount has been scaled, things level off quickly. Doing tables in straight LaTeX is miserable — CTAN, however, is filled with fantastic packages that make them easy. XeLaTeX makes inserting images pretty easy without packages. I will say that what may cause difficulty with images for people new to LaTeX are floats — tables, images, and the…

What's an example of a good tables package? Thanks

Calctab is interesting — https://ctan.math.illinois.edu/macros/latex/contrib/calctab/...

It's not what it's designed for, but Eledmac has some interesting tabular features — https://ctan.math.washington.edu/tex-archive/macros/latex/co...

There's a good list here — https://tex.stackexchange.com/questions/12672/which-tabular-...

Also, with some care, the tabular environment can be made to work very well. Example —

% In the preamble:

\def\qfont{\usefont{T1}{AlegreyaSans-LF}{m}{}} % only here as used in example document

% In the body:

{\footnotesize

\begin{center}

\begin{tabular}[pos]{| >{\qfont}c | >{\qfont}c | >{\qfont}c || >{\qfont}c |}

\hline

{\textbf{YEAR}} & {\textbf{PLATE OFFERINGS}} & {\textbf{ENVELOPES}} & {\textbf{TOTAL}} \\ \hline

1915 & 1,904.86 & 4,587.50 & 6,492.36 \\ \hline

1916 & 2,165.21 & 5,091.24 & 7,256.45 \\ \hline

1917 & 2,259.34 & 5,441.92 & 7,701.35 \\ \hline

1918 & 2,325.87 & 6,877.40 & 9,203.27 \\ \hline

1919 & 2,848.31 & 8,842.37 & 11,690.68 \\ \hline

1920 & 3,188.90 & 10,785.15 & 13,974.05 \\ \hline

1921 & 3,404.60 & 11,069.74 & 14,474.42 \\ \hline

\end{tabular}

\end{center}

}

Re: I hate LaTeX, I love LaTeX

#238

Earlier quoted context omitted.

I think you're assigning too much weight to the word itself. In informal settings, or even quasi-formal ones, it's not uncommon to use "designed" when we don't mean "literally designed".

The use of "design" in the context of the structure and capability of human bodies means precisely "literally designed" to many religious people, including many readers of HN. So I don't think it's out of place for the GP to address this.

Thank you. This was exactly the point of my comment. While some readers interpret the word lightly, there are many who use it literally in the context of biology with a reference to creationism. There is no evidence for creationism

Re: I hate LaTeX, I love LaTeX

#239
post #58

Try TeXmacs, it's neither TeX nor it's Emacs clone. TeXmacs is WYSIWYG scientific editing platform. Documents created can be saved in TeXmacs, Xml, Scheme, PDF or Postscript. Converters exist for TeX/LaTeX and HTML/MathML. It can also be used as a graphical front-end for other computer algebra, numerical analysis, statistics software[1]. [1] https://www.texmacs.org/tmweb/home/welcome.en.html

Any published papers that use this?

I recently published a paper [1] that I wrote using TeXmacs and then converted to LaTeX before publishing it on arXiv. The conversion was not completely seamless: it took me around 2 hours to tweak it to my liking. However, I feel that I would not have been able to finish the paper without TeXmacs. Honestly, 2 hours was a fair trade-off. Probably I would have spent a similar amount of time aligning equations by hand once I was done with writing. Texmacs -> LaTeX conversion actually made that part more streamlined.

[1] https://arxiv.org/abs/2205.09851

Re: I hate LaTeX, I love LaTeX

#240

Try TeXmacs, it's neither TeX nor it's Emacs clone. TeXmacs is WYSIWYG scientific editing platform. Documents created can be saved in TeXmacs, Xml, Scheme, PDF or Postscript. Converters exist for TeX/LaTeX and HTML/MathML. It can also be used as a graphical front-end for other computer algebra, numerical analysis, statistics software[1]. [1] https://www.texmacs.org/tmweb/home/welcome.en.html

I recently converted myself to using TeXmacs. I did it because I was constantly getting lost in the minutiae of proofs of a large paper I was working on [1]

The WYSIWYG aspect of TeXmacs was crucial for me because I was able to "think about math" while working on the PC. When doing things in LaTeX I always found myself thinking on paper and then writing down in TeX.

I personally believe that "thinking on paper" is still better for me at the starting stage of mathematical research. However, once the outline of the proof was clear and I needed to clean up details and to write technical proofs then working directly on the PC helped a lot

Another fantastic feature of TeXmacs is the "preview on hover" package. If you have a reference to an equation and you put your mouse over it, TeXmacs can show you the equation in a popup. This was very important when I was going over the draft once I have written the proofs and when checking for correctness. I have hundreds of numbered equations and checking that I was citing the correct bound in a proof of a lemma was made much easier by this feature. Before passing to TeXmacs I tried to find way to do this efficiently using LaTeX. Intrestingly enough very few PDF's have a "breadcrumbs" feature for you to be able to jump to a reference and then go "back" to your previous position in the paper. The closest I came was Emacs+Auctex+preview. Since Emacs is scriptable and already has the notion of "mark ring" that is essentially the "breadcrumb" feature, that helped a lot.

TeXmacs also has some shortcomings. While it is written in Scheme, I found discoverability and documentation lacking. However, there is a very friendly community of people that are very active on the forum. Any question I had about how to do something was usually answered in at most a day. This is actually great because the "basics" that one needs to work immediately are actually well documented. The things that are hidden are more advanced features. For example, there is math folding [2] that I accidentally discovered browsing the menus and then figured/asked on the forums. I had to ask about how to remove sub-sub-sections from the TOC [3] but, to be fair, even in LaTeX you cannot figure it out unless you know the macro.

The thing that I miss most from Emacs is the "self-documenting" nature of all the Lisp (Scheme in the case of TeXmacs) code and functions and the somewhat quirky search/replace functionality in TeXmacs. Honestly, the regexp search and replace (especially with a visual help package) in emacs was very powerful. But I believe the community is actively working on the former.

[1] https://arxiv.org/abs/2205.09851

[2] http://forum.texmacs.cn/t/folding-computation/551/5

Post reply on HN