PDA

Archiv verlassen und diese Seite im Standarddesign anzeigen : Latex-Problem (evtl. mit listings)



DAB268
18-12-2006, 15:18
Hi.

Folgender Fehler kommt bei mir beim kompilieren eines Latex Dokuments. Ich versteh nicht, warum. Hoffe ihr könnt mir helfen. Am Code kann es nicht liegen, da andere Leute es kompiliert bekommen.

Der Fehler liegt definitiv an den Optionen dieser Zeile:
\begin{lstlisting}[caption={Frame header example, file MyFrame.h}]
ohne diese Optionen geht es. Nur warum meckert teTeX (nur um mal so nebenbei die Latex-Distri zu nennen) da?

! Undefined control sequence.
<recently read> \@makecaption

l.1 ...ion={Frame header example, file MyFrame.h}]

?

Hier mein Minimalbeispiel:


\documentclass[compress]{beamer}

\usetheme{Dresden}
\usepackage{ngerman}
\usepackage[latin1]{inputenc}
\usepackage{graphicx}
\usepackage{color}
\usepackage{verbatim}
\usepackage{multimedia}
\usepackage{listings}

\begin{document}

\begin{frame}[fragile]
\begin{lstlisting}[caption={Frame header example, file MyFrame.h}]
//...
#ifndef MyFrame_H
#define MyFrame_H
#include <QLabel>
#include <QGridLayout>
#include "../GuiExtensionR6/RFrame.h"
/**
* This class implements a green frame
*/
class MyFrame : public RFrame{
Q_OBJECT // Needed for signals and slots
public:
MyFrame(QWidget *parent = 0);
~MyFrame();
\end{lstlisting}
\end{frame}

\end{document}

MfG
DAB268

localghost
18-12-2006, 15:52
In deiner caption steht ein Komma, das dort nicht stehen darf. Im optionalen Argument der lstlisting-Umgebung werden aber so die möglichen optionalen Parameter getrennt.

\begin{lstlisting}[caption={Frame header example, file MyFrame.h}]

\end{lstlisting}
So ist es auch in der Dokumentation zum Paket listings (ftp://dante.ctan.org/tex-archive/help/Catalogue/entries/listings.html) zu lesen. Du musst also anders formulieren. Damit ist der Fehler vielleicht schon behoben.

DAB268
18-12-2006, 17:01
Hmm. Seltsam. Bei anderen lässt es sich so kompilieren. Werde ich jetzt dadurch gestarft, dass ich den genausten Kompiler hab? ^^

localghost
18-12-2006, 17:51
Nun, wenn es sich genauso bei Anderen bearbeiten lässt, ist die Sache wohl verzwickter. Wie aktuell sind denn deine Pakete?

DAB268
18-12-2006, 17:59
Wie bekomme ich denn am besten eine Auflistung dieser unter Linux?

sofa-surfer
18-12-2006, 18:32
Halllo,

du setzt ein \listfiles vor das \documentclass{xxx}.

Matthias

daswaldhorn
18-12-2006, 19:29
Hallo,
du setzt ein \listfiles vor das \documentclass{xxx}.... und schaust in die *.log-Datei, denn in deinem Dokument landet das nicht ;)

Grüße, Carsten

DAB268
18-12-2006, 22:11
Das ist die Ausgabe:

*File List*
beamer.cls 2006/05/09 cvs version 3.06 A class for typesetting presentatio
ns (rcs-revision 1.1)
beamerbasercs.sty 2006/05/09 (rcs-revision 1.1)
beamerbasemodes.sty 2006/05/09 (rcs-revision 1.1)
beamerbasedecode.sty 2006/05/09 (rcs-revision 1.1)
beamerbaseoptions.sty 2006/05/09 (rcs-revision 1.1)
keyval.sty 1999/03/16 v1.13 key=value parser (DPC)
pgfcore.sty 2006/05/09 v1.01 (rcs-revision 1.1)
graphicx.sty 1999/02/16 v1.0f Enhanced LaTeX Graphics (DPC,SPQR)
graphics.sty 2001/07/07 v1.0n Standard LaTeX Graphics (DPC,SPQR)
trig.sty 1999/03/16 v1.09 sin cos tan (DPC)
graphics.cfg 2005/02/03 v1.3 graphics configuration of teTeX/TeXLive
dvips.def 1999/02/16 v3.0i Driver-dependant file (DPC,SPQR)
pgfsys.sty 2006/05/09 v1.01 (rcs-revision 1.1)
pgfrcs.sty 2006/05/09 v1.01 (rcs-revision 1.1)
pgfrcs.code.tex
pgfsys.code.tex
pgfsys-dvips.def
pgfsyssoftpath.code.tex
pgfsysprotocol.code.tex
xcolor.sty 2004/07/04 v2.00 LaTeX color extensions (UK)
color.cfg 2005/02/03 v1.3 color configuration of teTeX/TeXLive
pgfcore.code.tex
pgfbaseimage.sty 2006/05/09 v1.01 (rcs-revision 1.1)
pgfbaseimage.code.tex
xxcolor.sty 2003/10/24 ver 0.1
amssymb.sty 2002/01/22 v2.2d
amsfonts.sty 2001/10/25 v2.2f
geometry.sty 2002/07/08 v3.2 Page Geometry
geometry.cfg
hyperref.sty 2003/11/30 v6.74m Hypertext links for LaTeX
pd1enc.def 2003/11/30 v6.74m Hyperref: PDFDocEncoding definition (HO)
hyperref.cfg 2002/06/06 v1.2 hyperref configuration of TeXLive and teTeX
url.sty 2004/03/15 ver 3.1 Verb mode for urls, etc.
hdvips.def 2003/11/30 v6.74m Hyperref driver for dvips
pdfmark.def 2003/11/30 v6.74m Hyperref definitions for pdfmark specials
size11.clo 2004/02/16 v1.4f Standard LaTeX file (size option)
beamerbasecompatibility.sty 2006/05/09 (rcs-revision 1.1)
beamerbasefont.sty 2006/05/09 (rcs-revision 1.1)
beamerbasemisc.sty 2006/05/09 (rcs-revision 1.1)
beamerbasetwoscreens.sty 2006/05/09 (rcs-revision 1.1)
beamerbaseoverlay.sty 2006/05/09 (rcs-revision 1.1)
beamerbasetitle.sty 2006/05/09 (rcs-revision 1.1)
beamerbasesection.sty 2006/05/09 (rcs-revision 1.1)
beamerbaseframe.sty 2006/05/09 (rcs-revision 1.1)
beamerbaseverbatim.sty 2006/05/09 (rcs-revision 1.1)
beamerbaseframesize.sty 2006/05/09 (rcs-revision 1.1)
beamerbaseframecomponents.sty 2006/05/09 (rcs-revision 1.1)
beamerbasecolor.sty 2006/05/09 (rcs-revision 1.1)
beamerbasenotes.sty 2006/05/09 (rcs-revision 1.1)
beamerbasetoc.sty 2006/05/09 (rcs-revision 1.1)
beamerbasetemplates.sty 2006/05/09 (rcs-revision 1.1)
beamerbaseauxtemplates.sty 2006/05/09 (rcs-revision 1.1)
beamerbaseboxes.sty 2006/05/09 (rcs-revision 1.1)
beamerbaselocalstructure.sty 2006/05/09 (rcs-revision 1.1)
enumerate.sty 1999/03/05 v3.00 enumerate extensions (DPC)
beamerbasenavigation.sty 2006/05/09 (rcs-revision 1.1)
beamerbasetheorems.sty 2006/05/09 (rcs-revision 1.1)
amsmath.sty 2000/07/18 v2.13 AMS math features
amstext.sty 2000/06/29 v2.01
amsgen.sty 1999/11/30 v2.0
amsbsy.sty 1999/11/29 v1.2d
amsopn.sty 1999/12/14 v2.01 operator names
amsthm.sty 2004/08/06 v2.20
beamerbasethemes.sty 2006/05/09 (rcs-revision 1.1)
beamerthemedefault.sty 2006/05/09 (rcs-revision 1.1)
beamerfontthemedefault.sty 2006/05/09 (rcs-revision 1.1)
beamercolorthemedefault.sty 2006/05/09 (rcs-revision 1.1)
beamerinnerthemedefault.sty 2006/05/09 (rcs-revision 1.1)
beamerouterthemedefault.sty 2006/05/09 (rcs-revision 1.1)
beamerthemeDresden.sty 2006/05/09 (rcs-revision 1.1)
beamerouterthememiniframes.sty 2006/05/09 (rcs-revision 1.1)
beamercolorthemewhale.sty 2006/05/09 (rcs-revision 1.1)
ngerman.sty 1998/07/08 v2.5e Support for writing german texts (br)
inputenc.sty 2004/02/05 v1.0d Input encoding file
latin1.def 2004/02/05 v1.0d Input encoding file
verbatim.sty 2003/08/22 v1.5q LaTeX2e package for verbatim enhancements
multimedia.sty 2004/04/10 ver 0.01
listings.sty 2002/04/01 1.0 (Carsten Heinz)
lstpatch.sty 2002/10/13 1.0i (Carsten Heinz)
lstmisc.sty 2002/04/01 1.0 (Carsten Heinz)
listings.cfg 2002/04/01 v1.0 listings configuration
nameref.sty 2003/12/03 v2.21 Cross-referencing by name of section
umsa.fd 2002/01/19 v2.2g AMS font definitions
umsb.fd 2002/01/19 v2.2g AMS font definitions
images/robbie6_freigestellt.eps
images/robbie6_freigestellt.eps
images/coreArchitecture.eps
vortrag.vrb
images/coreArchitecture.eps
images/robbie6_freigestellt.eps
vortrag.vrb
vortrag.vrb
vortrag.vrb
vortrag.vrb
vortrag.vrb
vortrag.vrb
vortrag.vrb
vortrag.vrb
vortrag.vrb
vortrag.vrb
images/robbie6_freigestellt.eps
vortrag.vrb
vortrag.vrb
images/qtarch.eps
vortrag.vrb
vortrag.vrb
vortrag.vrb
vortrag.vrb
vortrag.vrb
vortrag.vrb
vortrag.vrb
vortrag.vrb
vortrag.vrb
vortrag.vrb
vortrag.vrb
vortrag.vrb
vortrag.vrb
***********

sofa-surfer
18-12-2006, 22:15
Also wenn ich das richtig sehe, dann hast du eine alte Version vom listings-Paket. Aktuell ist 1.3 (?) Du hast 1.0
Also mal updaten ...

Matthias

DAB268
18-12-2006, 22:25
ok, also einfach das alte löschen und neu installieren. in welchen Ordner denn? Habe listings in verschiedenen texmf trees drin einmal "texmf" und einmal "texmf-tetex". Der Rest des Pfades /usr/.... ist identisch.

daswaldhorn
18-12-2006, 22:41
Hallo,

installiere es in deinen lokalen texmf/-Ordner, also ~/texmf/tex/latex/listings wäre das zum Beispiel. Zum Schluss noch ein texhash auf der Konsole und schon klappt es.

Zu diesem Thema findest du auch schon genug Beiträge über die Suchfunktion.

Grüße, Carsten