General ⇒ lstlisting and summary entry
-
- Posts: 1
- Joined: Sat May 21, 2011 4:44 pm
lstlisting and summary entry
\section[Summary Entry Text for the Section]{Section Caption}
I would like to do the same for a lstlisting command.
I'm using the command as below:
\begin{lstlisting}[caption=My First Lua Application: The classic Hello World Sample, label=list:mycode, language=lua]
print('Hello world!!')
\end{lstlisting}
I tried to use the [] to define the summary entry but it didn't work with lstlisting. Are there any way to do this?
Thank you.
Learn LaTeX easily with newest books:
The LaTeX Beginner's Guide: 2nd edition and perfect for students writing a thesis
The LaTeX Cookbook: 2nd edition full of practical examples for mathematics, physics, chemistry, and more
LaTeX Graphics with TikZ: the first book about TikZ for perfect drawings in your LaTeX thesis
- localghost
- Site Moderator
- Posts: 9202
- Joined: Fri Feb 02, 2007 12:06 pm
lstlisting and summary entry
Of course it does. And the listings manual shows that quite clearly.manoelcampos wrote:[…] I'm using the command as below:
\begin{lstlisting}[caption=My First Lua Application: The classic Hello World Sample, label=list:mycode, language=lua]
print('Hello world!!')
\end{lstlisting}
I tried to use the [] to define the summary entry but it didn't work with lstlisting. […]
Code: Select all
\begin{lstlisting}[%
caption={[My First Lua Application]My First Lua Application: The classic Hello World Sample},
label={list:mycode},
language=lua
]
print('Hello world!!')
\end{lstlisting}
Best regards and welcome to the board
Thorsten
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10