Zeilenumbruch und Fettschrift in Tabelle

Tabellen und Grafiken erstellen und anordnen


Thomas_74a
Forum-Fortgeschrittener
Forum-Fortgeschrittener
Beiträge: 50
Registriert: Mi 5. Jan 2011, 13:30

Zeilenumbruch und Fettschrift in Tabelle

Beitrag von Thomas_74a »

Hi,

ich versuche eine lange Tabelle (mehrere Seiten) zu erstellen. Leider funktioniert der Zeilenumbruch und die Fettschrift im Tabellenkopf nicht.
Ich habe auch versucht es mit supertabular zu machen habe da aber auch keine funktionierende Vorlage gefunden.
\begin{longtable}{l*{4}{l}}
\caption{Bezeichnung 1 qwertz} \\
  \tablehead \textbf{Bezeichnung 1 qwertz} &
	\tablehead \textbf{Bezeichnung 1 qwertz}	&
	\tablehead \textbf{Bezeichnung 1 qwertz}	&
	\tablehead \textbf{Bezeichnung 1 qwertz}	&
	\tablehead \textbf{Bezeichnung 1 qwertz} \tabularnewline
\endfirsthead
	\hline
	\multicolumn{5}{r}{\emph{- Fortsetzung auf der nächsten Seite -}}
\endfoot
	\hline
\endlastfoot
\itshape Beschreibung 	& Inhalt & Inhalt & Inhalt & Inhalt  \tabularnewline
\itshape Beschreibung   & Inhalt & Inhalt & Inhalt & Inhalt  \tabularnewline
\itshape Beschreibung   & Inhalt & Inhalt & Inhalt & Inhalt  \tabularnewline
\itshape Beschreibung   & Inhalt & Inhalt & Inhalt & Inhalt  \tabularnewline
\itshape Beschreibung   & Inhalt & Inhalt & Inhalt & Inhalt  \tabularnewline
\itshape Beschreibung   & Inhalt & Inhalt & Inhalt & Inhalt  \tabularnewline
\itshape Beschreibung   & Inhalt & Inhalt & Inhalt & Inhalt  \tabularnewline
\itshape Beschreibung   & Inhalt & Inhalt & Inhalt & Inhalt  \tabularnewline
\itshape Beschreibung   & Inhalt & Inhalt & Inhalt & Inhalt  \tabularnewline
\itshape Beschreibung   & Inhalt & Inhalt & Inhalt & Inhalt  \tabularnewline
\itshape Beschreibung   & Inhalt & Inhalt & Inhalt & Inhalt  \tabularnewline
\itshape Beschreibung   & Inhalt & Inhalt & Inhalt & Inhalt  \tabularnewline
\itshape Beschreibung   & Inhalt & Inhalt & Inhalt & Inhalt  \tabularnewline
\itshape Beschreibung   & Inhalt & Inhalt & Inhalt & Inhalt  \tabularnewline
\itshape Beschreibung   & Inhalt & Inhalt & Inhalt & Inhalt  \tabularnewline
\itshape Beschreibung   & Inhalt & Inhalt & Inhalt & Inhalt  \tabularnewline
\itshape Beschreibung   & Inhalt & Inhalt & Inhalt & Inhalt  \tabularnewline
\itshape Beschreibung   & Inhalt & Inhalt & Inhalt & Inhalt  \tabularnewline
\itshape Beschreibung   & Inhalt & Inhalt & Inhalt & Inhalt  \tabularnewline
\itshape Beschreibung   & Inhalt & Inhalt & Inhalt & Inhalt  \tabularnewline
\itshape Beschreibung   & Inhalt & Inhalt & Inhalt & Inhalt  \tabularnewline
\itshape Beschreibung   & Inhalt & Inhalt & Inhalt & Inhalt  \tabularnewline
\itshape Beschreibung   & Inhalt & Inhalt & Inhalt & Inhalt  \tabularnewline
\itshape Beschreibung   & Inhalt & Inhalt & Inhalt & Inhalt  \tabularnewline
\itshape Beschreibung   & Inhalt & Inhalt & Inhalt & Inhalt  \tabularnewline
\itshape Beschreibung   & Inhalt & Inhalt & Inhalt & Inhalt  \tabularnewline
\itshape Beschreibung   & Inhalt & Inhalt & Inhalt & Inhalt  \tabularnewline
\itshape Beschreibung   & Inhalt & Inhalt & Inhalt & Inhalt  \tabularnewline
\end{longtable}
Vielleicht hat ja jemand eine gute Funktionierende Vorlage für eine Tabelle die:
1. Zeilenumbrüche in den einzelnen Kästchen zulässt
2. Wo man Die Überschriften fett machen kann
3. Die über mehrere Seiten geht
4. Die eine Tabellenüberschrift hat
5. Die die Tabellenüberschrift mit ins Tabellenverzeichnis nimmt
6. Die keinen Blocksatz benutzt
7. Wo die inhalte der einzelnen Zellen nicht ineinander laufen
...

Langsam treiben mich die nicht funktionierenden LaTex Tabellen in den Wahnsinn und leider sahen alle gegoogelten Beispiele irgendwie Kacke aus ...

Falls jemand da eine Vorlage kennt die vorallem das mit dem Zeilenumbrechen hin kriegt wär ich echt Dankbar.

MfG Thomas

Benutzeravatar
bloodworks
Moderator
Moderator
Beiträge: 1425
Registriert: Mo 19. Jan 2009, 10:52
Wohnort: /dev/null

Beitrag von bloodworks »

Longtable kennt imo kein tablehead. Bitte mach immer ein Minimalbeispiel
\documentclass{report}

\usepackage{longtable, tabu,  booktabs}

\begin{document}
\vspace*{.5\textheight} % Ich will einen Seitenumbruch sehen
\newcolumntype{Y}{X[r]} % oder was du willst, l oder j sollten aber am besten sein
\begin{longtabu} to \textwidth {>{\itshape}YYYYY} % Wirklich italic? 
% Wir machen uns im übrigen mit den Column Argumenten das Leben leichter. 
\caption{Bezeichnung 1 qwertz} \\ 
\textbf{\textup{Bezeichnung 1 qwertz}} & 
\textbf{Bezeichnung 1 qwertz}   & 
    \textbf{Bezeichnung 1 qwertz}   & 
 \textbf{Bezeichnung 1 qwertz}   & 
  \textbf{Bezeichnung 1 qwertz} \\
\endfirsthead 
\midrule
   \multicolumn{5}{r}{\emph{- Fortsetzung auf der nächsten Seite -}} 
\endfoot 
\midrule
\endlastfoot 
 Beschreibung    & Inhalt & Inhalt & Inhalt & Inhalt  \\ % tabularnewline nicht nötig
 Beschreibung   & Inhalt & Inhalt & Inhalt & Inhalt  \tabularnewline 
 Beschreibung   & Inhalt & Inhalt & Inhalt & Inhalt  \tabularnewline 
 Beschreibung   & Inhalt & Inhalt & Inhalt & Inhalt  \tabularnewline 
 Beschreibung   & Inhalt & Inhalt & Inhalt & Inhalt  \tabularnewline 
 Beschreibung   & Inhalt & Inhalt & Inhalt & Inhalt  \tabularnewline 
 Beschreibung   & Inhalt & Inhalt & Inhalt & Inhalt  \tabularnewline 
 Beschreibung   & Inhalt & Inhalt & Inhalt & Inhalt  \tabularnewline 
 Beschreibung   & Inhalt & Inhalt & Inhalt & Inhalt  \tabularnewline 
 Beschreibung   & Inhalt & Inhalt & Inhalt & Inhalt  \tabularnewline 
 Beschreibung   & Inhalt & Inhalt & Inhalt & Inhalt  \tabularnewline 
 Beschreibung   & Inhalt & Inhalt & Inhalt & Inhalt  \tabularnewline 
 Beschreibung   & Inhalt & Inhalt & Inhalt & Inhalt  \tabularnewline 
 Beschreibung   & Inhalt & Inhalt & Inhalt & Inhalt  \tabularnewline 
 Beschreibung   & Inhalt & Inhalt & Inhalt & Inhalt  \tabularnewline 
 Beschreibung   & Inhalt & Inhalt & Inhalt & Inhalt  \tabularnewline 
 Beschreibung   & Inhalt & Inhalt & Inhalt & Inhalt  \tabularnewline 
 Beschreibung   & Inhalt & Inhalt & Inhalt & Inhalt  \tabularnewline 
 Beschreibung   & Inhalt & Inhalt & Inhalt & Inhalt  \tabularnewline 
 Beschreibung   & Inhalt & Inhalt & Inhalt & Inhalt  \tabularnewline 
 Beschreibung   & Inhalt & Inhalt & Inhalt & Inhalt  \tabularnewline 
 Beschreibung   & Inhalt & Inhalt & Inhalt & Inhalt  \tabularnewline 
 Beschreibung   & Inhalt & Inhalt & Inhalt & Inhalt  \tabularnewline 
 Beschreibung   & Inhalt & Inhalt & Inhalt & Inhalt  \tabularnewline 
 Beschreibung   & Inhalt & Inhalt & Inhalt & Inhalt  \tabularnewline 
 Beschreibung   & Inhalt & Inhalt & Inhalt & Inhalt  \tabularnewline 
 Beschreibung   & Inhalt & Inhalt & Inhalt & Inhalt  \tabularnewline 
 Beschreibung   & Inhalt & Inhalt & Inhalt & Inhalt  \tabularnewline 
\end{longtabu}


\listoftables% 2 mal LaTeX durchlaufen lassen!
\end{document}

1. Zeilenumbrüche in den einzelnen Kästchen zulässt -- check
2. Wo man Die Überschriften fett machen kann -- check
3. Die über mehrere Seiten geht -- check
4. Die eine Tabellenüberschrift hat --check
5. Die die Tabellenüberschrift mit ins Tabellenverzeichnis nimmt --check
6. Die keinen Blocksatz benutzt -- check
7. Wo die inhalte der einzelnen Zellen nicht ineinander laufen -- hä?
Falls jemand da eine Vorlage...
Ich lehne Vorlagen grundsätzlich ab, besonders solche für Leute die nicht wissen was sie tun... Eine ordentliche Einsteigerliteratur hilft da meines Erachtens mehr.
[1] Nützliche Webdokumente für Anfänger und Fortgeschrittene
[2]Minimalbeispiel | [3]FAQ
[4]Regelwerk | [5] Knigge
Wenn nicht anderst angegeben ist mein System: texlive 2012, pdflatex, x86-64, Snow Leopard utd.
Angehöriger der Liga zur Verwendung von texdoc
texdoc mathmode koma l2picfaq l2tabu lshort-en
Achtung: Aufforderungen ein Minimalbeispiel oder mehr Erklärungen zu einer Frage zu liefern sind keine persönlichen Angriffe. Sie dienen viel mehr dazu die Kommunikation zwischen Fragendem und potentiellen Helfern zu erleichtern und zu präzisieren.


Thomas_74a
Forum-Fortgeschrittener
Forum-Fortgeschrittener
Beiträge: 50
Registriert: Mi 5. Jan 2011, 13:30

Beitrag von Thomas_74a »

Hi,
ich hab das eingebaut und das funktioniert schon. Auf italic hab ich verzichtet und den Text linksbündig gemacht. Was ich noch nicht hin bekommen hab ist eine Spaltenbreite vorzugeben (um das Aussehen ein wenig zu pimpen). Außerdem Tauchten die Tabellenüberschriften nur auf der ersten Seite auf.
\begin{singlespacing}
\begin{small}
\newcolumntype{Y}{X[l]} 
\begin{longtabu} to \textwidth {YYYYY} 
		\caption{Bezeichnung 1 qwertz} \\
		\label{tab:Bezeichnung 1 qwertz}
		\toprule
		\textbf{\textup{Bezeichnung 1 qwertz}} &
		\textbf{Bezeichnung 1 qwertz}   &
                \textbf{Bezeichnung 1 qwertz}   &
 		\textbf{Bezeichnung 1 qwertz}   &
  	\textbf{Bezeichnung 1 qwertz} \\
  	\midrule
		\endfirsthead
		\multicolumn{5}{r}{\emph{- Fortsetzung auf der nächsten Seite -}}
		\endfoot
		\bottomrule
		\endlastfoot

....
P.S. meine Präambel:
\documentclass [a4paper, 12pt, openany,   headsepline, footsepline, twoside, listof=totoc, titlepage, bibliography=totoc] {scrbook}

\usepackage[ngerman]{babel}        
\usepackage[T1]{fontenc}        
\usepackage{amsmath}        
\usepackage{amsfonts}              
\usepackage{amssymb}                  
\usepackage[text={15cm,24cm},left=3cm,top=2cm]{geometry}                  
\usepackage{graphicx}                
\usepackage{float}                  
\usepackage{scrhack}                  
\usepackage{tabularx}            
\usepackage{longtable}      
\usepackage{supertabular}
\usepackage{booktabs}
\usepackage[hang,small,bf]{caption}      
\usepackage{color}                    
\usepackage{cite}                        
\usepackage[latin1]{inputenc}      
\setlength{\parindent}{0pt}        
\usepackage{totpages}                  
\usepackage{sectsty}  
\usepackage[thinspace,thinqspace,squaren,textstyle]{SIunits}
\usepackage{mathptmx}      
\usepackage[doublespacing]{setspace}
\usepackage{textcomp}
\usepackage{ragged2e}

\pagestyle{useheadings}      
\setlength{\headheight}{1.1\baselineskip}                                                        
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{document} 

Benutzeravatar
bloodworks
Moderator
Moderator
Beiträge: 1425
Registriert: Mo 19. Jan 2009, 10:52
Wohnort: /dev/null

Beitrag von bloodworks »

Jetzt würde ich dir mal raten die jeweiligen PaketDokus zu lesen.

\documentclass{report}

\usepackage{longtable, tabu,  booktabs}

\begin{document}
\vspace*{.5\textheight} % Ich will einen Seitenumbruch sehen
 % oder was du willst, l oder j sollten aber am besten sein
\begin{longtabu} to \textwidth {X[l,1.3]X[l]X[l]X[l]X[l]} % Lese dazu die tabu Doku 
\caption{Bezeichnung 1 qwertz} \\ 
\textbf{\textup{Bezeichnung 1 qwertz}} & 
\textbf{Bezeichnung 1 qwertz}   & 
    \textbf{Bezeichnung 1 qwertz}   & 
 \textbf{Bezeichnung 1 qwertz}   & 
  \textbf{Bezeichnung 1 qwertz} \\
\endfirsthead 
\caption{Bezeichnung 1 qwertz} \\ 
\textbf{\textup{Bezeichnung 1 qwertz}} & 
\textbf{Bezeichnung 1 qwertz}   & 
    \textbf{Bezeichnung 1 qwertz}   & 
 \textbf{Bezeichnung 1 qwertz}   & 
  \textbf{Bezeichnung 1 qwertz} \\
\endhead
\midrule
   \multicolumn{5}{r}{\emph{- Fortsetzung auf der nächsten Seite -}} 
\endfoot 
\midrule
\endlastfoot 
 Beschreibung    & Inhalt & Inhalt & Inhalt & Inhalt  \\ % tabularnewline nicht nötig
 Beschreibung   & Inhalt & Inhalt & Inhalt & Inhalt  \tabularnewline 
 Beschreibung   & Inhalt & Inhalt & Inhalt & Inhalt  \tabularnewline 
 Beschreibung   & Inhalt & Inhalt & Inhalt & Inhalt  \tabularnewline 
 Beschreibung   & Inhalt & Inhalt & Inhalt & Inhalt  \tabularnewline 
 Beschreibung   & Inhalt & Inhalt & Inhalt & Inhalt  \tabularnewline 
 Beschreibung   & Inhalt & Inhalt & Inhalt & Inhalt  \tabularnewline 
 Beschreibung   & Inhalt & Inhalt & Inhalt & Inhalt  \tabularnewline 
 Beschreibung   & Inhalt & Inhalt & Inhalt & Inhalt  \tabularnewline 
 Beschreibung   & Inhalt & Inhalt & Inhalt & Inhalt  \tabularnewline 
 Beschreibung   & Inhalt & Inhalt & Inhalt & Inhalt  \tabularnewline 
 Beschreibung   & Inhalt & Inhalt & Inhalt & Inhalt  \tabularnewline 
 Beschreibung   & Inhalt & Inhalt & Inhalt & Inhalt  \tabularnewline 
 Beschreibung   & Inhalt & Inhalt & Inhalt & Inhalt  \tabularnewline 
 Beschreibung   & Inhalt & Inhalt & Inhalt & Inhalt  \tabularnewline 
 Beschreibung   & Inhalt & Inhalt & Inhalt & Inhalt  \tabularnewline 
 Beschreibung   & Inhalt & Inhalt & Inhalt & Inhalt  \tabularnewline 
 Beschreibung   & Inhalt & Inhalt & Inhalt & Inhalt  \tabularnewline 
 Beschreibung   & Inhalt & Inhalt & Inhalt & Inhalt  \tabularnewline 
 Beschreibung   & Inhalt & Inhalt & Inhalt & Inhalt  \tabularnewline 
 Beschreibung   & Inhalt & Inhalt & Inhalt & Inhalt  \tabularnewline 
 Beschreibung   & Inhalt & Inhalt & Inhalt & Inhalt  \tabularnewline 
 Beschreibung   & Inhalt & Inhalt & Inhalt & Inhalt  \tabularnewline 
 Beschreibung   & Inhalt & Inhalt & Inhalt & Inhalt  \tabularnewline 
 Beschreibung   & Inhalt & Inhalt & Inhalt & Inhalt  \tabularnewline 
 Beschreibung   & Inhalt & Inhalt & Inhalt & Inhalt  \tabularnewline 
 Beschreibung   & Inhalt & Inhalt & Inhalt & Inhalt  \tabularnewline 
 Beschreibung   & Inhalt & Inhalt & Inhalt & Inhalt  \tabularnewline 
\end{longtabu}


\listoftables% " mal LaTeX durchlaufen lassen!
\end{document}
[1] Nützliche Webdokumente für Anfänger und Fortgeschrittene
[2]Minimalbeispiel | [3]FAQ
[4]Regelwerk | [5] Knigge
Wenn nicht anderst angegeben ist mein System: texlive 2012, pdflatex, x86-64, Snow Leopard utd.
Angehöriger der Liga zur Verwendung von texdoc
texdoc mathmode koma l2picfaq l2tabu lshort-en
Achtung: Aufforderungen ein Minimalbeispiel oder mehr Erklärungen zu einer Frage zu liefern sind keine persönlichen Angriffe. Sie dienen viel mehr dazu die Kommunikation zwischen Fragendem und potentiellen Helfern zu erleichtern und zu präzisieren.


Antworten