January 07, 2022

Text publishing in the Linux operating system

 The short summary is, that Lyx is the most advanced typesetting software. The details why this makes sense is given next.

The perhaps obvious attempt to create a text is a text editor, for example gedit. The problem with plain text editors is that they are not able to handle images and tables which are both needed for creating pdf documents. So the question is, how to create such complex documents? There is more than a single option for doing so:

- latex
- libreoffice, abiword
- HTML
- pandoc

All these options have advantages and disadvantages. Typeseeting is a complex domain and many books and papers were written about it. The reason why latex outperforms all the other software packages is not because of the software itself, but because of the communit yaround it. If someone enters in a search engine of choice a typographic related question he can be sure, that this question was discussed already in a tex related content. That means the tex community is the largest typographic oriented community in the internet.

In theory it is possible to format a document with abiword or HTML. From a technical perspective both programs are well suited for the job. The abiword software is a lightweight program which supports twocolumn mode, can generate pdf files and has access to all the build in fonts. Also the HTML language is well suited for created documents. The largest HTML standard supports hyphenation, justified text and of course PNG images. Or let me explain it a bit more direct. A bad formatted latex document and a well formatted abiword document are looking nearly the same.

In the latex community there is a single tool available which has a unique position: lyx. In contrast to all the other frontends like Scientific word, texmaker or emacs, lyx combines many features. It allows to create easily complex documents and the main strength is perhaps the ability to insert linked images plus the outline window. So lyx has much in common with an outline editor but it is producing TeX quality documents.

The famous typesetting system from knuth was mentioned already. The reason why this program is used frequently is because the ability to produce justified text. Perhaps it makes sense to explain this feature in detail. Information in the internet are usually displayed in a sans serif font with left justified paragraphs. This is the most efficient way to present text on low resolution monitors. Sans serif fonts are easier to read, and left justified text makes it easier for a browser to reformat the content if the size of the windows is changed.

In contrast printed text needs a different format. The common standard for printed documents is to use a serif font in combination with a fully justified paragraph. Creating fully justified paragrpahs is more complex because the change is high that longer white spaces are visible. To prevent these white gaps, TeX is using the Knuth Plass line wrapping algoirthm. Tex and Adobe Indesign are the only programs available which are able to do so.

MS-Word, Abiword, libreoffice writer and HTML are not using a global optimization technique and the result is, that the justified paragraphs has a lower quality. In theory there are some github repositories available with the aim to implement knuth plass line breaking algoirthm in the HTML rendering engine. But until now this isn't possible. So we can say that from an objective standpoint, tex is the  most advanced typesetting software available and has the largest community. So it is a here to stay if someone likes to create documents with a computer.