[Leaplist] I'm thinking of staying with LyX
Steve Litt
slitt at troubleshooters.com
Thu Jan 11 10:59:13 EST 2007
On Thursday 11 January 2007 01:02, Fred Moore wrote:
> On Wednesday 10 January 2007 22:04, Steve Litt wrote:
[clip]
> >
> > I've been working with OpenOffice and wishing for LyX. Now more than
> > ever, I need to attend Fred's LaTeX presentation.
> >
> > SteveT
> Steve give me an example of how complex your styles are.. I can't imagine
> why a paragraph sytle should be difficult in a book. It almost never is..
In the following layout file for my book "Twenty Eight Tales of
Troubleshooting:
* I modify the table of contents, itemize and enumerate, so as to have less
space between items.
* parttextL is an environment to put arbitrary text on Part pages. Below the
word Part and the roman numeral counter number, it has left aligned text
indented severely, with a continuous vertical line to the left of that text.
The text provides an explanation for that particular part, and is just the
way I like it. As I remember, it took me two or three days to figure out how
to do this.
* topnoteL, bottomnoteL and middlenoteL are for "author's notes". They're
slightly different from each other, depending on whether they're intended to
be at the beginning of a page (probably because they're at the beginning of
the chapter, at the end of the page (probably because they're at the end of
the chapter), or in the middle of the page (in other words, not place in a
specific place). The commonality between them is handled by the whitebox
environment, which all three call. They print the heading "Author's Note"
bold and slightly big, and the text of the author's note small and bold, with
wide margins around the text. Note that on other books I have this area
shadowed also.
* The headers and footers are standard fare, yanked right out of
http://www.troubleshooters.com/lpm/200210/200210.htm#_HeadersandFooters. I
once gave a LEAP presentation with this header and footer material :-)
One more thing -- you see all the stuff that's commented out. The LaTeX code
looks pretty simple, but it was the result of huge amounts of exerimentation,
commenting stuff in and out.
And now, for your entertainment, here's the LaTeX code of the layout file:
#% Do not delete the line below; configure depends on this
# \DeclareLaTeXClass[memoir]{storybook}
Input stdclass.inc
Preamble
%\usepackage{fancyhdr}
\usepackage{setspace}% Fractional line spacing
\usepackage{ifthen}
%\usepackage{prettyref}
%\usepackage{tocloft}
%\usepackage{epigraph}
%\usepackage{epipart}
% ### Prevent pagebreak after part so text can go on Part page
\renewcommand{\@endpart}{~\\[0.1in]}
% ### PREVENT TOC ROMAN NUMERAL CRAM
\addtolength{\cftpartnumwidth}{1.5em}%
%\addtolength{\cftbeforepartskip}{-0.1cm}% This works
%\addtolength{\cftchapindent}{1in}%
%\addtolength{\cftbeforetoctitleskip}{-2in}%
\renewcommand{\cftpartfont}{\Large\bfseries}%
\renewcommand{\cftpartpagefont}{\Large\bfseries}%
% #### HEADERS AND FOOTERS
\renewcommand{\partmark}[1]{\markboth{\footnotesize{}Part \thepart : #1}{}}
\let\oldpart=\@part
\def\@part[#1]#2{\oldpart [#1]{#2}\partmark{#1}}
\renewcommand{\chaptermark}[1]{\markright{\small{}#1}}
\renewcommand{\sectionmark}[1]{}
\makepagestyle{pgonly}
\makeoddfoot{pgonly}{}{\thepage}{}
\makeoddfoot{pgonly}{}{\thepage}{}
\makeevenfoot{pgonly}{}{}{}
\makeevenfoot{pgonly}{}{}{}
\aliaspagestyle{part}{pgonly}
\aliaspagestyle{chapter}{pgonly}
\makeevenhead{plain}{\leftmark}{}{\thepage}
\makeoddhead{plain}{\thepage}{}{\rightmark}
\makeevenfoot{plain}{}{Warning: Illegal copy!}{}
\makeoddfoot{plain}{}{\tiny{Warning: Illegal copy!!}}{}
\makeevenhead{cleared}{}{}{}
\makeoddhead{cleared}{}{}{}
\makeevenfoot{cleared}{}{\thepage}{}
\makeoddfoot{cleared}{}{\thepage}{}
\makeheadrule{plain}{\textwidth}{1pt}
% ### DECLARE LENGTHS
\newlength{\oldparindent}
\newlength{\minipagewidth}
\newlength{\widthchange}
\newlength{\junk}
% ### Good looking ragged right ###
%\usepackage{ragged2e}
%\setlength{\RaggedRightParindent}{\parindent}
%\RaggedRight
% ### Vertically denser table of contents
\renewcommand\tableofcontents{%
\if at twocolumn
\@restonecoltrue\onecolumn
\else
\@restonecolfalse
\fi
\chapter*{\contentsname
\@mkboth{%
\MakeUppercase\contentsname}{\MakeUppercase\contentsname}}%
{
\normalsize\setlength{\parskip}{-8pt}\setstretch{0.8}%
\@starttoc{toc}%
}
\if at restonecol\twocolumn\fi
}
% ### Vertically denser Itemize style ###
\renewenvironment{itemize}{%
\ifnum\@itemdepth>3 \@toodeep
\else \advance\@itemdepth\@ne
\edef\@itemitem{labelitem\romannumeral\the\@itemdepth}%
\list{\csname\@itemitem\endcsname}%
{\def\makelabel##1{\hss\llap{\upshape##1}}}%
\fi
\setlength{\parsep}{1pt}
\setlength{\parskip}{1pt}
\setstretch{0.8}
}{%
\endlist
}
% ### Vertically denser Enumerate style ###
\renewenvironment{enumerate}{%
\ifnum \@enumdepth >3 \@toodeep\else
\advance\@enumdepth \@ne
\edef\@enumctr{enum\romannumeral\the\@enumdepth}\list
{\csname label\@enumctr\endcsname}{\usecounter
{\@enumctr}\def\makelabel##1{\hss\llap{\upshape##1}}}\fi
\setlength{\parsep}{1pt}
\setlength{\parskip}{1pt}
\setstretch{0.8}
}{%
\endlist
}
% ### LATEX ENVIRONMENT FOR TEXT ON PART PAGES
\newenvironment{parttextL}[1]%
{%
\begin{leftbar}{}%
\begin{adjustwidth*}{1cm}{1cm}%
\Large%
#1%
\footnotesize%
}%
{%
\end{adjustwidth*}%
\end{leftbar}%
}%
% ### whitebox is basis for StartNote and EndNote ###
% ### Implements 80% width, and indented paragraphs. ###
\newenvironment{whitebox}[0]%
{%
\setlength{\widthchange}{-2in}%
\setlength{\minipagewidth}{\textwidth}%
\addtolength{\minipagewidth}{\widthchange}%
\hspace*{-0.5\widthchange}%
\begin{minipage}[]{\minipagewidth}%
\begin{bfseries}%%
\begin{center}Author's Note\\%
\end{center}%
\begin{tiny}%%
\setlength\parindent{16pt}%%
~\\[-.2in]
}%
{%
\par
\end{tiny}%
\end{bfseries}%
\end{minipage}%
% \end{center}
\\[0.2in]
}%
% ### Topnotes
\newenvironment{topnoteL}%
{%
~\\[-0.2in]
\begin{whitebox}
}%
{%
\end{whitebox}
}%
% ### Bottom notes
\newenvironment{bottomnoteL}%
{%
~\\[0.5in]
\begin{whitebox}
}%
{%
\end{whitebox}
}%
% ### Middle notes
\newenvironment{midnoteL}%
{%
~\\[0.2in]
\begin{whitebox}
}%
{%
\end{whitebox}
~\\[0.2in]
}%
% ### Smallwriting is small writing for the copyright page
\newenvironment{smallwritingL}[1]%
{%
\begin{bfseries}%
\begin{tiny}#1%%
}%
{%
\end{tiny}%
\end{bfseries}%
}%
\newlength{\steve}
\setlength{\steve}{3pt}
EndPreamble
More information about the Leaplist
mailing list