\citet{gur+04} have demonstrated that authors should not have umlauts
in their names. It's OK to use them in the man\"{u}script, though.
\begin{thebibliography}{References}
-\bibitem[{{G\"{u}rkan et~al.}(2004)}]{gur+04} Gürkan, M.~A., Freitag,
+\bibitem[{{G\"{u}rkan et~al.}(2004)}]{gur+04} Gürkan, M.~A., Freitag,
M., \& Rasio, F.~A. 2004, ApJ, 604, 632\end{thebibliography}
pass
\end{lstlisting}
-
Here is an example listing with left line numbering, step ``3'',
language ``Python'', options ``Extended character table'' and
``Space~as~symbol'', range lines 3\,-\,8:
'this is a python function'
pass
def func(param):
-'This is a German word: Tschüß'
+'This is a German word: Tschüß'
pass
def func(param):
'this is a python function'
\end{lstlisting}
Special cases:
-\begin{lstlisting}
-\begin{centering}
+\begin{lstlisting}[abovecaptionskip=2em,basicstyle={\large\ttfamily},breaklines=true,extendedchars=true,firstline=2,float=h,language={[R/3 3.1]ABAP},lastline=5,numbers=left,numberstyle={\scriptsize},showspaces=true,showstringspaces=false,stepnumber=3,tabsize=4]
hello
\end{lstlisting}
+
\lstinline[language=TeX]!\begin{centering} hello!
{
parent_context.check_layout(os);
begin_inset(os, "listings\n");
+ if (p.hasOpt()) {
+ // there can be a [] pair inside the argument for the language
+ string arg = p.getArg('[', ']');
+ if (arg.find("language={[") != string::npos) {
+ char start = p.next_token().character();
+ arg += ']';
+ arg += start;
+ arg += p.getArg(start, ']');
+ }
+ os << "lstparams " << '"' << arg << '"' << '\n';
+ }
os << "inline false\n"
<< "status collapsed\n";
Context context(true, parent_context.textclass);
context.layout = &parent_context.textclass.plainLayout();
- context.check_layout(os);
- string const s = p.verbatimEnvironment("lstlisting");
+ string const s = p.plainEnvironment("lstlisting");
for (string::const_iterator it = s.begin(), et = s.end(); it != et; ++it) {
if (*it == '\\')
os << "\n\\backslash\n";
// FIXME handle listings with parameters
// If this is added, don't forgot to handle the
// automatic color package loading
- if (p.hasOpt())
- parse_unknown_environment(p, name, os, FLAG_END,
- outer, parent_context);
- else
- parse_listings(p, os, parent_context);
+ parse_listings(p, os, parent_context);
p.skip_spaces();
}