Hello all,

I'm just starting to work on my thesis and thought I would take a closer
look at getting the appropriate style to work.

I have to warn you all I've only made simple use of latex, and have been
using LyX for most of my writing.

When using an external format before I've simply exported the lyx file
to latex, applied the new style for the conference, and edited by hand
where needed, which has been a headache.

Now the format for my thesis (in the form of a .sty file) makes my other
 formats simplistic, and I'm having lots of trouble. I'll try to reduce
this to the central details.

First I took the article.layout file, copied it into a new name, and
added \usepackage{csthesis.sty} in the preamble section as such:

Preamble
        \usepackage{csthesis}
EndPreamble

I also added and texhashed the sty file so that lyx could find it.

I confirm that article(csthesis) is listed as a document class in Lyx.

The layout file simply controls how the document appears in Lyx, and
does not have any effect on the output, correct?

So I generated a few DVIs and noticed that the example thesis, that came
with the package, bears little resemblance to my own output.

In order to test I imported the latex example file, included with the
package, into lyx and tried to generate output.

First problem was that I got the following error:

LaTeX Error: There's no line here to end.

Lyx highlights the first \qualification{} command.

All the google references I found talked about this error in terms of
using \\, which is not in the document.

Aside: I did notice that just before the qualification a \maketitle
command in the view-source window. What I don't understand is that
command is not visible as ERT or in any way in the normal lyx view.

So I did the logical thing of commenting out (with a preceding % sign)
in front of both the \qualification{} commands. Once that is done Lyx
will generate output, the style of the title is incorrect.

So I exported a second latex file from this document, and commented out
the \maketitle command.

Once that is done I can generate a proper looking document using latex
directly on that tex document.

I'm happy that I've been able to get something to work at all, but how
can I use the proper style in LyX directly without having to manually
edit the tex file after exporting?

Why does the \maketitle command get added when I import the tex?

Why does output bail on the \qualification{} commands?

Why does the output of the document using the layout that uses the
thesis style file not generate output that resembles the sample file?

I've attached a few files to make things more clear:

csthesis.sty is the University provided style file.

sfuthesis.sty is a copy of article.layout with the csthesis package used.

bbtest.tex is a shorted version of the sample text file that came with
the university style file, without any hand-changes. Note it does not
include a \makeletter command, but generates a nice title according to
the university specs when using latex by hand.

I may be the first person to use LyX with this style at my University,
and considering how happy I am with LyX in general, I hope solving these
issues will encourage students in the future to use LyX.

Thanks for your time,
any pointers or suggestions appreciated.

B. Bogart

#% Do not delete the line below; configure depends on this
#  \DeclareLaTeXClass[article,csthesis.sty]{article (sfuthesis)}

Preamble
        \usepackage{csthesis}
EndPreamble

Format 4
Input stdclass.inc

SecNumDepth             3
TocDepth                3

NoStyle Chapter
NoStyle Chapter*


Style Part
        Align                 Left
        AlignPossible         Left
        TopSep                2
        BottomSep             1.5
        Font
          Size                Larger
        EndFont
End


Style Part*
        Align                 Left
        AlignPossible         Left
        TopSep                2
        BottomSep             1.5
        Font
          Size                Larger
        EndFont
End

%%
%% This is file `csthesis.sty',
%% generated with the docstrip utility.
%%
%% The original source files were:
%%
%% csthesis.dtx  (with options: `package')
%% 
%% IMPORTANT NOTICE:
%% 
%% For the copyright see the source file.
%% 
%% Any modified versions of this file must be renamed
%% with new filenames distinct from csthesis.sty.
%% 
%% For distribution of the original source see the terms
%% for copying and modification in the file csthesis.dtx.
%% 
%% This generated file may be distributed as long as the
%% original source files, as listed above, are part of the
%% same distribution. (The sources need not necessarily be
%% in the same archive or directory.)
%%
%% Comp. Science, SFU thesis style `csthesis', to be used with LaTeX2e
%% Copyright (C) 1998 Petr Pp Kubon
%%
%% History:
%%   1) 1989: Created by Stephen Chan (CSS) from Stanford PhD Thesis style
%%   2) 1996: Modifications and additions by Margaret Sharon (ACS)
%%   3) 1997-8: Further modified by Pepe Kubon to reflect current
%%   regulations
%%   4) 2003: Added "Contents" to the table of contents, Greg Baker
%%   5) 2006: Trivial change to approval page, Greg Baker
%%
\def\fileversion{V1.21}
\def\filedate{2006/03/07}
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{csthesis}
\typeout{Package `csthesis' \fileversion\space<\filedate>[Pepe Kubon]}
\oddsidemargin 3.8cm\advance\oddsidemargin by -1in
\evensidemargin 3.8cm\advance\evensidemargin by -1in
[EMAIL PROTECTED]
  \advance\evensidemargin by -1.3cm
\fi  % Adjust evensidemargin if twoside option specified **MS**
\textwidth 8.5in\advance\textwidth by -3.8cm\advance\textwidth by -2.5cm
\topmargin 1in\advance\topmargin by -2.5cm
\textheight 11in
\advance\textheight by -5cm % To account for header and TeX's top margin
\advance\textheight by -2.5cm % Bottom margin
\marginparwidth 40pt \marginparsep 10pt

%% space between text, header, footer, and footnotes
\setlength{\headsep}{2\baselineskip}%% 27pt for 11pt size
\setlength{\footskip}{\headsep}
\addtolength{\footskip}{.5\baselineskip}%% 34pt for 11pt
\addtolength{\skip\footins}{1ex}%% push 1st ftn further from text
\settoheight{\footnotesep}{\footnotesize !}%% space between footnotes
\addtolength{\footnotesep}{4pt}%% 10.25pt for 11pt size
\brokenpenalty=10000

%%% line spacing - localizing magic numbers (Pp)
\newcommand{\textstretch}{1.3}
\newcommand{\tighttextstretch}{1}
[EMAIL PROTECTED]
  \newcommand{\doublestretch}{1.67}
\or
  \newcommand{\doublestretch}{1.62}
\or
  \newcommand{\doublestretch}{1.66}
\fi
\renewcommand{\baselinestretch}{\textstretch}

[EMAIL PROTECTED] [EMAIL PROTECTED]@floatpenalty [EMAIL PROTECTED]
   [EMAIL PROTECTED]@[EMAIL PROTECTED]
      [EMAIL PROTECTED]@floatpenalty\z@
    [EMAIL PROTECTED]@[EMAIL PROTECTED]@tempcnta\csname [EMAIL PROTECTED]
       [EMAIL PROTECTED]@[EMAIL PROTECTED]@@n
       [EMAIL PROTECTED] [EMAIL PROTECTED] :=#2\do
                        [EMAIL PROTECTED] [EMAIL PROTECTED] [EMAIL PROTECTED]
                         [EMAIL PROTECTED] [EMAIL PROTECTED] [EMAIL PROTECTED]
                         [EMAIL PROTECTED] [EMAIL PROTECTED] 4\relax\fi
                         [EMAIL PROTECTED] [EMAIL PROTECTED] 8\relax\fi
         [EMAIL PROTECTED]@[EMAIL PROTECTED]
    [EMAIL PROTECTED]
    [EMAIL PROTECTED]
    \vbox\bgroup
    [EMAIL PROTECTED]
    \boxmaxdepth\z@
    \hsize\columnwidth [EMAIL PROTECTED]
[EMAIL PROTECTED]
    \def\baselinestretch{\tighttextstretch}\footnotesize
    \interlinepenalty\interfootnotelinepenalty
    \splittopskip\footnotesep
    \splitmaxdepth \dp\strutbox \floatingpenalty [EMAIL PROTECTED]
    \hsize\columnwidth [EMAIL PROTECTED]
   [EMAIL PROTECTED] [EMAIL PROTECTED]@[EMAIL PROTECTED]
    [EMAIL PROTECTED]
      #1\strut}}}

%%%  remove some space before paragraph and subparagraph
\renewcommand{\paragraph}%
  [EMAIL PROTECTED] plus1ex minus.2ex}%
    {-1em}{\normalfont\normalsize\bfseries}}
\renewcommand{\subparagraph}%
  [EMAIL PROTECTED] plus1ex minus.2ex}%
    {-1em}{\normalfont\normalsize\bfseries}}

%%% switches
\newif\ifcontentspage
\newif\iffigurespage
\newif\iftablespage
\newif\ifdedicationpage
\newif\ifquotationpage
\newif\ifotherlistpage
%%% defaults
\contentspagetrue
\figurespagefalse
\tablespagefalse
\dedicationpagefalse
\quotationpagefalse
\otherlistpagefalse
[EMAIL PROTECTED]  Call user's macro \otherlist **MS**
  \otherlist
  }


%%% Title page commands
[EMAIL PROTECTED] your thesis!}
[EMAIL PROTECTED] yourself!}
[EMAIL PROTECTED]
[EMAIL PROTECTED]
\newif\ifqvoid
\qvoidtrue
[EMAIL PROTECTED]
  \ifqvoid
  [EMAIL PROTECTED]
    [EMAIL PROTECTED]
  \qvoidfalse
  \fi
  [EMAIL PROTECTED]
    {\begin{center}%
        [EMAIL PROTECTED] possibly reduce space
        {#1}%
      \end{center}}}%
  }
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED] Science}
[EMAIL PROTECTED]
[EMAIL PROTECTED] of Philosophy}
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED] in month and year of Approval!}
[EMAIL PROTECTED] #1}}
[EMAIL PROTECTED] in year of Approval!}

%%%%%%%%%% Title page
\def\titlep{%
  \typeout{Title page.}
  \thispagestyle{empty}%
  \begingroup
  \null\vfill % stretchable white space
%%  You might want to change \Large to \large below if you're using 12pt
%%  as the basic font size.
  \begin{center}
    \renewcommand{\baselinestretch}{\doublestretch}\normalsize
      [EMAIL PROTECTED]
    \par\renewcommand{\baselinestretch}{\textstretch}\normalsize
  \end{center}
  \vskip.25in %% not less than this after title
  \begin{center}
    \normalfont\upshape by
  \end{center}
  \vfill
%%  \vspace*{-1\baselineskip} %% pushes author + quals up; adjust amount
  [EMAIL PROTECTED]
  \vskip.25in
  \vfill
  \begin{center}
    {\scshape
      a [EMAIL PROTECTED]  submitted in partial fulfillment\\
      of the requirements for the degree of\\
      [EMAIL PROTECTED]
      }
    in the [EMAIL PROTECTED]
    of\\
    [EMAIL PROTECTED]
  \end{center}
  \vskip.25in
  \vfill
  \begin{center}
    \copyright\ [EMAIL PROTECTED] [EMAIL PROTECTED]
    SIMON FRASER UNIVERSITY\\
    [EMAIL PROTECTED]
  \end{center}
  \vskip.5in
  \begin{center}
    \small
    All rights reserved. This work may not be\\
    reproduced in whole or in part, by photocopy\\
    or other means, without the permission of the author.
  \end{center}
  \endgroup
  \newpage%
}
[EMAIL PROTECTED]
[EMAIL PROTECTED] the committee chair!}
[EMAIL PROTECTED]
\newlength{\lwidth}% make enough space for the biggest label
\settowidth{\lwidth}{\textbf{Examining committee:\ }}
\addtolength{\lwidth}{3\labelsep}% change 3 to adjust spacing
\def\apdesclabel#1{\hspace\labelsep \bfseries #1:\hfill}
\def\apdesc{\list{}{\leftmargin\apdescmargin
\labelwidth\leftmargin \advance\labelwidth -\labelsep
\let\makelabel\apdesclabel}}
\let\endapdesc\endlist
\newdimen\apdescmargin
\apdescmargin=\lwidth
[EMAIL PROTECTED]
[EMAIL PROTECTED]
  [EMAIL PROTECTED]
    \begin{minipage}[t]{3.5in}\parindent=0pt
      [EMAIL PROTECTED]
      \vspace{.5in}\\% adjust to change spacing between committee members
      \underline{\hspace{3.5in}}\\
      #1%
    \end{minipage}%
  }
}

%%%%%%%%%% Approval page
\def\approvalpage{%
  \typeout{Approval page.}
  \begingroup
  \begin{center}
    {\large\bfseries APPROVAL}
  \end{center}
  \addcontentsline{toc}{chapter}{Approval}
  \vskip.25in
  \begin{apdesc}
    \let\\\ % turn off the user specified line breaking.
    \item[Name] [EMAIL PROTECTED]
    \item[Degree] [EMAIL PROTECTED]
    \item[Title of [EMAIL PROTECTED] [EMAIL PROTECTED]
  \end{apdesc}
  \vskip.25in
  \begin{apdesc}
    \item[Examining [EMAIL PROTECTED]
      Chair\\[-2\baselineskip]% adjust spacing betw. chair & rest
      [EMAIL PROTECTED]
  \end{apdesc}
  \vskip.25in
  \vfill
  \begin{apdesc}
    \item[Date Approved] \ \hrulefill\
  \end{apdesc}
  \endgroup
  \vfil
  \addtolength{\textheight}{-\headkeep}
                % Else the following page number too low **MS**
  \newpage%
}


%%%%%%% Typeset Title and Approval pages
\newlength{\headkeep}
\def\beforepreface{%
  \pagenumbering{roman}
  \pagestyle{plain}
  \setlength{\headkeep}{\headsep}% keep old value
  \setlength{\headsep}{0pt}% make more space for text
  \addtolength{\textheight}{\headkeep}
  \titlep%
  \approvalpage%
  \setlength{\headsep}{\headkeep}%% restore \headsep (\textheight
                                 %% adjusted by \approvalpage)
}

%%%%%%%%% Abstract, Acknowledgment, and (optional) Preface
\def\prefacesection#1{%
  \typeout{#1.}
  \chapter*{#1}
  \addcontentsline{toc}{chapter}{#1}
}

%%%%%%%% (optional) Dedication and Quotation pages
[EMAIL PROTECTED]
[EMAIL PROTECTED] forgot to do\\ your own dedication!}
[EMAIL PROTECTED]
[EMAIL PROTECTED] forgot to do\\ your own quotation!''\\[5pt]%
  --- My Work, \textsc{I.~M.~Author}, 2001}
\newcommand{\dedicquotation}{%
  \ifdedicationpage
     \newpage
     \typeout{Dedication.}
     \vspace*{\stretch{2}}
     \begin{flushright}\itshape
       [EMAIL PROTECTED]
     \end{flushright}
     \addcontentsline{toc}{chapter}{Dedication}
     \vspace*{\stretch{3}}
  \fi
  \ifquotationpage
     \newpage
     \typeout{Quotation.}
     \vspace*{\stretch{1}}
     \begin{flushright}\slshape
       [EMAIL PROTECTED]
     \end{flushright}
     \addcontentsline{toc}{chapter}{Quotation}
     \vspace*{\stretch{3}}
  \fi
}

%%%%%%%% Typeset list of Contents, Figures, Tables, etc.
\def\lists{%
  \ifcontentspage
    \newpage%
    \typeout{Contents.}
    \addcontentsline{toc}{chapter}{Contents}
    \tableofcontents%
    \newpage%
  \fi
  \iftablespage
    \addvspace{10pt}
    \typeout{Tables.}
    \addcontentsline{toc}{chapter}{List of Tables}
    \listoftables%
    \newpage%
  \fi
  \iffigurespage
    \addvspace{10pt}
    \typeout{Figures.}
    \addcontentsline{toc}{chapter}{List of Figures}
    \listoffigures%
    \newpage%
  \fi
  \ifotherlistpage
    \addvspace{10pt}
    \typeout{Other list.}
%%     \addcontentsline{toc}{chapter}{Name of my list}
    [EMAIL PROTECTED]
    \newpage%
  \fi
}

%%%%%%%% Transition to main text
\newcommand{\beforetext}{%
  \newpage%
  [EMAIL PROTECTED] %% coordinate twoside option with two-sided printing
    [EMAIL PROTECTED]
    \else
      \thispagestyle{empty}
      \null\vfill
      \newpage%
    \fi
  \fi
  \pagenumbering{arabic}
  \pagestyle{headings}
}

%%%% backward compatibility with sfuthesis.sty
\let\approvalitem\signatory

%%%%%%%%%%% Leftovers from sfuthesis.sty
%%%
%%%  This stuff is for using endnotes instead of footnotes. It's probably
%%%  useless but I left it here. It's not self-sufficient, you'd
%%%  have to load also ``endnotes.sty'' package and probably fool
%%%  around with the way how things look --- not worth the trouble
%%%  if you don't have to!
%%\def\enoteformat{\rightskip\z@ \leftskip\z@ \parindent=1.8em
%%  [EMAIL PROTECTED]
%%\def\enotesize{\normalsize}
%%\def\notesname{}
%%\def\printendnotes{%
%%  \typeout{Endnotes for chapter \thechapter.}
%%  \chapter*{Notes for Chapter \thechapter}
%%  \addcontentsline{toc}{section}{Notes for Chapter \thechapter}
%%  \begingroup
%%  \parskip 2ex
%%  \theendnotes%
%%  \endgroup
%%  \setcounter{endnote}{0}
%%}
%%\def\printallendnotes{%
%%  \typeout{Endnotes.}
%%  \chapter*{Notes}
%%  \addcontentsline{toc}{chapter}{Notes}
%%  \begingroup
%%  \parskip 2ex
%%  \theendnotes%
%%  \endgroup
%%}
\endinput
%%
%% End of file `csthesis.sty'.
%% Copyright 1998 Pepe Kubon
%%
%% `thes-full.tex' --- the example thesis, FULL version, used
%%                     with  the `csthesis' package 
%% Use: latex thes-full to generate the DVI output, then 
%%      bibtex thes-full to generate the bibliography
%%      makeindex thes-full to get the index, and
%%      latex thes-full (2x) 
%%
%% You are allowed to distribute this file together with all files
%% mentioned in READ.ME.
%%
%% You are not allowed to modify its contents.
%%

\documentclass[11pt]{report}
%\documentclass[11pt,twoside]{report}%% for two-sided printing
\usepackage{csthesis}
\usepackage{makeidx}  %%% standard INDEX
\makeindex  

%%% The following code demonstrates the ``other list'' facility. A new
%%% command \otherlist is defined for the List of Programs. Programs
%%% are defined as floating environments of type 3 (1 is used for figures,
%%% 2 for tables) and the information about them is stored in an
%%% auxiliary file with .lop extension. You can use this method to
%%% define several types of ``other lists,'' but in that case you'll
%%% need to add appropriate code to \lists in the csthesis.sty
%%% package.
%%% Note: It's better to move this code into your own mythesis.sty
%%% package. If you do that, you should get rid of the \makeatletter,
%%% \makeatother commands.
\makeatletter
\newcommand\otherlist{%
    \addcontentsline{toc}{chapter}{\otherlistname}
    [EMAIL PROTECTED]
      [EMAIL PROTECTED]
    \else
      [EMAIL PROTECTED]
    \fi
    \chapter*{\otherlistname
      [EMAIL PROTECTED]
              {\MakeUppercase\otherlistname}}%
    [EMAIL PROTECTED]
    [EMAIL PROTECTED]
    }
[EMAIL PROTECTED]@dottedtocline{1}{1.5em}{2.3em}}
\newcommand\otherlistname{List of Programs}
\newcommand\programname{Program}
\newcounter{program}[chapter]
[EMAIL PROTECTED]@program}
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
\newenvironment{program}
               [EMAIL PROTECTED]
               [EMAIL PROTECTED]
\newenvironment{program*}
               [EMAIL PROTECTED]
               [EMAIL PROTECTED]
\makeatother
%%% end of ``other list'' code

\begin{document}
%%% set switches
%\contentspagefalse  
\figurespagetrue
\tablespagetrue
\dedicationpagetrue
\quotationpagetrue
\otherlistpagetrue

%%% front matter 
%% Copyright 1998 Pepe Kubon
%%
%% `titapp.tex' --- title and approval for thes-full.tex, thes-short-tex from
%%                  the `csthesis' bundle
%%
%% You are allowed to distribute this file together with all files
%% mentioned in READ.ME.
%%
%% You are not allowed to modify its contents.
%%

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
%   Title and approval pages
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%%% title page

\title{Example of the Use of the Style for Writing Theses at CS, SFU}
\author{Brown Burger}
\qualification{D.Ed., Established University, 1991}
\qualification{M.Xyf., Even Better University, 1994}
\submitdate{Fall 1998}
\copyrightyear{1998}

%%% approval page

\chair{Dr.~Hu Kaers} 
\signatory{Dr.~Gigolo Joe,
%       Professor, Computing Science\\
%       Simon Fraser University\\ 
        Senior Supervisor}
\signatory{Dr.~Hans Goof,
%       Professor, Computing Science\\
%       Simon Fraser University\\ 
        Supervisor}
\signatory{Dr.~Silky Peach, Supervisor,\\
       Professor of Methodology,\\
       University of Nevada, Las Vegas
      }
\signatory{Dr.~Will Teachu,
%       Professor, Linguistics\\
%       Simon Fraser University\\ 
        SFU Examiner}
\signatory{Dr.~Will Testu, External Examiner,\\
        Professor of Unnatural Sciences,\\
        University of Surrey}

%%% generating title and approval pages 
\beforepreface


%%%  generate contents, lists of figures, etc.
\lists

%% preface (foreword), if any

%%% prepare main section
\beforetext

%%% main matter
blach blah blech blach blah blech blach blah blech blach blah blech blach blah blech blach blah blech blach blah blech blach blah blech blach blah blech blach blah blech blach blah blech blach blah blech blach blah blech blach blah blech blach blah blech blach blah blech blach blah blech blach blah blech blach blah blech blach blah blech blach blah blech blach blah blech blach blah blech blach blah blech blach blah blech blach blah blech blach blah blech blach blah blech blach blah blech blach blah blech blach blah blech blach blah blech


%%%  appendices, if any


%%%%%%  bibliography


%%%%%%  index


\end{document}







%%% Local Variables: 
%%% mode: latex
%%% TeX-master: t
%%% End: 

Reply via email to