von Jakob_Wiesinger » So 15. Mär 2020, 13:46
Liebes Forum,
zur Zeit arbeite ich mit einem kleinen Team an der Veröffentlichung eines Sammelbandes. Dafür verwenden wir LaTex. Seit mehreren Wochen schieben wir folgendes Problem immer wieder auf, weil jeder Lösungsversuch scheiterte.
Unsere Kopfzeile rutscht bei Tabellen im Querformat immer auf die Mitte der Zeile. Jedoch nur bei einer der Seiten, wenn die Tabelle über zwei Seiten geht.
Hier mein MWE:
\documentclass[10pt,a5paper]{scrbook}
\usepackage[margin=1in]{geometry}
\makeatletter
\geometry{a5paper,left=1.8cm,right=1.8cm,top=2.3cm, bottom=1.8cm, bindingoffset=4mm, includehead=false, headsep = \dimexpr\Gm@tmargin-\headheight-8mm, includefoot=false, footskip = \dimexpr\Gm@bmargin-18mm}
% Autor
\usepackage{suffix}
\newcommand\chapterauthor[1]{\authortoc{#1}\printchapterauthor{#1}}
\WithSuffix\newcommand\chapterauthor*[1]{\printchapterauthor{#1}}
\newcommand{\printchapterauthor}[1]{%
{\parindent0pt\vspace*{-25pt}%
\linespread{1.1}\large\scshape#1%
\par\nobreak\vspace*{35pt}}
\@afterheading%
}
\newcommand{\authortoc}[1]{%
\addtocontents{toc}{\vskip-10pt}%
\addtocontents{toc}{%
\protect\contentsline{chapter}%
{\hskip1.3em\mdseries\scshape\protect\scriptsize#1}{}{0pt}}
\addtocontents{toc}{\vskip5pt}%
}
\makeatother
% Sprachen
\usepackage[english, ngerman]{babel}
%Kapitel
\usepackage[explicit]{titlesec}
\usepackage{fix-cm}
\usepackage{type1cm}
\usepackage{xcolor}
\titleformat{\chapter}[display]
{\bfseries\fontsize{25pt}{25pt}\selectfont}
{\flushright\fontsize{60}{0}\textbf{\textcolor{black!70}{~\thechapter\vskip0pt\rule{\textwidth}{2pt}}}}{0pt}
{\flushleft\fontsize{30}{0}{#1}\vskip60pt}
\titlespacing*{\chapter}
{0pt}{-40pt}{0pt}
\titleformat{\section}[display]
{\bfseries\fontsize{15pt}{15pt}\selectfont}
{\flushright\fontsize{60}{0}\textbf{\textcolor{black!70}{~\thechapter\vskip0pt\rule{\textwidth}{2pt}}}}{0pt}
{\flushleft\fontsize{30}{0}{#1}\vskip-0.9cm}
\titleformat{\subsection}[display]
{\bfseries\fontsize{12pt}{12pt}\selectfont}
{\flushright\fontsize{60}{0}\textbf{\textcolor{black!70}{~\thechapter\vskip0pt\rule{\textwidth}{2pt}}}}{0pt}
{\flushleft\fontsize{30}{0}{#1}\vskip-0.8cm}
%Tabellen
\usepackage{float}
\usepackage{adjustbox}
\usepackage{threeparttable}
\usepackage{array}
\usepackage{siunitx}
\usepackage{booktabs}
\usepackage{multirow}
\usepackage[printonlyused]{acronym}
\usepackage{textcomp}
\usepackage{titling}
\setlength{\droptitle}{-2cm}
\usepackage{longtable,tabularx,ltxtable}
\setlength{\LTleft}{0pt} %Longtable linksbündig
\usepackage{bm}
%Notes in tables
\usepackage{threeparttablex}
\usepackage{environ}
%Querformat
\usepackage{lscape}
\usepackage{ragged2e} % for \RaggedRight and \Centering macros
\newcolumntype{L}{>{\RaggedRight\arraybackslash}X} % flush-left, while allowing hyphenation
\newcolumntype{C}{>{\Centering\arraybackslash}X} % centered, while allowing hyphenation
%Nummerierung Tabellen
\usepackage[justification=justified,singlelinecheck=false]{caption}
\captionsetup[figure]{labelformat=empty}
%Fußnote
\let\svthefootnote\thefootnote
%Kopfzeile
\usepackage{fancyhdr}\pagestyle{fancy}
\renewcommand{\chaptermark}[1]{\markboth{#1}{}}
\renewcommand{\printchapterauthor}[1]{\markright{#1}}
\fancyhf{}
\fancyhead[RO, LE]{\thepage}
\fancyhead[RE]{\nouppercase{\rightmark}}
\fancyhead[LO]{\nouppercase{\leftmark}}
\renewcommand{\headrulewidth}{1pt}
\begin{document}
%Hauptteil: Beiträge
\mainmatter
\pagestyle{fancy}
\chapter[Title]{Title}
\vspace*{-2.75cm}
\huge Title
\vspace*{-1cm}
\markboth{Title}
\normalsize
\begin{flushright}
\chapterauthor{Name}
\end{flushright}
\begin{flushright}
\Large\textsc{Name}
\end{flushright}
\thispagestyle{empty}
\let\thefootnote\relax\footnote{\includegraphics[scale=0.015]{letter.png} \textit{Adress}}
\addtocounter{footnote}{-1}\let\thefootnote\svthefootnote
\vspace*{0.5cm}
\noindent\large \textbf{Abstract}
\normalsize
\noindent Text
\\ \\ \textbf{Schlagworte:} Text
\section*{Section}
Text
\begingroup
\setlength\textwidth\textheight
\begin{landscape}
\footnotesize
\setlength\tabcolsep{13pt}
\begin{ThreePartTable}
\begin{TableNotes}
\item \textsc{Source}: Text
\end{TableNotes}
\begin{longtable}{l c c}
\caption*{Caption} \\
\hline
\textbf{V} & \textbf{F} & \textbf{P} \\
\hline
\endfirsthead
\textbf{Text} & & \\
\insertTableNotes
\end{longtable}
\end{ThreePartTable}
\end{landscape}
\endgroup
\section*{Section}
Text
\backmatter
\end{document}
Vielen Dank und beste Grüße
Jakob Wiesinger
Liebes Forum,
zur Zeit arbeite ich mit einem kleinen Team an der Veröffentlichung eines Sammelbandes. Dafür verwenden wir LaTex. Seit mehreren Wochen schieben wir folgendes Problem immer wieder auf, weil jeder Lösungsversuch scheiterte.
Unsere Kopfzeile rutscht bei Tabellen im Querformat immer auf die Mitte der Zeile. Jedoch nur bei einer der Seiten, wenn die Tabelle über zwei Seiten geht.
Hier mein MWE:
[code]
\documentclass[10pt,a5paper]{scrbook}
\usepackage[margin=1in]{geometry}
\makeatletter
\geometry{a5paper,left=1.8cm,right=1.8cm,top=2.3cm, bottom=1.8cm, bindingoffset=4mm, includehead=false, headsep = \dimexpr\Gm@tmargin-\headheight-8mm, includefoot=false, footskip = \dimexpr\Gm@bmargin-18mm}
% Autor
\usepackage{suffix}
\newcommand\chapterauthor[1]{\authortoc{#1}\printchapterauthor{#1}}
\WithSuffix\newcommand\chapterauthor*[1]{\printchapterauthor{#1}}
\newcommand{\printchapterauthor}[1]{%
{\parindent0pt\vspace*{-25pt}%
\linespread{1.1}\large\scshape#1%
\par\nobreak\vspace*{35pt}}
\@afterheading%
}
\newcommand{\authortoc}[1]{%
\addtocontents{toc}{\vskip-10pt}%
\addtocontents{toc}{%
\protect\contentsline{chapter}%
{\hskip1.3em\mdseries\scshape\protect\scriptsize#1}{}{0pt}}
\addtocontents{toc}{\vskip5pt}%
}
\makeatother
% Sprachen
\usepackage[english, ngerman]{babel}
%Kapitel
\usepackage[explicit]{titlesec}
\usepackage{fix-cm}
\usepackage{type1cm}
\usepackage{xcolor}
\titleformat{\chapter}[display]
{\bfseries\fontsize{25pt}{25pt}\selectfont}
{\flushright\fontsize{60}{0}\textbf{\textcolor{black!70}{~\thechapter\vskip0pt\rule{\textwidth}{2pt}}}}{0pt}
{\flushleft\fontsize{30}{0}{#1}\vskip60pt}
\titlespacing*{\chapter}
{0pt}{-40pt}{0pt}
\titleformat{\section}[display]
{\bfseries\fontsize{15pt}{15pt}\selectfont}
{\flushright\fontsize{60}{0}\textbf{\textcolor{black!70}{~\thechapter\vskip0pt\rule{\textwidth}{2pt}}}}{0pt}
{\flushleft\fontsize{30}{0}{#1}\vskip-0.9cm}
\titleformat{\subsection}[display]
{\bfseries\fontsize{12pt}{12pt}\selectfont}
{\flushright\fontsize{60}{0}\textbf{\textcolor{black!70}{~\thechapter\vskip0pt\rule{\textwidth}{2pt}}}}{0pt}
{\flushleft\fontsize{30}{0}{#1}\vskip-0.8cm}
%Tabellen
\usepackage{float}
\usepackage{adjustbox}
\usepackage{threeparttable}
\usepackage{array}
\usepackage{siunitx}
\usepackage{booktabs}
\usepackage{multirow}
\usepackage[printonlyused]{acronym}
\usepackage{textcomp}
\usepackage{titling}
\setlength{\droptitle}{-2cm}
\usepackage{longtable,tabularx,ltxtable}
\setlength{\LTleft}{0pt} %Longtable linksbündig
\usepackage{bm}
%Notes in tables
\usepackage{threeparttablex}
\usepackage{environ}
%Querformat
\usepackage{lscape}
\usepackage{ragged2e} % for \RaggedRight and \Centering macros
\newcolumntype{L}{>{\RaggedRight\arraybackslash}X} % flush-left, while allowing hyphenation
\newcolumntype{C}{>{\Centering\arraybackslash}X} % centered, while allowing hyphenation
%Nummerierung Tabellen
\usepackage[justification=justified,singlelinecheck=false]{caption}
\captionsetup[figure]{labelformat=empty}
%Fußnote
\let\svthefootnote\thefootnote
%Kopfzeile
\usepackage{fancyhdr}\pagestyle{fancy}
\renewcommand{\chaptermark}[1]{\markboth{#1}{}}
\renewcommand{\printchapterauthor}[1]{\markright{#1}}
\fancyhf{}
\fancyhead[RO, LE]{\thepage}
\fancyhead[RE]{\nouppercase{\rightmark}}
\fancyhead[LO]{\nouppercase{\leftmark}}
\renewcommand{\headrulewidth}{1pt}
\begin{document}
%Hauptteil: Beiträge
\mainmatter
\pagestyle{fancy}
\chapter[Title]{Title}
\vspace*{-2.75cm}
\huge Title
\vspace*{-1cm}
\markboth{Title}
\normalsize
\begin{flushright}
\chapterauthor{Name}
\end{flushright}
\begin{flushright}
\Large\textsc{Name}
\end{flushright}
\thispagestyle{empty}
\let\thefootnote\relax\footnote{\includegraphics[scale=0.015]{letter.png} \textit{Adress}}
\addtocounter{footnote}{-1}\let\thefootnote\svthefootnote
\vspace*{0.5cm}
\noindent\large \textbf{Abstract}
\normalsize
\noindent Text
\\ \\ \textbf{Schlagworte:} Text
\section*{Section}
Text
\begingroup
\setlength\textwidth\textheight
\begin{landscape}
\footnotesize
\setlength\tabcolsep{13pt}
\begin{ThreePartTable}
\begin{TableNotes}
\item \textsc{Source}: Text
\end{TableNotes}
\begin{longtable}{l c c}
\caption*{Caption} \\
\hline
\textbf{V} & \textbf{F} & \textbf{P} \\
\hline
\endfirsthead
\textbf{Text} & & \\
\insertTableNotes
\end{longtable}
\end{ThreePartTable}
\end{landscape}
\endgroup
\section*{Section}
Text
\backmatter
\end{document}
[/code]
Vielen Dank und beste Grüße
Jakob Wiesinger