Do you regularly write technical reports or publications? If so, you should consider using the LaTeX typesetting system. This system allows you to create professional-quality documents, especially those with scientific and mathematical content. Perhaps you have heard of (or currently use) LaTeX, but are not fond of the detailed input syntax required to create documents. As an open-source GUI front-end to LaTeX, LyX may be a perfect fit for you as creating a document with LyX does not require extensive knowledge or usage of LaTeX syntax. This article provides an overview of LyX, and explains why it is useful for both LaTeX beginners and veterans.
To install LyX on Linux, run the following command:
On Debian or Ubuntu:
On Fedora or CentOS:
Note that the EPEL repository must be configured on your CentOS system before you are able to install LyX using yum.
Usage of Lyx
After completing installation, open LyX and you'll see the following window (shown as it appears in Ubuntu):
The button menus at the top and bottom of the window will become active after you select the "New document" button (the leftmost item in the topmost menu). The middle section will contain the text you type, and the "LaTeX Source" section will display the raw LaTeX code that is associated with the text.
Here is an example document created with LyX:
Several features are illustrated in the above document:
- Text formatting (bold, italic, color)
- Scientific and mathematical symbols
- Mathematical formula creation and editing
- Insertion of raw LaTeX code
- Table-based presentation of data
The beauty of LyX is that it does much of the LaTeX-intensive work for you, while simultaneously displaying the formatted text and raw LaTeX code as you go. All of the text and symbols in the above document (excluding the formula created via insertion of raw LaTeX code) were created using a menu- and button-driven approach, without requiring any prior knowledge of LaTeX syntax. This is particularly useful for beginner LaTeX users that want to hit the ground running and produce results quickly without needing to learn all of the ins and outs of LaTeX. This environment may also appeal to veteran LaTeX users as it provides advanced functionality via a graphical interface.
Some additional features offered by LyX are:
- Specification of document class which dictates the format and layout of the document (e.g., AMS, IEEE, ACM)
- Custom math macros
- Insertion and editing of external image files
- Interactive WYSIWYG editing of tables
- Reference management via BibTeX bibliography
- Support for multiple languages
- Export to PDF, Postscript, DVI, TXT, HTML, ODF, DOC formats
In Lyx, PDF creation can be performed with the simple click of a button. The image below shows the PDF created from the above LyX document (as viewed with Adobe Reader). You will note that the raw LaTeX code is now replaced with the equation it represents:
To summarize, LyX allows you to harness the power of LaTeX using a graphical interface with minimal prior knowledge of LaTeX syntax. LyX is useful for LaTeX users of all skill levels, and offers a means for efficiently creating professional-quality technical reports or publications via a graphical interface environment. For additional details and documentation please visit the LyX website.
Subscribe to Xmodulo
Do you want to receive Linux FAQs, detailed tutorials and tips published at Xmodulo? Enter your email address below, and we will deliver our Linux posts straight to your email box, for free. Delivery powered by Google Feedburner.
Did you find this tutorial helpful? Then please be generous and support Xmodulo!