### Let's find something better than LaTeX

#### Peter Hoffmann on September 21, 2017

Filling my need for a response to Nicky's pro LaTeX article I'd like to explain why LaTeX is a failed project to me. Yes, I have strong feelings ... [Read Full]

Question: w/r/t your education research deliverables, I'd be interested to hear more about that solution's implementation... Thinking we are headed down the same path, but for the purpose of producing large, customized downloadable books. Using PDFlib right now but I believe that will take its toll at scale.

Comment: As I read the post, couldn't help but think it would be nice to have something do for LaTeX what Typescript/Babel/etc are doing for Javascript.

Last things first: having another layer before LaTeX -> PDF would - in my eyes - not make LaTeX any better but increase the bloat. But this is just a spontaneous opinion.

About PDFlib I'd just like to add that a commercial (non-OSS) product with a lot of language bindings is hardly a solution for a problem which obviously should be solved using a domain specific language.

We are currently still using LaTeX but are always looking to migrate to something else. HTML is our favorite but not the winner.

Fair enough.

But, I'd still like to hear more about how you use LaTeX in your solution.

for me, "something better than latex" is org-mode

it can create beautiful latex pdfs (with citations, bibtex support, formulas...) it also supports tables and rudimentary spreadsheets, and it's entirely legible as plaintext (which latex isn't unless you understand latex)

Same here, org-mode is the only way which made me enjoy writing LaTeX.

same here -- and one of its strengths is that it can effortlessly go down to full LaTeX where needed.

Same here, org-mode is the only way I ever managed to actually produce LaTeX documents.

Here here! For those interested, watch this video:

There are also extensions for VS, vi, and atom, so its not just for emacs...

I don't disagree that LaTeX needs an overhaul, but part of the problem is that since it's been around so long you run into the same problem with effectively any code-rewrite. It's going to take ages and some kind of standard needs to be agreed upon.

I will say, though, Microsoft has been doing an excellent job in making the effort to make maths easier to type in Word and OneNote. There's still a few clumsy unintuitive syntax things e.g. A matrix, if purely typed from text, needs to be written as [\matrix( row11 @ row12 & row21 & row22)] as opposed to \begin{bmatrix} row11 & row12 \ row21 & row22 \end{bmatrix}, but I'm positive a happy medium will be achieved.

I don't think it's infeasible to take some ideas from LaTeX and integrate them with e.g. markdown to provide additional functionality to a general markdown editor. In all honesty though, I have no clue how difficult such a task would be, and whether the 'taking care of the unimportant stuff' needs to be reintegrated from scratch or not.

Completely agree. I decided to write my master thesis in HTML to see if I could produce something of high quality. Sort of successfully. I was disappointed by CSS print features, such as printing page numbers. Although we're getting there.

I have dedicated some open source projects to be able to use LaTeX stuff on the web, most notably latex-to-unicode-converter and BibTeX.js. KaTeX is a wonderful project for math typesetting on the web.

A big problem with LaTeX syntax is that the language is actually very poorly defined. There is no BNF and parsing general LaTeX is at least weakly context sensitive. Basically the only complete syntax definition is the source code, which is pretty much unintelligible.

I was disappointed by CSS print features, such as printing page numbers.

CSS can allow you to format pages with borders, page numbers and the like. The problem is that web browsers don't implement many of the paged media features from the CSS spec. You need to use specialized software to properly generate PDFs from HTML and CSS.

You can check out print-css.rocks for tools available for the job. PrinceXML seems to be the most popular option, but WeasyPrint is the only Free and Open Source alternative. It's not as feature complete, and a tad buggy, but I haven't had too many issues with it so far.

Thanks for this great article. Last semester I had to do a course on LaTeX at university and it was terrible. We all got lost in package chaos and complicated errors we didn't understood. The professor neither understood our problems and feelings about LaTeX nor did he really help us. We all felt so lost. So it's great to hear that others have such problems with LaTeX, too.

I have never seen a university lecturer who was conversant in LaTeX. Academics are already not-the-best coders. Getting them to move from server-heavy SVN to Git is more difficult than stopping global warming. LaTeX is so much more difficult than Git; there is no chance any average academic can master LaTeX intimately.

That sounds like a bad course -- similar to the first course I had on C++ …

I think a good replacement for LaTeX is bookdown.org/
It´s perfect for any book. Technical or Non Technical.

The bookdown package is a free and open-source R package built on top of R Markdown to make it really easy to write books and long-form articles/reports. Markdown is a very simple language but made powerful thanks to Pandoc, and bookdown has added a few important missing features related to writing books, such as figure/table caption numbering and cross-references, and embedding HTML widgets or Shiny apps. We have tried hard to make everything work for all output formats (PDF, HTML, and EPUB, etc), so your readers can choose their favorite file format to read. Although the bookdown package was developed using R, it does not mean your book have to be related to R at all. You can certainly write poems or novels with bookdown!

:D

Bookdown contains some nice extensions of Markdown but lacks a style language, table support and is bound too tightly to R (which itself contains some strange constructs by itself)

Bookdown is a wraper to pandoc and rmarkdown. You can choose to use simple tables or advanced tables using latex or R code.

pandoc.org/MANUAL.html#tables

bookdown.org/yihui/bookdown/tables...

When you do not want a table to float in PDF, you may use the LaTeX package longtable, which can break a table across multiple pages. To use longtable, pass longtable = TRUE to kable(), and make sure to include \usepackage{longtable} in the LaTeX preamble (see Section 4.1 for how to customize the LaTeX preamble). Of course, this is irrelevant to HTML output, since tables in HTML do not need to float.

knitr::kable(
iris[1:55, ], longtable = TRUE, booktabs = TRUE,
caption = 'A table generated by the longtable package.'
)


For styling you can use themes bookdown.org/yihui/bookdown/themin...

I know that it can be seen odd that even using a powerful tool like bookdown you still need LaTex for certain operations. But I think using LaTex in certain areas that excells, it's better to use LaTeX for everything

:)

I think there is still an application where LaTeX doesn't have a better replacement : generating big pdf documents / documents to print.

You can argue pdf documents and print documents are from the past (and I would agree) but since a large part of the industries are still using pdf, there will be a need for a "language" to generate big pdf documents with a good layout and which print well (particularly with a good handling of page management, not cutting the document anywhere since it was thought to be a web document not a pages-based document.)

I agree, there is a need for printable documents, preferably in PDF-format. But I don't think they are something from the past. And I agree that HTML is not the solution. Instead of printing webpages one can optimise HTML for printout but some viable parts are (still) missing.
I just think there should be something better than LaTeX which could be based on HTML. We should not settle (any more).

Most of the problems here sound like they are about support from the development environment, not the system itself.

• Error messages: Compiler (just compare GCC 6 vs. GCC 2 -- latex could become as good)
• Packages: Organization of information and recommendation of tools to use.

(well, objects floating away means you need \FloatBarrier -- and most times I used wrapfig, the caption evolved and at the end I realized a float fit better)

I found that I cannot hack with LaTeX without internet, and that’s pretty worrying. But it’s because I have no neat local documentation. Too much expert knowledge, too little clear and structured documentation (except for the documentation which is restricted to single packages). That does not sound like something which needs a rewrite.

I pretty much agree with everything you've said. LaTeX is really terrible conveying error messages, and it's very difficult to get stuff right if your way is not LaTeX's way.
However.
Given the humongous amount of plugins and related developments (like Knitr, which I love) I don't see a replacement coming soon. Some simpler markups like markdown or org-mode can go part of the way, covering simple articles and even whole books; I wouldn't write a book now in LaTeX if I can avoid it. But for some niches there's nothing that beats LaTeX.
Besides, there's some stuff there that's pretty interesting: XeLaTeX, for instance, biber as a replacement for bibtex... I think that eventually a better LaTeX will simply be... a better LaTeX.
This is an issue that arises from time to time, and I seem to remember to have seen some articles that even provide PoC for replacements. None of them got to fly. So I guess it's LaTeX (or LaTeX++) for the foreseeable future.

You made me ponder what I want from LaTeX. I'm a heavy user of LaTeX at school and work. I guess LaTeX has become to some of my work circles (especially schools) what Markdown is to me --- a convenient common language to converse in. LaTeX can be really concise if you're not trying to get really creative with layouts.

I personally believe that LaTeX and its packages are a lot of value. Many packages are updated constantly, even in 2018. Yes, these packages basically patch problems in LaTeX. I think it's mainly because the LaTeX community is quite toxic, and doesn't receive corrections very well.

The toxicity of the community is very likely directly shaped by the frustration that LaTeX causes the users (the community itself).

I had been compiling quite a list of "Hello World" LaTeX know-how with MWEs (minimal working examples), replete with the precise packages needed for each MWE. You can also look at my recommended starter (tex.stackexchange.com/a/471072/152148).

If anyone is interested to learn LaTeX together, and brave the toxicity of the LaTeX community together, let me know. I'll get you started quickly. (UPDATE: Sorry, I can't now. Work instructions.)

You've summed up my feeling of conflict about LaTeX. The difficulty of designing books has made be give up using it but I love the way that it automates page make-up.

Just don't use something Javascript-based as replacement, please.

code of conduct - report abuse