%% %% This is file `bits.stq', %% generated with the docstrip utility. %% %% The original source files were: %% %% bits.sty %% %% This program is part of the Frankenstein bundle for LaTeX. %% This file should have been distributed with the source listed above. %% %% Copyright (C) 1995, 1996 Matthew Swift %% %% This program is free software; you can redistribute it and/or modify %% it under the terms of the GNU General Public License as published by %% the Free Software Foundation; either version 2 of the License, or %% (at your option) any later version. %% %% This program is distributed in the hope that it will be useful, %% but WITHOUT ANY WARRANTY; without even the implied warranty of %% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the %% GNU General Public License for more details. %% %% You should have received a copy of the GNU General Public License %% along with this program; if not, write to the Free Software %% Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. %% %% NOTE: I am willing to specially license this code. %% Please simply contact me with your proposal. %% %% \CharacterTable %% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z %% Lower-case \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z %% Digits \0\1\2\3\4\5\6\7\8\9 %% Exclamation \! Double quote \" Hash (number) \# %% Dollar \$ Percent \% Ampersand \& %% Acute accent \' Left paren \( Right paren \) %% Asterisk \* Plus \+ Comma \, %% Minus \- Point \. Solidus \/ %% Colon \: Semicolon \; Less than \< %% Equals \= Greater than \> Question mark \? %% Commercial at \@ Left bracket \[ Backslash \\ %% Right bracket \] Circumflex \^ Underscore \_ %% Grave accent \` Left brace \{ Vertical bar \| %% Right brace \} Tilde \~} \def\fileinfo{basic bits (Frankenstein's guts)} \def\fileversion{v1.0} \def\filedate{1996/03/26} \def\docdate{1996/03/26} \edef\PPOptArg {% \filedate\space \fileversion\space \fileinfo } \makeatletter \@ifundefined{JuStLoAdInFoRmAtIoN} {% }{% ELSE \@ifundefined{DoXNeeDME} {% }{% ELSE \UndefineCS\JuStLoAdInFoRmAtIoN \usepackage{bits}% } \makeatother \endinput } \NeedsTeXFormat{LaTeX2e} \ProvidesPackage{bits}[\PPOptArg] %% \RequirePackage{blkcntrl,moredefs,relsize} \DeclareOption{poetica} {% \RequirePackage{poetica} \newcommand\FullTitlePoetica {% \begin{Poetica} \fontshape{t}\selectfont \BitTitle\\% \ifx\BitSubtitle\ShortEmpty \else \BitSubtitle\\% \fi \end{Poetica} } \AtBeginDocument {% \let\FullTitle\FullTitlePoetica } } \DeclareBooleanOptions{ends}{noends} \DeclareBooleanOptions{titlepage}{notitlepage} \DeclareBooleanUserOptions{signed}{anonymous} \ExecuteOptions{ends,notitlepage,signed} \ProcessOptions \ReserveCS\bt@a \ReserveCS\bt@b \ReserveCS\bt@c \ReserveCS\bt@d \ReserveCS\bt@e \newcommand\sc@scheme@components {% environment,end@bit,begin@bit,interbits,firstbit% ,settitle,setfirsttitle% } \newcommand\sc@bitstyle@list {% generic% } \newcommand\sc@copystyle@list {% standard% } \provideboolean{@bt@trymoreschemes@} \NewName{sc@listcar}{#1,#2\@nil} {% #1% } \NewName{sc@listcdr}{#1,#2\@nil} {% #2% } \newcommand\NewCopystyle [2][Z] {% args: [scheme-list] new-copystyle \addto@macro\sc@copystyle@list{,#2}% \@for\bt@a:=\sc@bitstyle@list \do {% \@for\bt@b:=\sc@scheme@components \do {% \eExpand\bt@b\In {% \expandafter\sc@assign@schemecomponent \expandafter{\bt@a}{#2}{##1}{#1}% }% }% }% } \newcommand\NewBitstyle [2][Z] {% args: [scheme-list] new-bitstyle \addto@macro\sc@bitstyle@list{,#2}% \@for\bt@a:=\sc@copystyle@list \do {% \@for\bt@b:=\sc@scheme@components \do {% \eExpand\bt@a\In {% \eExpand\bt@b\In {% \sc@assign@schemecomponent{#2}{##1}{####1}{#1}% }% }% }% }% } \newcommand\sc@assign@schemecomponent [4] {% args: bitstyle copystyle % scheme-component scheme-list \@bt@trymoreschemes@true \edef\bt@d{#4}% scheme-list that diminishes; edef not necessary \@whilesw\if@bt@trymoreschemes@\fi {% \edef\bt@c{% \sc@listcar\bt@d,\@nil } \@ifundefined{sc@make@#3@\bt@c} {% \edef\bt@d{\sc@listcdr\bt@d,\@nil}% }{% ELSE \@nameuse{sc@make@#3@\bt@c}{#1}{#2}% \@bt@trymoreschemes@false }% }% } \newcommand\PromulgateComponentAcrossCopystyles [3] {% args: scheme-component % scheme bitstyle \@for\bt@a:=\sc@copystyle@list \do {% \@nameuse{sc@make@#1@#2}{#3}{\bt@a}% }% } \newcommand\PromulgateComponentAcrossBitstyles [3] {% args: scheme-component % scheme copystyle \@for\bt@a:=\sc@bitstyle@list \do {% \@nameuse{sc@make@#1@#2}{\bt@a}{#3}% }% } \newcommand\sc@begin@bit@common [2] {% \title{#1}% #2% \refstepcounter{bit}% \ifnum\value{bit} = \@ne \@nameuse{sc@firstbit@\CopyStyle}% \else \@nameuse{sc@interbits@\CopyStyle}% \fi } \ReserveCS\BitStyle \ReserveCS\PreBitAll \newcommand\sc@make@environment@Z [2] {% args: bitstyle dummy \DefName{end#1}{}{}% \DefName{#1}{##1##2} {% \DefName{end#1}{} {% \@nameuse{sc@end@bit@#1@\CopyStyle}{##1}% }% \@nameuse{sc@begin@bit@#1@\CopyStyle}{##1}{##2}% }% } \newcommand\sc@make@interbits@Z [2] {% args: dummy copystyle \DefName{sc@interbits@#2}{} {% \@nameuse{sc@settitle@\BitStyle @#2}% }% } \newcommand\sc@make@firstbit@Z [2] {% args: dummy copystyle \DefName{sc@firstbit@#2}{} {% \@nameuse{sc@setfirsttitle@\BitStyle @#2}% }% } \newcommand\sc@make@begin@bit@Z [2] {% args: bitstyle copystyle \DefName{PreBit#1}{}{}% \DefName{sc@begin@bit@#1@#2}{##1##2} {% \def\BitStyle{#1}% \sc@begin@bit@common{##1}{##2}% \PreBitAll \@nameuse{PreBit#1}% }% } \newcommand\sc@make@end@bit@Z [2] {% args: bitstyle copystyle \DefName{sc@end@bit@#1@#2}{##1} {% \TheEnd }% } \newcommand\sc@make@settitle@Z [2] {% args: bitstyle copystyle \DefName{sc@settitle@#1@#2}{} {% \relax\begin{center}\FullTitle\end{center}% \typeout{FIXME: need vc footer}% }% } \newcommand\sc@make@setfirsttitle@Z [2] {% args: bitstyle copystyle \DefName{sc@setfirsttitle@#1@#2}{} {% \relax\begin{center}\FullTitle\end{center}% \typeout{FIXME: need vc footer}% \typeout{FIXME first centered title}% }% } \newcommand\FullTitle {% \relsize{2}% \bfseries \BitTitle \\% \ifx\BitSubtitle\ShortEmpty \else \csname sbseries\endcsname % this way it's harmless if undefined \relsize{-1}\BitSubtitle\\% \fi } \newcommand\sc@make@begin@bit@P [2] {% args: bitstyle copystyle \DefName{sc@begin@bit@#1@#2}{##1##2} {% \def\BitStyle{#1}% \sc@begin@bit@common{##1}{##2}% \PreBitAll \relax\begin{verse}% \relax for emacs \@nameuse{PreBit#1}% }% } \newcommand\sc@make@end@bit@P [2] {% args: bitstyle copystyle \DefName{sc@end@bit@#1@#2}{##1} {% \relax\end{verse}% \TheEnd }% } \newcommand\sc@make@settitle@P [2] {% args: bitstyle copystyle \DefName{sc@settitle@#1@#2}{} {% \relax\begin{verse}\FullTitle\end{verse}% \typeout{FIXME: need vc footer}% }% } \newcommand\sc@make@setfirsttitle@P [2] {% args: bitstyle copystyle \DefName{sc@setfirsttitle@#1@#2}{} {% \relax\begin{verse}\FullTitle\end{verse}% \typeout{FIXME: need vc footer}% \typeout{FIXME first verse title}% }% } \newcommand\sc@make@settitle@R [2] {% \DefName{sc@settitle@#1@#2}{} {% \ifx\BitTitle\ShortEmpty\else \noindent \begingroup \larger \bfseries \BitTitle \endgroup \smallskip \fi }% } \@for\bt@e:=\sc@scheme@components \do {% \PromulgateComponentAcrossBitstyles{\bt@e}{Z}{standard} } \NewBitstyle{story} \NewBitstyle{poem} \PromulgateComponentAcrossCopystyles{begin@bit}{P}{poem} \PromulgateComponentAcrossCopystyles{end@bit}{P}{poem} \PromulgateComponentAcrossCopystyles{settitle}{P}{poem} \PromulgateComponentAcrossCopystyles{setfirsttitle}{P}{poem} \NewBitstyle{prose} \PromulgateComponentAcrossCopystyles{settitle}{R}{prose} \NewCopystyle{titlepage} \newcommand\sc@make@setfirsttitle@T [2] {% args: bitstyle copystyle \DefName{sc@setfirsttitle@#1@#2}{} {% \thispagestyle{empty}% \vspace*{\fill}% \begin{center} {\relsize{5}\BitTitle \\}% \ifx\BitSubtitle\ShortEmpty\else {\relsize{3}\BitSubtitle \\}% \fi \end{center} \vfill \par \begingroup \sffamily \hfill \begin{tabular}{r@{\hspace{\@ne em}}r} Copy of:&\todayabbrev \\% Version of:&\Lastchange \\% Date:&\Date \\% \end{tabular} \par\bigskip\bigskip \begin{raggedleft} \def\and{\\}% \larger\scshape\Author \par \end{raggedleft} \endgroup \newpage \setcounter{page}{\@ne}% }% } \PromulgateComponentAcrossBitstyles{setfirsttitle}{T}{titlepage} \providecounter{bit} \providecounter{bitbit}[bit] \providecounter{bitbitbit}[bitbit] \newcommand\sc@bitskip[1] {% \par \ifdim \lastskip < \bigskipamount \removelastskip \penalty -500% #1% \fi } \newcommand\InterBitBreak {% \sc@bitskip \bigskip } \newcommand\InterBitBitBreak {% \sc@bitskip \medskip } \newcommand\InterBitBitBitBreak {% \sc@bitskip \smallskip } \newcommand\bitbit {% \@ifstar {% \sc@bitbit{}% }{% ELSE \refstepcounter{bitbit}% \sc@bitbit{\thebitbit\ }% }% } \newcommand{\sc@bitbit} [2] {% \ifnum\value{bitbit}=\@ne \else \InterBitBitBreak \fi \noindent #1{\relsize{-1}\bfseries #2}% \par\nobreak \smallskip } \newcommand\bitbitbit {% \@ifstar {% \sc@bitbitbit{}% }{% ELSE \refstepcounter{bitbitbit}% \sc@bitbitbit{\thebitbitbit\ }% }% } \newcommand\sc@bitbitbit [2] {% \ifnum\value{bitbitbit}=\@ne \else \InterBitBitBitBreak \fi \noindent #1{\relsize{-1}\bfseries #2}% \par\nobreak \smallskip } \newlet\sc@saved@author\author \newlet\sc@saved@date\date \ReserveCS\Author \defcommand\author [1] {% \sc@saved@author{#1}% \def\Author{#1}% } \newcommand*\Date {% \todayabbrev } \defcommand\date [1] {% \sc@saved@date{#1}% \def\Date{#1}% } \newlet\sc@saved@title\title \ReserveCS\BitTitle \defcommand\title [1] {% \sc@saved@title{#1}% \def\BitTitle{#1}% } \NewUserInfo*[\Subtitle]\BitSubtitle \newlet\subtitle\Subtitle \NewUserInfo*\Lastchange \lastchange{\todayabbrev} \NewUserInfo*\CopyStyle \copystyle{standard} \def\today {% \number\day\space\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\space\number\year } \newcommand\todayabbrev {% \number\day\space\ifcase\month\or Jan\or Feb\or Mar\or Apr\or May\or Jun\or Jul\or Aug\or Sep\or Oct\or Nov\or Dec\fi\space\number\year } \newcommand\copywrite [1] {% \edef\Notes {% \copyright#1 All rights reserved. \Notes }% } \newcommand\EndSign {% \par\nobreak \vspace{2\bigskipamount}% multiplication turns glue into dimen. \hfill \begingroup \scshape \let\and\@tabularcr \begin{tabular}{c} \Author \\% \relsize{-1}\itshape\Date \end{tabular}% \endgroup } \newcommand\theend {% \if@signed@ \EndSign \fi } \newcommand\TheEnd {% \def\sc@t@c {% prizes% }% \let\sc@t@a\EndSign \ifx\CopyStyle\sc@t@c \InitCS*\sc@t@a \else \if@signed@ \if@ends@ \ifnum\value{page} < 2% \InitCS*\sc@t@a \fi \else \InitCS*\sc@t@a \fi \else \InitCS*\sc@t@a \fi \fi \sc@t@a } \newcommand\sc@vcbox {% \footnotesize \ifx\Lastchange\ShortEmpty\else {\bfseries Version:} {\slshape \Lastchange}% \fi \hspace{\@ne em}% {\bfseries Copy:} {\slshape \todayabbrev}% } \newcommand\VersionControlString {% \hfill \sc@vcbox \hfill } \newcommand\VersionControlAuthorString {% \sc@vcbox \hfill {\scshape\def\and{\unskip, \ignorespaces}\Author}% } \NewUserInfo*\AddressOne \NewUserInfo\AddressTwo % this can have an extra line if necessary. \NewUserInfo*\PhoneNumber \NewUserInfo*\EmailAddress \NewUserInfo*\Country \requirecommand\whitespace {% \bigbreak } \InputIfFileExists{bits.cfg}{}{} \endinput %% %% End of file `bits.stq'.