Hello all,

I wrote my thesis in LyX (an older version) using a layout and the
university supplied style file. I am no longer able to use this layout,
or a simplified version, in LyX 1.6.4.

I've attached the style file and the simplified version of the layout
(The exact same behaviour is seen with my original layout).

I confirm that LyX finds the style:

+checking for document class sfuthesis [csthesis.sty]... yes

But when I select the corresponding layout in document settings, LyX
stalls, python uses up 90% CPU, and continues to do so indefinitely. I
left it overnight.

If I manually kill LyX I get this from python:

^C
Traceback (most recent call last):
  File "/usr/share/lyx/scripts/layout2layout.py", line 530, in <module>
    main(sys.argv)
  File "/usr/share/lyx/scripts/layout2layout.py", line 518, in main
    format = convert(lines)
  File "/usr/share/lyx/scripts/layout2layout.py", line 182, in convert
    if re_Comment.match(lines[i]) or re_Empty.match(lines[i]):
KeyboardInterrupt

Why does this layout require conversion? Has the layout format changed?
(This is not mentioned on the wiki page:
http://wiki.lyx.org/Layouts/CreatingLayouts)

Considering this layout is so simple, I can't see why python would have
problems with it, not to mention no error or exit condition in this case.

Any hints?

What is the new format so I can bypass the layout2layout script?

Thanks,
B. Bogart
%%
%% 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
\...@twoside
  \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}
\ifca...@ptsize
  \newcommand{\doublestretch}{1.67}
\or
  \newcommand{\doublestretch}{1.62}
\or
  \newcommand{\doublestretch}{1.66}
\fi
\renewcommand{\baselinestretch}{\textstretch}

\d...@xfloat#1[#2]{\ifhmode \...@bsphack\@floatpenalty -...@mii\else
   \...@floatpenalty-\@miii\fi\d...@captype{#1}\ifinner
      \...@parmoderr\@floatpenalty\z@
    \el...@next\@currb...@freelist{\@tempcnta\csname ft...@#1\endcsname
       \multip...@tempcnta\@xxxii\advan...@tempcnta\sixt@@n
       \...@tfor \...@tempa :=#2\do
                        {\...@tempa h\advan...@tempcnta \...@ne\fi
                         \...@tempa t\advan...@tempcnta \...@\fi
                         \...@tempa b\advan...@tempcnta 4\relax\fi
                         \...@tempa p\advan...@tempcnta 8\relax\fi
         }\global\cou...@currbox\@tempcnt...@fltovf\fi
    \global\setb...@currbox
    \co...@vbox\normalcolor
    \vbox\bgroup
    \def\baselinestretch{\tighttextstretc...@normalsize
    \boxmaxdepth\z@
    \hsize\columnwidth \...@parboxrestore}
\long\d...@footnotetext#1{\insert\footins{%
    \def\baselinestretch{\tighttextstretch}\footnotesize
    \interlinepenalty\interfootnotelinepenalty
    \splittopskip\footnotesep
    \splitmaxdepth \dp\strutbox \floatingpenalty \...@mm
    \hsize\columnwidth \...@parboxrestore
   \ed...@currentlabel{\csname p...@footnote\endcsname\@thefnmar...@makefntext
    {\rule...@}{\footnotesep}\ignorespaces
      #1\strut}}}

%%%  remove some space before paragraph and subparagraph
\renewcommand{\paragraph}%
  {...@startsection{paragraph}{4}{0mm}{2.5ex plus1ex minus.2ex}%
    {-1em}{\normalfont\normalsize\bfseries}}
\renewcommand{\subparagraph}%
  {...@startsection{subparagraph}{5}{\parindent}{2ex 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
\d...@otherlist{%  Call user's macro \otherlist **MS**
  \otherlist
  }


%%% Title page commands
\d...@title{name your thesis!}
\d...@author{identify yourself!}
\gdef\qualification#...@qualifications{#1}}
\newsavebo...@qual}
\newif\ifqvoid
\qvoidtrue
\d...@qualifications#1{%
  \ifqvoid
  \sbo...@qual}{\parbox{\textwidth}
    {\begin{cente...@author\\\end{center}}}
  \qvoidfalse
  \fi
  \sbo...@qual}{\parbox{\textwidth}
    {\begin{center}%
        \usebo...@qual}\\%[-10pt]% possibly reduce space
        {#1}%
      \end{center}}}%
  }
\def\entity#1{\gd...@entity{#1}}
\d...@entity{school}
\def\dept#1{\gd...@dept{#1}}
\d...@dept{interactive Arts and Technology}
\def\degree#1{\gd...@degree{#1}}
\d...@degree{master of Science}
\def\endeavour#1{\gd...@endeavour{#1}}
\d...@endeavour{thesis}
\def\submitdate#1{\gd...@submitdate{#1}}
\d...@submitdate{fill in month and year of Approval!}
\def\copyrightyear#1{\gd...@copyrightyear{\space #1}}
\d...@copyrightyear{fill 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
      \large\bfseries\uppercase\expandafte...@title}
    \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
  \usebo...@qual}
  \vskip.25in
  \vfill
  \begin{center}
    {\scshape
      a \...@endeavour\  submitted in partial fulfillment\\
      of the requirements for the degree of\\
      \expandafte...@degree}\\
      }
    in the \expandafte...@entity}\\
    of\\
    \expandafte...@dept}\\
  \end{center}
  \vskip.25in
  \vfill
  \begin{center}
    \copyright\ \...@author\ \...@copyrightyear\\
    SIMON FRASER UNIVERSITY\\
    \...@submitdate\\
  \end{center}
  \vskip.5in
  \begin{center}
    \small

Portions of this thesis have been previously published in "The Handbook of Research on Computational Arts and Creative Informatics" edited by James Braman Copyright 2009, IGI Global, http://www.igi-pub.com. Included by permission of the publisher.

    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%
}
\def\chair#1{\gd...@chair{#1}}
\d...@chair{name the committee chair!}
\gdef\signatory#...@signatory{#1}}
\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
\newsavebo...@apitems}
\d...@signatory#1{%
  \sbo...@apitems}{%
    \begin{minipage}[t]{3.5in}\parindent=0pt
      \usebo...@apitems}%
      \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] \...@author
    \item[Degree] \...@degree
    \item[Title of \...@endeavour] \...@title
  \end{apdesc}
  \vskip.25in
  \begin{apdesc}
    \item[Examining committee]\p...@chair\\%
      Chair\\[-2\baselineskip]% adjust spacing betw. chair & rest
      \usebo...@apitems}
  \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
\def\dedication#1{\gd...@dedication{#1}}
\d...@dedication{you forgot to do\\ your own dedication!}
\def\thesquot#1{\gd...@thesquot{#1}}
\d...@thesquot{``you 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
       \expandaft...@dedication
     \end{flushright}
     \addcontentsline{toc}{chapter}{Dedication}
     \vspace*{\stretch{3}}
  \fi
  \ifquotationpage
     \newpage
     \typeout{Quotation.}
     \vspace*{\stretch{1}}
     \begin{flushright}\slshape
       \expandaft...@thesquot
     \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}
    \...@otherlist%
    \newpage%
  \fi
}

%%%%%%%% Transition to main text
\newcommand{\beforetext}{%
  \newpage%
  \...@twoside %% coordinate twoside option with two-sided printing
    \ifod...@page
    \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
%%  \leavevmode\textinden...@theenmark.}}
%%\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'.
#% Do not delete the line below; configure depends on this
#  \DeclareLaTeXClass[csthesis.sty]{Simon Fraser University Thesis}

Reply via email to