next up previous contents
Next: Lists and sublists Up: Environments Previous: Environments   Contents

Sections and Subsections

Type the word Introduction on the first line of your LYX file, and select Section from the Environment menu2.5. Be sure to use Section and not Section*, which will be covered below. LYX numbers the section ``1'' and typesets the section heading (title) in a larger font. Now hit Return. Note that the Environment box changes from ``Section'' back to ``Standard''. Section headings, like most environments, are assumed to end when you type Return. Type the document introduction:

This is an introduction to my first LyX document.
Hit Return again, and select Section from the Environment menu again. LYX writes a ``2'' and waits for you to type a title. Type More Stuff, and you'll see that LYX again sets it as a section title.

It gets better. Go to the end of Section 1 again (after ``my first LYX document'') and hit Return again, and select Section from the Environment menu again. Again, LYX writes ``2'' and waits for you to type a title. Type About This Document. Section ``More Stuff'', which used to be Section 2, has been automatically renumbered to Section 3! In true WYSIWYM fashion, you just need to identify the text that makes up the section titles, and LYX takes care of numbering the sections and typesetting them.

Hit Return to get back to the Standard environment, and type the following five lines:

Sections and subsections are described below.

Section Description

Sections are bigger than subsections.

Subsection description

Subsections are smaller than sections.

Click on the second line and select Subsection from the Environment menu. LYX numbers the subsection ``2.1'', and typesets it in a font which is bigger than regular text but smaller than the section title. Change the fourth line Subsection environment as well. As you probably expected, LYX automatically numbered the section ``2.2''. If you put yet another section before Section 2, Section 2 will be renumbered as Section 3, and the subsections will be renumbered to ``3.1'' and ``3.2''.

Further levels of sectioning include Subsubsection, Paragraph, and Subparagraph. We'll let you play with these on your own. You may notice that paragraph and subparagraph headings are not numbered by default, and that subparagraphs are indented; see the User's Guide to change this. Chapter headings are actually the highest level of sectioning, above Sections, but you're only allowed to use them in certain types (text classes) of LYX documents (see Section [*]).

Finally, you may want to have sections or subsections that are not numbered. There are environments for this as well. If you change one of your section headings to the Section* environment (you may have to scroll down in the Environment menu to find it), LYX will use the same font size for the heading as it uses for a regular section, but it won't number that section. There are corresponding ``starred'' heading environments for Subsection and Subsubsection. Try changing some of your sections or subsections to the starred environments, and note how the other sections' numbers are updated.

Exercise: Fix the section and subsection headings in example_raw.lyx.


next up previous contents
Next: Lists and sublists Up: Environments Previous: Environments   Contents
Jay Bolton 2004-04-15