I think the following should cover most things. If anything is missing or appears wrong, please let me know.
File organisation
Place named.sty
and named.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
11pt,openright,twoside,letterpaper
to the Custom options. (The template actually had openright,oneside
, but the former has no effect with the latter, so I switched to twoside
. I also removed the onecolumn
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 loads graphicx
(which is recommended for dealing with external images) anyway.
I removed the dvipdfm
and letterpaper
options to hyperref
. 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 from plain
) and \renewcommand\contentsname{Table of Contents}
.
\newcommand{\thesistitle}{Thesis title}
\newcommand{\thesisauthor}{Author's name}
\newcommand{\thesisyear}{20XX}
%%%
%%% Packages
%%%
\usepackage{named}
\usepackage{fancyhdr}
\usepackage{afterpage}
%
% We use the hyperref package and customize it for optimal PDF
%
\usepackage[
pdftitle={\thesistitle},
pdfauthor={\thesisauthor},
pdfpagemode={UseOutlines},
bookmarks,
bookmarksopen=true,
pdfstartview={FitH},
bookmarksnumbered=true]{hyperref}
%%%
%%% Margins
%%%
\paperwidth=8.5in
\paperheight=11in
% 1in + hoffset + oddsidemargin + textwidth + marginparsep + marginparwidth
% For PhD at Columbia we have single side theses and 1.5in left margin
% The settings below leave 1.5 inch margin at the left and 1 inch at the right
% for US Letter paper
\setlength{\hoffset}{0.0in}
\setlength{\oddsidemargin}{.5in}
\setlength{\textwidth}{6in}
\setlength{\evensidemargin}{0mm}
% 1in + voffset + topmargin + headheight + headsep + textheight + footskip
% For PhD thesis we also need an extra inch at the bottom
% 1inch = 72 pt
\setlength{\voffset}{0.0in}
\setlength{\topmargin}{.0in}
\setlength{\headheight}{14pt}
\setlength{\headsep}{22pt}
\setlength{\textheight}{8.5in}
\setlength{\footskip}{0pt}
%%%
%%% Spacing
%%%
\newcommand{\singlespace}{\renewcommand{\baselinestretch}{1.15} \small \normalsize}
\newcommand{\oneandhalfspace}{\renewcommand{\baselinestretch}{1.3} \small \normalsize}
\newcommand{\doublespace}{\renewcommand{\baselinestretch}{1.5} \small \normalsize}
\newcommand{\normalspace}{\doublespace}
\footnotesep=1\baselineskip
%%%
%%% Counters depth
%%%
\setcounter{secnumdepth}{3}
\setcounter{tocdepth}{3}
%%%
%%% Title page.
%%%
\newcommand{\thesistitlepage}{
\normalspace
\thispagestyle{empty}
\begin{center}
\textbf{\LARGE \thesistitle} \\[1cm]
\textbf{\LARGE \thesisauthor} \\[8cm]
Submitted in partial fulfillment of the \\
requirements for the degree \\
of Doctor of Philosophy \\
in the Graduate School of Arts and Sciences \\[4cm]
\textbf{\Large COLUMBIA UNIVERSITY} \\[5mm]
\thesisyear
\end{center}
\clearpage
}
%%%
%%% Copyright page.
%%%
\newcommand{\thesiscopyrightpage}{
\thispagestyle{empty}
\strut \vfill
\begin{center}
\copyright \thesisyear \\
\thesisauthor \\
All Rights Reserved
\end{center}
\cleardoublepage
}
%%%
%%% Abstract page.
%%%
\newcommand{\thesisabstract}{
\thispagestyle{empty}
\begin{center}
\textbf{\LARGE ABSTRACT} \\[1cm]
\textbf{\LARGE \thesistitle} \\[1cm]
\textbf{\LARGE \thesisauthor} \\[1cm]
\end{center}
\input{abstract}
\cleardoublepage
}
%%%
%%% Miscellaneous
%%%
\newcommand{\draft}{
\renewcommand{\normalspace}{\singlespace}
\normalspace
\chapter*{Draft. Version \today}
\clearpage }
\renewcommand{\contentsname}{Table of Contents}
% We change the pagestyle
\fancypagestyle{myplain} {%
\fancyhf{}
\fancyhead[LE,RO]{\thepage}
\fancyhead[RE,LO]{\itshape \leftmark}
\renewcommand{\headrulewidth}{0pt}
}
In the document
Start by adding an ERT (Ctrl + L) with
% For the first pages we do not have numbering
\pagestyle{empty}
\thesistitlepage
\thesiscopyrightpage
\thesisabstract
% In the "roman-numbered" section of the thesis, we have numbers at the bottom % and we have to reduce the textheight of the text to make space for the number
\pagenumbering{roman}
\pagestyle{plain}
\setlength{\footskip}{0.5in}
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
\pagenumbering{arabic}
% In the "arabic" section of the thesis, we do not have numbers at the
% bottom and we want to use the full length of the page to avoid vbox
% underfulls. We use the fancyheaders package to adapt the headers
% according to the Columbia requirements.
\setlength{\textheight}{8.5in}
\setlength{\footskip}{0in}
\pagestyle{myplain}
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 as something.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.)
#LyX 2.0 created this file. For more info see http://www.lyx.org/
\lyxformat 413
\begin_document
\begin_header
\textclass report
\begin_preamble
\newcommand{\thesistitle}{Thesis title}
\newcommand{\thesisauthor}{Author's name}
\newcommand{\thesisyear}{20XX}
%%%
%%% Packages
%%%
\usepackage{amsmath}
\usepackage{named}
\usepackage{fancyhdr}
\usepackage{afterpage}
%
% We use the hyperref package and customize it for optimal PDF
%
\usepackage[pdftitle={\thesistitle},pdfauthor={\thesisauthor},pdfpagemode={UseOutlines},letterpaper,bookmarks,bookmarksopen=true,pdfstartview={FitH},bookmarksnumbered=true,]{hyperref}
%%%
%%% Margins
%%%
\paperwidth=8.5in
\paperheight=11in
% 1in + hoffset + oddsidemargin + textwidth + marginparsep + marginparwidth
% For PhD at Columbia we have single side theses and 1.5in left margin
% The settings below leave 1.5 inch margin at the left and 1 inch at the right
% for US Letter paper
\setlength{\hoffset}{0.0in}
\setlength{\oddsidemargin}{.5in}
\setlength{\textwidth}{6in}
\setlength{\evensidemargin}{0mm}
% 1in + voffset + topmargin + headheight + headsep + textheight + footskip
% For PhD thesis we also need an extra inch at the bottom
% 1inch = 72 pt
\setlength{\voffset}{0.0in}
\setlength{\topmargin}{.0in}
\setlength{\headheight}{14pt}
\setlength{\headsep}{22pt}
\setlength{\textheight}{8.5in}
\setlength{\footskip}{0pt}
%%%
%%% Spacing
%%%
\newcommand{\singlespace}{\renewcommand{\baselinestretch}{1.15} \small \normalsize}
\newcommand{\oneandhalfspace}{\renewcommand{\baselinestretch}{1.3} \small \normalsize}
\newcommand{\doublespace}{\renewcommand{\baselinestretch}{1.5} \small \normalsize}
\newcommand{\normalspace}{\doublespace}
\footnotesep=1\baselineskip
%%%
%%% Counters depth
%%%
\setcounter{secnumdepth}{3}
\setcounter{tocdepth}{3}
%%%
%%% Title page.
%%%
\newcommand{\thesistitlepage}{
\normalspace
\thispagestyle{empty}
\begin{center}
\textbf{\LARGE \thesistitle} \\[1cm]
\textbf{\LARGE \thesisauthor} \\[8cm]
Submitted in partial fulfillment of the \\
requirements for the degree \\
of Doctor of Philosophy \\
in the Graduate School of Arts and Sciences \\[4cm]
\textbf{\Large COLUMBIA UNIVERSITY} \\[5mm]
\thesisyear
\end{center}
\clearpage
}
%%%
%%% Copyright page.
%%%
\newcommand{\thesiscopyrightpage}{
\thispagestyle{empty}
\strut \vfill
\begin{center}
\copyright \thesisyear \\
\thesisauthor \\
All Rights Reserved
\end{center}
\cleardoublepage
}
%%%
%%% Abstract page.
%%%
\newcommand{\thesisabstract}{
\thispagestyle{empty}
\begin{center}
\textbf{\LARGE ABSTRACT} \\[1cm]
\textbf{\LARGE \thesistitle} \\[1cm]
\textbf{\LARGE \thesisauthor} \\[1cm]
\end{center}
\input{abstract}
\cleardoublepage
}
%%%
%%% Miscellaneous
%%%
\newcommand{\draft}{
\renewcommand{\normalspace}{\singlespace}
\normalspace
\chapter*{Draft. Version \today}
\clearpage }
\renewcommand{\contentsname}{Table of Contents}
\setcounter{tocdepth}{2}
% We change the pagestyle
\fancypagestyle{myplain} {%
\fancyhf{}
\fancyhead[LE,RO]{\thepage}
\fancyhead[RE,LO]{\itshape \leftmark}
\renewcommand{\headrulewidth}{0pt}
}
\end_preamble
\options 11pt,openright,twoside,letterpaper,onecolumn
\use_default_options true
\maintain_unincluded_children false
\language english
\language_package default
\inputencoding auto
\fontencoding global
\font_roman default
\font_sans default
\font_typewriter default
\font_default_family default
\use_non_tex_fonts false
\font_sc false
\font_osf false
\font_sf_scale 100
\font_tt_scale 100
\graphics default
\default_output_format default
\output_sync 0
\bibtex_command default
\index_command default
\paperfontsize default
\spacing single
\use_hyperref false
\papersize default
\use_geometry false
\use_amsmath 1
\use_esint 1
\use_mhchem 1
\use_mathdots 1
\cite_engine basic
\use_bibtopic false
\use_indices false
\paperorientation portrait
\suppress_date false
\use_refstyle 1
\index Index
\shortcut idx
\color #008000
\end_index
\secnumdepth 3
\tocdepth 3
\paragraph_separation indent
\paragraph_indentation default
\quotes_language english
\papercolumns 1
\papersides 1
\paperpagestyle default
\tracking_changes false
\output_changes false
\html_math_output 0
\html_css_as_file 0
\html_be_strict false
\end_header
\begin_body
\begin_layout Standard
\begin_inset ERT
status open
\begin_layout Plain Layout
% For the first pages we do not have numbering
\end_layout
\begin_layout Plain Layout
\end_layout
\begin_layout Plain Layout
\backslash
pagestyle{empty}
\end_layout
\begin_layout Plain Layout
\end_layout
\begin_layout Plain Layout
\backslash
thesistitlepage
\end_layout
\begin_layout Plain Layout
\backslash
thesiscopyrightpage
\end_layout
\begin_layout Plain Layout
\backslash
thesisabstract
\end_layout
\begin_layout Plain Layout
% In the "roman-numbered" section of the thesis, we have numbers at the
bottom % and we have to reduce the textheight of the text to make space
for the number
\end_layout
\begin_layout Plain Layout
\backslash
pagenumbering{roman}
\end_layout
\begin_layout Plain Layout
\backslash
pagestyle{plain}
\end_layout
\begin_layout Plain Layout
\end_layout
\begin_layout Plain Layout
\backslash
setlength{
\backslash
footskip}{0.5in}
\end_layout
\end_inset
\end_layout
\begin_layout Standard
\begin_inset CommandInset toc
LatexCommand tableofcontents
\end_inset
\end_layout
\begin_layout Standard
\begin_inset FloatList figure
\end_inset
\end_layout
\begin_layout Standard
\begin_inset FloatList table
\end_inset
\end_layout
\begin_layout Chapter*
Acknowledgements
\end_layout
\begin_layout Standard
So long and thanks for all the fish.
\end_layout
\begin_layout Standard
\begin_inset Newpage cleardoublepage
\end_inset
\end_layout
\begin_layout Standard
\begin_inset VSpace vfill*
\end_inset
\end_layout
\begin_layout Standard
\align center
Dedication
\end_layout
\begin_layout Standard
\begin_inset VSpace vfill*
\end_inset
\end_layout
\begin_layout Standard
\begin_inset Newpage cleardoublepage
\end_inset
\end_layout
\begin_layout Standard
\begin_inset ERT
status open
\begin_layout Plain Layout
\end_layout
\begin_layout Plain Layout
\backslash
pagenumbering{arabic}
\end_layout
\begin_layout Plain Layout
\end_layout
\begin_layout Plain Layout
% In the "arabic" section of the thesis, we do not have numbers at the
\end_layout
\begin_layout Plain Layout
% bottom and we want to use the full length of the page to avoid vbox
\end_layout
\begin_layout Plain Layout
% underfulls.
We use the fancyheaders package to adapt the headers
\end_layout
\begin_layout Plain Layout
% according to the Columbia requirements.
\end_layout
\begin_layout Plain Layout
\end_layout
\begin_layout Plain Layout
\backslash
setlength{
\backslash
textheight}{8.5in}
\end_layout
\begin_layout Plain Layout
\backslash
setlength{
\backslash
footskip}{0in}
\end_layout
\begin_layout Plain Layout
\end_layout
\begin_layout Plain Layout
\backslash
pagestyle{plain}
\end_layout
\end_inset
\end_layout
\begin_layout Chapter
Intro
\end_layout
\begin_layout Standard
\begin_inset CommandInset label
LatexCommand label
name "chap:intro"
\end_inset
\end_layout
\begin_layout Standard
This is about stuff.
\end_layout
\begin_layout Part
Stuff
\end_layout
\begin_layout Chapter
Something
\end_layout
\begin_layout Standard
Etc.
\begin_inset CommandInset citation
LatexCommand cite
key "Grosz_and_Sidner_1986"
\end_inset
\end_layout
\begin_layout Part
Appendices
\end_layout
\begin_layout Standard
\begin_inset CommandInset bibtex
LatexCommand bibtex
bibfiles "refs"
options "named"
\end_inset
\end_layout
\end_body
\end_document
Best Answer
My suggestion is writing it directly using LaTeX files.
Nonetheless, said that, unlike many thesis templates, in this case
main.tex
do not use a custom document class but the standardbook
that is already supported by Lyx without any special configuration.So you can File > Import > LaTeX (plain) ... > select
main.tex
. This will makemain.lyx
as well as lyx versions of all the subdocuments.However, the imported file will have some problems:
1. Conflicts between the imported preamble and own LyX settings for the document. The solution is remove from Document > Settings... > LaTeX Preamble what could be fixed in other sections of Document > Settings....
For example, in the original
main.tex
file, this lines:Will be traduced by LyX in this LaTeX source:
Beside setting defaults margins in
geometry
, this is wrong mainly because thecroatian
option cannot be passed two times to thebabel
package. But you can remove both packages from the preamble and configure them through the LyX interface to produce this:That is essentially the same that the original .tex file.
2. Many LaTeX code remain as Evil Red Text boxes (aka ERT boxes or TeX Code boxes that you can insert with Ctrl+L ).
Generally the ERT boxes are not harmful (the file is still compilable) but annoying. In this case, many of these ERT are LaTeX comments that you remove safely or convert in yellow notes. Others are commands as
\tableofcontents
that you can replace easily by Lyx objects as Insert > List/ToC > Table of contents and some others could be LaTeX code that is better maintain "as is" since you cannot (or you do not know) replicate through the GUI of LyX (for example, thetitlepage
environment). If unsure, left the ERT boxes!3. Imported images are too big on the screen. This is a minor problem easy to solve: Right-click on the image Settings... > LateX and LyX options > Scale on the screen (%) > try with a 1-10%. The image size on the PDF is not modified by this setting.
4. Conflicts inherited from converted sub documents. The conversion of the main file is not too hard but debug compilations errors due (for example) to a
tabularx
environment infested with dozens of ERT boxes in a included subdocument will be a nightmare even for experts. Simply avoid these conflicting example subdocuments until you have a compilable main file. Then start including simple subdocuments with only some text. Remember that LyX cannot produce any type of LaTeX code, only the most common commands and environments, but you always insert unknow code for LyX as long as you use the ERT boxes, and when needed, packages/definitions in the preamble so LaTeX can understand these ERT boxes.So, after some cleaning, your
main.lyx
could be some like this: