Say no to formatting spaces and enter

Each person’s acquaintance with a computer sooner or later approaches document editing.
But further, as they say, there are options.


A person can use a computer only as a typewriter, in which all the means of formatting are reduced to inserting extra spaces and moving the carriage to the desired interval.
Or maybe learn how to format a document correctly using at least the required minimum of editor functionality spaces .

Those who are tired of seeing / picking out extra spaces from the text, who need to ensure the joint development of a document with storage in git / svn and many other useful things can click the button below to read a little more about the wonderful Lyx editor.


Let's start with the acquaintance:
Lyx is a WYSIWYM editor (not to be confused with WYSIWYG ). Those. the main thing is not a visual representation of the document on the screen, but its contents, which can be formatted as needed in a particular place.

Lix is ​​a free, open-source application distributed under the GPL v2 license, cross-platform (Win / Mac / Linux / BSD, including unofficial ports for such specifics as OS / 2 and Haiku).
Actually, even Apache OpenOffice and LibreOffice do not have packages for such a variety.


Glancing at the main screen of Lix, you can immediately note its good (but not ideal, as always) localization. There is also the Ukrainian language of the interface (but not, for example, Belarusian). However, this does not affect the support of languages ​​within the document - there are no problems with this.

The default screen is not cluttered with extra panels that can be turned on / off if necessary.

However, as in the joke "- the difference is only 7m sign the letter, but what's the difference" - before starting to edit a document, it is desirable to select the desired class (format) document - depends on two things - how to format the document, and how he will eventually look.

Regarding the “formatting of the document” - in contrast to the Microsoft presentation, which has already become classic, in Lix the set of paragraph styles is limited to exactly those styles that are specified in the original class (template) of the document.
For example, in one of the standard “article” classes, the nesting level of paragraphs is indicated through a chain:
Part, section, subsection, sub-section, paragraph and sub-paragraph. The paragraph may be numbered or without numbering.

Actually, such a strict separation, assigned to the document class, distinguishes Lix from the WYSIWYG style, where you can make styles depending on the weather in Singapore and quotes for milk in neighboring villages.

The class of the document can be changed later, but in any case, efforts will have to be made to make the document look “in a new style”. For starters, you can use the standard article, and after a while, come to the point of modernizing the style, or create your own styles. For the latter, by the way, you will have to work hard, because due to the lack of visibility, developing your own style is impossible without deep knowledge of Lyx & LaTeX text format.

So we have chosen the style of the document and begin to write text. And this is strange ... I would like to leave a piece of space for the cover page and retreat to the next. Is it true that we all once did this? However, Lix does not allow the insertion of an extra line feed.

We are trying to write one paragraph. Following him next. Now we go between them - press Enter - voila - there is an empty space. One more? No, it does not. We leave in another line. But what is it? Lix himself deleted the empty paragraph! Sad where is my Yatran ???
The same situation with spaces.

So we come to the fact that in order to format a document, there is only one method - to choose the correct paragraph style for which the document template pre-sets how many points or millimeters of the indent from the right edge and from the previous paragraph. A step to the left, a step to the right - no, not shooting - just nowhere to go.

Of course, not everything is so catastrophic - if necessary, you can set the vertical indent exactly as much as necessary.

With the rest of the utilities, everything is also in order - inserting pictures, auto-assembling the table of contents and index. Cross-references work even if you generate PDF (only if you generate via PDFLATEX and enable HYPERREF in the document properties).

Well, a little about the additional features and usefulness of this editor:
Internal storage format of its own. A document file is a text file that is not compact at all (in 2.0 it was possible to store in a compressed format).
At the same time, all embedded pictures should be located in separate files, however, they are displayed in the editor so that it can be seen what and where is inserted.

However, the text format for storing a document is a huge plus for someone who wants to organize joint editing of a document by several people with storing it in a versioning system like GIT / SVN.
At the same time, Lyx itself has built-in support for VCS, as well as support for SVN (through external utilities).

I would like to say a separate word about content management - everyone who had to reorganize a document with the transfer of entire chapters and sections to another position had to deal with a long and tedious operation of selecting the necessary piece. And suddenly, if something happens with the numbering, it happens that it’s easier to roll back the changes a couple of steps back than to fix it.
In Lyx, chapter transfer and indentation operations were approached from a completely different end - we open the document structure and then right in it, choosing the necessary part, section or paragraph - we simply move them up / down or change the level with all the paragraphs enclosed.

This editor has a lot of opportunities and there is no need to bring here all the documentation that can be read on the site .

As a summary:
Actually, the use of Lyx as a tool for working with documents within the company was primarily due to the fact that the joint work on documents led to the fact that everyone pressed the buttons as he wanted and wherever he wanted. The paperwork suffered from this.
The availability of storage capabilities in SVN helped us both to be able to identify the one who made the mistake in the document, and SVN to correct these errors by rolling back some of the changes in the document that were sometimes made half a year ago.
It should be noted that the initial part of the document is taken from one place (cover page, privacy information, etc.), the other part of the document is edited by different people who speak different languages, and the third part is generally collected automatically (documentation from the source code , configuration and status of servers, etc.) and all this is beautifully assembled into a single PDF which can be downloaded by clicking a couple of buttons in CustomerCare.

I hope that this article will be of interest to those who are looking for a similar solution for storing and processing documentation.

Also popular now: