newcommand for verbatim

If you want a simple implementation, go with

\newcommand[1]{{\small\texttt{#1}}}

If you want more detailed control, you should go with fancyvrb or minted packages.


Specific answer

For my example below the following code from the listings package was the solution:

\newcommand{\codeline}[1]{\lstinline|#1|}

Of course this is only reasonable if you are using short inline code examples without vertical line |.

Example

MWE in which this implementation makes sense:

\documentclass[landscape]{article}
\usepackage{listings}
\newcommand{\includegraphicswithtitle}[1]{%
\clearpage%
\section*{\lstinline|#1|}%
\includegraphics{#1}}

\title{All graphics of my thesis}

\begin{document}
\maketitle
\centering
\includegraphicswithtitle{Image08_a_1.pdf}
\includegraphicswithtitle{Image08_b_1.pdf}
\includegraphicswithtitle{Image08_c_1.pdf}
\end{document}