Discussion:
Bug#475746: listings: 'Assembler' and 'Basic' languages don't work
(too old to reply)
Eugene V. Lyubimkin
2008-04-12 17:10:14 UTC
Permalink
Package: texlive-latex-base
Version: 2007-13
Severity: normal

The command

\begin{lstlisting}[language=Assembler]

or the command

\begin{lstlisting}[language=Basic]

produce an error:

! Package Listings Error: Couldn't load requested language.


-- Package-specific info:
If you report an error when running one of the TeX-related binaries
(latex, pdftex, metafont,...), or if the bug is related to bad or wrong
output, please include a MINIMAL example input file that produces the
error in your report. Don't forget to also include minimal examples of
other files that are needed, e.g. bibtex databases. Often it also helps
to include the logfile. Please, never send included pictures!

If your example file isn't short or produces more than one page of
output (except when multiple pages are needed to show the problem),
you can probably minimize it further. Instructions on how to do that
can be found at

http://www.latex-einfuehrung.de/mini-en.html (english)

or

http://www.latex-einfuehrung.de/mini.html (german)

##################################
minimal input file


##################################
other files

######################################
List of ls-R files

-rw-r--r-- 1 root root 842 2008-02-25 22:21 /var/lib/texmf/ls-R
lrwxrwxrwx 1 root root 29 2008-01-05 22:17 /usr/share/texmf/ls-R -> /var/lib/texmf/ls-R-TEXMFMAIN
lrwxrwxrwx 1 root root 27 2008-01-05 22:17 /usr/share/texmf-texlive/ls-R -> /var/lib/texmf/ls-R-TEXLIVE
lrwxrwxrwx 1 root root 27 2008-01-05 22:17 /usr/share/texmf-texlive/ls-R -> /var/lib/texmf/ls-R-TEXLIVE
######################################
Config files
lrwxrwxrwx 1 root root 20 2008-01-05 22:17 /usr/share/texmf/web2c/texmf.cnf -> /etc/texmf/texmf.cnf
-rw-r--r-- 1 root root 3905 2008-01-05 22:42 /var/lib/texmf/web2c/fmtutil.cnf
-rw-r--r-- 1 root root 7648 2008-01-05 22:42 /var/lib/texmf/web2c/updmap.cfg
-rw-r--r-- 1 root root 4795 2008-01-05 22:42 /var/lib/texmf/tex/generic/config/language.dat
######################################
Files in /etc/texmf/web2c/
total 4
-rw-r--r-- 1 root root 283 2007-11-23 18:52 mktex.cnf
######################################
md5sums of texmf.d
42c20d7e8bd343542772b5a145bf8ad8 /etc/texmf/texmf.d/05TeXMF.cnf
5f7f6652cc8b8071c9e4ea6ba9e9f0a1 /etc/texmf/texmf.d/15Plain.cnf
8ed54ce13b2eed4871e03bdfdace9342 /etc/texmf/texmf.d/45TeXinputs.cnf
ea33127256c6a9f37145ae5b16fdb80c /etc/texmf/texmf.d/55Fonts.cnf
afccf1d3f87057411166a77c58e00bd1 /etc/texmf/texmf.d/65BibTeX.cnf
9da7c1c7b1eaf06f941af91f48a23068 /etc/texmf/texmf.d/75DviPS.cnf
7ae52efac46feb97010986e57877d12e /etc/texmf/texmf.d/80DVIPDFMx.cnf
8fee79ccdd5d1f56b1563dabfd53c717 /etc/texmf/texmf.d/85Misc.cnf
a8952d594677235951d447665ec46e9c /etc/texmf/texmf.d/90TeXDoc.cnf
30f4f13357c2761ed01a6a15f28725a5 /etc/texmf/texmf.d/95NonPath.cnf

-- System Information:
Debian Release: lenny/sid
APT prefers unstable
APT policy: (500, 'unstable'), (1, 'experimental')
Architecture: amd64 (x86_64)

Kernel: Linux 2.6.22-2-amd64 (SMP w/2 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash

Versions of packages texlive-latex-base depends on:
ii texlive-base 2007-13 TeX Live: Essential programs and f
ii texlive-common 2007-13 TeX Live: Base component

Versions of packages texlive-latex-base recommends:
ii texlive-latex-base-doc 2007-13 TeX Live: Documentation files for

Versions of packages tex-common depends on:
ii debconf 1.5.14 Debian configuration management sy
ii ucf 3.003 Update Configuration File: preserv

Versions of packages texlive-latex-base is related to:
pn tetex-base <none> (no description available)
pn tetex-bin <none> (no description available)
pn tetex-extra <none> (no description available)
ii tex-common 1.10 common infrastructure for building

-- debconf information:
tex-common/check_texmf_wrong:
tex-common/check_texmf_missing:
--
To UNSUBSCRIBE, email to debian-bugs-dist-***@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact ***@lists.debian.org
Frank Küster
2008-04-15 18:40:10 UTC
Permalink
Post by Eugene V. Lyubimkin
Package: texlive-latex-base
Version: 2007-13
Severity: normal
The command
\begin{lstlisting}[language=Assembler]
or the command
\begin{lstlisting}[language=Basic]
! Package Listings Error: Couldn't load requested language.
You have to do it right, it seems you can't use languages with dialects
without specifiying one, even if there is only one:

\documentclass{article}
\usepackage{listings}


\begin{document}
foo

\begin{lstlisting}[language={[x86masm]Assembler}]
A
\end{lstlisting}

or the command

\begin{lstlisting}[language={[Visual]Basic}]
A
\end{lstlisting}
bar

\end{document}

However, it seems to me this could be clearer in the documentation. I
didn't read it like someone interested in the package, only like someone
interested in the bug - do you have a suggestion where this should be
explained?

Regards, Frank
--
Frank Küster
Debian Developer (teTeX/TeXLive)
Eugene V. Lyubimkin
2008-04-15 20:20:11 UTC
Permalink
Post by Frank Küster
Post by Eugene V. Lyubimkin
Package: texlive-latex-base
Version: 2007-13
Severity: normal
The command
\begin{lstlisting}[language=Assembler]
or the command
\begin{lstlisting}[language=Basic]
! Package Listings Error: Couldn't load requested language.
You have to do it right, it seems you can't use languages with dialects
\documentclass{article}
\usepackage{listings}
\begin{document}
foo
\begin{lstlisting}[language={[x86masm]Assembler}]
A
\end{lstlisting}
or the command
\begin{lstlisting}[language={[Visual]Basic}]
A
\end{lstlisting}
bar
\end{document}
However, it seems to me this could be clearer in the documentation. I
didn't read it like someone interested in the package, only like someone
interested in the bug - do you have a suggestion where this should be
explained?
Regards, Frank
Thanks, it works.

I didn't read official documentation. I've just mentioned that
'language=C++' works, but 'language=Basic' does not, so thought that it
is a bug.
I think this can be explained at section that tells about 'listings'
package, it would be logical.
--
Eugene V. Lyubimkin aka JackYF, Ukrainian C++ developer.
--
To UNSUBSCRIBE, email to debian-bugs-dist-***@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact ***@lists.debian.org
Manuel Pégourié-Gonnard
2008-04-15 21:40:16 UTC
Permalink
Hi,
Post by Eugene V. Lyubimkin
Post by Frank Küster
You have to do it right, it seems you can't use languages with dialects
I'm afraid this is a bit more complicated: you can use a language with
dialects without specifying one only if there is a default dialect for this
language (see table 1, p 12 of the doc). For example, there is a default
dialect for TeX, namely plain, so you can say :

\begin{lstlistings}[language=TeX]

But, somehow surprisingly, there is no predefined default dialect for Basic,
though there is only one dialect. Anyway, you can define a default dialect for
this language with

\lstset{defaultdialect=[Visual]Basic}

in your preamble for example.
Post by Eugene V. Lyubimkin
I think this can be explained at section that tells about 'listings'
package, it would be logical.
Hum, in LaTeX, each package has a separate documentation. For listings, the
documentation is in

/usr/share/doc/texlive-latex-recommended-doc/latex/listings/listings.pdf

and can easily be found by typing 'texdoc listings' in a terminal.

By the way, I would expect section 2.4 of the documentation to mention the
fact that the "optional" argument for the dialect is actually mandatory for
languages without predefined default dialect...

Best,
Manuel.

Loading...