#LyX 1.1 created this file. For more info see http://www.lyx.org/ \lyxformat 218 \textclass book \language english \inputencoding auto \fontscheme default \graphics default \paperfontsize default \spacing single \papersize Default \paperpackage a4 \use_geometry 0 \use_amsmath 0 \paperorientation portrait \secnumdepth 2 \tocdepth 2 \paragraph_separation indent \defskip medskip \quotes_language english \quotes_times 2 \papercolumns 1 \papersides 2 \paperpagestyle default \layout Title Title: Making a LyX Book \layout Author Author: Steve Litt \layout Date Date: Copyright (C) 2002 by Steve Litt. All rights reserved. \layout Part Part: Using this File \layout Chapter Chapter: How to Use this File \layout Standard The purpose of this file is to be copied and pasted into LyX, after which each paragraph starting with an environment name followed either by a colon and space or, in the case of the Description environment, an underscore, is converted to the named environment. In other words, if a paragraph starts with "Section:", convert that paragraph to a section. Note that this is true only if the paragraph STARTS WITH "Section:". This paragraph contains several instances of "Section:", but in fact it's not a Section paragraph -- it's a Standard paragraph. \layout Standard To find all paragraphs needing environment changes, simply search for the colon character within LyX, and change those paragraphs that start with an environment name and a colon. The list of environment names is available by clicking the environment list at the left side of the button bar. \layout Standard IMPORTANT!!! After finding the above, make sure to search for the string "Description_", and any paragraphs starting with that string should be changed to the Description. \layout Standard Searching is simple. Just press the Ctrl+F keystroke combination, and you'll be presented with a search dialog box. Put the text you're seeking in the "Find" input, leave the "Replace" input blank, and click either the forward arrow or the backward arrow. NEVER click the replace or replace all buttons, or one or more instances of the sought text will be deleted (actually replaced with nothing). Note that you needn't dismiss the search dialog box, nor click the document. The paragraph containing the highlight found by the search will be changed to any environment you select from the environment list. \layout Chapter Chapter: Cut and Paste \layout Standard This chapter explains how to get the text from your browser into LyX. \layout Section Section: Copying Text \layout Standard Pull up booktext.htm in a browser. Now highlight it from top to bottom. \layout Section Section: Pasting Text \layout Standard Next click the edit field of your LyX program. The edit field is the yellow part into which all text is typed. Press the middle mouse button to paste. \layout Subsection Subsection: What If the Paste Didn't Work? \layout Standard First, if you have no middle mouse button, you need to find a way to paste. Sometimes pressing the left and right mouse buttons simultaneously does the trick. Sometimes pressing Ctrl+P does it. \layout Standard If still no joy, find out whether the copy from the browser went into the clipboard. Try pasting into gvim. Finally, you can try running a clipboard program such as klipper to add advanced cut and paste functionality. \layout Chapter Chapter: Setting the Proper Environments \layout Standard This chapter details how to set the various environments in your book properly. \layout Section Section: Which Environments to Set \layout Standard Recognizing the proper environments to set is easy. In this document, all paragraphs for which an environment should be set are labeled by starting the paragraph with the environment name, followed by a colon. So the first three lines should be Title, Author and Date respectively. Any text not starting with a name and a colon should not have its environment set, but instead should remain in the default environment, "Standard". \layout Subsection Subsection: What is a Paragraph? \layout Standard In LyX, a paragraph is all text bordered on each side by a carriage return. So when you're typing, every time you press the Enter key, you start a new paragraph. Short paragraphs, such as headings, appear as single lines. Longer paragraphs, such as this paragraph, line wrap. \layout Section Section: How to Set an Environment \layout Standard It's simple. Place the cursor anywhere in the paragraph to be set. Then click the Environment dropdown list in at the left of the buttonbar, and select the proper environment from the dropdown list. \layout Standard So on the first line of this document, note that it starts with "Title:", so click that line, then click the dropdown and select "Title". Notice that the line becomes centered and its size is vastly increased. That's because it's now in the title environment. And please remember, "environment" is LyXese for "paragraph style". \layout Section Section: Be Careful \layout Standard Various section names resemble each other, and it's necessary to pick the right ones. You'll notice that Part, Chapter, Section and Subsection have counterparts that end with asterisks. The ones with asterisks do not show up in a table of contents, so they aren't what you want. Be sure to pick the ones without asterisks. \layout Standard Another gotcha is the Subsection environment. Read carefully --- there's also a Subsubsection environment. Note the extra "sub". That's not what you want, you want Subsection. \layout Standard Environments will be discussed more in the next chapter. \layout Chapter Chapter: Environments \layout Standard As has been mentioned many times before, what we LyX people refer to as an "Environment" is what MS Office and Wordperfect people call a "paragraph style". It's a look and feel assigned to a paragraph, complete with spacing, margins, lines, font, and much, much more. LyX environments are extremely powerful. \layout Section Section: Often Used Environments \layout Standard Environments can be categorized into major groups: \layout Itemize Itemize: Single Use Environments \layout Itemize Itemize: Hierarchical Environments \layout Itemize Itemize: Listing Environments \layout Itemize Itemize: Special Use Environments \layout Standard The preceding environment categories will be examined in this chapter. \layout Section Section: Single Use Environments \layout Standard We've already used the Title, Author and Date environments. These appear on the title page. There's also the Bibliography environment, which can appear in the back of the book. \layout Section Section: Hierarchical Environments \layout Standard A book is a hierarchy. There are a few parts, and each part has chapters, and each chapter has sections, on down the line. Different document classes have different hierarchies. For instance, the Article document class does not have Part and Chapter environments. Here is a numbered list of the seven hierarchical environments available in a book: \layout Enumerate Enumerate: Part \layout Enumerate Enumerate: Chapter \layout Enumerate Enumerate: Section \layout Enumerate Enumerate: Subsection \layout Enumerate Enumerate: Subsubsection \layout Enumerate Enumerate: Paragraph \layout Enumerate Enumerate: Subparagraph \layout Standard The naming of the "Paragraph" and "Subparagraph" environments is unfortunate. A paragraph is a group of sentences making a single point. From a technical/publishing viewpoint, it's a group of sentences that word wrap together. A run of content contained in a "Paragraph" or "Subparagraph" environment can span many paragraphs. Remember there's NOTHING special about these two environments --- they're simply subservient to the rest. \layout Standard Each of these hierarchical environments has a counterpart ending in an asterisk. Those counterparts are not listed in the table of contents and other generated lists, and in the case of Part* and Chapter* they do not have their name and number prepended. \layout Section Section: Listing Environments \layout Standard The purpose of listing environments is to create, you guessed it, a list. If you think about the types of lists you see, you'll remember that some are numbered and some not. Further, some resemble tables in that they consist of a word or short phrase to the left, followed by one or more sentences of definition. The following is a non-numeric list of the listing environments: \layout Itemize Itemize: Itemize \layout Itemize Itemize: Enumerate \layout Itemize Itemize: Description \layout Itemize Itemize: List \layout Standard If you want to see the same list as a numbered list, here it is: \layout Enumerate Enumerate: Itemize \layout Enumerate Enumerate: Enumerate \layout Enumerate Enumerate: Description \layout Enumerate Enumerate: List \layout Standard And the following is a description formatted list explaining each. Note that the usual colon and space is replaced with an underscore, because the Description environment splits the paragraph across the first space encountered: \layout Description Description_Itemize is an unnumbered list element. These elements start with a bullet of some kind. The bullet styles can be changed as desired. \layout Description Description_Enumerate is a numbered list element. These elements start with a number. The format and type of number can be changed as desired. \layout Description Description_Description is a list element consisting of a single word in bold, followed by the rest of the paragraph not bolded. The purpose is as a list of terms and descriptions, such as the list you're now viewing. \layout Description Description_List is similar to a Description list, except it has no bold. I don't know why anyone would use it. \layout Section Section: Special Use Environments \layout Standard These are environments used to connote specific types of context. Here is a description list: \layout Description Description_Quote is used for short quotes, such as "To be or not to be, that is the question", or "Great minds discuss ideas; Average minds discuss events; Small minds discuss people". \layout Description Description_Quotation is used for long quotes that typically consist of several sentences. \layout Description Description_Verse is used for poetry and/or song lyrics. \layout Description Description_LyX-Code is used to display source code. \layout Section Section: Environments are Versatile \layout Standard Environments are versitile. If you know how to, you can change the appearance of an environment, both in LyX and in the final output. You can also make new environments. For instance, I made environments called Tip, Warning and Note as narrow, shaded areas to display tips, warnings and notes. Naturally, each began with a title line displaying the appropriate word (e.g. "Tip" for the Tip environment). \the_end