Open Source Self-Publishing Tools: Designing a Book with LyX Writing translation jobs
Home More Articles Join as a Member! Post Your Job - Free! All Translation Agencies

Open Source Self-Publishing Tools: Designing a Book with LyX

Become a member of at just $12 per month (paid per year)

Corinne McKay photoLanguage professionals should be interested in self-publishing tools, for a variety of reasons. Not least of all, the mainstream publishing houses in the United States aren't very receptive to publishing translations; according to the wholesale book distributor Bowker, of the roughly 195,000 new titles printed in English in 2004, only 891, or an unimpressive 4 tenths of a percent, were works of adult literature in translation. So, one option for book and literary translators (once you've obtained the translation rights, of course) is to take the matter into your own hands and self-publish. Another excellent use of self-publishing tools is the production of books with a very targeted niche market, which are usually unappealing to mainstream publishers but can be profitable for the author. Specialized dictionaries, translation software manuals and translation business guides are some examples of possible candidates in this department. In this article, we'll focus on LyX, a very handy pre-press tool that is cost-free and available for Linux, Mac and Windows.


Self-publishing is becoming easier and cheaper, thanks in part to improved printing technologies and desktop publishing tools. If you've ever considered writing a book, you may have looked at the layout capabilities of Writer, AbiWord, KWrite or other word processing programs. While these tools can produce adequate results for many types of documents, it's also worth considering LyX, an open source (GPL) desktop publishing application that, with a bit of work, can create a really professional looking book that is indistinguishable from a book produced by a mainstream publishing house.

When we began looking for an application to design Corinne's book How to Succeed as a Freelance Translator (Lulu Press, 2006), we road-tested a few pieces of software, including the word processors referenced above. The problem? Although features such as Writer's PDF export are easy to use and produce clean, easy-to-read documents, there was something subtly missing from the design; something that didn't quite look "like a book." It's not that Writer can't be made to produce a high-quality book layout, but the conventions of book design are extremely subtle and tricky to master, at least for those of us who are not professional book designers or typographers. So, we turned to LyX. Our system is Debian Linux, but LyX is packaged and included in the repositories for most of the popular Linux distributions, so installation is a breeze. LyX is distributed under the GPL, and runs on Unix/Linux, Mac and Windows operating systems.

LyX is "the first WYSIWYM (What You See Is What You Mean) document processor." When you start up LyX, the user interface has a very similar look and feel to that of a word processor with a stripped down set of toolbars. It includes all the basic wordprocessing functions, such as cut and paste, search and replace, undo and spell checking. The idea behind LyX is that the user selects a document class, such as Article, Report, Book, Letter or Slides, and LyX provides the structure. For example, a Book document allows the user to identify any given piece of text as a Chapter, Section, Subsection, or Subsubsection, etc., and formats the document automatically according to the defined styles for the category, referred to as the paragraph environment, that the user selects. In effect, LyX enforces consistency throughout the document, without requiring (but while allowing) the user to define the style to be used for each paragraph environment. This is especially useful in a book-length document, where consistency can be the difference between a book that looks like a book, and a book that looks like a bound word processing document. Here's an example from LyX's own website: "Let's say you tell LyX that a certain line is a Section title. LaTeX adds the Section to your table of contents, places the Section name into your page header, gives it a special "bold" appearance on the page, assigns it a number or label, and tells other parts of your document what page it's on, for references and citations." LyX also enforces typographic rules by its behavior; for example, hitting the space bar over and over doesn't result in a series of blank spaces in the text, since LyX automatically inserts the correct number of spaces between different pieces of text. LyX works its real magic when the user selects a PDF preview of the print-ready document from the View menu---after a small delay, the on-screen document is transformed into a PDF that looks, well... exactly like a book!

The workhorse behind the magic of LyX is Donald Knuth's legendary typesetting system, TeX, and the LaTeX document preparation system built on top of TeX. LaTeX provides the structured document classes and functions such as indexing, page numbering, cross-references and bibliographies; the underlying TeX typesetting engine incorporates intelligent algorithms for tasks such as hyphenation, paragraph breaking and line breaking, which are largely responsible for the "like a book" look of documents produced by LyX.

Creating a book in LyX

There are several document classes available for LyX that are suitable for typesetting a book, including the default Book class, the KOMA-script Book class (scrbook), and the Memoir class. The default Book class is fairly minimal in terms of features, most notably it lacks paragraph environments for standard front matter and end matter sections, such as Acknowledgments, Publishers, Dedication, etc., with no built-in fine controls for these features. However, the LyX user can insert LaTeX code directly into a LyX document to create these sections, which is referred to as ERT (for Evil Red Text!).

KOMA-Script, a mature (in active development since 1994) set of replacement classes for the standard LaTeX classes, provides the scrbook class, which is an excellent option for LyX users, and is the one we chose for our project. KOMA-Script's original purpose was to provide alternative LaTeX classes for German documents, but it is now used by authors in a variety of languages. KOMA-Script's scrbook class offers a comprehensive set of paragraph environments. For example, the Uppertitleback and Lowertitleback environments allow the author to format the upper and lower sections of text that appear on the back side of the book's title page, normally the copyright and cataloging-in-publication data (the book's ISBN number and Library of Congress cataloging information) and any disclaimers, sales information, author contact information, etc. If there is no specific paragraph environment for a section that the author wants to include, scrbook provides useful generic sections. For example, we wanted How to Succeed as a Freelance Translator to include a Colophon, emphasizing the fact that the book was written and designed using free and open source software exclusively. To accomplish this, we used the Addsec* paragraph environment to add a generic section (the * indicates that the section will not appear in the table of contents). A notable feature of scrbook is that it produces books laid out using European typographic conventions, including: the book's lower margin is twice the height of the upper margin, and the inner margin on each page is half the width of the outer margin. While this produces a classic and elegant finished layout, our publisher (Lulu Press; Global Distribution) required equal top and bottom margins and equal side margins, which required us to change scrbook's default settings. It is possible to do this within the scrbook package by using LaTeX commands, but LyX makes it very easy to bypass scrbook's layout engine and change the margins using the Document→Settings→Page Margins menu. The KOMA-Script manual, weighing in at 227 pages, and available in English and German, is not only a comprehensive guide to the KOMA-Script package, but an excellent overview of typographical conventions and principles. Its dedication "To All Friends of Typography!" speaks for itself; this manual is a must-read for the novice book designer. The sections on typography are worth reading even if you do not intend to use KOMA-Script.

The Memoir class offers another book layout option, with 307 pages of beautifully typeset manual to go with it. The Memoir User Guide, written by the Memoir class' developer Peter Wilson, contains a thorough introduction to typography (another must-read for the novice book designer), including a section on designing electronic books. The Memoir class is now production-grade, and is in active development. In terms of functionality, Memoir appears to be comparable with scrbook, although it relies more on external LaTeX packages; for example, scrbook includes its own header package, whereas Memoir must use a separate header package such as fancyhdr.

In addition to its primary function of typesetting, LyX provides a number of very helpful features for the self-publisher. Conveniently, a Table of Contents is generated automatically. In researching the market for nonfiction books, we learned that having an index greatly adds to the saleability of a nonfiction book; in fact, many libraries are reluctant to purchase nonfiction books that do not have indexes. Since hiring a professional indexer was out of our budget, we turned to LyX's indexing feature, which proved itself more than equal to the task. When you position the cursor at the end of the word that you want to index and select Insert→Index Entry, a dialog box will pop up, with the word automatically inserted in the "Keyword" field. Then, you can either keep the pre-inserted word, or edit it. The edit could take the form of a minor change, such as case, or you can change the word to an entirely different one; for example if you want to associate the word "interview" with the index entry "job search." You can also create a nested index entry by typing an exclamation point after the parent term, then typing a sub-term directly after it, for example "travel!Asia" would result in the parent index entry "travel" and the sub-term "Asia." You can also insert as many index tags after a word as you want. True to its typographic genius, LyX (actually LaTeX) is also smart enough to notice when you insert index tags for the same term on consecutive pages, and will create an appropriate index entry, for example "travel, 47--50."

LyX also has excellent support for tables. In fact, using tables in LyX is similar to using tables in HTML. To insert a table, select Insert→Table, and the efficiently designed Insert Table dialog box will pop up. This allows you to select the number of rows and columns that you would like in the table. Then, by right-clicking in the table, you can bring up the Table Settings dialog box, where you can adjust the table's size, orientation, borders, etc. To change the font of the text in your table, highlight the portion of the table containing the text to be changed, and select Edit→Text Style. We used tables for a Glossary (there is also a LaTeX package for compiling a glossary) and various worksheets such as Billable Hours and Hourly Rate charts.

LyX's features could be the basis of an article in themselves, but it's worth noting that the software includes: a math editor; support for most European languages and right to left languages, including documents that contain more than one language; support for footnotes and margin notes; comprehensive bibliography support and figure support with rotation, scaling and captions. There are many more features that are relevant to other document classes, such as academic journal articles, etc.

Customization in LyX

One of the differences between LyX and a traditional word processor is LyX's approach to formatting. Most word processing programs allow regions of text to be tagged with a style. In LyX, every piece of text belongs to a paragraph environment which has a predefined style. For example, someone using Writer can choose to use the style options offered by the software, such as Heading 1, Text body, etc. However, most word processor users do not employ styles, but instead do most of their formatting manually, by using different fonts and effects. In LyX, it is not impossible to do manual formatting, but the program is set up to discourage this behavior by limiting manual formatting options.

Some basic customization can be done from the Document→Settings dialog box. For example, the user can change the default font for the document, the page size and margins, the bullet styles, etc. For finer control, the user needs to edit the LaTeX Preamble, also found in the Documents→Settings dialog box. In the Preamble, the user can add LaTeX commands to change the default behavior of the document class, including the settings for different paragraph environments, as well as including and configuring additional LaTeX packages to add functionality. While LaTeX code can be daunting, LaTeX's maturity, excellent documentation, widespread use and great support through mailing lists and newsgroups means that a solution to most customization questions can be found with a quick web search. It is certainly possible to use a book class such as KOMA-Script or Memoir without altering any of the paragraph environments (we did this). One thing we did want to change was the default header formatting. This involved loading and configuring the popular fancyhdr package in the Preamble.

Submit your article!

Read more articles - free!

Read sense of life articles!

E-mail this article to your colleague!

Need more translation jobs? Click here!

Translation agencies are welcome to register here - Free!

Freelance translators are welcome to register here - Free!

Free Newsletter

Subscribe to our free newsletter to receive news from us:

Recommend This Article
Read More Articles
Search Article Index
Read Sense of Life Articles
Submit Your Article
Obtain Translation Jobs
Visit Language Job Board
Post Your Translation Job!
Register Translation Agency
Submit Your Resume
Find Freelance Translators
Buy Database of Translators
Buy Database of Agencies
Obtain Blacklisted Agencies
Advertise Here
Use Free Translators
Use Free Dictionaries
Use Free Glossaries
Use Free Software
Vote in Polls for Translators
Read Testimonials
Read More Testimonials
Read Even More Testimonials
Read Yet More Testimonials
And More Testimonials!
Admire God's Creations

christianity portal
translation jobs


Copyright © 2003-2024 by
Legal Disclaimer
Site Map