I'm looking to write my thesis in Lyx as I'm impressed with all the document handling features.
I have found, what is called, a Latex template for my university's thesis here: http://www.cs.columbia.edu/mice/c/d.php?d=109
The template contains a set of .tex, .bst. and .sty files as well as a simple Makefile. Running make
does produce a nice pdf that looks exactly like a bare bones thesis would.
Now how can I get Lyx to play nice with all of this? For one, I don't see anything for dealing with Makefiles.
Am I shooting for the moon?
Best Answer
I think the following should cover most things. If anything is missing or appears wrong, please let me know.
File organisation
Place
named.sty
andnamed.bst
in the same folder as your.lyx
file.Document class options
Go to Document --> Settings --> Document class, choose Report from the list of classes, and add
to the Custom options. (The template actually had
openright,oneside
, but the former has no effect with the latter, so I switched totwoside
. I also removed theonecolumn
option.)Preamble
Paste the below code in Document --> Settings --> LaTeX preamble. Notes:
You should of course modify the first three lines, adding your title, name and year.
I removed the
epsfig
package, don't think it's normally used these days, and LyX loadsgraphicx
(which is recommended for dealing with external images) anyway.I removed the
dvipdfm
andletterpaper
options tohyperref
. You'll probably compile with pdfLaTeX, making the first of these wrong. The latter is not used.I moved some stuff from the document to the preamble, including the definition of a pagestyle (
myplain
, I switched name fromplain
) and\renewcommand\contentsname{Table of Contents}
.In the document
Start by adding an ERT (Ctrl + L) with
After the ERT, add the table of contents, list of figures and list of tables via the Insert --> List/ToC menu.
Add an unnumbered chapter, call it Acknowledgements and write those here.
(This is not exactly the same as in the template.)
If you want the dedication page, do the following:
i. Do Insert --> Formatting --> Clear double page
ii. Insert --> Formatting --> Vertical space. Choose VFill, check the box for Protect.
iii. Write your dedication.
iv. Add a second VFill, as step i).
v. Insert --> Formatting --> Clear Double page
Add a new ERT with
Write all your content.
Bibliography
Where the bibliography should be, do Insert --> List/ToC --> BibTeX bibliography. Select your
.bib
file, and from the Style drop down menu, choose named.Complete example
The code below is actually a
.lyx
file, you can copy the text, save it assomething.lyx
and open it in LyX. It is generated by LyX 2.0.6, as LyX 2.1 isn't in Ubuntu's repositories yet, and I haven't bothered updating manually. (I never really use LyX anyway.)