%% gretl.sty, written by Allin Cottrell, <2005/11/07> %% To be used when generating the Gretl manuals %% from LaTeX source. @FONTREQ@ \ProvidesPackage{gretl} \newcommand{\scriptname}{Example} \newcommand{\GCR}{\textit{Gretl Command Reference}{}} \newcommand{\GUG}{the \textit{Gretl User's Guide}{}} \newcommand{\gtitle}[1]{\vspace*{1in} {\Huge \sffamily #1}\par \vspace{.5in} \includegraphics{figures/gretl-logo} } \newcommand{\gsubtitle}[1]{% {\Large \sffamily #1} \vspace{.5in} } \setcounter{secnumdepth}{1} \setcounter{chapter}{-1} \newcommand{\app}[1]{\textsf{#1}} \newcommand{\cmd}[1]{\texttt{#1}} \newcommand{\varname}[1]{\texttt{#1}} \newcommand{\option}[1]{\texttt{-{}-#1}} \newcommand{\dollar}[1]{\texttt{\$#1}} \newcommand{\ttsl}[1]{\ttfamily{\textsl{#1}}\normalfont} %% \newenvironment{code}{\par\small\verbatim} %% {\endverbatim\normalsize\vspace{-1ex}} \newenvironment{textcode}{\par\small\ttfamily} {\normalfont\normalsize\par} \DefineVerbatimEnvironment% {code}{Verbatim} {fontsize=\small, xleftmargin=1em} \DefineVerbatimEnvironment% {scode}{Verbatim} {frame=lines, framesep=2ex, fontsize=\small, formatcom=\color{myteal}, rulecolor=\color{mygray}} \DefineVerbatimEnvironment% {scodebit}{Verbatim} {fontsize=\small, formatcom=\color{myteal}} \DefineVerbatimEnvironment% {scodebot}{Verbatim} {frame=bottomline, framesep=2ex, fontsize=\small, formatcom=\color{myteal}, rulecolor=\color{mygray}} \renewcommand{\arraystretch}{1.2} \definecolor{mygray}{rgb}{0.85,0.85,0.85} \definecolor{myteal}{rgb}{0.0,0.25,0.15} \definecolor{steel}{rgb}{0.03,0.20,0.45} %% Unlike standard book class, running heads not in caps %% \renewcommand{\chaptermark}[1]{\markboth{\chaptername\ %% \thechapter. #1}{}} %% \renewcommand{\sectionmark}[1]{\markright{#1}} %% floats %% \def\floatpagefraction{.85} \renewcommand{\topfraction}{0.9} \renewcommand{\bottomfraction}{0.8} \renewcommand{\textfraction}{0.07} %% add script as float ("Example") \newcounter{script}[chapter] \renewcommand \thescript {\ifnum \c@chapter>\z@ \thechapter.\fi \@arabic\c@script} \def\fps@script{tbp} \def\ftype@script{1} \def\ext@script{los} \def\fnum@script{\scriptname\nobreakspace\thescript} \newenvironment{script} {\@float{script}} {\end@float} \newenvironment{script*} {\@dblfloat{script}} {\end@dblfloat} \newcommand\theHscript{\thechapter.\arabic{script}} %% \def\toclevel@script{0} %% Make TOC match revised chapter style \renewcommand\tableofcontents{% \if@twocolumn \@restonecoltrue\onecolumn \else \@restonecolfalse \fi \chapter*{\contentsname \@mkboth{\contentsname}{\contentsname}}% \@starttoc{toc}% \if@restonecol\twocolumn\fi} %% offset "tip" text \newcommand{\tip}[1]{\par\vspace{4pt} \ding{43} {\small \sffamily #1}\par} %% rule for use in bibliography \newcommand{\bibliorule}{\rule[-.01in]{.5in}{.005in}} %% get the bibliography into the TOC \renewenvironment{thebibliography}[1] {\chapter*{\bibname\@mkboth{\bibname}{\bibname}} \label{refs} \addcontentsline{toc}{chapter}{\bibname} \list{\@biblabel{\@arabic\c@enumiv}}% {\settowidth\labelwidth{\@biblabel{#1}}% \leftmargin\labelwidth \advance\leftmargin\labelsep \@openbib@code \usecounter{enumiv}% \let\p@enumiv\@empty \renewcommand\theenumiv{\@arabic\c@enumiv}}% \sloppy \clubpenalty4000 \@clubpenalty \clubpenalty \widowpenalty4000% \sfcode`\.\@m} {\def\@noitemerr {\@latex@warning{Empty `thebibliography' environment}}% \endlist} %% custom page headings \if@twoside \def\ps@headings{% \let\@oddfoot\@empty\let\@evenfoot\@empty \def\@evenhead{\thepage\hfil\sffamily\leftmark}% \def\@oddhead{{\sffamily\rightmark}\hfil\sffamily\thepage}% \let\@mkboth\markboth \def\chaptermark##1{% \markboth {{% \ifnum \c@secnumdepth >\m@ne \if@mainmatter \@chapapp\ \thechapter. \ % \fi \fi ##1}}{}}% \def\sectionmark##1{% \markright {{% \ifnum \c@secnumdepth >\z@ \thesection. \ % \fi ##1}}}} \else \def\ps@headings{% \let\@oddfoot\@empty \def\@oddhead{{\sffamily\rightmark}\hfil\sffamily\thepage}% \let\@mkboth\markboth \def\chaptermark##1{% \markright {{% \ifnum \c@secnumdepth >\m@ne \if@mainmatter \@chapapp\ \thechapter. \ % \fi \fi ##1}}}} \fi \def\@makechapterhead#1{% \vspace*{10\p@}% {\parindent \z@ \centering \normalfont \ifnum \c@secnumdepth >\m@ne \Large\sffamily \@chapapp\space \thechapter \par\nobreak \vskip 5\p@ \fi \interlinepenalty\@M \huge \sffamily #1\par\nobreak \vskip 30\p@ }} \def\@schapter#1{% \if@twocolumn \@topnewpage[\@makeschapterhead{#1}] \else \@makeschapterhead{#1} \@afterheading\fi \refstepcounter{chapter} \if\pdfoutput=1 \@writetorep{#1}{chapter.\theHchapter}{0}\fi } \def\@makeschapterhead#1{% \vspace*{10\p@}% {\parindent \z@ \centering \normalfont \interlinepenalty\@M \Large \sffamily #1\par\nobreak \vskip 30\p@ }} %% revised caption style \long\def\@makecaption#1#2{% \vskip\abovecaptionskip \sbox\@tempboxa{\small {\bfseries #1}: #2}% \ifdim \wd\@tempboxa >\hsize {\small {\bfseries #1}: #2}\par \else \global \@minipagefalse \hb@xt@\hsize{\hfil\box\@tempboxa\hfil}% \fi \vskip\belowcaptionskip} %% table of contents \renewcommand{\l@chapter}[2]{% \ifnum \c@tocdepth >\m@ne \addpenalty{-\@highpenalty}% \vskip 1.0em \@plus\p@ \setlength\@tempdima{2em}% \begingroup \parindent \z@ \rightskip \@pnumwidth \parfillskip -\@pnumwidth \leavevmode \bfseries \advance\leftskip\@tempdima \hskip -\leftskip #1\nobreak\hfil \nobreak\hb@xt@\@pnumwidth{\hss #2}\par \penalty\@highpenalty \endgroup \fi} \renewcommand{\l@section}{\@dottedtocline{1}{1.5em}{2.8em}} \renewcommand{\l@subsection}{\@dottedtocline{2}{4.3em}{3.2em}} %% Make section numbers go into left margin: %% \def\@seccntformat#1{\protect\makebox[0pt][r]{\csname %% the#1\endcsname\quad}} \renewcommand\section{\@startsection{section}{1}{\z@}% {-3ex \@plus -1ex \@minus -.2ex}% {.5ex \@plus .2ex}% {\normalfont\large\sffamily}} \renewcommand\subsection{\@startsection{subsection}{2}{\z@}% {-2.5ex\@plus -1ex \@minus -.2ex}% {.2ex \@plus .5ex}% {\normalfont\bfseries}} \renewcommand\subsubsection{\@startsection{subsubsection}{2}{\z@}% {-2ex\@plus -1ex \@minus -.2ex}% {.2ex \@plus .2ex}% {\normalfont\normalsize\itshape}} \endinput %% end of gretl.sty