Amir Karger wrote: > On Tue, Dec 22, 1998 at 07:04:33PM -0600, Edmar Wienskoski Jr. wrote: > > > > No, that is not entirely true. Actually, the fact that "return" ends > > a layout is not even a concern (I can use alt-return instead of plain ret...) > > The problem, is that if you define the Scrap layout to be anything different > > than "Environment" or "Item_Environment" then each line in the code will be > > treated as a paragraph, and the output will have many empty lines. Example: > > If you're willing to use alt-return, though, then why can't you just call it > type Paragraph? Then > foo C-Return > bar > > should yield > > foo > bar > > on output. Right? Yes, that is right.As a matter of fact I use both the Item_Environment and the C-Return in my programs. Why ? The appearance in the screen looks very closely to the paper document. That is why I did the patch #1 (the one that changes the color of the newline character), to make the newlines characters to blend in the background, and not interfere with the visuaisation of the code. But, I don't want to force everyone else to do what I like. People is used to type plain return to change to the next line, so we must to provide a way do that. The Layout I found more suitable for it was the Environment one. > > That reminds me: I also have a thesis.layout class and the corresponding > > thesis.cls for latex I wrote for my thesis. I don't know if other > > universities have similar thesis formats or if they are all diferent > > (Rice format has a lot of pick details..). > > > Anyway, if you think a thesis.layout class is a valid contribution, > > I can submit a patch for that one too. > > > > This is a great idea, as long as the thesis is latex2e. I've seen a bunch of > thesis style files floating around, but many (including the one I need to use > :( ) are latex209. It would be even better if the thesis.cls is a small file. > Again, the old files I've seen actually define description environment, etc. > They're basically slightly edited copies of report or book class, which they > shouldn't have to be. At least I think so. It seems to me you ought to be able > to have some sort of "derived from class article" (either with a thesis class > or a book class with \usepackage{thesis}) or something, but I'm no > LaTeX guru. I have good news and bad news. The file is a latex2e. But... The file is also a modified report class. It has a lot of low level TeX commands. I am not a LaTeX guru either. Basicaly I started with a document describing the differences between latex209 and latex2e and modifyed an existing thesis.sty into a thesis.cls one. I use: \LoadClass[12pt]{report} i.e., all the common parts with the original report class were removed. But the file still has 400+ lines of re-definitions, and new environments, in low level TeX. Then I created the thesis.layout file for lyx. That was the easiest part. > If you do this, it would be neat if you could document it (should be easy, > since the format won't be too much different from book format). In the > documentation, you ought to tell people that it shouldn't be too hard to > change the rice thesis to some other kind of thesis, with a bit of hacking > (especially if they've got a school class file already). Hummm. I don't hold my breath for that. The title page alone (the one that the committee signs), uses *five* different combinations of fonts and sizes !! These things are still done in a very traditional way.... Anyway, I am attaching both files, take a look and tell me what you think. > (btw, please don't let all of our "suggestions" discourage you. Contributions > are always welcomed!) > > -Amir Karger > [EMAIL PROTECTED] Not at all, suggestions for improvements are always welcome. -- /*----------------------------------------------------------------------*/ /* Edmar Wienskoski Jr. - [EMAIL PROTECTED] */ /* - http://www.cs.rice.edu/~wiensk */ /*----------------------------------------------------------------------*/ ____ | [] | ______()_||_ ---+----+--- ------------ ------------ ------------ | [] | | | | | | | | | | | ___| | |_|______|_| |__________| |__________| |__________| |______________\ "o-o o-o""o-o o-o""o-o o-o""o-o o-o""o-o O-O-O o-o "
% % Rice University thesis macros % \NeedsTeXFormat{LaTeX2e} \ProvidesClass{thesis}[1997/09/27 Rice University LaTeX class] \DeclareOption*{\PassOptionsToClass{\CurrentOption}{report}} \ProcessOptions \LoadClass[12pt]{report} \renewcommand{\normalsize}{\fontsize{12}{14}\selectfont} \def\linespacing#1{\def\baselinestretch{#1}} \lineskip 1pt \normallineskip 1pt \def\baselinestretch{1.2} \normalsize \if@twoside \oddsidemargin 21pt \evensidemargin 59pt \marginparwidth 85pt \else \oddsidemargin .5in \evensidemargin 0in \marginparwidth .8in \fi \marginparsep .1in \advance\oddsidemargin -.0625in \advance\evensidemargin -.0625in \topmargin 0in \headheight \baselineskip \headsep 1.5\baselineskip \footskip 2.5\baselineskip \textheight 9in \advance\textheight -\headheight \advance\textheight -\headsep \textwidth 6in \columnsep 10pt \columnseprule 0pt \footnotesep 11.4pt \skip\footins 18pt plus 12pt minus 6pt \floatsep 24pt plus 6pt minus 6pt \textfloatsep 36pt plus 10pt minus 10pt \intextsep 24pt plus 6pt minus 6pt \dblfloatsep 24pt plus 6pt minus 6pt \dbltextfloatsep 36pt plus 10pt minus 10pt \@fptop 0pt plus 1fil \@fpsep 10pt plus 2fil \@fpbot 0pt plus 1fil \@dblfptop 0pt plus 1fil \@dblfpsep 10pt plus 2fil \@dblfpbot 0pt plus 1fil \marginparpush 7pt \parskip .5pt plus .5pt minus .5pt \parindent 1.5em \partopsep 3pt plus 2pt minus 2pt \@lowpenalty 51 \@medpenalty 151 \@highpenalty 301 \@beginparpenalty -\@lowpenalty \@endparpenalty -\@lowpenalty \@itempenalty -\@lowpenalty \def\@makechapterhead#1{\begingroup \def \baselinestretch{1} \parskip \z@ \parindent \z@ \par \Large\bf \null \vskip 1.5ex \centering \ifnum \c@secnumdepth >\m@ne \@chapapp~\thechapter \vskip 3.5ex \fi #1 \vskip 3ex plus .2ex\endgroup} \def\@makeschapterhead#1{\begingroup \def \baselinestretch{1} \parskip \z@ \parindent \z@ \par \null \vskip .3in \centering \Large \bf #1\par \endgroup \nobreak \vskip .6in\relax} \def\chapter{\cleardoublepage \thispagestyle{plain} \global\@topnum\z@ \@afterindentfalse \secdef\@chapter\@schapter} \def\@chapter[#1]#2{\ifnum \c@secnumdepth >\m@ne \refstepcounter{chapter} \typeout{\@chapapp\space\thechapter.} \addcontentsline{toc}{chapter}{\protect \numberline{\thechapter}#1}\else \addcontentsline{toc}{chapter}{#1}\fi \chaptermark{#1} \addtocontents{lof}{\protect\addvspace{\baselineskip}} \addtocontents{lot}{\protect\addvspace{\baselineskip}} \if@twocolumn \@topnewpage[\@makechapterhead{#2}] \else \@makechapterhead{#2} \@afterheading \fi} \def\@schapter#1{\if@twocolumn \@topnewpage[\@makeschapterhead{#1}] \else \@makeschapterhead{#1} \@afterheading\fi} \def\section{\@startsection{section}{1}{\z@}{-3.25ex plus -1ex minus -.2ex}{1.5ex plus .2ex}{\large\bf}} \def\subsection{\@startsection{subsection}{2}{\z@}{-3.25ex plus -1ex minus -.2ex}{1.5ex plus .2ex}{\normalsize\bf}} \def\subsubsection{\@startsection{subsubsection}{3}{\z@}{-3.25ex plus -1ex minus -.2ex}{1.5ex plus .2ex}{\normalsize\bf}} \def\paragraph{\@startsection {paragraph}{4}{\z@}{3.25ex plus 1ex minus .2ex}{-1em}{\normalsize\bf}} \def\subparagraph{\@startsection {subparagraph}{4}{\parindent}{3.25ex plus 1ex minus .2ex}{-1em}{\normalsize\bf}} \def\chaptermark#1{} \setcounter{secnumdepth}{2} \def\appendix{\par \setcounter{chapter}{0} \setcounter{section}{0} \def\@chapapp{Appendix} \def\thechapter{\Alph{chapter}}} \leftmargini 2.5em \leftmarginii 2.2em \leftmarginiii 1.87em \leftmarginiv 1.7em \leftmarginv 1em \leftmarginvi 1em \leftmargin\leftmargini \labelsep .5em \labelwidth\leftmargini\advance\labelwidth-\labelsep \renewenvironment{quotation} {\list{}{\listparindent 1.5em% \itemindent \listparindent \rightmargin \leftmargin \parsep \z@ \@plus\p@}% \item[] \linespacing{1}} {\endlist} \newdimen\descriptionmargin \descriptionmargin=3em \def\@begintheorem#1#2{\list{}{\parindent \z@\rightmargin\leftmargin} \item[]{\bf #1\ #2}\quad} \def\@opargbegintheorem#1#2#3{\list{}{\parindent \z@\rightmargin\leftmargin} \item[]{\bf #1\ #2\ }{\it(#3)\/}\quad} \def\@endtheorem{\endlist} \def\proof{\par\noindent\trivlist\item[]{\@prooffont Proof}\quad} \def\endproof{\hskip .8em plus 1fill\penalty\@M\BOX\parskip \z@\par\@listi \@tempdima\topsep\advance\@tempdima\parskip\vskip\@tempdima \endtrivlist} \def\listoffigures{\@restonecolfalse\if@twocolumn\@restonecoltrue\onecolumn \fi\chapter*{Illustrations\@mkboth {ILLUSTRATIONS}{ILLUSTRATIONS}} \thispagestyle{empty} \addcontentsline{toc}{frontmatter}{\protect\numberline {\hfil}List of Illustrations}\@starttoc{lof}\if@restonecol \twocolumn\fi} \def\listoftables{\@restonecolfalse\if@twocolumn\@restonecoltrue\onecolumn \fi\chapter*{Tables\@mkboth {TABLES}{TABLES}} \thispagestyle{empty} \addcontentsline{toc}{frontmatter}{\protect\numberline {\hfil}List of Tables}\@starttoc{lot}\if@restonecol \twocolumn\fi} \def\l@frontmatter#1#2{\pagebreak[3] \@tempdima 1.5em \begingroup \parindent \z@ \rightskip \@pnumwidth \parfillskip -\@pnumwidth \leavevmode #1\hfil \hbox to\@pnumwidth{\hss #2}\par \endgroup} \def\thebibliography#1{\chapter*{Bibliography\@mkboth {BIBLIOGRAPHY}{BIBLIOGRAPHY}}\addcontentsline {toc}{chapter}{\protect\numberline {\hfil}Bibliography}\list {[\arabic{enumi}]}{\settowidth\labelwidth{[#1]}\leftmargin\labelwidth \advance\leftmargin\labelsep \usecounter{enumi}} \def\newblock{\hskip .11em plus .33em minus .03em} \sloppy \uchyph=1\sfcode`\.=1000\relax} \let\endthebibliography=\endlist \def\footnoterule{\kern-3\p@ \hrule width .25\columnwidth \kern 2.6\p@} \long\def\@makecaption#1#2{ \vskip 1.5em \setbox\@tempboxa\hbox{{\bf #1}\quad #2} \@tempdima \hsize \advance \@tempdima -.5in \hfil\parbox[t]{\ifdim \wd\@tempboxa<\@tempdima \@tempdima \else\ifdim \wd\@tempboxa<1.75\@tempdima .57\wd\@tempboxa \else \@tempdima \fi\fi} {\linespacing{1}\centering\unhbox\@tempboxa\par}\hfil} \def\maketitle{\begin{titlepage}\null\linespacing{1}\setcounter{page}{1}\vfill \vbox to 0pt{\vss\vbox to 8.75in{\parskip 0pt \parindent 0pt\centering {\large \uppercase\expandafter{\@school} \par} \vskip 0pt plus 3fil {\Large \bf \@title \par} \vskip 0pt plus 1.3fil {\large by \par} \vskip 0pt plus 1fil {\large \bf \@author \par} \vskip 0pt plus 3fil {\large \sc A Thesis Submitted \\ in Partial Fulfillment of the \\ Requirements for the Degree \par} \vskip 0pt plus 1.1fil {\large \bf \@degree \par} \vskip 0pt plus 4.5fil \begingroup \leftskip .5\textwidth \rightskip 0pt plus 1fil {\sc Approved, Thesis Committee: \par} \vskip 2.5em \moveright\leftskip\vbox{\hrule width \leftskip} \def\and{\par \vskip 2.25em minus 1em\moveright\leftskip\vbox{\hrule width \leftskip}} \@committee \par \endgroup \vskip 0pt plus 2fil {\large \@address \par} \vskip 0pt plus .8fil {\large \@month, \@year \par}}}\cleardoublepage \end{titlepage}} \newif\if@bigcommittee \@bigcommitteefalse \def\school#1{\gdef\@school{#1}} \def\degree#1{\gdef\@degree{#1}} \def\committee#1{\gdef\@committee{#1}} \def\bigcommittee#1{\@bigcommitteetrue\gdef\@committee{#1}} \def\address#1{\gdef\@address{#1}} \def\donemonth#1{\gdef\@month{#1}} \def\doneyear#1{\gdef\@year{#1}} \def\@school{Rice University} \def\@degree{Doctor of Philosophy} \def\@committee{member 1, Chairman \\ prof \and member 2 \\ prof \and member 3 \\ prof} \def\@address{Houston, Texas} \def\@month{\ifcase\month ?\or January\or February\or March\or April\or May\or June\or July\or August\or September\or October\or November\or December\fi} \def\@year{\number\year} \def\abstract{\cleardoublepage \pagestyle{empty} \global\@topnum\z@ \@afterindentfalse \begingroup \def \baselinestretch{1} \parskip \z@ \parindent \z@ \par \null \vskip .1in \centering \Large \bf \@title \vskip .3in \large \@author \par \vskip .5in \endgroup \section*{\hfil Abstract\hfil} \setcounter {footnote}{0}\addcontentsline {toc}{frontmatter}{\protect\numberline {\hfil}Abstract}} \def\endabstract{\setcounter{footnote}{0} \pagestyle{plain}\thispagestyle{empty}} \def\acknowledge{\chapter*{Acknowledgments}\thispagestyle{empty} \setcounter{footnote}{0} \addcontentsline{toc}{frontmatter}{\protect\numberline {\hfil}Acknowledgments}} \def\endacknowledge{\setcounter{footnote}{0}} \def\preface{\chapter*{Preface} \thispagestyle{empty} \setcounter{footnote}{0} \addcontentsline{toc}{frontmatter}{\protect\numberline {\hfil}Preface}} \def\endpreface{\setcounter{footnote}{0}} \def\frontmatter{\relax} \def\endfrontmatter{\cleardoublepage \pagenumbering{arabic}\def\thefootnote{\arabic{footnote}}} \mark{{}{}} \if@twoside \def\ps@headings{\let\@mkboth\markboth \def\@oddfoot{}\def\@evenfoot{} \def\@evenhead{\rm \thepage\hfil \sl \leftmark} \def\@oddhead{\hbox{}\sl \rightmark \hfil \rm\thepage} \def\chaptermark##1{\markboth {\uppercase{\ifnum \c@secnumdepth >\m@ne \@chapapp\ \thechapter. \ \fi ##1}}{}} \def\sectionmark##1{\markright {\uppercase{\ifnum \c@secnumdepth >\z@ \thesection. \ \fi ##1}}}} \else \def\ps@headings{\let\@mkboth\markboth \def\@oddfoot{}\def\@evenfoot{} \def\@oddhead{\hbox {}\hfil \rm\thepage} \def\chaptermark##1{\markright {\uppercase{\ifnum \c@secnumdepth >\m@ne \@chapapp\ \thechapter. \ \fi ##1}}}} \fi \def\ps@myheadings{\let\@mkboth\@gobbletwo \def\@oddhead{\hbox{}\sl\rightmark \hfil \rm\thepage} \def\@oddfoot{}\def\@evenhead{\rm \thepage\hfil\sl\leftmark\hbox {}} \def\@evenfoot{}\def\chaptermark##1{}\def\sectionmark##1{} \def\subsectionmark##1{}} \def\BOX{\leavevmode\hbox{\setbox\@tempboxa=\vbox{M} \baselineskip\z@ \lineskip\z@ \lineskiplimit\z@ \vbox{\vbox to \z@{\vss \hrule \@height.4pt \@width\ht\@tempboxa \@depth\z@ \vss} \hbox to \ht\@tempboxa{\hbox to \z@{\hss\vrule \@width .4pt \@height \ht\@tempboxa \@depth \z@\hss} \hfill \hbox to \z@{\hss\vrule \@width .4pt \@height \ht\@tempboxa \@depth \z@\hss}} \vbox to \z@{\vss\hrule \@height .4pt \@width \ht\@tempboxa \@depth \z@\vss}}}} \@addtoreset{equation}{chapter} \long\def\@footnotetext#1{\insert\footins{\def\baselinestretch{1}\footnotesize \interlinepenalty\interfootnotelinepenalty \splittopskip\footnotesep \splitmaxdepth \dp\strutbox \floatingpenalty \@MM \hsize\columnwidth \@parboxrestore \edef\@currentlabel{\csname p@footnote\endcsname\@thefnmark}\@makefntext {\rule{\z@}{\footnotesep}\ignorespaces #1\strut}}} \def\@xfloat#1[#2]{\ifhmode \@bsphack\@floatpenalty -\@Mii\else \@floatpenalty-\@Miii\fi\def\@captype{#1}\ifinner \@parmoderr\@floatpenalty\z@ \else\@next\@currbox\@freelist{\@tempcnta\csname ftype@#1\endcsname \multiply\@tempcnta\@xxxii\advance\@tempcnta\sixt@@n \@tfor \@tempa :=#2\do {\if\@tempa h\advance\@tempcnta \@ne\fi \if\@tempa t\advance\@tempcnta \tw@\fi \if\@tempa b\advance\@tempcnta 4\relax\fi \if\@tempa p\advance\@tempcnta 8\relax\fi }\global\count\@currbox\@tempcnta}\@fltovf\fi \global\setbox\@currbox\vbox\bgroup \linespacing{1}\hsize\columnwidth \@parboxrestore} \def\cleardoublepage{\clearpage\if@twoside \ifodd\c@page\else \hbox{}\thispagestyle{empty}\newpage\if@twocolumn\hbox{}\newpage\fi\fi\fi} \newtheorem{lemma}{Lemma}[chapter] \newtheorem{theorem}{Theorem}[chapter] \newtheorem{corollary}{Corollary}[chapter] \newtheorem{claim}{Claim}[chapter] \newtheorem{definition}{Definition}[chapter] \def\@addtotoporbot{ \@tempcntb-\outputpenalty\advance\@tempcntb-\@Mii \ifcase\@tempcntb \@addtobot\or \@addtobot\or \@addtobot\else \@tempcnta\count\@currbox \divide\@tempcnta\tw@ \ifodd\@tempcnta \ifnum \@topnum >\z@ \ifdim\@toproom >\ht\@currbox \@bitor\@currtype{\@midlist\@botlist}\if@test\else \global\advance\@topnum\m@ne \global\advance\@colnum\m@ne \@tempdima-\ht\@currbox \advance\@tempdima -\ifx\@toplist\@empty \textfloatsep \else\floatsep\fi \global\advance\@toproom \@tempdima \global\advance\@colroom \@tempdima \@cons\@toplist\@currbox \@inserttrue \fi\fi\fi\fi \if@insert\else\@addtobot \fi\fi} \def\@makecol{\setbox\@outputbox\box\@cclv \xdef\@freelist{\@freelist\@midlist}\gdef\@midlist{}\@combinefloats \ifvoid\footins\else\setbox\@outputbox\vbox {\unvbox\@outputbox\vskip\skip\footins\footnoterule\unvbox\footins}\fi \setbox\@outputbox\vbox to\@colht{\boxmaxdepth\maxdepth \@texttop\unvbox\@outputbox \@textbottom}\global\maxdepth\@maxdepth} \itemsep \z@ \parsep \z@ \topsep \z@ \uchyph=0 \clubpenalty=10000 \widowpenalty=10000 \ps@headings \onecolumn \if@twoside\else\raggedbottom\fi \pagenumbering{roman} % % Until Graduate Studies comes to their senses, put all page numbers % in the upper-right. They think that the page number at the bottom-center % is too close to the bottom of the page. % \let\ps@plain\ps@headings
#% Do not delete he line below; configure depends on this # \DeclareLaTeXClass{thesis} # Report textclass definition file. Taken from initial LyX source code # Author : Matthias Ettrich <[EMAIL PROTECTED]> # Transposed by Pascal André <[EMAIL PROTECTED]> # Heavily modifed and enhanced by serveral developers. # Input general definitions Input stdclass.inc # a few changes to the bibliography Style Bibliography TopSep 4 # label font definition LabelFont Series Bold Size Huge EndFont End Style Frontmatter Margin Static LatexType Environment LatexName frontmatter NextNoIndent 1 LabelSep MMMMMMMMM ParSkip 0.4 TopSep 0.4 BottomSep 0.4 ParSep 0.4 Align Left AlignPossible Left LabelType Centered_Top_Environment LabelString Frontmatter LabelBottomSep 0.5 # label font definition LabelFont Series Bold Size Normal EndFont End Style Committee Margin Static LatexType CommandTitle LatexName bigcommittee NextNoIndent 1 LabelSep xxx ParSkip 0.4 TopSep 0.4 BottomSep 0.4 ParSep 0.4 Align Right AlignPossible Right LabelType Centered_Top_Environment LabelString Committee LabelBottomSep 0.5 # label font definition LabelFont Series Bold Size Normal EndFont End Style DefenseMonth Margin Static LatexType CommandTitle LatexName donemonth NextNoIndent 1 LabelSep xxx ParSkip 0.4 TopSep 0.4 BottomSep 0.4 ParSep 0.4 Align Center AlignPossible Center LabelType No_Label # label font definition LabelFont Series Bold Size Normal EndFont End Style DefenseYear Margin Static LatexType CommandTitle LatexName doneyear NextNoIndent 1 LabelSep xxx ParSkip 0.4 TopSep 0.4 BottomSep 0.4 ParSep 0.4 Align Center AlignPossible Center LabelType No_Label # label font definition LabelFont Series Bold Size Normal EndFont End Style Acknowledge Margin Static LatexType Environment LatexName acknowledge NextNoIndent 1 LeftMargin MMM RightMargin MMM ParIndent MM ItemSep 0 TopSep 0.7 BottomSep 0.7 ParSep 0 Align Block AlignPossible Block LabelType Centered_Top_Environment LabelString Acknowledge LabelBottomSep 0.5 # standard font definition Font Size Small EndFont # label font definition LabelFont Series Bold Size Large EndFont End