Commit 21028a29 authored by Uwe Schulzweida's avatar Uwe Schulzweida
Browse files

Docu: added line numbers in listings

parent 32acaa0c
\lstset{frame=single, backgroundcolor=\color{pyellow}, basicstyle=\small, columns=flexible, numbers=left, stepnumber=5}
\chapter{\label{example}Examples}
This appendix contains complete examples to write, read
......@@ -11,7 +13,7 @@ Here is an example using {\CDI} to write a netCDF dataset with
on surface level and the second variable is a 3D field on 5 pressure
levels. Both variables are on the same lon/lat grid.
\lstinputlisting[language=C, frame=single, backgroundcolor=\color{pyellow}, basicstyle=\small, columns=flexible]
\lstinputlisting[language=C]
{../../examples/cdi_write.c}
......@@ -19,7 +21,7 @@ levels. Both variables are on the same lon/lat grid.
This is the {\tt ncdump -h} output of the resulting netCDF file {\tt example.nc}.
\begin{lstlisting}[frame=single, backgroundcolor=\color{pyellow}, basicstyle=\small, columns=flexible]
\begin{lstlisting}[]
netcdf example {
dimensions:
lon = 12 ;
......@@ -59,7 +61,7 @@ data:
This example reads the netCDF file {\tt example.nc} from \htmlref{Appendix B.1}{example_write}.
\lstinputlisting[language=C, frame=single, backgroundcolor=\color{pyellow}, basicstyle=\small, columns=flexible]
\lstinputlisting[language=C]
{../../examples/cdi_read.c}
......@@ -69,5 +71,5 @@ This example reads the netCDF file {\tt example.nc} from \htmlref{Appendix B.1}{
and writes the result to a GRIB dataset by simple setting the output file type
to {\tt FILETYPE\_GRB}.
\lstinputlisting[language=C, frame=single, backgroundcolor=\color{pyellow}, basicstyle=\small, columns=flexible]
\lstinputlisting[language=C]
{../../examples/cdi_copy.c}
\lstset{frame=single, backgroundcolor=\color{pyellow}, basicstyle=\small, columns=flexible, numbers=left, stepnumber=5}
\chapter{\label{example}Examples}
This appendix contains complete examples to write, read
......@@ -11,7 +13,7 @@ Here is an example using {\CDI} to write a netCDF dataset with
on surface level and the second variable is a 3D field on 5 pressure
levels. Both variables are on the same lon/lat grid.
\lstinputlisting[language=Fortran, frame=single, backgroundcolor=\color{pyellow}, basicstyle=\small, columns=flexible]
\lstinputlisting[language=Fortran]
{../../examples/cdi_write_f.f}
......@@ -19,7 +21,7 @@ levels. Both variables are on the same lon/lat grid.
This is the {\tt ncdump -h} output of the resulting netCDF file {\tt example.nc}.
\begin{lstlisting}[frame=single, backgroundcolor=\color{pyellow}, basicstyle=\small, columns=flexible]
\begin{lstlisting}[]
netcdf example {
dimensions:
lon = 12 ;
......@@ -59,7 +61,7 @@ data:
This example reads the netCDF file {\tt example.nc} from \htmlref{Appendix \ref{example_write}}{example_write}.
\lstinputlisting[language=Fortran, frame=single, backgroundcolor=\color{pyellow}, basicstyle=\small, columns=flexible]
\lstinputlisting[language=Fortran]
{../../examples/cdi_read_f.f}
......@@ -69,7 +71,7 @@ This example reads the netCDF file {\tt example.nc} from \htmlref{Appendix B.1}{
and writes the result to a GRIB dataset by simple setting the output file type
to {\tt FILETYPE\_GRB}.
\lstinputlisting[language=Fortran, frame=single, backgroundcolor=\color{pyellow}, basicstyle=\small, columns=flexible]
\lstinputlisting[language=Fortran]
{../../examples/cdi_copy_f.f}
\section{\label{examples_f2003}Fortran 2003: mo\_cdi and iso\_c\_binding}
......@@ -85,7 +87,8 @@ have to be convertet to C charcters by
\item take {\tt ctrim} from {\tt mo\_cdi} for {\tt CHARACTER(type=c\_char)} variables
\end{itemize}
\lstinputlisting[language=Fortran, frame=single, backgroundcolor=\color{pyellow}, basicstyle=\small, columns=flexible]
\lstinputlisting[language=Fortran]
{../../examples/cdi_read_f2003.f90}
\lstinputlisting[language=Fortran, frame=single, backgroundcolor=\color{pyellow}, basicstyle=\small, columns=flexible]
\lstinputlisting[language=Fortran]
{../../examples/cdi_write_f2003.f90}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment