Download this zip file to complete the LyX training for the Spring 2014 class! In the file you will find the LyX training document (which is a LyX file itself) as well as a zipped file that Heidi created as an example of what your completed assignment should look like.
This site has a some good information on how to do things in LyX.
Many figures come from PowerPoint diagrams and Excel or Mathcad graphs, and getting these figures to look good in the LyX pdf, with nice crisp lines and clear text, is somewhat difficult. The only language LyX, Excel, Mathcad, and PowerPoint all speak is pdf. Here is the recommended procedure:
A note on centering figures: to center any figure insert a LaTeX code box containing the text \centering in the float box that contains the figure you wish to center.
An overarching theme of the next few sections is that there are many things in LyX and its associated programs (chiefly BibTeX) that you cannot change easily in menus or other user controls. LyX makes a lot of decisions for you, and some of them will inevitably not make your document look good. Your page numbering defaults to starting at 1, putting your title page on page 1 and your table of contents awkwardly around page 10. If you cite a source like a report by "American Society of Civil Engineers," your in-text citations will be (Engineers, 2009) and your bibliography will assume that the author is a person named, "Engineers, A.S.C." If there is an article in your references list with a title that includes a word like "Honduras," it will show up in lower case letters automatically. And if you were tempted to have a references list at the end of each chapter of your thesis, you can add two database files ... but a lot of your references will disappear.
All of these examples have two things in common: (1) It may take you many hours to fix each of them, and (2) there is nothing you can do in the menus, user options, etc. in LyX that make any of these problems go away. To fix these problems you need to learn a bit of the nuts and bolts of LaTeX and BibTeX coding to complete thesis, or other complex document. LyX pretends to be a totally user-friendly program that eliminates the need to use LaTeX coding, however this is not entirely true.
It is possible to get Roman numerals on your pages before and up to your table of contents, and Arabic numerals starting on the first page of your actual text. You need to do this by inserting LaTeX code boxes in the right places:
and
right before your title does two things: it gets rid of page numbering on your title page, and starts using Roman numerals for the beginning of the document and until further notice. Then, after your Table of Contents, List of Figures, and List of Tables (each spaced by a page break), add another page break before Chapter 1 of the actual text and add another LaTeX command to switch to Arabic numerals:
A good way to start is to put together your bibliography in RefWorks online, then export a BibTeX file from RefWorks. This step is not too difficult, but does require one important step: the file that RefWorks sends you, even though it is meant for BibTeX, has the .txt (text file) extension. You have to change this to .bib before it will work. Different operating systems have different ways to do this. Once your file is in the .bib form, you are often far from done. The online libraries and indices have many inconsistencies in the way they enter references, so some of your journal articles will come back with:
Theoretically it is possible to get rid of all this stuff in RefWorks, but it is hard to catch everything. One easy way to do this is to open the BibTeX database file and make all of these changes by hand to be sure that it is all correct. The other key lesson is that you can use an extra set of braces to "fix" the text of a reference to make it appear EXACTLY as you want it to look. Here is a typical examples of a BibTeX entry where the double braces method is used to get things to show up correctly - in this case, to capitalize things as I wanted them to appear in the article title because it defaults to lower case (please note that here the title should have double braces around it).
@article{RefWorks:58,
author={C. B. Yang and Y. L. Cheng and J. C. Liu and D. J. Lee},
year=
,
title=Treatment and reuse of backwash water in Taipei water treatment plant, Taiwan
,
journal= ,
volume=,
number=,
pages=
Here is a method for citing a report where the author is something like ASCE or US EPA. It consists of two basic steps - the BibTeX entry and the in-text citations. We will use the example of the "Report Card for America's Infrastructure" by the American Society of Civil Engineers, 2009. Here is how it is formatted in BibTeX with the "fixed braces" method (please note that here the author and title should have double braces around them):
@misc{RefWorks:34,
author=American Society of Civil Engineers (ASCE)
,
year= ,
title=2009 Report Card for America's Infrastructure
,
journal= ,
month= ,
url={http://www.infrastructurereportcard.org/report-cards{color:#222222}}
This is using the "ascelike" convention, and bizarrely it is the case that the "Journal" line is needed in order for quotes to properly appear around the title of a misc or online reference. Written this way, it will show up fine in a bibliography.
Now, here is how to make it appear correctly for in-text citations. Lets say we want it to appear as (ASCE, 2009). The first step is to add some code to the LaTeX preamble (Document >> Settings >> LaTeX preamble) for each reference whose default in-text citation we want to change. The syntax is: \defcitealias . In order to use this, you cannot simply add a citation from the menu as you would with other references. Instead, where you want (ASCE, 2009) to show up in the pdf file, you need to make the citation in LaTeX code. For this example, the syntax is: \citepalias
The final challenge with bibliographies is getting them to section. If you want a unique list of references at the end of each chapter of a document, that ends up requiring a few steps:
Many times in LyX you might run into the problem of your text running off the page. If it is simply text (in an author list, or a super long website) then all you need to do is add a LaTeX box with two backslashes in it where you want the hard return to happen. If that doesn't work for some reason another command to try is \newline. You can also use this method for breaking up equations, but it might be somewhat messy. We are currently trying to figure out ways to fix this problem with equations.