Skip to content
This repository has been archived by the owner on Mar 22, 2021. It is now read-only.

Commit

Permalink
Add listings.sty
Browse files Browse the repository at this point in the history
Don't want to do this, but I need to change the addtocontents line
so that it will work with memoir
  • Loading branch information
miekg committed Aug 15, 2010
1 parent b432ebd commit 595b8a6
Show file tree
Hide file tree
Showing 3 changed files with 2,283 additions and 10 deletions.
43 changes: 39 additions & 4 deletions go-setup.tex
Expand Up @@ -8,11 +8,46 @@
%% list of answers %% list of answers
\newlistof{listofex}{ex}{List of Exercises} \newlistof{listofex}{ex}{List of Exercises}
\newlistentry{exercise}{ex}{0} \newlistentry{exercise}{ex}{0}
\renewcommand{\exmark}{\markboth{\myfamily \typename: List of Exercises}{\myfamily List of Exercices}}
\renewcommand{\lofmark}{\markboth{\myfamily \typename: \listfigurename}{\myfamily \listfigurename}} \newlistof{listofcode}{code}{List of Code Examples}
\renewcommand{\lotmark}{\markboth{\myfamily \typename: \listtablename}{\myfamily \listtablename}} \newlistentry{code}{code}{0}

%% need to do this for code examples too
%%\renewcommand{\lstlistlistingname}{List of Code Examples}
%% toc
\renewcommand{\tocheadstart}{}
\renewcommand{\aftertoctitle}{\pagestyle{blocks}}
\renewcommand{\aftertoctitle}{\thispagestyle{empty}\afterchaptertitle\pagestyle{blocks}}

\renewcommand{\printtoctitle}[1]{}
\renewcommand{\contentsname}{Table of Contents}
\renewcommand{\tocmark}{\markboth{\myfamily \typename: \contentsname}{\myfamily \contentsname}} \renewcommand{\tocmark}{\markboth{\myfamily \typename: \contentsname}{\myfamily \contentsname}}
\renewcommand{\lstlistlistingname}{List of Code Examples} %% new print the titles as section not as chapter, that explains
%% why the page is headerless. the page style is empty
%% lof
\renewcommand{\lofheadstart}{}
\renewcommand{\afterloftitle}{\thispagestyle{blocks}}
\renewcommand{\printloftitle}[1]{\section*{#1}}
\renewcommand{\lotmark}{\markboth{\myfamily \typename:
\listfigurename}{\myfamily \listfigurename}}
%% lot
\renewcommand{\lotheadstart}{}
\renewcommand{\afterlottitle}{\thispagestyle{blocks}}
\renewcommand{\printlottitle}[1]{\section*{#1}}
\renewcommand{\lofmark}{\markboth{\myfamily \typename:
\listtablename}{\myfamily \listtablename}}
%% ex
\renewcommand{\exheadstart}{}
\renewcommand{\afterextitle}{\thispagestyle{blocks}}
\renewcommand{\printextitle}[1]{\section*{#1}}
\renewcommand{\exmark}{\markboth{\myfamily \typename: List of
Exercises}{\myfamily List of Exercises}}
%% code
\renewcommand{\codeheadstart}{}
\renewcommand{\aftercodetitle}{\thispagestyle{blocks}}
\renewcommand{\printcodetitle}[1]{\section*{#1}}
\renewcommand{\codemark}{\markboth{\myfamily \typename: List of
Code Examples}{\myfamily List of Code Examples}}


\nobibintoc \nobibintoc
\renewcommand*{\indexmark}{% \renewcommand*{\indexmark}{%
Expand Down
13 changes: 7 additions & 6 deletions go.tex
Expand Up @@ -92,12 +92,13 @@
\clearpage \clearpage


\pagenumbering{roman} \pagenumbering{roman}
\tableofcontents \chapter*{Table of Contents}
\lstlistoflistings \tableofcontents*
\listoffigures \listoffigures*
\listoftables \listoftables*
\listofex %%\lstlistoflistings* %% fix this

\listofcode*
\listofex*
\clearpage \clearpage


\chapter{Introduction} \chapter{Introduction}
Expand Down

0 comments on commit 595b8a6

Please sign in to comment.