2

Hi guys I have a problem with lslisting because the code spans over multiple pages. I really hope you can help:

result when typeset

How can I remove the heading (BILIAG A. APPENDIKS)? Here is a minimal example of the code:

\documentclass[11pt,a4paper,danish,oneside]{memoir} 
\usepackage[utf8]{inputenc}
\usepackage[danish]{babel} 
\usepackage[T1]{fontenc}
\usepackage{graphicx}  
\usepackage[margin=1in]{geometry}
\usepackage{appendix}

\usepackage{listings}
\usepackage{color}
\usepackage{textcomp}
\definecolor{listinggray}{gray}{0.9}
\definecolor{lbcolor}{rgb}{0.9,0.9,0.9}
\lstset{backgroundcolor=\color{lbcolor},
tabsize=4, rulecolor=, language=matlab,
basicstyle=\scriptsize, upquote=true,
aboveskip={1.5\baselineskip}, columns=fixed,
showstringspaces=false, extendedchars=true, breaklines=true,
prebreak = \raisebox{0ex}[0ex][0ex]{\ensuremath{\hookleftarrow}},
frame=single, showtabs=false, showspaces=false, showstringspaces=false,
identifierstyle=\ttfamily,
keywordstyle=\color[rgb]{0,0,1},
commentstyle=\color[rgb]{0.133,0.545,0.133},
stringstyle=\color[rgb]{0.627,0.126,0.941},
identifierstyle=\color[rgb]{0.125,0.695,0.690},
texcl=true, inputencoding=ansinew, extendedchars=true}

\begin{document}
\appendix
\chapter{APPENDIKS}
\addtocontents{toc}{\cftpagenumbersoff{chapter}}
\addtocontents{toc}{\cftpagenumbersoff{section}}

\section*{Topbillede.m}
\lstinputlisting{Topbillede.m}
\end{document}
2

1 Answer 1

2

You simply have to add the line

\pagestyle{simple}

just before

\lstinputlisting{Topbillede.m}

if you want the page number at the outer left side of the page.

If you don't want neither the title nor the page number, issue

\pagestyle{empty}

If, for some reasons, you want to turn back to normal headings later in your document, issue this command at the point where you want it to restart.

\pagestyle{headings}
1
  • Thanks man. This worked great - my error was trying with thispagestyle command. Sorry for wasting your time! Commented Jan 27, 2014 at 12:30

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .