Introduction to Writing Documents with LYX Erich Hoover Academic Chair, CSM Graduate Student Association March 25, 2011 Outline Installation Purpose Toolbar Special Formatting Greek Symbols Working with Floats Tables Figures Subfigures Cross-referencing Equations Lists Citing References Conclusion Downloading Installation Free Download: http://www.lyx.org/Download The installer for Windows includes the MiKTeX distribution of LATEX. The installer for Mac OS X requires the installation of MacTeX. Installations for Linux will automatically install LATEX through your distribution’s package manager. Installing on Windows Installation Installing on Windows Installation Installing on Windows Installation Installing on Windows Installation Installing on Windows Installation Installing on Windows Installation Installing on Windows Installation Installing on Windows Installation Installing on Windows Installation What exactly is LYX? Purpose Not exactly a typesetting application (LATEX). Not exactly a word processor (Word). Not WYSIWYG — “What You See Is What You Get” LYX is rather a “document processor,” or WYSIWYM — “What You See Is What You Mean” What exactly is LYX? Purpose Not exactly a typesetting application (LATEX). Not exactly a word processor (Word). Not WYSIWYG — “What You See Is What You Get” LYX is rather a “document processor,” or WYSIWYM — “What You See Is What You Mean” What exactly is LYX? Purpose Not exactly a typesetting application (LATEX). Not exactly a word processor (Word). Not WYSIWYG — “What You See Is What You Get” LYX is rather a “document processor,” or WYSIWYM — “What You See Is What You Mean” What exactly is LYX? Purpose Not exactly a typesetting application (LATEX). Not exactly a word processor (Word). Not WYSIWYG — “What You See Is What You Get” LYX is rather a “document processor,” or WYSIWYM — “What You See Is What You Mean” WYSIWYM Purpose The document must be “rendered,” it cannot be printed directly. Document appearance is defined by styles, rather than explicit formatting. Styles are preset concepts that exist outside the document itself (ie. “Chapter” or “Enumeration”). Most writers only need to worry about the meaning of each component of the document, how the document renders is handled by the chosen style. Custom styles are generally implemented by a typesetter, who will handle how each concept renders in the resulting document. WYSIWYM Purpose The document must be “rendered,” it cannot be printed directly. Document appearance is defined by styles, rather than explicit formatting. Styles are preset concepts that exist outside the document itself (ie. “Chapter” or “Enumeration”). Most writers only need to worry about the meaning of each component of the document, how the document renders is handled by the chosen style. Custom styles are generally implemented by a typesetter, who will handle how each concept renders in the resulting document. WYSIWYM Purpose The document must be “rendered,” it cannot be printed directly. Document appearance is defined by styles, rather than explicit formatting. Styles are preset concepts that exist outside the document itself (ie. “Chapter” or “Enumeration”). Most writers only need to worry about the meaning of each component of the document, how the document renders is handled by the chosen style. Custom styles are generally implemented by a typesetter, who will handle how each concept renders in the resulting document. WYSIWYM Purpose The document must be “rendered,” it cannot be printed directly. Document appearance is defined by styles, rather than explicit formatting. Styles are preset concepts that exist outside the document itself (ie. “Chapter” or “Enumeration”). Most writers only need to worry about the meaning of each component of the document, how the document renders is handled by the chosen style. Custom styles are generally implemented by a typesetter, who will handle how each concept renders in the resulting document. WYSIWYM Purpose The document must be “rendered,” it cannot be printed directly. Document appearance is defined by styles, rather than explicit formatting. Styles are preset concepts that exist outside the document itself (ie. “Chapter” or “Enumeration”). Most writers only need to worry about the meaning of each component of the document, how the document renders is handled by the chosen style. Custom styles are generally implemented by a typesetter, who will handle how each concept renders in the resulting document. Important Toolbar Buttons Toolbar Style Selection Dropdown Box Check for Spelling Mistakes Toggle Emphasis (Italics) In-line Math (NOT for Numbered Equations) Insert Float for Graphic Insert Graphic (Without Float) Insert Float for Table Insert Table (Without Float) Toggle Outline View (Table of Contents) Important Toolbar Buttons Toolbar Insert Cross-referencing Label Insert Cross-reference Insert Bibliography Citation Insert Footnote Insert Typesetting Code (“Evil Red Text”) Change Style of Hilighted Text Change Style of Current Paragraph Render and View the Document Important Formatting Options Special Formatting Insert Formatting Superscript Insert Formatting Subscript Insert Formatting Protected Space Insert Formatting Thin Space Create a small upper-right text box. Create a small lower-right text box. Create a “standard size” space between items and ensure that a linebreak does not occur on that space. Create a “half size” space between items and ensure that a linebreak does not occur on that space. This formatting mark is primarily for use with Latin abbreviations (like i. e.) and for separating variables in equations. Important Formatting Options Special Formatting Insert Formatting Ragged Line Break Insert Formatting Hyphenation Point Insert Special Character Protected Hyphen Insert Formatting New Page Insert Special Character Ellipsis End the line without starting a new paragraph. Place a suggested point of hyphenation for when a word breaks at the end of a line. Place a hyphen that does not break at the end of a line. Force following content to occur on a new page. Insert an ellipsis (. . . ). Inserting Greek Symbols Greek Symbols Greek symbols can be inserted with the “Insert Special Character Symbols. . . ” dialog. Generally these symbols should be inserted by inserting the symbol within an in-line math formula. That way the style of the symbol will match with when it is used inside a full-blown equation. Inside a math mode box any Greek character can be created by selecting the appropriate character from the “Greek” menu (α symbol) on the “Math Panel”. Inserting Greek Symbols Greek Symbols Greek symbols can be inserted with the “Insert Special Character Symbols. . . ” dialog. Generally these symbols should be inserted by inserting the symbol within an in-line math formula. That way the style of the symbol will match with when it is used inside a full-blown equation. Inside a math mode box any Greek character can be created by selecting the appropriate character from the “Greek” menu (α symbol) on the “Math Panel”. Inserting Greek Symbols Greek Symbols Greek symbols can be inserted with the “Insert Special Character Symbols. . . ” dialog. Generally these symbols should be inserted by inserting the symbol within an in-line math formula. That way the style of the symbol will match with when it is used inside a full-blown equation. Inside a math mode box any Greek character can be created by selecting the appropriate character from the “Greek” menu (α symbol) on the “Math Panel”. What is a “float”? Working with Floats Unlike in a word processor, in professional typeset documents figures and tables are generally automatically placed nearby the referencing text ± a couple pages. Informing the software which objects should be placed like this is done through the use of a “float,” since those objects may float (move around) during the rendering process. All captioned figures and tables must be placed in a float. There are different types of floats for different objects, this fact is important for many documents (such as the unofficial thesis template) where the correct position of the caption differs between different float types. What is a “float”? Working with Floats Unlike in a word processor, in professional typeset documents figures and tables are generally automatically placed nearby the referencing text ± a couple pages. Informing the software which objects should be placed like this is done through the use of a “float,” since those objects may float (move around) during the rendering process. All captioned figures and tables must be placed in a float. There are different types of floats for different objects, this fact is important for many documents (such as the unofficial thesis template) where the correct position of the caption differs between different float types. What is a “float”? Working with Floats Unlike in a word processor, in professional typeset documents figures and tables are generally automatically placed nearby the referencing text ± a couple pages. Informing the software which objects should be placed like this is done through the use of a “float,” since those objects may float (move around) during the rendering process. All captioned figures and tables must be placed in a float. There are different types of floats for different objects, this fact is important for many documents (such as the unofficial thesis template) where the correct position of the caption differs between different float types. What is a “float”? Working with Floats Unlike in a word processor, in professional typeset documents figures and tables are generally automatically placed nearby the referencing text ± a couple pages. Informing the software which objects should be placed like this is done through the use of a “float,” since those objects may float (move around) during the rendering process. All captioned figures and tables must be placed in a float. There are different types of floats for different objects, this fact is important for many documents (such as the unofficial thesis template) where the correct position of the caption differs between different float types. Creating a Table Working with Floats Creating a Table Working with Floats Creating a Table Working with Floats Creating a Table Working with Floats Creating a Table Working with Floats Creating a Table Working with Floats Creating a Table Working with Floats Creating a Table Working with Floats Creating a Table Working with Floats Creating a Table Working with Floats Creating a Table Working with Floats Creating a Table Working with Floats Creating a Table Working with Floats (Rendered Document) Creating a Figure Working with Floats Creating a Figure Working with Floats Creating a Figure Working with Floats Creating a Figure Working with Floats Creating a Figure Working with Floats Creating a Figure w/ Subfigures Working with Floats Creating a Figure w/ Subfigures Working with Floats Creating a Figure w/ Subfigures Working with Floats Creating a Figure w/ Subfigures Working with Floats Creating a Figure w/ Subfigures Working with Floats Creating a Figure w/ Subfigures Working with Floats Creating a Figure w/ Subfigures Working with Floats Creating a Figure w/ Subfigures Working with Floats Creating a Figure w/ Subfigures Working with Floats Creating a Figure w/ Subfigures Working with Floats Creating a Figure w/ Subfigures Working with Floats Creating a Figure w/ Subfigures Working with Floats Creating a Figure w/ Subfigures Working with Floats Creating a Figure w/ Subfigures Working with Floats Creating a Figure w/ Subfigures Working with Floats (Rendered Document) Creating a Figure w/ Subfigures Working with Floats Creating a Figure w/ Subfigures Working with Floats Creating a Figure w/ Subfigures Working with Floats Creating a Figure w/ Subfigures Working with Floats Creating a Figure w/ Subfigures Working with Floats Creating a Figure w/ Subfigures Working with Floats Creating a Figure w/ Subfigures Working with Floats (Rendered Document) Referencing Tables, Figures, and Equations Cross-referencing LATEX (and, by extension, LYX) keeps track of the linking between an object and any references to it in the text, this feature allows for the software to autoregenerate the text (such as the equation number) when the order of any of these items changes. In order to keep track of this information the user must “label” anything they wish to reference in the text and later “cross-reference” that item to insert the appropriate reference to the item. All labels are descriptive text defined by the author (rather than an autogenerated number), permitting easy identification of which object is being referenced. Referencing Tables, Figures, and Equations Cross-referencing LATEX (and, by extension, LYX) keeps track of the linking between an object and any references to it in the text, this feature allows for the software to autoregenerate the text (such as the equation number) when the order of any of these items changes. In order to keep track of this information the user must “label” anything they wish to reference in the text and later “cross-reference” that item to insert the appropriate reference to the item. All labels are descriptive text defined by the author (rather than an autogenerated number), permitting easy identification of which object is being referenced. Referencing Tables, Figures, and Equations Cross-referencing LATEX (and, by extension, LYX) keeps track of the linking between an object and any references to it in the text, this feature allows for the software to autoregenerate the text (such as the equation number) when the order of any of these items changes. In order to keep track of this information the user must “label” anything they wish to reference in the text and later “cross-reference” that item to insert the appropriate reference to the item. All labels are descriptive text defined by the author (rather than an autogenerated number), permitting easy identification of which object is being referenced. Labeling an Object Cross-referencing Labeling an Object Cross-referencing Labeling an Object Cross-referencing Labeling an Object Cross-referencing Labeling an Object Cross-referencing Labeling an Object Cross-referencing Labeling an Object Cross-referencing Labeling an Object Cross-referencing (Rendered Document) Using Equations Equations LATEX and LYX were designed around the ability to use equations, resulting in a system that allows for extremely user-friendly equation editing. This system was designed so well that virtually all software supports the LATEX language for writing equations, you can even see this in Wikipedia if you ever view the “alternate text” for an equation. In addition to a nice user-interface, LYX permits copying and pasting LATEX equations from any application. Using Equations Equations LATEX and LYX were designed around the ability to use equations, resulting in a system that allows for extremely user-friendly equation editing. This system was designed so well that virtually all software supports the LATEX language for writing equations, you can even see this in Wikipedia if you ever view the “alternate text” for an equation. In addition to a nice user-interface, LYX permits copying and pasting LATEX equations from any application. Using Equations Equations LATEX and LYX were designed around the ability to use equations, resulting in a system that allows for extremely user-friendly equation editing. This system was designed so well that virtually all software supports the LATEX language for writing equations, you can even see this in Wikipedia if you ever view the “alternate text” for an equation. In addition to a nice user-interface, LYX permits copying and pasting LATEX equations from any application. “Advanced” Equations Equations As an extension of copy-pasting equations, LYX allows the user to type raw LATEX equations and then convert them into a “pretty print” view when they press the spacebar. LYX helps the user to learn this language (if they wish) by informing the user of the LATEX command for an operator whenever they insert it into an equation. This message (along with the keyboard shortcut) is displayed unobtrusively in the status bar at the bottom of the window: “Advanced” Equations Equations As an extension of copy-pasting equations, LYX allows the user to type raw LATEX equations and then convert them into a “pretty print” view when they press the spacebar. LYX helps the user to learn this language (if they wish) by informing the user of the LATEX command for an operator whenever they insert it into an equation. This message (along with the keyboard shortcut) is displayed unobtrusively in the status bar at the bottom of the window: Typesetting Equations Equations Typesetting Equations Equations Typesetting Equations Equations Typesetting Equations Equations Typesetting Equations Equations Typesetting Equations Equations Typesetting Equations Equations Typesetting Equations Equations Typesetting Equations Equations Note the purple “selection box,” this indicates that you are within an equation object. Typesetting Equations Equations Note that the purple “selection box” is now gone, indicating the cursor is no-longer within the object. Typesetting Equations Equations Typesetting Equations Equations Note the purple “selection box,” this indicates that you are within an equation object. Typesetting Equations Equations Note that the purple “selection box” is now gone, indicating the cursor is no-longer within the object. Typesetting Equations Equations Typesetting Equations Equations Typesetting Equations Equations Typesetting Equations Equations Typesetting Equations Equations Typesetting Equations Equations Typesetting Equations Equations Typesetting Equations Equations (Rendered Document) List Environments Lists LATEX and LYX have built-in list environments that permit consistently displaying list content throughout the document. Default bullets and numbering are built into LATEX; however, the user may override these options at their discretion. Overriding the defaults in LYX is performed in the “Document Settings” dialog under the “Bullets” heading (there are numerous built-in bullet styles at your disposal). List Environments Lists LATEX and LYX have built-in list environments that permit consistently displaying list content throughout the document. Default bullets and numbering are built into LATEX; however, the user may override these options at their discretion. Overriding the defaults in LYX is performed in the “Document Settings” dialog under the “Bullets” heading (there are numerous built-in bullet styles at your disposal). List Environments Lists LATEX and LYX have built-in list environments that permit consistently displaying list content throughout the document. Default bullets and numbering are built into LATEX; however, the user may override these options at their discretion. Overriding the defaults in LYX is performed in the “Document Settings” dialog under the “Bullets” heading (there are numerous built-in bullet styles at your disposal). Making Lists Lists Making Lists Lists Making Lists Lists Making Lists Lists Keeping Track of References Citing References Just like cross-references, LATEX (and LYX) keep track of citations automatically and present the reference using a descriptive user-specified label. The actual information displayed for the bibliography is stored in a text file called a “BIBTEX Database” (“.bib” extension). Most citation software packages and websites support exporting to BIBTEX - including EndNote, JabRef, Mendeley, Papers, and Zotero. Keeping Track of References Citing References Just like cross-references, LATEX (and LYX) keep track of citations automatically and present the reference using a descriptive user-specified label. The actual information displayed for the bibliography is stored in a text file called a “BIBTEX Database” (“.bib” extension). Most citation software packages and websites support exporting to BIBTEX - including EndNote, JabRef, Mendeley, Papers, and Zotero. Keeping Track of References Citing References Just like cross-references, LATEX (and LYX) keep track of citations automatically and present the reference using a descriptive user-specified label. The actual information displayed for the bibliography is stored in a text file called a “BIBTEX Database” (“.bib” extension). Most citation software packages and websites support exporting to BIBTEX - including EndNote, JabRef, Mendeley, Papers, and Zotero. Setting a Database Citing References NOTE: With a brand-new document the bibliography must first be inserted through the menu: “Insert List/TOC BibTeX Biliography. . . ” Setting a Database Citing References Setting a Database Citing References Setting a Database Citing References Setting a Database Citing References NOTE: With most documents you must also set a style, this is usually “unsrtnat” or “authordate1” (the thesis template does this automatically). Adding a Citation Citing References Adding a Citation Citing References Adding a Citation Citing References Adding a Citation Citing References Adding a Citation Citing References Adding a Citation Citing References Adding a Citation Citing References (Rendered Document) Using Author-Date References Citing References Using Author-Date References Citing References Using Author-Date References Citing References Using Author-Date References Citing References Using Author-Date References Citing References (Rendered Document) Conclusion LYX allows users without a background in LATEX typesetting to easily write large professional documents. The unofficial CSM thesis template integrates directly into LYX, making writing your thesis just like writing any other document in LYX. This template can be downloaded from the GSA website: http://organizations.mines.edu/gsa/resources.html Questions?