1

With the lstlistings package, is there a strait forward way of changing the label style from

Listing 1

to

Listing. 1

By the "label style" I mean the string used in the captions.

EG.

\begin{lstlisting}[caption=This is a caption, label=list]
   here lieth some code
\end{lstlisting}

would give me:

listing 1: This is a caption
here lieth some code

However, What I need to get is (notice the punctuation after the listing):

listing. 1: This is a caption
here lieth some code
  • Do you mean Listing. 1 instead of Listing 1 (note the singular)? Yes, there is a way... but I can't see how that would make sense: a full stop is usually meant for an abbreviation, but listing is written in full, here. – jub0bs May 11 '14 at 17:39
  • Yes, I ment listing rather than listings. I agree, it makes little sense, however those are the formatting instructions I have been provided with and arguing with the publishers on a grammar issue would probably be foolish. – Chris Headleand May 11 '14 at 18:02
  • Do you use a package for references, such as prettyref or cleveref? A minimal working example (MWE) would help. – jub0bs May 11 '14 at 18:06
  • 1
    When you say "label style", do you mean the string used in the captions or the string used in cross-references? – Gonzalo Medina May 11 '14 at 18:28
  • edit added to answer some of the questions. – Chris Headleand May 11 '14 at 19:44
1
\def\lstlistingname{Listing.}

You might also want to read section "4.9 Captions" from the listings.pdf

| improve this answer | |

Not the answer you're looking for? Browse other questions tagged or ask your own question.