
Здравствуйте, я хотел бы разместить слева от заголовка только "Kapitel X", где X = номер этого раздела ("Kapitel 3" или что-то еще). Справа я хотел бы разместить только название раздела без отметки. Сейчас я добился того, что второй вариант работает...
\documentclass[12pt]{scrartcl}
\usepackage[a4paper]{geometry}
\geometry{left=3.5cm,right=3.5cm,top=3cm,bottom=3cm}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[ngerman]{babel}
\usepackage{lmodern}
%% Kopf- und Fußzeile
\usepackage[headsepline,footsepline,automark]{scrlayer-scrpage}
\renewcommand*{\sectionmarkformat}{%
}
\clearscrheadfoot
\ohead[]{\headmark}
\ihead[]{Kapitel \sectionmark}
\setkomafont{pageheadfoot}{\sffamily}
\begin{document}
\section{Hauptteil}
\end{document}
решение1
\documentclass[12pt]{scrartcl}
\usepackage[a4paper]{geometry}
\geometry{left=3.5cm,right=3.5cm,top=3cm,bottom=3cm}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[ngerman]{babel}
\usepackage{lmodern}
%% Kopf- und Fußzeile
\usepackage[headsepline,footsepline,automark]{scrlayer-scrpage}
\renewcommand*{\sectionmarkformat}{Kapitel~\thesection\hfill}
\clearscrheadfoot
\ihead[]{\headmark}
\setkomafont{pageheadfoot}{\sffamily}
\begin{document}
\section{Hauptteil}
\end{document}