Seite 1 von 1

ltablex in Kombination mit tabularx

Verfasst: Di 8. Mai 2012, 12:15
von Max Grabner
Folgendes "minimalbeispiel"
\documentclass[11pt]{scrartcl}
.
.
.
\usepackage[ngerman]{babel}
\usepackage[T1]{fontenc}
\usepackage[ansinew]{inputenc}
\usepackage{float}
\usepackage{lmodern}
\usepackage{picinpar}
\usepackage{color}
\usepackage{colortbl}	
\usepackage{fix-cm}
%\usepackage{tabularx}
\usepackage[textheight=620pt, footskip=90pt]{geometry} 
\usepackage{ltablex}
\newcommand{\changefont}[3]{
\fontfamily{#1} \fontseries{#2} \fontshape{#3} \selectfont}
.
.
.
\begin{document}
.
.
.
\begin{flushleft}
\begin{tabularx}{\textwidth}[H]{@{\extracolsep{\fill}}|l|X|}
	\hline
	\cellcolor{dunkelgrau}\textbf{Blaaaa} & blaaaaaaaaaaaaaaaaaaaa\\
	\hline
	\cellcolor{dunkelgrau}\textbf{Blaaaa} & blaaaaaaaaa\\
	\hline
	\cellcolor{dunkelgrau}\textbf{Blaaaa} & blaaaaaaaaaaaa\\
	\hline
	\cellcolor{dunkelgrau}\textbf{Blaaa} & blaaaaaaaaaaaaaaa\\
	\hline
	\cellcolor{dunkelgrau}\textbf{Blablabla} & blaaaaaaaaaaaaaaa\\
	\hline
\end{tabularx} 
\end{flushleft}

Leider bekomme ich stets für jede Tabellenzelle eine Fehlemeldung:

! Missing \endgroup inserted.
<inserted text> 
                \endgroup 
l.183 \end{tabularx}
                    
I've inserted something that you may have forgotten.
(See the <inserted text> above.)
With luck, this will get me unwedged. But if you
really didn't forget anything, try typing `2' now; then
my insertion and my current dilemma will both disappear.

! Missing \endgroup inserted.
<inserted text> 
                \endgroup 
l.183 \end{tabularx}
                    
I've inserted something that you may have forgotten.
(See the <inserted text> above.)
With luck, this will get me unwedged. But if you
really didn't forget anything, try typing `2' now; then
my insertion and my current dilemma will both disappear.


! Missing \cr inserted.
<inserted text> 
                \cr 
l.183 \end{tabularx}
                    
I'm guessing that you meant to end an alignment here.

! Missing { inserted.
<inserted text> 
                {
l.183 \end{tabularx}
                    
I've put in what seems to be necessary to fix
the current column of the current alignment.
Try to go on, since this might almost work.

! Missing { inserted.
<inserted text> 
                {
l.183 \end{tabularx}
                    
I've put in what seems to be necessary to fix
the current column of the current alignment.
Try to go on, since this might almost work.

! Missing } inserted.
<inserted text> 
                }
l.183 \end{tabularx}
                    
I've inserted something that you may have forgotten.
(See the <inserted text> above.)
With luck, this will get me unwedged. But if you
really didn't forget anything, try typing `2' now; then
my insertion and my current dilemma will both disappear.

! Missing } inserted.
<inserted text> 
                }
l.183 \end{tabularx}
                    
I've inserted something that you may have forgotten.
(See the <inserted text> above.)
With luck, this will get me unwedged. But if you
really didn't forget anything, try typing `2' now; then
my insertion and my current dilemma will both disappear.

! Missing } inserted.
<inserted text> 
                }
l.183 \end{tabularx}
                    
I've inserted something that you may have forgotten.
(See the <inserted text> above.)
With luck, this will get me unwedged. But if you
really didn't forget anything, try typing `2' now; then
my insertion and my current dilemma will both disappear.

! Missing \cr inserted.
<inserted text> 
                \cr 
l.183 \end{tabularx}
                    
I'm guessing that you meant to end an alignment here.

! Misplaced \cr.
<inserted text> \cr 
                    
l.183 \end{tabularx}
                    
I can't figure out why you would want to use a tab mark
or \cr or \span just now. If something like a right brace
up above has ended a previous alignment prematurely,
you're probably due for more error messages, and you
might try typing `S' now just to see what is salvageable.

! Missing \cr inserted.
<inserted text> 
                \cr 
l.183 \end{tabularx}
                    
I'm guessing that you meant to end an alignment here.
...usw...
hatt jemand eine ahnung wieso???
Danke schonmal im Voraus[color=#][/color]

Verfasst: Di 8. Mai 2012, 12:17
von Max Grabner
\definecolor{dunkelgrau}{rgb}{0.8,0.8,0.8}
\definecolor{hellgrau}{rgb}{0.95,0.95,0.95}
hab ich im codebeispiel vergessen....

Verfasst: Di 8. Mai 2012, 15:24
von Sepp99
Die Fehlermeldungen können aber nicht aus deinem Beispiel stammen, denn dieses läuft bei Ergänzung mit der Farbdefinition und mit
\end{document}
fehlerfrei durch.
Sepp.-

Verfasst: Di 8. Mai 2012, 15:55
von Max Grabner
Mhhh...komisch...

habs jetzt so gelöst:
\usepackage{forloop}
\newcounter{count}
\setcounter{count}{1}
und für die tabellen:
\begin{filecontents*}{TAB\arabic{count}.tex}
\begin{longtable}{@{\extracolsep{\fill}}|X|X|}
	\hline
	TEXT & TEXT\\
	\hline
	TEXT & TEXT\\
	\hline
	TEXT & TEXT\\
	\hline
	TEXT & TEXT\\
	\hline
	TEXT & TEXT\\
	\hline
\end{longtable} 
\end{filecontents*}
\LTXtable{\textwidth}{TAB\arabic{count}}
Ich kann mir nicht erklären wieso es vorher nicht geklappt hat.
Schade ist noch, dass mit der aktuellen Lösung zwar Zeilenumbrüche innerhalb einer Zelle gut gehen und Seitenumbrüche innerhalb der Tabelle,
Seitenumbrüche innerhalb einer Zelle aber leider nicht.
Bleibt wohl nur der mauelle Seitenumbruch. Oder hat noch wer eine bessere Idee??

Verfasst: Di 8. Mai 2012, 15:57
von Max Grabner
Ja und natürlich
\usepackage{ltxtable,filecontents}
nicht zu vergessen