Hacker News new | past | comments | ask | show | jobs | submit login
I hate LaTeX, I love LaTeX (commutative.xyz)
210 points by miguelmurca on May 24, 2022 | hide | past | favorite | 236 comments



I love LaTeX whole-heartedly. I never learned Word in college and wrote all my papers in LaTeX as an undergrad, just using its default styles. I write mathematical papers to myself, despite not being a mathematician. I found a LaTeX package that lays things out in the same style as old TSR D&D modules and I use that to write new dungeons. I wrote a book in markdown and used pandoc to output LaTeX and publish it through Amazon. I write silly scripts for my friends to do table reads from, using a LaTeX package. I write music scores of my composition in lilypond and one of my next projects is to combine it with LaTeX to print out books I can have on my piano.

Ultimately, I think wrestling with LaTeX is kind of like wrestling with programming. Over time, you just have to develop that sense of radar that tells you when you are over-implementing. In programming, it's the choice of whether to write custom or hunt for a library, or at a higher level, the build-vs-buy question. For LaTeX, it's whether to wrestle with custom commands or just search its stack exchange or hunt for a package. It's still easy to go down the wrong rabbit hole - last time it happened to me it was because I got obsessed with wondering if I could create nomographs in LaTeX, but luckily I discovered pynomo instead.


I have never met someone who use Latex who wasn't a mathematician, CS, or older (elderly?) engineer


Which LaTeX package are you using for old school D&D?


https://github.com/slithy/rpg_module - I'm not sure if it's published in CTAN but I've been active in its GitHub issues.


I have a related feeling about TeX. It has superb output quality but the programming is awful. When LuaTeX finally arrived a few years ago, it was possible to do almost everything you have done before in the TeX language (starting with \backslashes) in Lua.

See http://wiki.luatex.org/index.php/TeX_without_TeX for an introduction.

I have (shameless plug) created a database publishing software using this technique (https://github.com/speedata/publisher/). Once in a while I have to use LaTeX and it feels a bit old school to do the macro programming.

My next project is to rewrite the TeX algorithms in Go - see https://github.com/speedata/boxesandglue. Already usable but not TeX like in any way (this is just a library, not a frontend software like TeX)


I feel the same way! I also feel like the LaTeX crap on top of Plain TeX is crap and it fills me with rage when I try to find info about TeX and always get back something assuming LaTeX.

Your stuff looks cool, I will take a look!


> 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.


Take a look at https://sile-typesetter.org/. IIRC it literally reuses some core C libraries from TeX/LaTeX, and glues them together in a different way using Lua, keeping Lua as the only language available. Notably, SILE recently achieved the long overdue milestone of math/equations support (https://sile-typesetter.org/2021/09/sile-0-12-0-is-released). Obviously, open-source.

edit: for some attempt at an explicit discussion of pros & cons & history vs. TeX, see: https://sile-typesetter.org/what-is/#sile-versus-tex


Oh I remember my CS years, when all the professors were raving to me about LaTeX, and I never understood why.

Sure, it might be marginally better than just using Word, although - not that much; and it’s horrible to debug, it’s horrible to actually automate, it’s horrible to actually “separate content from style”…

I thought that maybe something is wrong with me and over time it will “click”… it never did.

But, this article made it click. (but that’s after I already got my degree…)

http://www.danielallington.net/2016/09/the-latex-fetish/

LaTeX is not actually good for writing papers.

It’s good for typesetting. And that’s it. It’s good as a type-setting program, that’s what it is meant to be. It’s definitely not good for separating content from style, or some kind of meta-automation or macros.


It's great for writing papers. I can crack open vim rattle off an essay throw in some \par s and some \cite{sho0ngle} s, and then let all the typesetting, citation management, and whatnot get handled by the compiler.

For STEM classes, the LaTeX defaults are perfect, and I can insert tables and images and such that can be in flux over the course of writing the report, importing then from external scripts that part of my data analysis.

LaTeX only gets hairy when you start trying to fight it. If you want some that looks exactly as you imagine it, you're going to be fighting an uphill battle trying to specify exactly what you want, and constantly re-compiling. If instead, you just care about a clean, consistent, and presentable end product, then LaTeX gets you there with minimal fuss.


> LaTeX only gets hairy when you start trying to fight it. If you want some that looks exactly as you imagine it, you're going to be fighting an uphill battle trying to specify exactly what you want, and constantly re-compiling.

'fighting' as you describe it is the reason why people use latex. They want more fine grained control over the doc.

I work in STEM, every publisher has their own formatting style. My pubs would get rejected if I submitted a default style.

What you're describing is, in essence, using MS Word with defaults. Might as well use Word.


I work in (non-CS) STEM, and not fighting Word is a big reason that I use LaTeX. I find it really distracting how word automatically reflows text while writing, references are always a pain, and it’s a hassle to update figures after re-running analysis scripts. With TeX none of those things are painful

Collaborative writing is often a bit difficult, especially with bigger groups not comfortable with overleaf. But Word is not great in that setting either, it usually ends in a zillion emailed versions. (365 doesn’t seem to have feature parity, and usually doesn’t cut it. Track changes doesn’t work the same way, it’s a mess)


Why do you use \par?


An article about how word processors are superior to LaTeX by someone who has never written anything with LaTeX, not even finished a single paper.

It's like writing an article about how walking is much faster than cycling, because 'I tried cycling once and fell over, so clearly all those fetishists are wrong, the suckers'.


I learned about Latex in physics 2 in college and started taking my notes that way in class. I could quickly make quick notes for anything that would take me too long to input and then I'd go back and actually review my notes to fill in what I hadn't formatted yet. I think it helped a lot because I actually reviewed my notes after class. I had a discrete math professor that offered extra points if you did your homework in Latex. I have shitty handwriting so I was already doing my homework on the computer anyway so it was easy credit. I got to be the favorite in my intro to astrophysics class because I turned in my papers in Latex, professor went out of his way to find me after class and complimented me. Haven't touched it in years since college.


Why is it not good at separating content from style?


You sometimes see people ask fairly simple Python questions on Stack Overflow, that could be solved by five lines of plain Python, and be answered with some Pandas magic incantation that happens to do what they want with one call. I always find this a bit sad, because it seems to take away the idea that programming is about assembling composable parts, replacing it by a search for the right magic thing from a box of ready-made magic things.

(Plain)TeX always seems the opposite of this. There is never a keyword that does what you want, but you can always do it by using five different mechanisms in concert. You always feel like you are trying to trick the system into doing something it was not designed for.


> You always feel like you are trying to trick the system into doing something it was not designed for.

This is one of the hallmarks of human civilization.

Your hands were designed for throwing a stone at the eye of a mammoth. But you can play the violin with them! Yes; it is totally awkward and anti-natural for your hands, obviously not their intended purpose... but so beautiful!


I would disagree. You can play the violin firstly because the violin was designed so that it could produce beautiful sounds under _human_hands_. This way, not another.


It seems you are actually in agreement with the underlying argument. Humans were able to use their body, originally developed for hunting large prey, to design, build and play violins.


> Your hands were designed for throwing a stone at the eye of a mammoth.

No, they weren't designed at all.

And utility in fine as well as gross manipulation of the type you describe is clearly part of what they were selected (not designed) for.

> But you can play the violin with them

Violins, unlike human hands, were designed, and specifically for people with human hands to use. They aren't just something existing outside of humans in nature that hands happen to work with.

So, it's not at all surprising that they can be used with human hands.


> This is one of the hallmarks of human civilization.

This is one of the hallmarks of evolution.

How do you think wings evolved? By repurposing an appendage that was already had a purpose other than flight.


We didn’t evolve to play instruments though, we adapted and created them to suit our existing physical form


Our hands were not designed, and they have no “intended purpose”. We have hands because throughout the extremely long line of evolutionary adaptations the individuals that had them ended up surviving and procreating, and so we ended up having them.

This is not true of a violin, which is of cause the product of intelligent design and is designed to fit our hands, no Awkwardness intended. Though naturally there are constraints dictated by the physics of the sound generation.


Nope, we use stones because we can lift and throw it with our hands, not the other way around.


I see what you're saying, but the violin was designed for human hands.


Nothing in nature was necessarily "designed"


I'd go so far to say that linguistically nature is the antithesis of artificial (made by hands).

Avoiding silly theological tropes, evolution is often mistakenly referred to as a designer when it's just an emergent property of competing, replicating agents. People don't normally bother with precision though, so we are where we are.


I always like to see it the other way around, it eliminates entities that are not a good fit, and the remainder is what drives adaptation. Of course, people could argue that's just like Michelangelo [1], and we're back at 'designed'.

[1] “The sculpture is already complete within the marble block, before I start my work. It is already there, I just have to chisel away the superfluous material.”


> it eliminates entities

But evolution doesn't eliminate entities. Low fitness entities are eliminated by hunger, or predators, or lower reproductive rates.

The marble on the other hand is eliminated by Michelangelo.

There's a linguistic confusion where because evolution is a noun, we think we can treat it as a subject. But in the person/place/thing/idea delineation, it is an idea.

Not only does it not design, not only does it not eliminate: "it" doesn't do anything!


Of course 'evolution' is not an actor, it's just the overall pattern we give a name to. And the pattern we observe is that low fitness entities are eliminated. That plus variation yields adaptation.


Well, yeah.


The process of evolution is more than just the elimination of unfit specimens. That suggests that a tiger is just a tiger, and the only kind of evolution that can occur in the tiger is for it to become a better (faster, stronger) tiger. But in fact there was a time when carnivores didn't even exist, and then some random genetic flux produced an animal that was inclined to start eating other animals and a new ecological niche was discovered. Evolution is therefore a creative process of adaptation and specialization under constantly changing circumstances.


> That suggests that a tiger is just a tiger,

Not at all. Everything can come from variation (mutation, cross over) + elimination of the worst. It's just that 'worst' is not a global minimum. Are we as humans superior to animals in strength, agility, speed, etc? Not at all. But some distant ancestor had some bigger brain, and that gave it all the edge it needed compared to weak and dumber siblings that were eaten, while our ancestor hid on a tree.

When some animal mutated to be able to eat meat in addition to plants, it had some advantage and was less likely to be eliminated when food got scarce. That's all you need to eventually arrive at something tiger-like.

That said, some animals seem to have reached a local maximum: sharks haven't changed in millions of years, cockroaches seem pretty successful, too.

But there's nothing 'creative' about it.


In my interpretation entities != organisms

Entities could be alleles, genes, or gene products


If you consider a "design" to result from a process where someone sketches out a plan, builds it, and it works first time. I've designed a lot of systems, and it is clearly an iterative process. Balancing tradeoffs, figuring out the essentials, build prototypes, test, etc. If you are patient and diligent a solution emerges. That sounds a lot like evolution, so in my mind everything in nature has been designed by the collective intelligence of an iterative process that rewards useful optimizations.


I think that's a reasonable perspective to take, although I would argue that there is no clear goal in evolution besides survival and reproduction


The nice thing about a goal, is that one goal begets other sub-goals.

Or rather, a goal begets a strategy, and a strategy begets sub-goals. Beautifully at some point these sub-goals start being optimized for. A few steps of this is how I believe humans went from the sub goal "Survive, eat, reproduce" to "Make art, understand life, explore the world".

The cool thing is that I think this extends beyond humans to tools. Because at some point humans had a sub-goal of "hit thing hard" they made a hammer. And this hammer has a goal (or a purpose) which is "hit things hard". This purpose can be traced back, through human sub-goals, to the final goal of evolution: "reproduce".

Note that I am not saying that the point of a hammer is to produce more hammer. But the point of a hammer is (very indirectly) to allow a human to reproduce.

Interestingly there is a weird game of telephone that can happen, where the sub-goals are imperfect for achieving the final goal. I would argue that this is (part of) why humans can be truly selfless. Take a soldier going to a battle he considers unwinnable but going out of a sense of duty / fear of ridicule. This will not help him reproduce, since the battle is unwinnable it will not help his progeny reproduce either. From the 'ultimate' goal, this is an irrational step. But there are sub-goals at play. Things like "be honorable", "do your duty".

This idea that a sub-goal can subvert the 'ultimate' goal is very beautiful to me. It means that evolution is not some tyranny that sets our purpose in life. Instead evolution brought 'purpose' into the world. And then some stochastic process put you and me on into the universe with some, vaguely related, sense of purpose. But we have our own purpose. Sure our purpose was 'created by' the ultimate purpose of evolution. But our purpose is not subordinate to the ultimate purpose of evolution. A human life can have so much more value that just "continue the genetic line and have children". I find that freeing.


There is no plan in evolution. That's the point. It's a reactionary phenomenon. If it had a plan, it would be a proactive phenomenon. Evolution is happenstance.


Design has a goal, evolution has not.


Proponents of the anthropic principal disagree. Nevertheless, it's irrelevant to this thread.


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...


You've smoothly shot right past solid ground (evolution doesn't design things) to a fairly wild claim (rock-throwing apes didn't experience evolutionary pressure to get better at throwing rocks).

Orangutans aren't humans, so what are you saying, apes which don't throw rocks to kill their prey don't... throw rocks to kill their prey?


Perhaps my example is poor, but it shows that hands are not coupled to predation

I'm specifically talking about the evolution of hands, humans are not the only organism with hands.


The poster didn't say "hands", they said "your hands".

Your human hands, which co-evolved with throwing things, we have abundant paleontological evidence of this and you may read as many papers on the subject as you would care to.


Got links to any of those papers?


Are you vegan? Just curious.


No, but I'm not sure what that has to do with the topic at hand

Also unsure how that's an appropriate response to a request for citations?


This seems accurate to me.

Like complex brains are evolutionarily fit because they can solve lots of disparate problems, hands are evolutionarily fit because they can do lots of disparate things.

Of course, we do also then design violins for our specific dexterity.


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


> Proponents of the anthropic principal disagree. Nevertheless, it's irrelevant to this thread.

The anthropic principle does not imply designed, it implies suited for.


Sculpted like a riverbed.


My main issue with LaTex is that you can't take a perfectly correct piece of markup, insert it into a container like a table, and expect it to work.

LaTeX makes it difficult to compose stuff. Even HTML did this better.


Not to mention that when it fails to compile, at least in Overleaf you get an error log that is hopelessly useless and the only thing you can do is just remove your changes until it works again.

LaTeX is a cool idea, but the implementation? Absolutely horrid.


There are two big challenges: One is that TeX, the underlying executable behind LaTeX, is pushed to its limits¹ to run. The macro expansion paradigm behind LaTeX made sense in 1982 but there are a lot of decisions underlying the executable and TeX-the-language that were dictated by the computing technology of the 1970s (forget Unicode, standard ASCII wasn’t universally available when Knuth wrote TeX).

The other problem was the questionable decision by the LaTeX core team to, rather than release LaTeX3, they instead decided to evolve LaTeX2e which means that they are encumbered by backwards compatibility issues.

The noisy output from LaTeX is also not so great. One of the things I’m doing with finl is (a) assuming that there won’t be an attempt to fix errors mid-run (one of those 1982-era decisions that no longer makes sense) so a comprehensive list of errors can be presented to the user (or revealed programmatically) and (2) Adding indications in the output (which can be disabled) of errors in the input. I’m debating between errors being PDF annotations so users would click on an error or warning icon in the PDF to see the message and indication of where the issue was found, or just making it a big blot of overprinting (so many times on tex.stackexchange there are so many issues where a user—usually on Overleaf—ignored the error messages being output.

1. Actually beyond its limits. LaTeX will no longer run on a Knuth TeX executable but requires eTeX extensions to run.


> errors being PDF annotations so users would click on an error or warning icon in the PDF to see the message and indication of where the issue was found

This would be by far the best approach, no?


I haven’t seen any updates to your “finl is not LaTeX” page in a while. I’m glad to hear you’re still working on the project.


I should have an update when the next crate is ready for publication—I ended up writing some Unicode handling stuff because unicode-segmentation didn’t offer the interface I needed while unicode_categories is outdated and has a flawed implementation (my replacement code is 10x faster by my benchmarks). I need to do some additional work to verify that my segmentation algorithm is at least comparable in speed to unicode-segmentation and fix that if it’s not and I’ll have a 1.0 release of finl_unicode ready probably in the next month.


Yes! Plain python is almost always crystal clear and self explanatory. But "idiomatic python" which people seem to compete to be "more idiomatic than thou" is none of these things. It's actually a barrier to learning the language.


Idiomatic python is slow. Trying to convert everything into the mini-DSL that a C implemented library can understand is oftentimes considerably faster.


In case of most ordinary datasets it simply doesn’t matter in practice. Even comenius logo would be adequately fast.


> almost always crystal clear and self explanatory

and slow. Most of the time the idiomatic pandas answer takes advantage of its vectorization capabilities while plain python would require nested loops.


This is one of the advantages of languages with optimizing compilers. In Python, there's a tradeoff between clarity and performance. But in C++ for example, your for-loop is just as fast as any library's for-loop.

Edit: My assumption is that many Python libraries are written in C for performance, but maybe that's not the case.


>But in C++ for example, your for-loop is just as fast as any library's for-loop.

This is most definitely not true. Even stuff like subtle aliasing guarantees can make code run an order of magnitude faster or slower.


Another example is the order in which you access memory. To multiply two matrices, in one you move by row and in the other you move by columns. One makes the cache happy and the other unhappy, so it's faster to transpose one of them (the correct one, I never remember) and them "multiply" them. We notice this in Fortran with -O2, but the difference disappears in Fortran with -O3, so the compiler is doing some magic.


In case of these libraries it is mostly the case of painstaking optimizations in low level code. No common language has sufficiently smart auto-vectorization to reliably convert for loops in most cases to SIMD instructions - so no, your average C++ for loop wouldn’t be that much faster, unless you spend a lot of time optimizing it for the specific task.


Except that your C loop can be WRITTEN slower than some library’s loop.


Someone pointed out to me recently as you say, the idiomatic python sometimes seems like more of a barrier. It takes more time to parse and grok, for their human brain, a for loop with a zip having multiple interables vs nested for loops. I've been thinking about this. So take, a list comprehension, supposedly better than a for loop at times. The canted take would be that list comprehensions are said in a way of what a human wants, the for loop is more how to do it, and the former is better ipso facto. And I think I've come to appreciate this difference and preference.

My conclusion is that I rather like the opinionated take of python. It might take a liiiiittle bit of a learning curve, but you do come to appreciate the zen of choices they've arrived at after a few decades of going at it.


Worth pointing out that list comprehensions aren't just a stylistic preference or syntactic sugar, they're significantly better performance than the equivalent for loops.


> There is never a keyword that does what you want

Clearly you haven't seen https://github.com/mscroggs/realhats


> I always find this a bit sad, because it seems to take away the idea that programming is about assembling composable parts

[OT] Concerning "programming is about assembling composable parts": I always find both sad and ridiculous when self-proclaimed software developers bash Unix because they are not able to appreciate its philosophy.


It would help Unix’s case if the glue between the parts wouldn’t be byte streams and some very crude int result code, signals, etc.

A monolith can be just as composable if not more, with a much “stronger glue” in the form of language-mandated guarantees. Also, sometimes doing multiple things well is the better direction — IPC is additional complexity and essential complexity can’t be decomposed.


Unix has gotten pretty far using just text and return codes. But there's no need to be dogmatic about it I guess, it could be nice to pass objects around, rather than text, like Powershell does. Although, their implementation seems quite verbose.

I think to really use something like that, I'd want a well-defined ordering for the fields and the ability to also do something like

variable.1

in addition to

variable.someLongFieldName

This could result in less than obvious scripts, but a shell language also needs to be compact, for interactive usage.


In Unix space we use text, almost exclusively. This byte stream thing is a windows/java bs thing.


When contributing to uutils (the coreutils written in Rust), one of the bigger pain points with cross platform support is the way that in Unix, everything, including arguments, is just bytes, while on Windows, arguments are semi-opaque text strings. E.g., the -t option in sort, join, etc. takes an arbitrary byte (other than null, which is supported via \0), so you can sort, join, etc. binary inputs. However, the -t option will not let you use a multi-byte character, even valid Unicode characters like é, which, if Unix actually used text for everything, you would expect it to. Meanwhile, on Windows, uutils still doesn't support non-ASCII byte values for -t, because Windows doesn't provide a way to represent those.


In 1999, I was editing a telecom industry standard as an intern and, of course, decided to use LaTeX instead of Word. The seasoned industry veterans on the technical committee were super impressed with my “Word” abilities and wondered if I could share my much-improved template with them.

It suffices to say that I hastily hired a friend in school to work over the weekend converting the beautiful LaTeX into Word.


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 Jennifer's LaTeX but nobody uses "vanilla LaTeX." So even after I download "LaTeX" (which is itself multiple gigabytes in size), I still have very little hope of compiling documentation that comes in LaTeX form. I hate LaTeX with the heat of a thousand suns and I'm embarrassed for my profession when I find it still in use.

The one thing LaTeX does well is math; if I had to write math papers I'd probably force myself to learn it, but fortunately I don't.

I tend to use org-mode for everything now. I don't use markdown because it has the same problem as LaTeX: There's really no such thing as "markdown" and the vanilla Daring Fireball version isn't facile enough for real work.


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 :).


Having written my thesis in LaTex, I can say it is wonderful and a wonderful waste of time.


Having written a report in Word that was about 1/4 of the size of my dissertation, but had some of the same content, and then the dissertation in LaTeX, I can say that as much as LaTeX wastes your time, it's by far the least wasteful option.


Strong agree. My fiance and I wrote our thesis simultaneously, she in Word, while I used LaTeX. The amount of stupid figure- and page- rearrangements she suffered because she removed half a sentence from the middle, while LaTeX generated sane output with basically any text seriously made me much more productive.


Word has had automatic reference numbering for a while now (see for instance [0]). Not denying that it's not very known (nor pleasant to use), and I'm not even talking about bibliography.

I made my partner switch to Latex thanks to the bibliography. Writing tables almost made her switch back to Word.

[0]: https://www.sfu.ca/~ljilja/cnl/info/UseCrossReference/index....


> Word has had automatic reference numbering for a while now

It also breaks regularly. I know a student in the middle of a thesis writing up marathon, and the time he wastes with this is unbelievable. For example, there are the references that just end up garbled, with Word putting in an error message instead, the references that somehow don't get updated despite having been entered exactly like all the others that do. It adds at least two passes every time he wants to send a chapter to proofread.

Tables in LaTeX are bad. References, notes, and bibliography in Word are horrendous.


I meant it more in terms of bad figure placement. LaTeX tries to place the figure relatively close to the source, it has a sane fallback policy, like grouping them together at the end of the section.

With word one can get from a decently formatted text to multiple quarter-filled pages with a single additional sentence, because it has comparatively bad algorithm for text-block reflow.


I've written two thesis in Latex and a small 100 page book in Word.

Word 2000 performed wonderfully. I had no problems with references or images shifting around, no strange errors, nothing. Bibliography sucked, but in general it was a pleasure to work with.

Word 365, on the other hand, is something I have to force to do what I want again and again. It is built in such a way that doing things cleanly and error-free is difficult and much less obvious than in Word 2000. Even standard tools like image anchors, which worked nicely in 2k, are not reliable anymore. I got the feeling that this is due to automatisms aimed at casual users.


Among fellow students countless hours were lost playing with spaces, line breaks, font sizes just to get tables/figures stay or move to the next page. This did look like an endless task: adding few chars in a chapter could have messed up positioning of bunch of figs.


I did typesetting in Lyx/LaTeX of two PhD theses: my own (eng) and my GF's (esp) a decade+ later. In both cases the adventure started with admitted a vanilla Word doc without all the bells and whistles (= no templates, no version control).

Once you enter the area of strange formatting, chars typed by who knows either a cat walking on the keyboard or sleep deprived student typing madly, fixing these in a binary format is a real PITA. Lyx/LaTex text formats are trivial to grep, diff, etc.

Today I would probably start and try to stay as long as possible in Markdown, then reformat it at the very end.


Same, I just did my resume in LaTeX, it's such an obtuse and painful tool, yet nothing even comes close to the control it gives you.

Hey btw, I'm looking for contract work! https://github.com/1player/resume/blob/master/resume.pdf


I always wonder with comments like this what LaTeX allows that Adobe Indesign is incapable of.


Plaintext source file; hence source control and portability. Also it's free in both senses.


* Free (as in freedom) and open source

* Cross-platform

* Industry standard in the sciences


Surely plain old html does?


For several years (a decade maybe?) I authored my resume in LaTeX. Then a few years ago I wanted to restructure it radically, and make an interactive version that showed off some simple subset of my full-stack skillset (from design to implementation). This goal led me to authoring it in HTML with CSS. I never actually got around to implementing my full vision because I had an unexpected opportunity land in my lap before I'd officially started looking. I had the design and static mockup completed, so I just exported that to PDF and used it. In hindsight, I spent a lot less time getting the look I wanted in HTML than I did in LaTeX.

I still tend to use LaTeX for some long-form documentation, but I'll probably stick to HTML for my resume and I'm finding myself using HTML + Markdown a lot more for other authoring tasks too.


It's not the right tool for the job, in this case perfectly laying out text on a A4 sheet of paper. HTML is made for variable-sized screens, and can be repurposed to be printed, but it's still trying to screw a nail in when all you need is a hammer.


The solution presented in this anonymous, undated article is relevant if you’re constrained to only using LaTeX. But you’re not, and there are certainly easier ways to go about such things. We have Python and other higher level languages that we can use to pre-process source and extract metadata. This type of problem is made much easier if you write in Markdown, putting authors, affiliations, and other metadata in (say) YAML blocks, and use Pandoc to convert to LaTeX (or anything else). You can write a filter in Python, Lua, or Haskell to rearrange the metadata the way the author wants. This would be a far more pleasant experience, and easier to extend and generalize.


This anonymous, undated article was written by me, yesterday. The strong backwards compatibility of LaTeX(2e) [0] make it so that the date is not especially relevant (since I'm using primitives); in any case my point was pedagogical, in the sense of diving into the operational mechanisms of (La)TeX to develop a better mental model of what's going on. And while Pandoc is very nice, if you're in academia none of your alternatives are viable, since LaTeX is a de facto standard for most journals.

Fun fact: the article was written in Markdown, with some front matter for metadata!

[0] https://tex.stackexchange.com/questions/247524/do-i-risk-bre...


I certainly appreciate the pedagogical purpose; what you did there goes beyond any pure TeX programming I’ve ever tried to do.

My suggestion was to use Pandoc to create a LaTeX document. You can easily tell it to use RevTeX or any style required by a journal. The only friction with my approach is when you need to work with coauthors or editors on revisions.

EDIT: I think I caused some confusion due to my sloppiness. I should have written “constrained to only writing in LaTeX”.


I am in academia and I do all of my writing in pandoc. I simply submit the .tex file that pandoc outputs if and when the manuscript is accepted. (I liked and learned a lot from your post, just wanted to prevent a possible misunderstanding about the usefulness of pandoc for academic writing).


How did you do emojis in pandoc? I’ve had a hard time writing them in md files and converting them to pdf using pandoc


Pandoc uses LaTeX to make the PDF, so you have to set up LaTeX somehow to be able to handle the emoji. I use “normal” Unicode in md source all the time, but not emoji, so, sorry, I don’t know what to do.


I too love LaTeX but it's important to remember that the writing experience might be nice and elegant in LaTeX with the right stys and ShareLatex and whatnot, but the editing experience is decidedly not. Everyone who has used it in any serious form with page limits knows the stress of slowly varying their figure sizes and hoping it will squish into the limits.

Very honestly, part of the reason I don't bother with any new "LaTeX reimagined" projects is because either (a) they are written by LaTeX nonbelievers who don't understand the complexity of beautiful typesetting, or (b) I don't want to learn another markup+ language or mental model. The latter is increasingly annoying to me.

Out of curiosity, is LaTeX compilation benchmarked on the M1 processors? Is it better? Has anyone experimented with magic Raph Levien-style SIMD magic (a la stack monoid) compilation for LaTeX? I just want LaTeX but really really fast.


> Very honestly, part of the reason I don't bother with any new "LaTeX reimagined" projects is because either (a) they are written by LaTeX nonbelievers who don't understand the complexity of beautiful typesetting, or (b) I don't want to learn another markup+ language or mental model. The latter is increasingly annoying to me.

Then you have to try TeXmacs http://www.texmacs.org/. It is completely independent from LaTeX and TeX and has - beautiful typesetting (better than LaTeX) - it is fully WYSYWYG, so you don't have to learn a new markup language - yet it affords better document control than LaTeX


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


Another good WYSIWYG front end is LyX: www.lyx.org . I've written a few hundred physics lecture notes with it, as well as a number of Beamer presentations. I find it much easier to use than TeXmacs (mainly because of keyboard shortcuts), and the output is excellent. And yes, it produces true TeX/LaTeX.


LyX is good but the quality of the typesetter is not. Early on, when looking for a replacement for my TeX workflow I was taken back by the rendering. It improved lately, but still TeXmacs is a superior tecnology which renders onscreen exactly as on paper, and it is fully scriptable in scheme, including the user interface. I use it to lecture online, via Zoom, for example and I would not be able to do the same with LyX. See e.g. https://www.youtube.com/watch?v=FL50D2PpswE Also thinking about mathematics in TeXmacs is really pleasant. I wrote here my reflection on mathematical writing in TeXmacs: https://texmacs.github.io/notes/docs/art-of-math-writing.htm...


Before starting to use TeXmacs I tried LyX. It is true that the typesetting is not optimal, as often pointed out by TeXmacs users, but for me that was not a dealbreaker. I found LyX to be extremely un-customizable. TeXmacs has Scheme that allows you to do potentially anything! That made me very happy coming from Emacs land.

An important thing for me was having context-aware keyboard shortcuts (that are barely possible in LyX).

Another cool thing that seems to be possible that I plan on exploring next is integrating math typing in TeXmacs with sympy and or Maxima. This would allow symbolic manipulation using the above packages directly in TeXmacs.


Finding Lyx when I was at university saved me an immense amount of frustration while producing beautiful output. My girlfriend used Word 95 and I spent many more hours helping her format and fix her projects than I ever spent dealing with issues in Lyx. Once I had it setup how I needed it it just works.


TeXmacs is not a front-end for LaTeX, but a completely original system, superior to TeX and LaTeX under every point of view: typographic quality, ease of use, control over your document.


I concur. LyX makes things order of magnitude easier for a casual latex user like me.


>Try TeXmacs, it's neither TeX nor it's Emacs clone.

Seems to be about the worst name they could have chosen then


We seldom choose our names, ourselves. The name was chosen early on to pay due respect to the two main sources of inspiration: the TeX system and the Emacs editor. TeXmacs takes the good features of both, but just because I have the same name as your parents it does not mean I'm the same kind of person. A family is not a clone hierarchy. One can argue that Javascript also has the wrong name, there are reason for this, but usually this does not stop people to appreciate the good sides.


Any published papers that use this?


You can check all of the papers of Joris van der Hoeven (https://www.texmacs.org/joris/main/publs.html) and of Massimiliano Gubinelli (https://www.hcm.uni-bonn.de/people/faculty/publications/?tx_...), and as well these lecture notes the link to which was recently posted on the TeXmacs forums https://www.jonmsterling.com/papers/sterling:2022:wg6.pdf (link to the forum post http://forum.texmacs.cn/t/sharing-some-lecture-notes-created...). The papers of vdH you find in his website are converted from the TeXmacs format into pdf (one can find the TeXmacs sources too by each paper) and the papers of Gubinelli as far as I know are written using TeXmacs but since he puts the links to the journals there you get a version converted from the TeXmacs format into LaTeX.


I write all my papers with it since few years, and my lecture notes, and my talks. The papers are converted to LaTeX when sending to the publisher. Several of my PhD students used it to write their thesis. Also some Master students.

Some pointers here: Papers: - https://arxiv.org/abs/2004.09637 - https://arxiv.org/abs/2112.05562 - https://arxiv.org/abs/2107.12115 Lecture notes: - https://www.iam.uni-bonn.de/abteilung-gubinelli/teaching/sto... Online lectures with TeXmacs: - https://www.youtube.com/watch?v=FL50D2PpswE&t=4990s


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


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


LaTeX is mostly good for academics who need to manage citations, if you just want a clean, readable CV there's lots of WYSIWYG options.

I actually used to use TexMaxer:

https://en.wikipedia.org/wiki/Texmaker

It's on my list of things I want to deploy a fuzzer on when I get around to learning that -- I've been focused more on data visualization lately.


I'm always amazed how people could bootstrap something as feature rich and versatile as LaTeX from plain TeX.

I'd really like to get to know plain TeX a bit better, but I've got no idea where to start.


If found “TeX by Topic” a great introduction, it's less overwhelming than the TeX book. Also really helpful in wrapping your head around macro expansion is the `texdef` cli tool, which allows you to quickly evaluate a line of macro code. Finally, https://www.tug.org/utilities/plain/cseq.html is nice for reference.


There are three books that are worth looking at to get plain TeX. I’d start with Viktor Eijkhout’s TeX by Topic (which I think is free in PDF on CTAN). Then the TeXbook to really get everything (the PDFs that float around the net are illegal. Please buy your copy. DEK donated his royalties to TUG so your purchase will help support the continuation of things like CTAN and the LaTeX project). And finally, if you really want to dig deep, Stephan v. Bechtolsheim’s four-volume magnum opus, TeX in Practice will tell you more than you ever wanted to know.


I can only hope to curse you with a TeX nerd-snipe :) I can recommend reading the first few chapters of The TeX Book (it's a genuinely fun read) followed by the links in the article's footnotes for more operational information.


I found The Advanced TeXbook by David Salomon to be helpful. It shows how to make your own format on top of plain TeX, including table of contents, page numbering, cross-references and insertions.

I also found A Beginner's Book of TeX by Raymond Seroul and Silvio Levy helpful as a quick reference.

Also I have an anti-recommendation for Knuth's TeXBook. I did not find this book helpful at all- too much information buried in exercises (which I don't think is appropriate for a reference), and not enough directly said on how to do useful things. Figure out how to make a table of contents using only the TeXBook..


I only interact with tex and latex through pollen these days. https://docs.racket-lang.org/pollen/

It doesn't shield you from much of the pain, initially at least. But you can separate it from the document and treat it as markup, and reuse bits more easily.

Of course pollen itself is a thing to learn. But if you work with text a lot and like lisp it might be worth it. It's been good to me.


I gave a cursory look at it and it's really too niche, complicated for its own good IMO.

Your comment made me want a modern TeX, written in Racket/Lisp.

  #lang latex

  (documentclass "article")
  (document
    (section "Chapter 1")
    Welcome to (LaTeX). Here is some (textbf "bold") text.)
How does this not exist yet??


Yeah it is kind of surprising. Scribble supports latex output but I don't know the details and it's probably similar to pollen, since pollen is built on it.

It doesn't seem that hard (famous last words tho) especially since turning arbitrary DSLs into xexprs is one of the things racket truly excels at.


Just having proper semantic closing syntax would be a huge improvement for any member of the TeX family. It drives me nuts wrestling with shit falling into or out of some macro expanded function based on argument parsing logic. If it had defined closing syntax the damn tools would just tell me there was a mistake or get it correct not mysteriously screw up my document because I added or removed one row from my document. Or my favourite because I added a second table and that macro could only handle one table of that kind per document because it was designed for a table based bibliography that would only exist once at the end of a document…

I put TeX and Perl in my “decent tool with extremely shitty syntax” mental categorisation of languages. I basically never look at anything TeX related directly anymore unless I have to. It’s either the input material I converted to something better like plain text or vector graphics (fuck Tkiz based graphics are so miserable to use) or it’s the output from putting something more sensible into pandoc.


I also have a love & hate relationship with LaTeX. I think it really boils down to the following:

LaTeX will work excellently for you, so long as your use case was envisioned by the original authors.

I can't say that the original authors of LaTeX didn't envision using it for creating slideshows/presentations, but I can say that making a beamer theme is uniquely complicated. I wish that LaTeX had something as flexible as CSS for styling documents rather than the awkward commands, etc. used now—so much so that I attempted to replace LaTeX with a HTML & CSS -> PDF workflow in the past [0]. It is still an idea I want to revisit someday when I have more time.

[0] https://github.com/jonpalmisc/pmt (no longer actively maintained)


I don't mind Beamer, there's some boilerplate but it is like a once-per-institution setup so it doesn't seem like too big of a pain. It was hopefully done by someone else, and if not, I only have to do it once for myself -- and then I can share it.

However, drawing figures in TikZ seems to be the main way of getting figures into a beamer presentation. This is a total nightmare and not really worth the effort, IMO.


If you have a lot of time on your hands, nothing makes your math/cs hw look quite as slick. Was fun to play around with in undergrad for sure. I've forgotten all my LaTeX skills since though.


I used it avidly for years. It’s still fun to see pretty LaTeX documents, but my patience for working with it—despite being rather fluent with it—has grown too slim.


Not a TeXnicians nor a TeXpert but I've learnt it at a certain point in high school after a professor suggestion, than much used at the uni and now just used casually for letters, reports etc I do love the quality, that's is.

As far as I do not find something with equivalent or better typesetting quality I'm stick with LaTeX :-)

To those who hate it: try to learn some tangible "alternatives" like *roff or TeXinfo and than you'll see LaTeX syntax is not that horrid or difficult, then try to learn some modern typesetting tools like those from Adobe. LaTeX win easily, that's is. Said that IF someone can offer something equivalent with a far simpler/nicer markup as I said before my love is just to the quality of the output!


In my opinion LaTeX fails to deliver when doing anything other than text based work. Tables, images, etc are always a hassle. It gets even worse when changing one page to landscape mode. Debugging is a pain and there aren't any tools to help with that.


My rule of thumb is that once I start writing imperative LaTeX with loops and stuff, I'm almost always on the wrong path. Now, I might be missing some important corner cases, but by skimming through the blog post, I feel like the author's solution is too complicated. For example, I don't get why this requires auxiliary files.

I would create a counter for the affiliations, let the \affiliation command define macros that contain the name of the affiliation and the value of the counter and then append the output to two different helper macros, one for authors and one for affiliations, whose contents I dump in \maketitle.


Check out https://www.monsterwriter.app/, It is something like LyX but even easier to use.


Interesting, I hadn't seen this before. How does it differ from LyX?

Is a Windows build planned?


There is a Windows build available already.

LyX is a LaTeX frontend, you still need to understand some notions of LaTeX. MonsterWriter is a WYSIWYM Word Processor, LaTeX is just used as internal tool to create PDF files. There are other exports available (e.g. HTML, Markdown, you also can publish to Ghost directly)


In the last three decades of having the opportunity to learn and use TeX, i have managed to avoid it. In the same time i've helped a friend with word processing for her dissertation. I'm still not sure how we managed to get it to work with all the horror stories about data loss and Microsoft Word at the time. But it did its job and I'm still in the WYSIWYG camp.

Maybe in another life...


I find Word is only tolerable when used like Latex. I.e., extensive use of Styles. Define a Style for every object type in your doc. Also, carefully choose the Next Style option. Define Sections if columns or pagination vary across the document. With that in hand, it is now just a matter of plugging in text and images. If something isn't working quite right, edit the Style instead of macdinking the text on the screen.

You are still left with formatting equations, but Word lets us use Latex-ish syntax for that now, so you can keep the fine control of Latex within the GUI context.

Don't get me wrong, I hate Word, but it is required in many environments. Adopting a rational use strategy helps a bit.

https://www.wordsense.eu/macdink/#English


Indeed, using styles is the (only) way to manage any significant document in Word.


I have the exact opposite story to tell. A friend of mine asked me to convert a 300 pages Word document to LaTeX, because Word couldn’t handle it. It was text, mostly, so it worked out quite well.


People write dissertations in Word all the time. How painful it is depends a bit on how complicated the dissertation is as a document.

This is of course only an anecdote, but I know many people who started in word, gave up on it and moved to Tex/Latex, but nobody who went the other way (that is to say, I know people who tried to give up on Tex, but eventually went back - not anyone who actually published with it). This might have quite a bit to do with subject matter - Word has always been an awkward fit for mathematics.


Although I haven't used LaTeX in decades to write anything substantial like a paper or dissertation, I recently had cause to use it to write up some homework for an online course I'm doing - mainly (pretty simple) maths proofs. After 20 years of not doing maths, my ability to faithfully rearrange handwritten equations from one line to another was even more rubbish that it was in my 20s! All sorts of dropped or flipped signs, terms and stray brackets would trip me up. Although initially sceptical, I found that doing this in LaTeX (with the ability to cut/paste to a new line and then manually 'refactor') was way more reliable. I think it tapped into my ability to do this semi-unconsciously when coding! (And with no dreaded page turns...)

However, it's still an effort to squint at all of LaTeX's curly brackets and long form symbol names, and LaTeX doesn't grok the equation of course.

Has anyone come across any tools out there that offer a similar experience for manually rearranging equations and somehow 'linting' as you go along? i.e. something that knows a bit more about precedence/structure etc? Even a intellij ctrl-W style shortcut (highlights chunks with increasing scope) would make it easier/quicker to do what I'm talking about.


I'm not sure if it's necessary to use auxiliary files.

I made something implementing fake vectors using \csname . I think that a similar approach can be used for this problem, but I prefer to never see my old code again. IWIMM

  \newcommand{\defwithindex}[3]{%
    \expandafter\def\csname #1@#2\endcsname{#3}%
  }

  \newcommand{\getwithindex}[2]{%
    \csname #1@#2\endcsname%
  }
(You probably need the two dimensional version.)


Hi! Author here. This is a cool idea for a vector implementation, but you still need to work around the fact that the command definition can come after the \get


Since your code doesn't write the authors to the file it already requires that the authors are given before `\maketitle`, so then it's also reasonable to require affiliations there. Then you get something like https://gist.github.com/zauguin/19bf1bc9128a8abaedfe3081717b... which doesn't need a file.


Hello, I thought about it a little and indeed you are both right! For the sake of completeness I've updated beamleeto to use this mechanism instead :) thank you for your help!


Perhaps you can use the main aux file, as other packages do. I think I never did that, so I'm not sure about how difficult it is. Or perhaps I used the aux file and I forgot about that. [ I should write an article titled "I hate LaTeX. I hate MSWord." :) . ]


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


Like bash, LaTeX is one of those languages where you immediately forget it after you're done with your current task.


There must be a solution similar to this: https://hackage.haskell.org/package/TeX-my-math

I don't understand why they encode these expressions f^{(2)}(x) like so. They should be written like a regular function: f 2 x. Then you apply your styling depending on eg. the domain definitions. Eg. for f : N x R -> R, then the first argument is sub/super-scripted... etc.

Another eg. In python, we would render this expression: sum([i*2 for i in range(0, n)]) with sigma expression... etc.


LaTeX needs replacing with something faster and more program-y, and that isn't just a python script.

LateX's successor should be opinionated, safe, easy to build in parallel, and also good at integrating with other tooling:

Let a CAS generate the next equation for you, for example.

Make sure that figure is never out of date (e.g. a build system rather than relying on a web of files and button clicks)

Etc.

This will likely never happen because latex is still very good at what people want it to do push comes to shove, but we could have a much better document format and publishing system around it.


Please no. Stop replacing useful tools with "opinionated" ones. Nothing makes me nope out of using a tool faster than hearing it described as "opinionated".


You can embed CAS-generated equations and computations in LaTeX[1]. This came in handy for undergraduate linear algebra homework that combined proofs (where I could use my existing LaTeX macros) and computations (where we were expected to use a CAS). Mathematica or Jupyter notebooks would also work, but I prefer Emacs over the notebook UI (and Jupyter didn't actually exist at the time).

[1] See, e.g., https://github.com/tmolteno/SympyTeX/


> Make sure that figure is never out of date

For anyone with a software background, this is pretty straightforward - once you start thinking of the latex file(s) as source code rather than the document, it's a short jump to setting up a build environment...


> something faster

I don't know that this is the major pain point. The thing is, writing complex-structure/programmed documents is not something which needs immediate re-rendering with every character - just like you don't recompile your program with every character you change.

This would, however, be very useful for syntax and compiler-detectable error. You would have an effectively-immediate indication of warnings and errors per line in your document, like an IDE. So it would be Java-like compilation speed rather than C++-like compilation speed...

> safe

LaTeX programming is basically sandboxed, or at least you have to work _very_ hard to do dangerous things.

> latex is still very good at what people want it to do

That's not it. It is actually usually pretty bad in doing what we want it to do (e.g. tables. Oh, the pain!) ... but what it has going for it is that you can do almost anything you want?: It will take effort and the "source code" will be ugly, but it'll work.


> we could have a much better document format and publishing system around it.

TeXmacs (http://www.texmacs.org/ and http://forum.texmacs.cn/), and it happens right now!


What is LuaLaTeX?


LuaLaTeX is a lot slower than pdfLaTeX or XeLaTeX and default settings give different output than the other two, e.g., around line breaks at – or —. I only recommend it if you need it. Most people don't.


Good idea. Doesn't go far enough / is only an incremental improvement.

I've never truly immersed myself in it so maybe it's more powerfully elegant than I remember.


I don't use LateX explicitly (my colleagues and supervisors didn't know LaTeX and exclusively use MS Word) but I like how I can write equation in MS Word using LateX notations.


Same. I'm a PhD student in CS and manage just fine with embedded latex in word documents and a reference plugin (I use zotero). There's definitely pros/cons. Imo biggest con is the absence of something like overleaf and biggest pro is ease of use.


I hate clickbait. I click clickbait


I collected here: https://texmacs.github.io/notes/docs/art-of-math-writing.htm... some of my reflections about mathematical writing and in particular about the reasons I choose TeXmacs as my tool of choice. It might be also relevant to you.


LaTeX? I just use TeX. The documentation for TeX is clear, very precise, and much shorter.

LaTeX is just TeX but with a lot of new macros. The intent is different: With TeX, you just say in detail what steps you want the software to do. With LaTeX you say what you want in general terms and f'get about the details.



Yup, for "doing slides", I wrote some TeX macros. It sets the sizes of the page and the fonts, draws a box around the content, etc.


I love LaTex. It helped me complete my two papers without having to learn various Word typesetting techniques.


I \usepackage{loveandhate} LaTeX


Jesus H Carnegie. I JUST WANT TO WRITE AN ACADEMIC ARTICLE.

I mean, look at this abhorrence. And look at what you open up in a TeX file, which again is meant to represent English prose.

   % Options for packages loaded elsewhere
    \PassOptionsToPackage{unicode}{hyperref}
    \PassOptionsToPackage{hyphens}{url}
    %
    \documentclass[
    ]{article}
    \usepackage{amsmath,amssymb}
    \usepackage{lmodern}
    \usepackage{iftex}
    \ifPDFTeX
    ... and more and more of this dross ...
I want to get stuck into the article. At least show me my abstract. But no. It's just more and more backslashes.

It's just vile. And the people who use it have Stockholm syndrome, and they pass it on to their PhD students who spend nights before their presentation at 2am, trying to align a table and crying. Then they have Stockholm syndrome too, and they tell you "it's pronounced LARTECH" and give themselves a little pat on the back.

And here's an equation:

    \sigma _{I}^{2}=a^{2}s^{2}+\left( 1-a\right)^{2}S^{2}+2a\left( 1-a\right)\sigma.

How are you supposed to manipulate that? I can open up a WYSIWYG editor and literally do maths by just copy-pasting parts from one side to another. But this, I can't even read, let alone intuit.

TeX. It's the worst.


Out of all the problems of TeX/LaTeX, the worst I found is that subscripts and superscripts visually dominate the line noise when they ought to be less visible than the main content. I think your example helps to illustrate that by the equations I tended to typeset where way worse for that problem. (But I only dipped my toe in properly programming it like OP, which I realise is even worse.)

This is really solved by the graphical equation editor in LyX. I wrote my master's thesis and PhD thesis using it, having previously written an undergrad thesis in raw LaTeX. When I switched, I was part way through writing up notes for a masters course and ended up rewriting them in LyX (sadly its LaTeX import is terrible). I found that I was able to write notes faster by a factor of 3! And I honestly was no LaTeX novice, it just really is less efficient. I shudder to imagine how long I would've spent on my PhD thesis without LyX.

The mistake people make with LyX is assuming it is for beginners trying to avoid LaTeX (and it does partly market itself that way). I consider it the opposite: it's best suited to those who already fully understand LaTeX. You still need to dip into it occasionally to edit the preamble or stick in the odd little snippet of manual LaTeX (that's ERT in LyX terminology). And while typesetting errors are much rarer with LyX (it's much harder to forget a closing brace when you don't put them in in the first place), when they do occur it's because something has gone really wrong so you better know what's going on.


I agree that TeX sources are often damn near impossible to read. That stuff is... ugly. But at least it's there. You can see it. You can manipulate it. You can understand it (though it sometimes takes more time flipping through the TeXbook than any sane person is willing to spend). In comparison, WYSIWYGgery is like boxing with an invisible opponent. Where do I click, what magic check box three levels deep in dialogs do I need to check? Why does that word come out in a different font? How do I move the cursor across the italic/roman boundary? Why is there extra space here, but not there? How can I interact with things that I cannot see?


Related: TeX sources can be put under source control, with meaningful diffs.


Word has version control built in and you can see diffs easily. (No git is not the only VCS)


> \sigma _{I}^{2}=a^{2}s^{2}+\left( 1-a\right)^{2}S^{2}+2a\left( 1-a\right)\sigma.

I'd write the above expression as the following:

\sigma_I^2 = a^2 s^2 + (1-a)^2 S^2 + 2a(1-a) \sigma

The only thing you need to know to understand it conceptually is `_ -> move next character down`, `^ -> move next character up`.


Right, sure. This is indeed copy-pasted from LyX, which is a saviour. Manually written, TeX can be better. But as soon as anything gets complicated, you're gonna be stuck again. The problem is not understanding something conceptually. It's intuiting it. I want my brain to be working on the maths. I don't want to use valuable brain cycles understanding the notation!


I am with you for all* of it. The Stockholm syndrome bit is oh so true. But I take exception with the math, Latex math is its only redeeming quality (with Adobe FrameMaker coming in a distant second).


I agree that LaTeX has not the best syntax, but that is a better alternative?

I mostly write in Word and I can tell you that it is not that much better than LaTeX. Sure, the editor is WYSIWYG so you can see right away the title, abstract, text, etc.

The problems I have with Word are mostly solved in LaTeX. For example, references are automatically managed in LaTeX. In Word, that's mostly a manual process (I know there are integrations with Zotero/Mendeley/whatever, but those are a little wonky on a long paper---I have never used the built-in citation manager). I sometimes feel bad for the editors that have to check all my reference lists. They usually find 1-2 papers that are either missing or included and no longer cited.

Tables are also a problem in Word, especially if your collaborators use an older version that breaks the formatting (Moving between Google Docs -> Word -> Google Docs also breaks a lot of things). I can't tell you how many times I had to reformat tables that a collaborator broke. Making complex tables is also wack sometimes, like adding a simple sub-rule between cells requires some column hacks in Word.

Table/figure numbering is also another thing that I loathe in Word. Manually renumbering is a pain and the automatic numbering always breaks for me in a way or another (maybe still thanks to my collaborators).

All those things work pretty well in LaTeX with some backslash commands.

What Word really shines is track changes and commenting. I don't know if there is a LaTeX editor where you can track changes and comments like in Word (I know that Overleaf has something that kind of works).

Powerpoint vs. Beamer is a whole different ball of wax. Both have pros and cons. But with presentations with a lot of equations, beamer is definitely better but, as you point out, it doesn't play well when you want to put an equation in a specific spot in the slide. In powerpoint, you can just click and drag and you are done.


Ah, Beamer.

You know how people make animations in Beamer?

They write the same picture on multiple slides and then flip through the slides really fast. Like drawing flipbook pictures as a kid.

This, with computers thousands of times more powerful than what took us to the moon.


I agree. LyX is a much better alternative to LaTeX. It's a sort of GUI front-end to it, but it lets you do all the normal editing in normal WYSWYG way (but without the "is the space bold? why is the font of this blank line different?" you get with Word). Most importantly it has a really amazing equation editor.


Honestly, do you have any idea how to improve the math mess? I did use both Word and LaTeX für equations, the latter is much faster for me. So WYSIWYM seems to have its usecase. But I agree, reading that equation is just awful. My idea would be tooling to partially render tha equation, e.g. rendering sections the cursor is not in.


I use word with embedded latex and I'd say it's almost as fast to write once you get the tweaks and hot keys going (eg. learn to never use the horrible "equation editor"). You make up in overall speed by readibility. Write an equation, render and its just there, write next equation, render, etc.


There's this:

http://asciimath.org/

I wish someone would integrate this into pandoc so I could use it in rmarkdown.


The equation example is artificial. In practice there will be no curly brackets around these single-token sub/superscripts, nor should the \left / \right present in this example. With properly added whitespaces this equation becomes quite legible.

For more complex equations people use line breaks and indentations, and/or macros.


As an example taken at random from my undergrad days, see

https://jasomill.at/metric.pdf

produced with

    \begin{align*}
      f^*(dx& \otimes dx + dy \otimes dy + dz \otimes dz)\\
      =&\ f^*(dx \otimes dx) + f^*(dy \otimes dy) + f^*(dz \otimes dz)\\
      =&\ d(f^*x) \otimes d(f^*x) + d(f^*y) \otimes d(f^*y) + d(f^*z) \otimes d(f^*z)\\
      =&\ d(x \circ f) \otimes d(x \circ f) + d(y \circ f) \otimes d(y \circ f) + d(z \circ f) \otimes d(z \circ f)\\
      =&\ df^1 \otimes df^1 + df^2 \otimes df^2 + df^3 \otimes df^3\\
      =&\ \left(\pdFOneU du + \pdFOneV dv\right) \otimes \left(\pdFOneU du + \pdFOneV dv\right)\\
      +&\ \left(\pdFTwoU du + \pdFTwoV dv\right) \otimes \left(\pdFTwoU du + \pdFTwoV dv\right)\\
      +&\ \left(\pdFThreeU du + \pdFThreeV dv\right) \otimes \left(\pdFThreeU du + \pdFThreeV dv\right)\\
      =&\ \left(\gOneOne\right) du \otimes du\\
      +&\ \left(\gOneTwo\right) \left(du \otimes dv + dv \otimes du\right)\\
      +&\ \left(\gTwoTwo\right) dv \otimes dv.
    \end{align*}
(note that, using my editor defaults, none of this equation's lines are truncated or wrapped)

The \g... and \pdF... are trivial ad hoc macros defined in the document. Producing the same document by repeatedly copy/pasting the tensor components and partial derivatives would have been considerably more time-consuming and error-prone.

Also notable is the align environment: type \\ for a manual line break and & at each point that is to be aligned.

I just tried to reproduce this with the "WYSIWYG" equation editor in Word, and I can't figure out how to do it — right-clicking on plus and equal signs gives an "Align at this Character" option, but this appears to be a special case, as the option doesn't appear when clicking on anything else in the example.

In particular, had the first line involved (implied) multiplication instead of addition, there apparently wouldn't be any acceptable point to declare alignment!?!

I'm also not sure what it means to align "at" a character, as characters have width, and characters to be aligned aren't necessarily the same width. Does it align the left sides? The right sides? The center?

Moreover, the default key bindings in the Word equation editor are counterintuitive: the usual binding for "manual line break" instead splits the equation in two and there doesn't appear to be any default binding for the "Insert Manual Break" equation editor command at all.

Sure, LaTeX has a learning curve, but it's not at all obvious to me that Word is any better in this respect.


To be clear, the above is meant to be an example in favour of TeX? You look at that and think "well, it's obvious what's going on here"?


I want to use latex while using your attitude! It has to be simple and the syntax out of the way, almost like Markdown


That equation is easily workable with the code as is, and that options block is also fine. My bigger concern is someone coming in without enough experience and trying to disrupt the whole academia. Yes, the learning curve is steep - can anyone even say they finally know TeX? Aligning stuff and other things may take time. But if you're writing papers, the output quality is amazing and, what is important, consistent - light years ahead of WYSIWYG editors. I'd rather edit my equations manually in TeX rather than, say, popular office suites. And why would anyone want to do presentations in TeX anyways? It's like using a spaceship to shop for groceries.


As a physics postdoc I have to say that is quite a simple equation


That's my point! The equation is simple. The markup makes it complicated. Now imagine a complex equation.


What is the intended use for LaTex these days?

I’m not trying to flame, I just have no idea why anyone would choose to use it over html/css or just a word processor.


Academia. At least, its widespread (almost universal) where I am studying. Mainly to manage citations, figures, and tables of contents automatically. Tools like Sharelatex are used for collaboration on papers.


I thought Sharelatex was bought by Overleaf years ago? It is still alive I see.


afaik yes it was, perhaps its a force of habit for me as sharelatex redirects to overleaf I just always click through to it.


That’s interesting.

Is it really a problem that requires manually writing the code? Seems like there should be more elegant solutions by this point.


For most usages, you don't need to write the code. Sometimes buff out rough edges for your specific application, but in my 12 years in academia, I think I've only really _written_ Latex twice.


How do you typeset your research then?


By just using the existing "code"/markup. Similarly, I would not count writing markdown as programming. Now if you need some new stuff, e.g. complicated tree diagrams, it starts to turn into programming.


You could do it through Pandoc. Pandoc can process multiple data sources (citations, chapters, yamls etc.) and output a pdf.

You can turn on citation linking (in the text), you can apply a custom latex template.

Once it is all setup, you just write text in Pandoc Markdown.


Ok that makes a bit more sense, thanks for taking the time to educate me :)


There really isn't much code to write for a typical scientific document, just sectioning and math. You usually include the same preamble in your own documents and a preamble from the editor if you're targeting a scientific journal, but most of the time you focus on the content.


expanding on what others mentioned, usually each university has latex templates for their papers and reports which handle most of the complicated parts, the only real latex ive worked on for reports is for eqations and tables, and many people just use gui tools that generate the code for them.

New students do occasionally complain about images/figures not being where they are relative to the text in the code, thats a solvable problem in latex by embedding it in a minipage but honestly people complain about images having a mind of their own in word too ;)


We use a lot of LaTeX to make the midterms and final exams in the math department of my university. Everyone knows how to write in LaTeX, so if I make a internal helper package or a bunch of macros, then everyone can use it with minimal training.

The problem with wysiwyg word processors is that people get creative and it's very difficult to enforce the same style for all the material.


Ok, that makes perfect sense.


I use it for stuff more than a couple of pages long, because:

- I can use my text editor of choice

- I don't have to worry about messing with the formatting by accident

- It goes through git easily

Anything shorter and I just use a word processor, it's not worth the time messing with the boilerplate.

I do use it for writing letters - I have a template I just fill out and it spits out a nicely formatted letter with an envelope.

It's also handy for when I need documents in multiple languages - you can make one change to the formatting and it changes them all.


Won't asciidoc together with tools like pandoc serve the same usecase.


Laying out books. The fact that all of this can be done in a text file, without hidden codes and being tied to this file format or another, is extraordinary. Images are easily handled, fonts simply work (XeTeX & friends work well for me), and — with sufficient warnings — these files can be handed over to an author and edited without messing much, if anything, up. The PDFs generated work well with all the PDF tools I've attempted to use on them, and there's none of the weirdness that too-often shows up in Word or other WPs. If all you want is good-looking text, generated from truly basic documents, it will give it to you without effort.


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


Very late but just in case: If you're referring to my post, it was the particular layout I was trying to achieve. The board wanted me to imitate the existing minutes title page layout from their Word "template." The image was inside a table cell, the table had a lot of column/row spans, and things got messy really fast. As with HTML, using tables for layout is just a bad idea all around.

Also, as pointed out deeper in other responses, the basic tabular environment is not terrific when you're not just presenting standard table data.

Breaking apart the image and table and letting LaTeX handle the layout Just Worked (TM) and looked better in my opinion. That said, LaTeX images and tables are pretty easy and look great by default when you're not doing something weird with them.

Edit: A better way to phrase this might actually be that a major principle for LaTeX is that I should be able to just drop in a new chapter in the middle of a large document and LaTeX will automatically reflow and typeset the entire document without any of the very specific fiddling necessary in WYSIWYG word processors.

A major example is for instance, figures/images/tables will move to new pages but will remain correctly placed between paragraph X and Y. Because I've marked it up as such, if paragraph Y is on the page following paragraph X, it will bring the figure along with it to the new page. In WYSIWYG word processors, that figure would likely just sit at the end of the page until I manually moved it myself.

When you try to micromanage the layout of a very specific page, even if it's just the title page, you're going to have a pretty bad time unless you've written your own \documentclass. :-)


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 like may move page to page depending on how the document flows; if you're used to anchoring an image on a particular page in a WP, that may put one's mind a bit out of joint until it makes sense.


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}

}


The other poster was wrong.


LaTeX is particularly suited to print (and by extension PDF). When you get into writing your own custom LaTeX macros/commands, yes it's difficult. However, the vast majority of users are simply consuming these sorts of custom commands in the article, not producing them. This leads into environments where people writing papers or articles just use what's handed to them.

LaTeX works out amazingly for two very specific use cases: 1) Large, collaborative documents and 2) producing the exact same, highly structured print document over and over. I have pretty extensive experience with the second use case.

When I was Secretary for a non-profit organization, I had an entire little personal library of macros that sat on top of the minutes[1] package. I could open an empty text file, type in \attendee{Name} as people arrived. Type in \maketitle and do a quick preview and the document would instantly build out a front page that included if we had quorum or not, etc. I typed the document exactly as the meeting happened while marking up things like tasks (and who they're assigned to), decisions made (with voting tallies and who motioned what), and so on.

All that data would get duplicated to the end of the document in nice lists for quick reference. It had consistent formatting. The build system (a make file and latexmk iirc) would wrap my new file in the basic boilerplate and spit out the PDF for me to email. I consistently had the meeting minutes published an hour after every meeting whereas my predecessors often took 24 hours or more to publish meeting minutes due to Word being Word. Those documents also lacked a table of contents or the various appendices with summary data.

That said, there were things that I tended to avoid doing, like complex tables or something. There's something to be said for staying inside the box of what comes built into LaTeX. I recall giving up with floating an image to the left of a table on our title page and just plopping the image inline in a horizontally centered paragraph and then putting the rest of the title content beneath it.

Also, many documentation frameworks (sphinx comes to mind) use LaTeX under the covers to produce their PDF output. So you might think you're just using markdown or RST, but somewhere someone is converting that to LaTex or TeX in order to leverage a very good typesetting engine.

[1]: https://www.ctan.org/pkg/minutes


I'm a professor and research mathematician, and I use LaTeX for nearly everything I write. In addition to what others wrote --

- The way I conceptualize it, LaTeX is a word processor. So, for example, if I'm writing a rec letter and I choose LaTeX over Word, I'm thinking "I like this word processor better than that one."

- LaTeX/PDF is often criticized for being static, but in my experience, this is a good thing in most cases. If I am discussing the contents of a file with someone else, it is useful if we are both looking at exactly the same thing.

- I don't try to do any significant programming, or extensive customization of how my documents look. I agree that trying to do so would be annoying, but this is not part of my use case. If you look at a random selection of math papers, say here

https://arxiv.org/list/math/new

you'll notice that all of them look more or less identical.


PDF is unfortunately still the preferred format for sharing research papers.

And you're right, single file HTML with embedded images would be a much better format, but I assume publishers are preventing this.


> single file HTML with embedded images would be a much better format

Or use epub, which lets you store the images as part of the zip archive without having to store binary files as bloated and text editor killing base64 text.


Yes, you're right. Another benefit of epub is that existing reader apps already have good support for highlights, bookmarks and comments.


have you ever printed a webpage?


Yep. A while ago, I used wkhtml2pdf to write a document in Markdown (Pandoc) and convert it to PDF.

It worked fine. There where some minor issues around page breaks. But then again, most people don't use paper for reading anymore, so I'll happily accept these minor issues over the absolute inconsistent hell that is text-selection, searching and hyperlinks in most PDFs.


For how long do we still need to print a paper?


For as long as I use time sitting on public transport and airplanes to review them. Nothing beats the ergonomics of a printout, a red pen and no internet.


I think the same way but I'm also pretty sure that the generation to come does not appreciate it anymore.

I hope that e-inc displays will mature. Paired with the UX of a modern I Pad this will replace printed stuff.


Or a decent paperback novel.

Reading long form content on a screen gives me awful eyestrain.

Plus I love the smell of a good book.


Paper is the best form of long term storage of data we have besides stone tablets.


> What is the intended use for LaTex these days?

Writing anything with complicated mathematical typesetting, for one; their have been improvements in word processors and thinks like MathML/MathJax, but they are still behind.

Works pretty well for autogenerated docs with more going on than is easy in Markdown, also - but that's often a bit of a wash.


Anything where decent typography is desired. Also, of course, mathematics. Mathjax is very good, but we sometimes want a canonical version of a document that looks the same for every reader, and doesn’t depend of the vagaries of constantly evolving browser engines. This means PDF.


I use it for puzzle books. Things like suduko, cryptograms, criss-cross, etc.

I have various custom C++ programs to generate the puzzles. But, getting the results to a formatted PDF was nearly impossible.

I use LaTeX as I can have my C++ program output a text file which, when compiled with LaTeX, creates the pretty puzzle books.

Essentially, I can press a button and “poof” I have a print-ready puzzle book ready to go up on Amazon.


My use case was for getting easy marks for proper APA formatting, which Zotero/EndNote and Mendeley don’t quite cover in one pass.


Word processor does not work with git and group collaboration and versioning properly.

HTML is not an authoring tool. Maybe pandoc or sphinx or other system would compete.


Master/PhD theses and papers in the sciences, particularly if formulas are involved.


Gold standard equation editing.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: