Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
LaTeX3: Programming in LaTeX with Ease (2020) (alanshawn.com)
86 points by nequo on July 31, 2023 | hide | past | favorite | 81 comments


I write LaTeX pretty much every day (math graduate student), and I like LaTeX quite a bit. It's a piece of software that solves a difficult problem, and after the (admittedly nearly vertical) learning curve, you can quite easily produce beautiful documents with it. It's a reproducible, programmatic solution. However, it is also clear that there's quite a lot of legacy pains within the language, much of which occurs when trying to stretch the macro system.

If you're interested in this (and already know LaTeX), consider reading the full expl3 design document:

https://texdoc.org/serve/expl3/0

I don't know if LaTeX is what I'll be writing in the future (at least, hopefully not in its current incarnation). I'm keeping my eyes open for a language with a similar design philosophy, but, frankly, it's a monumental effort to write anything similar, let alone build the community around it (packages, but also journal styles, etc.).


There's Typst (https://typst.app), which is a new typesetting language aiming to improve some of the more inconvenient aspects of LaTeX and make it more functional (also incremental rendering!).


Yes, I've looked at this. It looks great, and the templates functionality is precisely what makes LaTeX is the standard, and so it's clear they understand what it takes to replace the language. As it stands, LaTeX is deeply entrenched in the mathematics community, and it'll take journals creating typst templates to truly allow me to switch (unless I can transpile typst to LaTeX? this is typically a bad idea). But I've been playing with it, and I really adore the smarter programmatic interface.


Ditto, the inertia is real but one can be hopeful. I'm using it for personal documents (simple ones for now using currently supported features) because it's so easy to set up a data pipeline to read data from CSV, YAML, and JSON files along with just one executable to work with.


You can convert between Typist and LaTeX with Pandoc.


> and after the (admittedly nearly vertical) learning curve, you can quite easily produce beautiful documents with it.

what helped you get over this curve?


Not a math student, used to be a CS master student (with not so great math skills). For me, it took 40 hours to learn with Overleaf/Sharelatex (or whatever they're called nowadays).

Just creating many small proof of concept thingies, and slowly building them out. I did this until I was comfortable enough. After 40 hours of learning it, I was about 90% as fast as typing in MS Word. There was one difference though, LaTeX made me way more structured because I commented at every paragraph what the intention of that paragraph was. So my writing became way more focused.


Frankly, I got over the curve by forcing myself to write a lot of it. I learned about the language back when I was a freshman in undergrad, and I intentionally just did everything in it. Not just my math and computer science work (but absolutely those), but also I tried to bend the language to do my other course work (e.g. there's a lot of ways to typeset beautiful linguistics diagrams and latin translations).

I learned a lot when bending it. And then I again learned a lot when I began to have collaborators whose LaTeX I could look at. And one more time when I began to put together LaTeX for publishing.

It was painful for about a week, uncomfortable for about a month, fine for about a year, great for the next five, and as fluid as speaking afterward. I'd call that the typical low-level tool learning trajectory.


I didn't write any latex for a very long time now, but by the time I went through a master in CS, I had my laboratory advisor asking "how did you make this?"

A good answer I didn't thought at the time but that will aplly equally here: curiosity powering the will to read more documentation.


The most common way to learn is to co-author a paper with someone who’s proficient- but that’s an expensive resource!


Live preview, overleaf, and the wikibook page on latex


Though I'm not the same commenter, I personally got over the curve by learning from the https://latex-tutorial.com/tutorials/ website recommended by my professor of a math course, and then by learning how to use the Vim text editor with LaTeX. I also gained practice as the math course happened to require students to submit weekly problem sets in LaTeX.

~~~

The first stage was to learn from the LaTeX Tutorial website, which includes a detailed tutorial with no paywall [1]. I paid the closest attention to tutorials 00 to 05 for the core functionality, then skimmed the rest of the tutorial, as I would only rarely use the remaining features. (For tables, even after gaining a general familiarity with how the tabular environment work, I still found it faster to use the Tables Generator website [2], which was also recommended by my instructor.)

I then gained practice using TeXstudio as the software to convert LaTeX code into PDFs (as I preferred an offline program), though my professor and most of my fellow students used Overleaf as an online editor. However, I found that I spent a lot of time transcribing handwritten problem sets into LaTeX documents on TeXstudio and Overleaf, and searched for a faster and more pleasant method (in particular, I found that there was a significant delay in my experience when compiling LaTeX code to a PDF with TeXstudio and Overleaf).

~~~

Speed and ease-of-use were therefore my sources of my motivation for learning how to use Vim with LaTeX, though you should have enough knowledge for effectively writing LaTeX documents with just the information from the LaTeX tutorial website. I was also motivated due to my curiosity about Vim in general, from past discussions on the text editor in an xkcd comic and various forum discussions.

To begin the learning process for Vim, I completed the default-installed tutorial “vimtutor” (also motivated because I was curious about Vim in general, from past discussions on the text editor in an xkcd comic and various forum discussions) over a weekend day. Crucially, I followed most of the advice from a Hacker Noon article [3] about more efficient ways to scroll up and down. I then edited the .vimrc config file to allow for using the cursor for highlighting text to keep things simple, using most of the default configurations for Neovim.

Then, I roughly followed E.J. Mastnak's guide at [4] to get set up, over the course of another weekend day. After some troubleshooting with the configuration, I finally got the setup to work, and I’ve happily been using Vim with LaTeX since then. Since the process reduced the friction to compile LaTeX code to a PDF, I compiled my document more often, so I could catch errors early and often (I rarely spend time troubleshooting and debugging LaTeX code now, since I now fix errors shortly very after they appear, as I compile the document every few lines of code or so).

The main major drawback of using Vim and LaTeX was that I followed the advice to enable autocompletion with snippets (e.g. typing “AA” automatically types in “\forall”) via the the UltiSnips software, which would make substitutions without an audible notification (in contrast to other software that I use to make snippets outside of Vim, that would make an audible ping before a substitution). That led to some significant typos in an early assignment I submitted, and I since learned from my mistake to be far more careful when using Vim with LaTeX for enabling snippets. However, snippets also functioned as a nice learning tool, as I would learn through practice what some basic commands would be, through the auto-substitution (for example, I’ve now easily remembered through exposure that <= is written as `\leq`) in LaTeX.

~~~

To conclude, you can use free tutorials to learn the basics of LaTeX, and use Overleaf and TeXstudio to practice. For additional speed and pleasantness, you can spend a couple focused weekend days (or possibly more) to learn how to use Vim with LaTeX following another free guide. Then, you can reinforce your learning through regular practice (in my experience, my regular practice was necessary due to requirements of a math course—if your work or education similarly requires LaTeX, a real-life necessity is a great motivator for practicing document production with LaTeX).

[1] https://latex-tutorial.com/tutorials/

[2] https://www.tablesgenerator.com

[3] https://hackernoon.com/learning-vim-what-i-wish-i-knew-b5dca...

[4] https://www.ejmastnak.com/tutorials/vim-latex/intro/

[5] https://github.com/gillescastel/latex-snippets/blob/master/t...



Looks interesting and I could see this being adopted in limited situations. Most Latex users only use a tiny subset of its capabilities. Most non-math journals also easily accept non Latex manuscripts. The math part seems similar to Latex (without backslashes) which is important since most folks have built muscle memory there (not just for documents but also for typing math in other situations like Markdown docs and Mathjax or KaTeX websites)

The only issue is the ecosystem for specialized fields with their own typesetting requirements.

But I’m all for anything that is easier to debug than Latex.

That said I feel it will never truly compete with LaTeX in terms of adoption. LaTex is like SQL — it’s long in the tooth and has some minor design issues but represents something very fundamental that defies reinvention.


LaTeX is a de-facto standard in academia and journals. Makes it very hard to just skip and go to Typst or any of the other recent takes on math typesetting.


I kind of hoped that new contenders to LaTeX could ditch the state-based sections (e.g. `\section{Introduction}`) and switch to strictly scoped sections that are properly closed (i.e. section trees).


HTML is evidence that having to do a closing tag is an amusing non-starter for authored pages. Such that I don't see that flying too well.


The problem with HTML is that you name the tags and can close them anywhere.You could have something like this instead:

  \section{Introduction}{
    .
    .
    .
  }


I get the motivation. I'm not sold on the results. Especially since you will have a ton of machinery around what sections can go in other sections. It really is nicer to not have the brackets.


Sure, but a single pair of parentheses is enough:

[section[Introduction][...]]


Sections in my markup language work like that. I definitely find it a better approach.

https://xidoc.nim.town/commands.html#section


Good point, never thought of that. Indentation would become hellish though.


it's like suggesting to use julia for ML 5 years ago instead of using Python, because it is new. Nowadays is somewhat decent but still lags behind PyTorch and none cares, same will be for Typst unless something major happens.

For example, how I'm supposed to use a markdown language that doesn't have a tikz-like library? Sure you can still write commutative diagram but that's not all tikz does.


This looks neat.

I noticed it has a scripting language built in, but how might one use already made scripts in another language? For example, if I already have a make_plot.py script, can I just call it instead of rewriting everything in this new scripting language? It seems that this functionality would be absolutely crucial for adoption, but there's nothing but complaining and disagreement on the issue raised on this in the GitHub.


Would you happen to know if it is possible to convert an existing Latex document into Typst?


You could do it with Pandoc (https://github.com/jgm/pandoc), it supports both Latex and Typst as input and output formats, and can use either as a PDF engine.


Great - thanks so much!


Thank you for this, I might consider it for my next paper - it seems great at a first glance.

Do you use it on a daily basis? Any problems I should be aware of? I see quite a few open issues - do they actually matter?


I've utilized it to craft a number of high-school level mathematics and physics problems and solutions, and the experience was genuinely pleasing. The scripting language brings a fresh perspective to the markup language, while the plugin ecosystem is steadily expanding and improving.

Though I don't have firsthand experience in formatting documents to meet publication standards, the flexibility it offers seems promising for such applications.

My sincere hope is that it garners the recognition it truly deserves, and that significant publications in the future will embrace it, rolling out official templates directly in typst.


It can't embed PDFs and there doesn't seem to be a solution in sight, because they want to keep their software stack working in the browser. It supports embedding SVGs, but converting PDF to SVG never works well, so the only reliable option is to render the PDF to high-DPI PNG.

The font subsetting seems to be suboptimal. I had small documents that were a megabyte when they should have been a few kilobytes. This however can be fixed with PDF tools.


Would be great if they had stuck to typesetting Math instead of inventing a new programming language. Lot of scope creep there. Who wants to learn yet another programming language ?


While LaTeX's future replacement could certainly learn a lot from modern languages like Markdown, I hope that the creators will use as much rigor in designing the typesetting system as Knuth did. Part of LaTeX's success was the absolutely beautiful documents it can make with nothing but a personal computer. For example, to compute line breaks, it solves an optimization problem over the whole page.


Oddly, I would cite Knuth's rigor in stability as much as in rigor of algorithm choice and creation.

Specifically, TeX still works well today because of deliberate choices to not break things. He is well aware of modern techniques for many of the things that people complain about. He likes that he can still build every one of his documents today, with no concerns over things having "moved on to better ways."


> modern languages like Markdown

Markdown was created in 2004. From the creator:

> ... the single biggest source of inspiration for Markdown’s syntax is the format of plain text email.

Email goes back to 1965, though I suspect Markdown's influence stems from the more widely adopted email usage of the 1990s. I'm not sure if I'd call Markdown "modern". Quite popular though!

> Part of LaTeX's success was the absolutely beautiful documents it can make with nothing but a personal computer.

I'd say that was TeX's success, with LaTeX bolted on later to greatly improve TeX's extensibility. Keep in mind, there are a number of TeX-centric implementations beyond LaTeX. For example, my fork of NTS, called KeenType, is a pure Java version of TeX that can typeset beautifully and has at its core Knuth's original TeX files. I specifically avoided integrating LaTeX.

https://github.com/DaveJarvis/KeenType/tree/main/tex/src/mai...

My Markdown text editor, KeenWrite, uses KeenType to preview math in documents.

https://github.com/DaveJarvis/KeenWrite/blob/main/docs/scree...

When exporting to PDF, KeenWrite uses ConTeXt to typeset the final document. ConTeXt being another TeX-based system. This is the reason why KeenWrite only uses TeX: to give users the ability to choose what TeX flavour to use for typesetting the PDF.

https://wiki.contextgarden.net/Main_Page


2004 is still modern era of computing - and far more recent than TeX which is half a century ago. And, creation date aside, its wide adoption is even more recent.


There is hope that/ongoing research into the algorithm (so that it) will be extended beyond the paragraph/page and will allow the sort of optimizations/adjustments which are necessary.

In almost 4 decades of typesetting, I've had a chapter come out exactly right, requiring no adjustment exactly _once_ (fastest 40 minutes of my life) --- the usual approach is after:

- importing the text and all the images, paging everything with the defaults

one has to:

- check the last page --- is it reasonably full? is the page which it is ending on acceptable --- would it be better to gain or lose a page?

- from the beginning, check each image/table --- where do they fall relative to the first reference? What needs to move to what page? Make gross adjustments to make that happen where possible (resizing images/tables/tweaking placement, if the book design allows, change image/table type/appearance to adjust things

- see where one falls at the end of the chapter --- last page full enough? Would it be desirable to gain/lose a page?

- go back to the beginning, begin fine tuning each page/spread --- are there any paragraphs which don't look nice? (setting too tight/loose, rivers, stacks, &c., adjust as needed), do the bottom lines line up? adjust paragraph specs/image size to make them line up (keeping in mind if one wants to gain/lose a page) --- do this for each page/spread

- check the last page --- repeat any of the above adjustments as necessary --- sometimes, while one might want to gain a page, a tighter setting losing a page looks sufficiently better that it's worth un-doing all the tweaking an re-setting thus


The problem I see is not rigor, it's more that there's no realistic chance we'll ever see that next system available in our lifetimes...


Just to clarify, this is not a new version of the TeX engine or a new language, it is a new set of macro interfaces that one can use to implement features in the LaTeX macro package. It provides certain facilities that make it easier to write larger macro packages for users.


I'm a math professor. I've written articles, books, lecture notes, exams, exercise sheets, presentations... with latex. Hell, even a custom class for a journal I participate in.

I hate this language with a passion. The design choices may have made sense in the 80s when 128 kB of RAM was considered high-end, "tooling" was an unknown term, and modern parser design an academic matter. If I have to read "Runaway argument" and sift through a hundred lines of log to find an error again I will have a stroke.

LaTeX3? I have great admiration for the work they've done. But they have made at least two mistakes.

1. The fundamental mistake of insisting on backwards compatibility. Latex is choke-full of historical cruft. How many times have I read things to the effect of:

"Oh, you want an inline list? And you're using the inline-list package?! You poor fool! You should be using inllst3 with the xtabl option. Holy shit, you're using hyperref too?? (Spoiler alert: everyone uses fucking hyperref.) You cretin. Well, you should load these three other packages in this specific order. Then paste these esoteric commands:

\makeatletter\def\tbl@lst#1{\hy@tbl\vphantom{#2}#1\strut\lbl@lst##&!@\makeatother

No, I'm not going to explain what the commands do. Figure it out. Documentation? In the texbook. It's not online, you expect Knuth to work for free? Go buy it on amazon, you freeloader."

Don't get me started on how to get arXiv to accept your biblatex files.

Throw all this into the trash and start anew. There's no other good way forward.

2. The superficial on creating a theoretically beautiful and consistent syntax that is designed for computers, not for humans.

Seriously, go to the authors' website, the "LaTeX3 examples" page https://www.alanshawn.com/tech/2020/05/25/latex-3.html#examp.... Here's how you multiply a length by a float and store it somewhere.

    \cs_generate_variant:Nn  \fp_set:Nn {Nx}
    % #1: input name
    % #2: output name
    % #3: factor
    \cs_set:Npn \__multiply_length:NNn #1#2#3 {
        \fp_set:Nx \l_tmpa_fp {\dim_to_fp:n {#1}}
        \fp_set:Nx \l_tmpb_fp {\l_tmpa_fp * #3}
        \dim_set:Nx \l_tmpa_dim {\fp_to_dim:n {\l_tmpb_fp}}
        \dim_set_eq:NN #2 \l_tmpa_dim
    }
How anyone can look at this and think "that's the proper way of doing things" is beyond me.

I've started writing stuff with msword and I honestly like it better. Even UTN28 kind of makes sense. Yes, I'm expecting a fight after writing this.


Oh, I'm with you on a lot of things here, and I've just typeset my PhD manuscript with it, being a longtime (10 years) user.

LaTeX does not feel like a programming language. It is first and foremost designed as a macro language, which is nice for writing text, not that much for implementing algorithms.

I quite like what lualatex is doing, including a lua interpreter to add some simple code to your document, and make writing packages easier. I admit I haven't used yet, being afraid of compatibility issues. I know a friend also uses a package to interoperate with python.

This doesn't completely solve my main gripes with LaTeX though, including the slow compilation speed (while 95% could be cached), and the bad error messages, as well as the brittleness of the programming part (I ended up typesetting my manuscript in 9pt because I forgot a comma after the previous documentclass argument).

And the adoption is slow, packages stick to the most compatible baseline.

Maybe the future really is to restrict LaTeX use to minor parts of the text, like Markdown (pandoc?). But there's still some value in having a plugin system that doesn't require additional dependencies.


The only thing I really don’t like about LaTeX is the slow compilations, which could I guess be solved by caching or breaking up my file.

OTOH, I’m of sure to what extent this slow compilation is actually just a symptom of something bad in the language. I’ve included a bunch of packages in my file, which probably slow down compilation, due to the fact that they have to deal with ancient cruft.


I have written three books in Latex and I also hate it. I am thinking of a fourth one but I don't think I can take another of these night trying to figure out why the lines in a table don't connect.

At this point I will try anything else.


I would try Lyx. No need to deal with Latex errors and its equation editor is actually worth using (unlike literally every other equation editor).

TeXmacs is another option. No idea if it's any good - I always ignored it based on the name because it sounds like some kind of Emacs based Latex editor but it's actually nothing to do with Emacs and not based on Latex. Terrible name. Might be good though.


I may be crazy, but I would love a functional language that compiles to LaTeX, BibTeX, and pgfplots--like the Elm language, but for typesetting. At least that way, once a document compiles, we could get some guarantees about its behavior, no matter what data we feed to it. Overflows would be handled however we define them, and the document would still produce something.

The reason I say this is because every document I produce in the TeX family needs to be tweaked slightly depending on the text and data I compile with it, or else it either won't compile or something will get visually screwed up. At least with strong typing I can get useful error messages and better control of the behavior throughout the whole document.


It's an interesting idea --- fundamentally a typeset document is nothing but nested key value pairs where there are:

- tags/formatting large --> small, document --> paragraph --> character-level

- content which is tagged

I find that if one just finds all the "right" packages and uses appropriate markup it mostly "just works", if one then adds a pair of packages:

- one which defines all the additional markup beyond the initial author markup as empty commands

- a second which redefines all those commands to achieve the formatting


There's a modern way of doing things now that's much simpler. Just use markdown, and then convert to PDF with pandoc.

Oh, right, you want to be able to comment on it in a nice way, and not everyone in the group is super familiar with git, so you can just use a self hosted overleaf for the comments. Oh, that's actually for latex, so just use markdown->latex->pdf, and now everyone can comment easily.

Oh shoot, nevermind, the latex comments aren't the original source, so the comments won't sync right. Easy, just make a custom script to make the comments as part of a git commit to the repo with the markdown, in a format that can re-apply the comments when they're pulled and synced with the latex. Sure, that will work :/.

You want easy version control of image placement too? No problem, markdown can work with css as well, so just add that into your markdown file wherever needed.

This is so much easier, right?

Right?


My Typesetting Markdown series goes into creating a number of scripts that use pandoc, knitr, and a YAML interpolator to do just that:

https://dave.autonoma.ca/blog/2019/05/22/typesetting-markdow...

Later, I wrote KeenWrite, which is both a GUI and command-line application for converting Markdown documents to PDF. KeenWrite separates the content layer from the presentation layer and uses ConTeXt to do so. I've tried to keep my software backwards compatible with pandoc.

https://github.com/DaveJarvis/keenwrite


When I was into my UNIX phase, I was deep into LaTeX, wrote several assignments in it, including my graduation project reports and thesis.

Nowadays, I rather use a WYSIWYG editor, even if it takes a bit longer to type equations (when needed).


Ha, glad to see I'm not the only one. LaTeX math is great, the rest should be thrown out. Something like Asciidoctor is perfectly fine for creating “serious” documents and supports LaTeX.


> I've started writing stuff with msword and I honestly like it better.

Give TeXmacs a try. You don't need to suffer between Word and LaTeX :)


The appeal of word isn't the WYSIWYG aspect. It's that... it. just. works. You want a table? There's only one way to make a table, and it works. You want to insert an image? It f*cking works. You want to format running headers a certain way? Believe it or not, it works! No weird incompatibilities between packages. No delving through the depth of 1990-era latex library code to figure out where the weird space comes from. Everything just works! And there's documentation online! Written for humans!

Trust me, writing code is not the issue with latex. I've written C++ code for embedded MCUs. I've taught python to undergrads. The pain does not even compare.


The disadvantage of Word is that it has absolutely terrible output and quite a lot of use cases are hard or impossible to use in it.

Don't let the name fool you. TeXmacs won't make you write (La)TeX. You'll get tables that work, images that work, hyperlinks that work, running headers that work, math that works, kerning that words, hyphenation and justification that work. (From math forward are major failure points in Word)


>The disadvantage of Word is that it has absolutely terrible output

This is a moot point if most people are reluctant to pick up latex and those who do are greeted by often unreadable, esoteric code that produces error messages such as "badness". This is the problem with latex and its derivatives, not their output.


TeXmacs isn't a derivative of LaTeX. It has an unfortunate name. It is a WYSIWYG editor that produces comparable output. It does support some subset of (La)TeX backslash commands as convenience, but requires none of them.

Basically you get all the advantages of Word, all the advantages of (La)TeX, and none of the disadvantages of either.


For anything more complex, world utterly fails when you inadvertently edit a column of that table, that will break page 533 beyond recognition.


Do you have anything to contribute beyond rehashing memes? I can have a go at it too: better not miss a bracket on line 2000 of your document, otherwise latex will complain about a runaway argument in a different file and you'll have to sift through the whole thing to find where the error is.


But you at least get an error before you print your whole work! Like, the two is absolutely incomparable.

The sad part of Word is that even professionals mess it up constantly, because you have many ways to reach the same goal, and that every addition affects the whole document, or in some fortunate cases only the part till the next page break. But silent breakage is the worst, as is quite clear from any kind of programming background. Imo, Word just doesn’t scale due to this.


The right answer is a structured editor like Framemaker, or Oxygen.


Can't say I've heard of those, but TeXmacs does pride itself on being structured.


Those exist since the 1990's, and sorry to say, they are hardly unknown.


Perhaps they aren't. TeXmacs is also from the 1990s and from your brief description, no compelling reason was offered to prefer them. :p


So here is one, plenty of people used those at CERN, I haven't ever seen TeXmacs in action.


You might like Typst. It is a new language, new tooling that actually learned its lessons, and while its community won’t magically replace all the cruft that came from the LaTeX world overnight, I think it might have already managed to get a critical mass and it can be the next chapter of scientific papers (among other use cases)


Do any scientific publishers accept it?


Give it 20 years, maybe 50.


While we're at it let's stop using PDF files too /s


There's a variant of arXiv.org called ar5iv.org which renders papers in HTML5 instead of PDF. It is very handy when reading papers in a browser and it is generated from the same LaTeX files. You just need to replace the "x" with "5" in the URL:

https://arxiv.org/abs/1807.11408

https://ar5iv.org/abs/1807.11408


Why would I want completely broken layouting instead of artfully crafted one? PDF does its job absolutely well, sure it won’t accommodate to your screen but there is no automatic way of laying out the content in a way that it makes sense both semantically, and from a design perspective. That figure 10 pages down is completely useless, I want to see it when it is referenced in the text. I really have a hard time reading anything that requires more formatting that a novel in anything else than properly rendered PDF.


I don't really understand. Which figure is 10 pages down in the example that I linked?


Nice, thanks. I knew of arxiv vanity as well- https://www.arxiv-vanity.com/papers/1708.06733/


Not sure why you're being sarcastic. PDF is terrible for anything other than printing documents.


It is perfect for its job, and nothing else comes even close to it.

https://news.ycombinator.com/item?id=36948776


Yet they persist. So does latex, even in 2023. There is intrinsic value in both that OP does not want to acknowledge.


And mp3 persists despite being inferior to any alternative. The reason isn't intrinsic value, it's inertia.


Great rant, and on the money. Made my day! Thank you.


Latex doesn't require you to learn how to multiply two lengths! The beauty of LaTex is that it makes the simple things easy and hard things possible. If you don't like programming in TeX, great, just use a package that does what you want or use the defaults of the language. People who really care about the fine details of how the document looks can count on the TeX engine to do that (after reading Knuth's book). Everybody else can still take advantage of the great quality of the results.


Every time I've tried to stray from LaTeX 2e to something else TeX or TeX adjacent such as LaTeX 3 I've always found that programmatically generating LaTeX 2e is easier for me, often because I don't have time to learn how to do it "properly" or the macro packages I want to use aren't available, etc.


I have a similar experience with XeLaTeX. The "it's not unicode unless you jump through hoops" and "oh you want to use opentype fonts? I'm sorry to hear that" of plain LaTeX2e always make me go back to XeLaTeX instead.


So, someone will probably correct me further but:

You're still using (mostly the same) plain old LaTeX 2e with pdftex, xetex, and luatex (pdflatex, xelatex, and lualatex). Those are just 3 different engines for Knuth's original tex. As far as I know, some parts of all 3 are written in WEB (which is a language that persists mostly because Knuth's TeX is written in it).


Note that LaTeX2e is just a set of commands, a bunch of which are absolutely ridiculous to use in plain LaTeX, and simply not used when using LaTeX in conjunction with XeTeX as engine, because XeTeX can do things that plain TeX just can't, and so all the insanity that LaTeX2 had to invent to make TeX "do things it was never designed for" simply aren't used when you're writing XeLaTeX documents. Like everything being Unicode by default, no packages/macros/special affordances required. Including not needing stuff like \hat{...} or \grave{...} because those make no sense when everything's Unicode: just write text. Or having direct font access instead of needing to go through the horrendously outdated TeX font metric concept.


While what you're saying is true, I get the feeling that you want to say that this is in contrast to LaTeX3, which isn't "plain old LaTeX 2e". Except... that it is. The project to have a new engine has been scrapped a long time ago. LaTeX3 is just another layer above LaTeX 2e. With all its cruft.




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

Search: