Regarding the
listings package, you can use
\lstset anywhere in the document, and it will affect only the following listings. See documentation for more information.
Changing the margins in the appendix could be done with the
geometry package, or possibly through a different construction depending on the document class you use.
A small example of how this could be done:
- Code: Select all • Open in writeLaTeX
\documentclass{article}
\usepackage{geometry}
\usepackage{listings}
\geometry{margin=2in}
\begin{document}
\begin{lstlisting}
program hello
implicit none
print *, 'Hello World'
end program
\end{lstlisting}
\newgeometry{margin=0.1in}
\clearpage
\lstset{
language=[95]fortran,
basicstyle=\small\ttfamily,
keywordstyle=\bfseries,
frame=single,
}
\begin{lstlisting}
program hello
implicit none
print *, 'Hello World'
end program
\end{lstlisting}
\end{document}