Permalink
Browse files

Add listings.sty

Don't want to do this, but I need to change the addtocontents line
so that it will work with memoir
  • Loading branch information...
1 parent b432ebd commit 595b8a66fe9ff16737186705521cfe984ff9c953 @miekg committed Aug 15, 2010
Showing with 2,283 additions and 10 deletions.
  1. +39 −4 go-setup.tex
  2. +7 −6 go.tex
  3. +2,237 −0 listings.sty
View
@@ -8,11 +8,46 @@
%% list of answers
\newlistof{listofex}{ex}{List of Exercises}
\newlistentry{exercise}{ex}{0}
-\renewcommand{\exmark}{\markboth{\myfamily \typename: List of Exercises}{\myfamily List of Exercices}}
-\renewcommand{\lofmark}{\markboth{\myfamily \typename: \listfigurename}{\myfamily \listfigurename}}
-\renewcommand{\lotmark}{\markboth{\myfamily \typename: \listtablename}{\myfamily \listtablename}}
+
+\newlistof{listofcode}{code}{List of Code Examples}
+\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{\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
\renewcommand*{\indexmark}{%
View
@@ -92,12 +92,13 @@
\clearpage
\pagenumbering{roman}
-\tableofcontents
-\lstlistoflistings
-\listoffigures
-\listoftables
-\listofex
-
+\chapter*{Table of Contents}
+\tableofcontents*
+\listoffigures*
+\listoftables*
+%%\lstlistoflistings* %% fix this
+\listofcode*
+\listofex*
\clearpage
\chapter{Introduction}
Oops, something went wrong.

0 comments on commit 595b8a6

Please sign in to comment.