Hallo zusammen,
erstmal Danke für das ganze Feedback. Ich hab den Fehler für das Einrücken gefunden. Dieser beruht auf dem Befehl
\AtBeginDocument{\renewcommand{\ref}[1]{\mbox{\autoref{#1}}}}
\newlength{\abc}
\settowidth{\abc}{\space}
\addto\extrasngerman{
\renewcommand{\equationautorefname}{\hspace{-\abc}}
\renewcommand{\sectionautorefname}{Kapitel}
\renewcommand{\subsectionautorefname}{Kapitel}
\renewcommand{\subsubsectionautorefname}{Kapitel}
\renewcommand{\figureautorefname}{}
\renewcommand{\subfigureautorefname}{Abbildung}
\renewcommand{\tableautorefname}{}
%\renewcommand{\schemeautorefname}{}
}.
Wenn ich diese Befehle entferne, erhalte ich eine Kopfzeile, die nicht eingerückt ist. Wie muss ich das Umschreiben, damit der Fehler behoben wird?
Vielleicht hat hier jemand eine Idee?
Schon mal vielen Dank,
liebe Grüße
\documentclass[a4paper, twoside, openright, english,ngerman,bibliography=totoc,index=totoc,captions=tablehea
ding,toc=listofnumbered, listof=totoc]{scrbook}
%\RedeclareSectionCommand[tocnumwidth=3em]{chapter}
%\RedeclareSectionCommand[tocindent=1em,tocnumwidth=3.5em]{section}
\usepackage[left= 2.5cm,right = 2cm, bottom = 4 cm]{geometry}
\usepackage{lmodern}
\renewcommand{\sfdefault}{lmss}
\renewcommand{\ttdefault}{lmtt}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[ngerman]{babel}
\usepackage[hyphens]{url}
\urlstyle{same}
\usepackage{csquotes}
%\usepackage{selinput}
\usepackage[]{acronym} %Abk�rzugnsverzeichnis
\usepackage{caption}
\usepackage{subcaption}
\usepackage{textcomp,mathcomp} %degree
\usepackage{ragged2e}
%\usepackage{scrhack}
%\usepackage{microtype}
\setcounter{secnumdepth}{3}
%\renewcommand\thechapter{\Roman{chapter}} %r�mische Nummerieung
\setlength{\parskip}{\medskipamount}
\setlength{\parindent}{0pt}
%\renewcommand*{\chapterheadendvskip}{\newpage}
%\renewcommand*{\raggedchapter}{\raggedleft}
%\addtokomafont{chapter}{\rmfamily\scshape}
\usepackage{multirow}
\usepackage{longtable}
\usepackage{makecell}
\usepackage{xltabular} %longtable + tabularx
\usepackage{ltxtable}
\usepackage{textgreek} %griechische Buchstaben fett
%\usepackage{filecontents}
\usepackage{showframe}% blendet Seitenränder ein
%Kopf- und Fußzeile
\usepackage[headsepline]{scrlayer-scrpage}
\pagestyle{scrheadings}
%\clearpairofpagestyles
%\setkomafont{pageheadfoot}{\slshape}
%\ihead{Kopfzeile innen}
%\chead{Kopfzeile Mitte}
\ohead{\headmark} %TItel in Kopfzeile
\automark[section]{chapter} %Festlegung linke und rechte Seite
%\ifoot{Fußzeile innen}
%\cfoot{\pagemark}
%\ofoot{Fußzeile außen}
%%Referenzen
\usepackage[]{chemstyle}
\usepackage[style = chem-angew]{biblatex}
\DefineBibliographyStrings{ngerman}{
andothers = {\textit{et~al\adddot}}
}
\usepackage{amsmath}
\usepackage[version=4]{mhchem} %%Chemie- Zeugs%%
\usepackage{upgreek}
\usepackage[]{chemmacros}
\chemsetup{modules=spectroscopy,
spectroscopy/format={\bfseries}}
\usepackage{graphicx,epic}
\usepackage{overpic}
\usepackage{pdfpages}
\usepackage{float}
\usepackage{chemnum}
%\usepackage[]{epstopdf}
\usepackage[]{siunitx}
\sisetup{locale=DE,
}
%% Benutze gleiche Schriftarten wie im Textdetect-all
\DeclareSIUnit\bp{bp}
\DeclareSIUnit\rpm{rpm}
\DeclareSIUnit\rcf{rcf}
\DeclareSIUnit\bar{bar}
\DeclareSIUnit\Molar{M}
\DeclareSIUnit\angstrom{Å}
\usepackage{booktabs} %Tabellen%
\renewcommand{\arraystretch}{1.2}
\usepackage{tabularx}
\usepackage{pdflscape}
\usepackage{chngcntr} %Formeln durchnummieren
%\usepackage{subfig} %% Einf�gen Originalgr�sse , falls sie weniger breit als die Seite sind. Sonst wird das Bild auf Seitenbreite skaliert
%% Gegen die meisten Overfull hboxes, aus
%% dctt, Axel Reichert, Message-ID: <a84us0$plqcm$7@ID-30533.news.dfncis.de>
\tolerance 1414
\hbadness 1414
\emergencystretch 1.5em
\hfuzz 0.3pt
\widowpenalty=10000
\vfuzz \hfuzz
\raggedbottom
\newcommand{\uproman}[1]{\uppercase\expandafter{\romannumeral#1}} %römische Zahlen
\counterwithout{equation}{chapter}
\usepackage{amssymb}
\PassOptionsToPackage{hyphens}{url}
\usepackage{varioref}
\usepackage[unicode=true,
bookmarks=true,bookmarksnumbered=true,bookmarksopen=true,bookmarksopenlevel=1,
breaklinks=false,pdfborder={0 0 0},backref=false,colorlinks=false,breaklinks]
{hyperref}
\usepackage[noabbrev]{cleveref}
\hypersetup{}
\usepackage{url}
\makeatletter
\makeatletter\renewcommand*{\@pnumwidth}{4em}\makeatother %Kein Überschreiten der Seitenzahl in Verzeichnis
\makeatletter\renewcommand*{\@tocrmarg}{6em}\makeatother
\makeatletter\renewcommand*{\@dotsep }{1}\makeatother
% Linkfl�che f�r Querverweise vergr��ern und automatisch benennen
\AtBeginDocument{\renewcommand{\ref}[1]{\mbox{\autoref{#1}}}}
\newlength{\abc}
\settowidth{\abc}{\space}
\addto\extrasngerman{
\renewcommand{\equationautorefname}{\hspace{-\abc}}
\renewcommand{\sectionautorefname}{Kapitel}
\renewcommand{\subsectionautorefname}{Kapitel}
\renewcommand{\subsubsectionautorefname}{Kapitel}
\renewcommand{\figureautorefname}{}
\renewcommand{\subfigureautorefname}{Abbildung}
\renewcommand{\tableautorefname}{}
%\renewcommand{\schemeautorefname}{}
}
\let\myTOC\tableofcontents
\renewcommand\tableofcontents{%
\pdfbookmark[1]{\contentsname}{}
\myTOC
\mainmatter }
\newfloat{Gleichung}{htbp}{equ}[chapter]
\newcommand{\listequationsname}{Formelverzeichnis}
%
% make caption labels bold
\setkomafont{captionlabel}{\bfseries}
\setcapindent{1em}
% erlaubt LaTeX-Berechnungen
\usepackage{calc}
%Anhang
\makeatletter
\newcommand\appendix@chapter[1]{%
\refstepcounter{chapter}%
\def\app@ct{Anhang \@Alph\c@chapter: #1}
\orig@chapter*{\app@ct}%
\markboth{\app@ct}{\app@ct}
\addcontentsline{toc}{chapter}{\app@ct}%
}
\let\orig@chapter\chapter
\g@addto@macro\appendix{\let\chapter\appendix@chapter}
\makeatother
% Vergr��ert den Teil der Seite, in dem Gleitobjekte
% unten angeordnet werden d�rfen
\renewcommand{\bottomfraction}{0.5}
% Vermeidet, dass Gleitobjekte vor ihrem Abschnitt gedruckt werden
\let\mySection\section\renewcommand{\section}{\suppressfloats[t]\mySection}
\usepackage{blindtext}
\begin{document}
\Blinddocument
\end{document}