Longtable Thema ist als GELÖST markiert

Tabellen und Grafiken erstellen und anordnen


basti-fantasti-48
Forum-Century
Forum-Century
Beiträge: 151
Registriert: So 4. Apr 2021, 14:27

Longtable

Beitrag von basti-fantasti-48 »


\documentclass{article}			

\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage[ngerman]{babel}
\usepackage{lmodern} 		
\renewcommand{\familydefault}{\sfdefault} 
\usepackage{sansmath}  
\sansmath 						 
\usepackage{microtype}	
\usepackage{csquotes}	

\usepackage[
  backend=biber,			
  style=numeric-comp,	
  block=ragged,
  ]{biblatex}

\addbibresource{ref/Bibliothek.bib}

\usepackage{booktabs}
\usepackage{amsmath,amssymb}
\hyphenation{Crash-zo-ne}

\usepackage[headsepline,automark]{scrlayer-scrpage}
\clearpairofpagestyles
\ihead{\rightmark}
\cfoot{\pagemark}
\renewcommand*\chaptermarkformat{}
\renewcommand*\chapterpagestyle{scrheadings}
\usepackage{chngcntr}
\counterwithout{equation}{section} 
\counterwithout{equation}{chapter}
\counterwithout{figure}{section}
\counterwithout{figure}{chapter}
\counterwithout{table}{section}
\counterwithout{table}{chapter}

\usepackage{pgfkeys}
\usepackage{tikz}
\usepackage{pgfplots}\pgfplotsset{compat=newest}
\usetikzlibrary{arrows.meta,positioning,calc}

 \usepackage{longtable} 

\pgfplotsset{select coords between index/.style 2 args={
		x filter/.code={
			\ifnum\coordindex<#1\def\pgfmathresult{}\fi
			\ifnum\coordindex>#2\def\pgfmathresult{}\fi
		}
}}
\usepackage{subcaption}
\usepackage{pdfpages}
\usepackage{acronym}
\usetikzlibrary{arrows, decorations.markings}
\makeatletter
\tikzset{
    nomorepostaction/.code=\makeatletter\let\tikz@postactions\pgfutil@empty,
    my axis/.style={
        postaction={
            decoration={
                markings,
                mark=at position 1 with {
                    \arrow[ultra thick]{latex}
                }
            },
            decorate,
            nomorepostaction
        },
        thin,
        -, % switch off other arrow tips
        every path/.append style=my axis % this is necessary
          %so it works both with "axis lines=left" and "axis lines=center"
    }
}
\makeatother

\usepackage{listings}
\usepackage{matlab-prettifier}


\renewcommand*{\chapterheadstartvskip}{\vspace*{-1\baselineskip}}
\renewcommand*\chapterheadendvskip{%
	\vspace*{1\baselineskip plus -1\baselineskip minus .167\baselineskip}}

\begin{document}
\begin{longtable}[htbp]
	\centering
	
	\begin{tabular}{p{2cm} p{4cm} p{4cm} }
		\toprule
		erste Spalte & zweite Spalten & dritte Spalte \\
		\midrule
		Ganz viel Text der nicht in eine Zeile passt&  text & Zentrierter Text\\
		Ganz viel Text der nicht in eine Zeile passt &   text & Zentrierter Text\\
		Ganz viel Text der nicht in eine Zeile passt & text &  Zentrierter Text \\
		
		\bottomrule
	\end{tabular}
	\caption{Grenzwerte der Metriken in Abhängigkeit des ASIL-Levels}
	\label{grenzasil}
\end{longtable} 
\end{document}
Zuletzt geändert von basti-fantasti-48 am Mi 20. Mär 2024, 08:47, insgesamt 12-mal geändert.

Benutzeravatar
Stefan Kottwitz
Admin
Admin
Beiträge: 2534
Registriert: Di 8. Jul 2008, 00:39
Kontaktdaten:

Re: Longtable

Beitrag von Stefan Kottwitz »

Ich sehe hier keine m-Spalten wo es falsch aussähe, und alle Zellen sind nur einzeilig und damit in der Höhe an der Grundlinie ausgerichtet. Das ist vllt. nicht ein richtiges Beispiel, irgendwas kopiert und nicht getestet? Beim Übersetzen wirft es auch Fehlermeldungen.

Stefan

basti-fantasti-48
Forum-Century
Forum-Century
Beiträge: 151
Registriert: So 4. Apr 2021, 14:27

Re: Longtable

Beitrag von basti-fantasti-48 »

weiß nicht warum es nicht kompiliiert. Es sollte schon mehrzeilig sein

Benutzeravatar
Stefan Kottwitz
Admin
Admin
Beiträge: 2534
Registriert: Di 8. Jul 2008, 00:39
Kontaktdaten:

Re: Longtable

Beitrag von Stefan Kottwitz »

basti-fantasti-48 hat geschrieben:
Di 19. Mär 2024, 12:08
weiß nicht warum es nicht kompiliiert. Es sollte schon mehrzeilig sein
Vorhin, vor Deinem Editieren, war noch \usepackage{tabular} drin (Paket nicht gefunden) und booktabs wurde nicht geladen. Jetzt kommt ein Fehler hier
\renewcommand{\familydefault}{\sfdefault} ft
! LaTeX Error: Missing \begin{document}.

See the LaTeX manual or LaTeX Companion for explanation.
Type H <return> for immediate help.
...

l.16 \renewcommand{\familydefault}{\sfdefault} f
t
?
! Emergency stop.
Außerdem wird in der jetzigen Version des obigen Codes das longtable-Paket nicht geladen, was wieder Fehler bringt.

Sorry, Du wirfst uns hier Code-Stücke rein die irgendwie teils kopiert/erstellt sind und unvollständig, wie sollen wir dann so einen spezifischen anderen Fehler finden, wenn es nichtmal testbar ist?

Stefan

basti-fantasti-48
Forum-Century
Forum-Century
Beiträge: 151
Registriert: So 4. Apr 2021, 14:27

Re: Longtable

Beitrag von basti-fantasti-48 »

Bin am verbessern aber es ist genauso in meiner Arbeit

basti-fantasti-48
Forum-Century
Forum-Century
Beiträge: 151
Registriert: So 4. Apr 2021, 14:27

Re: Longtable

Beitrag von basti-fantasti-48 »

Habe alles genau wie in meinem Dokument es kompiliert nicht.

basti-fantasti-48
Forum-Century
Forum-Century
Beiträge: 151
Registriert: So 4. Apr 2021, 14:27

Re: Longtable

Beitrag von basti-fantasti-48 »

\documentclass[jou,apacite]{apa6}
\usepackage{multirow}
\usepackage{array}
\newcolumntype{P}[1]{>{\centering\arraybackslash}p{#1}}
\usepackage{longtable}

\usepackage{showframe} % to visualize writing area and margins ...
\usepackage{blindtext} % to generate dummy text


\begin{document}


\renewcommand{\arraystretch}{1.3}

\begin{longtable}{|p{2.8cm}|p{0.6cm}|p{1.6cm}|p{2.2cm}|P{0.8cm}|p{2.6cm}|p{2.5cm}|}
\caption{My data}
\label{tab:table3}\\
\hline
\textbf{Name} & \textbf{Year} & \textbf{ID} & \textbf{Address} & \textbf{Salary} & \textbf{Skills} & \textbf{Qualifications} \\
\hline
Some text & some text & some text & 5 & some text & Som text &\\
\hline
Some text & some text & some text & 5 & some text & Som text &\\
\hline
Some text & some text & some text & 5 & some text & Som text &\\
\hline
Some text & some text & some text & 5 & some text & Som text &\\
\hline
Some text & some text & some text & 5 & some text & Som text &\\
\hline
Some text & some text & some text & 5 & some text & Som text &\\
\hline
Some text & some text & some text & 5 & some text & Som text &\\
\hline
Some text & some text & some text & 5 & some text & Som text &\\
\hline
Some text & some text & some text & 5 & some text & Som text &\\
\hline
\end{longtable}

\end{document}
so jetzt
Der Text unter Skills soll zentral sein

Antworten