January 25, 2022

Creating a Zettelkasten with Lyx

 

In a recent video the Zettelkasten (which is a german word for creating a catalog of index cards) of Niklas Luhmann was explained in detail. https://www.youtube.com/watch?v=rUtCMdeqauE Somewhere in the Intenet there is a sophisticated Java software available which is mainly a relational database which has converted the idea into the digital age. But, both examples (the analog version and the software version as well) are not efficient enough. A more elaborated version of creating a Luhmann like Zettelkasten is explained next.
The idea is to a use a text file in an outliner tool like Scrivener or Lyx instead of using a database which provides different fields for date, keywords and references. The reason is, that database fields have to be filled and are not flexible enough. The main structure of a note taking app is based on keywords and keywords have much in common with sentences in a natural language.


Perhaps some explanations are helpful. New items are created in the add section. An item is equal to a paragraph and the title is shown in bold. Then some notes are enclosed also a reference is given. If the item was created in the add section it gets transferred into the main section into the correct category. This is done by simple copy&paste method of the outliner software.
Such a simplified pipeline is working closely with the original idea of a zettelkasten. The mechanism was known 300 years ago and it was not described by the index cards itself but by the workflow how to create new cards. What researchers and fiction authors have done in the past was the following.
1. They are going to the library and making notes into a normal book in a chronological order
2. At home, a scissors is taken to divide the page into sections
3. The sections (=items) are sorted by category into a card box
If the process is repeated frequently hundred of these cards are created. The card box is only the result the more interesting element is that scissor is needed to create the items from the written notes. In the screenshot this workflow can be emulated with an outliner tool much easier. New items are added only in the add section and the main section is the archive.

January 23, 2022

How to write an academic paper (fast and efficient)

The following blog posts contains a detailed description of the workflow from getting the first idea until formatting the manuscript. Step 1 is to copy and paste the text from Wikipedia into a word processor.


In the second step the document gets formatted so that it will fulfill the typographic requirements and the standards in academic publishing as well. This is realized by applying the fully justified paragraph formatting. Fully justified means, that each line occupies the entire space until the end. For reason of better readability the font is adjusted to a monospace font.


In the third and last step a pdf file is generated and submitted to an academic journal.





January 22, 2022

BEAM robotics as central pattern generator

January 23, 2022. by Manuel Rodriguez

The control element of a BEAM robot is the nv network, also known as bicore. It is realized with an analog circuit. The purpose of the nv network is to work as a central pattern generator. A CPG generates similar to an oscillating neural network a pattern for controlling flashing LEDs or servo motors over a longer time period. The CPG tells exactly which status 4 and more LED will have over the next 20 time steps in the future. This reduces the complexity of control tasks.

The following longer article explains in detail what BEAM robotics is, and why it is different to programmable robots.

Tags: BEAM, CPG, quadruped walking robot, bicore, nv net, bottom up robotics

Table of contents
1 Introduction into BEAM robotics
2 CPG for a hexapod walking robot
3 The inner working of a 5 motor bicore walker
4 What robotics can learn from BEAM robotics
5 Why BEAM Robotics has felt out of fashion
6 Sources

 

1 Introduction into BEAM robotics


Since the 1990s the idea of Bottom up robotics was published. Bottom up robotics was described as opposite to planning and means to program the behavior of the robot with Scripting AI. That means the robot has some built in procedures like walk(), rotate(), and sense() and these procedures are producing complex motions. What is not needed is a fast CPU or a solver.

On step further than normal bottom up robotics is the idea of BEAM robotics.[1][2] Similar to bottom up robotics described by Rodney brooks, BEAM robotics is a bottom up approach. The difference is that no computer program at all is needed. Instead the actions are triggered by analog circuits.[3]

Most programmers in the now are no longer familiar with analog circuits. The basic idea is to let let an LED flashing in a certain pattern. That means, the led is on from timestep 0 to 2 and it is off from timestep 3 to 8. Then the cycle starts again. If not one but 4 leds are flashing with different patters the core element of a BEAM Walking robot is available.

There is no need to built a BEAM robot in hardware, but the concept can be utilized in a simulator more easily. All what is a needed is a physics engine like Box2d and a for loop for the pattern generator. A common way to let an LED flashing in a python program is the modulo operator, but more complex waveforms can be realized with mathematical equations like sinus as well.

So let us analyze the principle from an AI perspective. Suppose the robot motor is controlled by a flashing LED pattern. It depends mostly on the mechanics if the robot moves forward. It is not a program which runs on a computer, but it is the same pattern repeated over and over again. Perhaps it can be compared with music notes which are played back in a loop and these pattern moves the robot (sometimes).

Let us try to simplify the information about BEAM Robots. To build a so called nv network the programmer needs to simulate an LED flashlight in software. And then he has to program the led so that it will flash in a certain pattern. This oscillator is the brain of the robot.

The reason why the analog circuit of a BEAM robot is formed in a certain way is to produce an inversely oscillating pattern. That means on frame step 0 the motor A is on while motor B is off. At framestep 10 the motor A is off while motor B is on and so on. This can be visualized with a drum editor from a music software. In the example screenshot there are two sounds available (clap and hihat) and they are making a sound at different positions in time.

Drum editor in a music sequencer

Where is the world model?

Short answer: a CPG controlled robot has no world model. The only thing which was implemented is the robot movement itself. The nv neural network makes sure that the robot's legs are moving in a certain pattern but the robot is not aware if these actions are useful. What is missing in bottom up robotics is a virtual referee which is sometimes called a critic. Such a higher instance would monitor the current score of the robot during solving certain situations. Without a referee the robot isn't aware of any obstacles or wrong directions the pattern generates. Because of this reason, BEAM Robotics is seen as a non sense and chaotic discipline in Artificial Intelligence.

Mindmap for BEAM robotics

Central pattern generator

On the first look, BEAM robotics seems to be a hard to grasp alternative approach in robotics. The reason is, that it's focused on analog circuits, is working bottom up and has no microprocessor nor a computer program. It's possible to explain in detail why this approach makes sense, but the more elaborated attempt in understanding BEAM is by asking what are the shared principle to conventional academic robotics. The same part is a central pattern generator (CPG). CPGs are researched in classical topdown AI and in BEAM Robotics as well.

In case of BEAM robotics, the abstract idea of a CPG is realized with nv networks. The analog circuit, including its components, is creating a central pattern generator.[4] And this is used to control the motors. The interesting situation is, that there is no need to do so in hardware. A central pattern generator can be created in software more easily. For example with mathematical equations like a sine function, with neural networks implemented with the sigmoid function or by using the modulo operator in a for loop. It's possible to build BEAM robots without creating them in physical hardware. Instead the idea of a CPG is put into the center and the robot is created around this building block.

From a programming perspective, a CPG is a black box which generates signals over a time axis. If the CPG has four outputs, it can control four flashing LED lights in parallel. Creating a CPG in Python or any other programming language is surprisingly easy. It can be realized with a random generator or with a pattern sequence which is repeated over the time. For example, in a 2d array some 1 and 0 values are stored and then the signal is printed on the screen according to the frame step in the game loop.

0  1  0  1
0  0  1  1


Here, the pattern was written in the matrix notation known from mathematics. This pattern is equal to the central pattern generator. A single column is shown on the screen, for example in timestep #0 the output of the CPG is 0\:0. This output is send to the flashing LED or to the motor of a walking robot and it will produce a certain result. Fine tuning a CPG means nothing else but changing the values in the pattern matrix.

Waveform as diagram

nv network = Central pattern generator?

BEAM robotics is a large and complex domain which has many subproblems. There are tutorials available how to solder transistors, how to implement the circuit for a solar panel and also some ideas are given which sort of robots can be realized, for example walking robots and wheel driven robots. The perhaps most interesting element in BEAM robotics is the NV net, which stands for nv network. This element defines what the robot is doing at which moment.

After investigating the question what an nv network is and how to program it, the answer is surprisingly simple. An NV network is a central pattern generator, not more and not less. It's a CPG realized in an analog circuit. So the question is not how to build a BEAM robot which can walk but the more elaborated question is how to use a CPG to create walking robots in general. These robots can be realized with the BEAM concept which stands mostly for analog circuits, but they can be realized with micro-controllers for example Lego mindstorms and Arduino as well.

The idea of a central pattern generator seems to be even more esoteric than BEAM robotic itself. A CPG is described mostly in the context of biological systems. It is working different from a classical program. The dominant question is how to generate a trajectory for example for biped walking. A trajectory is not a single value, but it is a function over time. So a sinus function seems to be the natural Central pattern generator available.

There is a concept available which has much in common which are dynamic movement primitives.[5] Similar to a CPG the DMP approach tries to reduce complexity. Instead of defining for each time frame what the robot has to do with which servo motor the idea is to provide a general equation which is fine tuned with parameters. This equation creates a longer and repeating action trajectory over the time axis.



2 CPG for a hexapod walking robot


There is a reason why most mobile robots have been realized with a wheel based locomotion. The reason is that wheels are pretty easy to control. All what is need is an electromotor which powers the wheel and after putting a current on the circuit the robot will move forward. Even if the principle is improved by a gearbox and a steering wheel the overall design remains tractable. This allows to design more complex behaviors for example a robot mouse who can find the goal in a maze.

In contrast, leg based robots are much harder to control. Especially if the amount of legs is 4 and more the overall system is for sure np hard. For example if a hexapod robot has two motors for each leg then the overall amount of joints is 12. And in each time step a different position can be set so the overall complexity is endless. The interesting situation is, that with a central pattern generator the complexity can be reduced drastically. The only thing what is needed to control six and more legs at the same time, is a gait pattern and some sinus functions. The sinus function will take the gait pattern as input and are producing the joint rotation as output. The advantage is, that the robot isn't depending on million of possible gait positions, but there are only a handful gait patterns and some possible sinus functions for the central pattern generator. Most robots which have 4 and more legs are designed with a cpg in the loop because this is the best practice method to reduce the complexity. Instead of controlling the legs directly the task for the programmer is to fine tune the cpg. So it is some sort of black box for state space reduction.

Sine oscillator in Libreoffice calc with the equation value=(SIN(A2)+1)/2


3 The inner working of a 5 motor bicore walker


BEAM robotics has become popular because it has demonstrated how to constructed walking robots. This problem was recognized as hard to solve because many degree of freedoms are available. A possible attempt to solve it, is to design first an oscillating walk pattern. This is equal to assign all the motors a value over a time axis.[6]

From an abstract perspective this assignment problem contains of motors from 1 to 5 which have a value over the time from timecode 0 to timecode 100. For example, on timecode 20 the motor M2 can have the value On. On means, that the motor is doing something. Biped walking with many legs is equal to activate the motors in a coordinated fashion. Even if the problem seems hard to understand it will become much easier if a sine wave function is used. A sine function takes a framestep as input and determines the output at this moment. If the sine function is adjusted for each motor a certain pattern can be generated.

The interesting element is how a BEAM robot walker is created from scratch. In most cases the prototype has no servo motors but instead LEDs are used to test the oscillator. The question to answer is, if the correct LED is on at the correct moment in time. If the LED are flashing with the desired pattern, then they are replaced by servo motors which make the robot walk.

Walk pattern generator

Before it makes sense to explain in detail what a sinusoidal Oscillator is, there is a need to give a reason why such tool is needed. In most case the idea is to create a walk pattern generator. That is a software module or a hardware box which is producing the gait pattern for a biped robot. The walk pattern generator defines at which position each leg is, and in which direction the motor has to run at each moment.

The interesting situation is that it is possible to create a walk pattern generator which doesn't work. That means, a sinus function is producing a signal but this signal isn't not optimal. For example the robot can't walk over an obstacle or it will loose the balance. Then, the signal has to be modulated. But in all the cases the problem is located in the walk pattern generator. This focus on a certain subproblem allows to understand how to create such generators. The goal is, that the walk pattern generator fulfills certain needs so it can be asked how to change the parameters.



4 What robotics can learn from BEAM robotics


The most interesting element in BEAM robotics is the nv network for controlling the servo motors. This principle is similar to a central pattern generator realized in analog hardware. Even if more common robots are controlled with micro-controllers it is possible to use such pattern generators in such environment as well. The only difference is that all BEAM robots are controlled by nv networks while not all micro controller robots are based on this principle.

The difference has to do with the programming paradigm. Microcontroller based robots are mostly programmed in one of the larger programming languages like C, C++ or Python. Game programming and microcontroller programming is working with some paradigm which are seldom discussed. In such a paradigm it is difficult or even impossible to generate complex motions. Let me give an example for the famous micromouse robot. Suppose the idea is to control such a robot with python autonomously. Most programs are dividing the tasks in subproblems like “moveforward()” and moveleft()”. And these functions are executed on the program. During the runtime the main program calls one of the routines, this routine is producing a movement and then the next routine is executed. The principle can be summarized as behavior driven robotics. Even it is a bottom up approach in robot control it is working quite different from oscillator based control.

An oscillator or a central pattern generator is some sort of macro. The routine CPG() is executed and in this routine all the movements are generated. The interesting situation is that such a routine works internally with a mathematical equation which is often equal to a sine function. The idea is not that every situation is now for the robot but it is repeating the same actions.

A general description is, that robot programming works with a program flow while central pattern generators are based on fixed pattern which are repeated. It is a bit hard to imagine how pattern oriented control can move a robot towards the goal:

quote: “While CPG approaches have been used extensively to control legged, serpentine and worm like robots, it has not been widely explored in the context of wheeled robots.[7]


CPG

CPG (Central pattern generators) can be realized as oscillators. An oscillator is an analog circuit which has much in common with a timer. The electronics term is “Wave form generator”. That means an oscillator can produce a sine function. This signal is send to an LED which makes them flashing or to a servo motor which moves it back and forth. If the servo motor is built into a robot, the robot will walk forward.[8] The interesting situation is that such a control technique is very different from classical high level computer programming. In a computer program trajectories are usually planned by a solver or they are the result of for loops which are executed. In contrast, a cpg based locomotion is created mostly with sine functions. It needs little or no computational power and at the same time it produces an interesting pattern.

The interesting feature of an oscillator based waveform generator is, that the output signal can be modulated. That means, it can be fine tuned by selecting different parameters. These parameters will make the robot move faster, slower and even left and right movements are possible.Garcia-Saura, Carlos. "Central pattern generators for the control of robotic systems." arXiv preprint arXiv:1509.02417 (2015).




5 Why BEAM Robotics has felt out of fashion


In the late 1990s, BEAM Robotics was some kind of Internet hype. Lots of websites were published which explained to the audience what BEAM is and how to build such robots from scratch. Even dedicated robotics challenges were created in which different bicore walkers were compared how fast they will reach a goal. The hype was only available for around 10 years, and since the mid 2000s BEAM has felt out of fashion.

The reason why is simple to answer. Because BEAM is a bit too much of bottom up robotics. A capacitor and a transistor is not an example for low cost robotics but it is the opposite. Such analog device were common ingredients in the 1950s but today the well known personal computer and modern microcontrollers are low cost electronics components.

BEAM robotics was replaced by lego mindstorms challenges. This single product can be programmed and there is no need to rewire the circuit first. Lego Mindstorms allows more easily to explore what robotics is about. And very important it is possible to create with mindstorms and Arduino based hardware as well more easily a robot which is doing something, for example play soccer or travel in a maze.

BEAM Robotics emphasizes the use of analog devices for creating lifelike robots, while Lego mindstorms has a focus on programming a microcontroller. From a technical perspective, Lego mIndstorms is not bottom up robotics but it goes into the direction of top down. Top down means, that not the robot stands in the focus and his ability to walk over rough terrain but the first step is to formulate a plan which is then programmed on the robot.

Let us take a look into a typical Lego mindstorm project. There are some soccer playing robots which are remote controlled with smartphones, and an intelligent software determines which team has won the match. Such a task is the opposite of what BEAM robotics is about. First thing to mention is, that the robots are not autonomous, they are programmed in Java and AI is hidden in the referee which counts how often the ball hits the goal.

We can say, that analog driven BEAM robotics which has no clear objective is the past, while Lego mindstorms based top down robotics which includes virtual referees and remote control is the future. This description sounds a bid harsh against the BEAM movement. But the idea of bottom up robotics has too many weakness which makes it hard to understand what AI is about.

Let us compare BEAM robotics with a manual controlled Lego Mindstorm bot. Both are very different so it is easy to recognize the difference. In BEAM robotics the assumption is/was, that it is important to understand on a hardware level who electric current is transformed. A BEAM robot consists of an analog circuit and has much in common with a circuit for ann AM radio. There is a battery, some electronic components, which are wired together. Also a strong emphasize is put on the idea that the robot is autonomous. The internal nv network determines what the robot is doing next. So it is an example for artificial life.

in contrast, a remote controlled Lego mindstorms bot hides the internal working from the user. The servo motors are put in a plastic case and the only interface to the outside world is the Java API which gets programmed in the IDE on the laptop. Also, the bot is not autonomous but it is controlled by a script or with a joystick.



6 Sources


  • [1] Hasslacher, Brosl, and Mark W. Tilden. "Living machines." Robotics and autonomous systems 15.1-2 (1995): 143-169.
  • [2] Mokhtar, Natasha Binti. "BEAM ROBOTIC." (2009).
  • [3] Harris, Adam, and James M. Conrad. "Hybrid control of a simple walking autonomous robot." Proceedings of the IEEE SoutheastCon 2010 (SoutheastCon). IEEE, 2010.
  • [4] Wu, Dongrui, Woei Wan Tan, and Prahlad Vadakkepat. "A Comparison of Several Hardware-Realized Central Pattern Generators (CPGs)." Department of Electrical and Computer Engineering, National University of Singapore (2005): 1-23.
  • [5] Pitchai, Matheshwaran, et al. "CPG driven RBF network control with reinforcement learning for gait optimization of a dung beetle-like robot." International Conference on Artificial Neural Networks. Springer, Cham, 2019.
  • [6] Elner, T., S. Fraser, and P. Rimmer. "6 Legged Walking Heat Seeking Robot." (2006)
  • [7] Urziceanu, Ionuţ, et al. "Central pattern generator control of a differential wheeled robot." 15th International Conference on System Theory, Control and Computing. IEEE, 2011.
  • [8] Garcia-Saura, Carlos. "Central pattern generators for the control of robotic systems." arXiv preprint arXiv:1509.02417 (2015).

 

HTML test

 This post is experimenting with the HTML syntax.


section

The quick brown fox. 

 

section

the

1.1 subsection

quick

section



January 20, 2022

Academic publishing in the humanities

The main reason why the Arxiv preprint server has accumulated around 2 Mio papers is because of the LaTeX typesetting program. Other preprint servers like Socarxiv which are preferring MS-Word as default format have a lower submission rate. It might be an open problem if LateX is producing a higher typographic quality than other publishing tools, but what can be measured is, that authors who are using this software are confident that their paper is written very well. This makes it likely that LaTeX papers are submitted to an online only preprint server, while MS-Word generated documents never exit the local hard drive. This strange situation can be described in detail. What happens after the pdflatex compiler was applied to a document is, that the document is ready. The pdflatex compiler checks for possible overfull hboxes, wrong style sheets and correct referenced literature and if he doesn't found a mistake the resulting pdf file is created int he working directory. According to the pdflatex program this file is ready to publish. it was formatted with the most advanced typesetting software available which is used by thousands of other researchers worldwide. So there is no reason left why this document should be revised or formatted something else. Technically it is possible to reformat the pdf paper because the pdflatex program has done all the work. All what the author is allowed to do is to print it out or better, to submit it to a preprint server. Basically spoken, a latex first pipeline makes it easy to publishing something. Authors are encouraged to type in a manuscript and then they are encouraged to submit the document to a webserver. This is why the latex software was created. In contrast, possible alternative word processing software are not forcing such a mandatory behavior. A simple outline tool or a literature database was programmed to support a local user during his work. And publishing the results is not recommended. It doesn't make much sense to print out a “ work in progress” manuscript. The reason is that such draft file has to be reformatted before it can be published somehow in the future – maybe. Let us try to investigate the hypothesis, that the LaTeX community is overconfident about the quality of the generated pdf files. Suppose we are asking in one of the latex forums, if latex is superior to MS-Word. The answer is: yes it is. And if we are asking if a latex generated pdf document is ready to print it out or ready for uploading it to arxiv, then the answer is the same. It is pretty hard to find someone who explains that latex generated papers have a low quality and it is not recommended to publish them because they need to be formatted somehow else.

January 12, 2022

Some applause for the Times new roman font



In the TeX community and in the Scribus community as well there is the shared understanding available that the default font Times new roman should be replaced by something which looks better. In the forum there are many individual recommendations available which alternative type1 font may look smoother, easier to read and more professional. A typical description is, that the Times font looks bad, but the recent discovered Pallatine / Utopia or Latin modern roman fonts looks so much better designed.
On the first look there is a clear difference between the default times font and other serif fonts. For most users, the times font looks to narrow and they are preferring a more wider font. The interesting situation is that subjective description has nothing to do with the Times font itself but width its current parameter. In the character setting of Libreoffice or any other word processor it is possible to change parameters like font size and very important the width scaling.
In the lower part of the screenshot, the times font was made wider while the latin modern font was reduced in the width and the surprising situation is, that all the fonts are looking equal. Not a certain font looks familiar but a certain scaling factor of this fonts. Basically spoken the Times font looks great always and if the user likes to get a new look he can make the font more wider.
 
Perhaps some detail information are helping to repeat this experiment. The default serif font in the postscript language is Times new roman. Apart from Times there are only Helvetica, and Courier available but both are not proportional serif fonts. With this restricted post script situation the user has no choice. He can either use the Times font or doesn't print the document at all.
If the user likes to replace Times with a different font there is no need to search for a new fontface, but the user has to adjust the scaling parameter in the postscript language. In the lower example, the same liberation font was used. The reason why it looks different is because the width was scaled up by 10%. That means all the characters are stretched by 10% and this make the font look more like Pallatino, Garamond or any other Times alternative.

January 10, 2022

Scribus for LaTeX experts

 

The assumption is, that the user is already familiar with the LaTeX software package, has used the texlive distribution many times and is able to create an academic paper which includes a table of contents, and a larger amount of included float figures. And now the user likes to know how to master the publishing workflow outside the TeX ecosystem and he is prefering especially the Scribus software.
The advantage of Scribus is, that it has much in common with the Adobe pagemaker software but is is available as open source. So let us start the journey.
First thing to mention is, that the workflow needs to be planned much better. If LaTeX and especially modern frontend likes Overleaf and Lyx have much in common with the python scripting language, the Scribus software is using a more linear workflow. That means at first the text is written in a word processor which is Libreoffice writer and then the document gets imported into Scribus. After the text was imported it is not possible to modify the text anymore so the content has to be froozen first.
Scribus works with the page concept. That means, the designer defines each page for it self. On page 1 it is possible to activate a twocoumn layout and on page 2 only a one column layout is visible. It is difficult to ochange a page later, so there is a need to plan the process. At first, the layout designer imagines a rough idea for the document. He makes decision about the amount the column and where the pictures should be placed. Then he is realizing the idea in the scribus software.
A common task is to create a new text frame or a new graphics frame. These functions are used so frequently that a shortcut is available. The grid system on each page helps to position a frame and then the content is send to this box.
Especially the import filter in Scribus is an early stage. In most cases the importet stylesheets have to be assigned again. This is done manually over context menu. The duration until a short document was created is long. That means, the layout process will take endless amount of hours, and then the designer will recognize that major components like the page number or the table of contents are missing. So these registers have to be created manual or half automatic.
The perhaps most obvious difference between latex and scribus has to do with changing an existing document. Suppose the well written report contains of 8 pages. The document was rendered once into the pdf format and it looks well formatted. Then, the author likes to add a single paragraph on page 4 somewhere in the middle of the text. Such a request is denied. The reason is, that after inserting a paragraph, the existing text will move to a different position and the position of the images won't match to the text anymore. Because of this reason, Scribus requires more pre planning than latex. The content needs to be written already, has to be proofread and it is not possible to change it drastically. The only thing what can be realized within scribus are smaller adjustments, for example adding a word into a section or adding a coma in a sentence.
If the author of a text likes to add an entire paragraph or likes to rewrite larger parts of the text a new project has to be started. That means, the text has to be written again in libreoffice and then it can be imported into a new scribus document.
In contrast, it is much easier to change the graphics. The reason is, that scribus creates in the document only a link and the graphics is stored in the working directory. After adapting the graphics, it gets rendered automatically in Scribus.
Perhaps it makes sense to explain which kind of workflow can be realized in scribus very well. The idea is, that that creation of the text is done by different users and at a different date in the calendar than formatting the layout. For example, in January person A and B are writing the text in libreoffice and in Febrauary this document gets imported by Person C and D into Scribus. So the final pdf file can be printed in March. In contrast the interactive single person workflow of LaTeX can't be realized with Scribus. The typical Latex project is done by a single person in a single month and if a mistake was found in the text it gets fixed on the fly. So we can say latex has much in common with the Python programming language and Scribus has much in common with the Cobol language printed on punch cards.

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.