Tue Apr 12 20:17:17 2011, original submission:
Roland Levillain wrote, on Tue, 25 May 2010 18:03:36 +0200:
Hello,
I'm experiencing a curious behavior of the Listings package with the
Algol (60 et 68) language typesettings. There seems to be a problem
when they are used within the `article' class. For instance, the following
LaTeX input does not compile:
\documentclass{article}
\usepackage{listings}
\lstset{language=Algol}
\begin{document}
\begin{lstlisting}
program main ...
\end{lstlisting}
\end{document}
LaTeX produces the following output:
% latex algol-article.tex
latex algol-article.tex
This is pdfTeX, Version 3.1415926-1.40.10 (TeX Live 2009/Debian)
restricted \write18 enabled.
entering extended mode
(./algol-article.tex
LaTeX2e <2009/09/24>
Babel <v3.8l> and hyphenation patterns for english, usenglishmax, dumylang, noh
yphenation, french, basque, latin, ukenglish, loaded.
(/usr/share/texmf-texlive/tex/latex/base/article.cls
Document Class: article 2007/10/19 v1.4h Standard LaTeX document class
(/usr/share/texmf-texlive/tex/latex/base/size10.clo))
(/usr/share/texmf-texlive/tex/latex/listings/listings.sty
(/usr/share/texmf-texlive/tex/latex/graphics/keyval.sty)
(/usr/share/texmf-texlive/tex/latex/listings/lstmisc.sty)
(/usr/share/texmf-texlive/tex/latex/listings/listings.cfg))
(/usr/share/texmf-texlive/tex/latex/listings/lstlang1.sty)
(/usr/share/texmf-texlive/tex/latex/listings/lstlang2.sty)
(/usr/share/texmf-texlive/tex/latex/listings/lstlang3.sty)
! Package keyval Error: keywordcomment undefined.
See the keyval package documentation for explanation.
Type H <return> for immediate help.
...
l.3 \lstset{language=Algol}
? x
x
No pages of output.
Transcript written on algol-article.log.
This is strange, because the previous code works if I use it from within
a Beamer's frame, and it produces the expected DVI file (or PDF, if
using pdflatex) :
\documentclass{beamer}
\usepackage{listings}
\lstset{language=Algol}
\begin{document}
\begin{frame}[fragile]
\begin{lstlisting}
program main ...
\end{lstlisting}
\end{frame}
\end{document}
I am facing similar issues when `language' is set to `[60]Algol', but
the error message mentions a problem with `keywordcommentsemicolon' this
time, instead of `keywordcomment'.
My installation uses Listings 1.4 and TeX Live (version 2009) from
Debian GNU/Linux current unstable distribution.
Thank you in advance for your help!
Best regards,
Roland Levillain
|