Seite 1 von 1

newLayout mit scrlayer-scrpage

Verfasst: Di 27. Feb 2024, 16:08
von MATKON75
Hallo Forum,

ich versuche gerade eine ZTV-Ing konformes Latex Layout zu erstellen (siehe Anhang).
Leider scheitere ich an der Kopf-/ Fusszeile bzw. an der geplanten Tabelle.
Der Rahmen inkl. Koordinaten ist wahrscheinlich auch deutlich einfacher zu erstellen.

Für Tipps und Hilfe bzw. den Schubs in die richtige Richtung vorab vielen Dank.
\documentclass[DIV=14]{scrreprt}
\usepackage[]{showframe}
\usepackage{tikz}

\setlength{\headheight}{10mm}
\setlength{\footheight}{8mm}

\newcommand\fsep{2mm}
\newcommand\fpAh{1in+\hoffset+\oddsidemargin-3mm}
\newcommand\fpAv{10mm}
\newcommand\fpBv{\paperheight-1in-\voffset-\topmargin}
\newcommand\fpBh{1in+\hoffset+\oddsidemargin+3mm+\textwidth}

\usepackage{scrlayer-scrpage}
\DeclareNewLayer[%
  background,% Hintergrundebene
  page,
  contents={%
    \begin{tikzpicture}%
    \useasboundingbox (current page.south west) rectangle (current page.north east);
    \draw[line width=1pt,orange] (\fpAh,\fpAv ) rectangle (\fpBh,\fpBv);
    \draw[line width=1pt,orange] (\fpAh,\fpAv+10mm) -- (\fpBh, \fpAv+10mm);
    \end{tikzpicture}    
    }%
 ]{frameTEST}


\AddLayersToPageStyle{scrheadings}{frameTEST}% nur beim Seitenstil empty


\usepackage{mwe}% Nur zur Demozwecken
\cfoot{test}
\chead{%
\centering
\begin{tabular*}{\textwidth}{@{\hspace{3mm}}p{0.3\textwidth}p{0.3\textwidth}p{0.4\textwidth}}
asdfsadf&afadsf&adfad \\ \hline
asdfsadf&afadsf&adfad \\ \hline
asdfsadf&afadsf&adfad \\
\end{tabular*}
}

\begin{document}
\pagestyle{scrheadings}


\Blindtext[10]
\end{document}

newLayout mit scrlayer-scrpage

Verfasst: Mi 28. Feb 2024, 14:33
von MATKON75
Hallo,
soweit bin ich gekommen.

Für Verbesserungsvorschläge bin ich dankbar.

\documentclass[a4paper, 12pt]{scrreprt}
%\usepackage{showframe}
\usepackage{comment}
\usepackage{tikz}
\usepackage{tabularx}
\usepackage{scrlayer-scrpage}
\usepackage[%
top=2.5cm,%
bottom=1.2cm,%
left=2.0cm,%
right=1cm, % 
includehead, 
includefoot]{geometry}
\addtokomafont{pagehead}{\sffamily}
\addtokomafont{pagefoot}{\sffamily}

\KOMAoptions{headwidth=\textwidth+6mm:-3mm}
\KOMAoptions{footwidth=\textwidth+6mm:-3mm}
\setlength{\headsep}{3mm}
\renewcommand{\chapterpagestyle}{scrheadings}
\renewcommand{\headfont}{\normalfont\sffamily}

%---------------------------------------------------
\newcommand\fsep{3mm}
\newcommand\fpAh{1in+\hoffset+\oddsidemargin-\fsep}

\newcommand\fpBv{\paperheight-1in-\voffset-\topmargin}
\newcommand\fpBh{1in+\hoffset+\oddsidemargin+\fsep+\textwidth}
\newcommand\fpAv{\footskip-\the\footheight-0.4mm}

\DeclareNewLayer[%
  background,% Hintergrundebene
  page,
  contents={%
    \begin{tikzpicture}%
    \useasboundingbox (0,0) rectangle (\paperwidth, \paperheight);
    \draw (\fpAh,\fpAv ) rectangle (\fpBh,\fpBv);
    \end{tikzpicture}    
    }%
 ]{frameTEST}
\AddLayersToPageStyle{scrheadings}{frameTEST}



\newlength{\headw}
\setlength{\headw}{\textwidth}
\addtolength{\headw}{6mm}

\chead{%
\begin{tabularx}{\the\headw}{%
@{\hspace{3mm}}%
p{0.3\textwidth}%
|p{0.3\textwidth}%
|X%
@{\hspace{3mm}}%
}
\hline
adsf&srtas&srtas\\  \hline
adsf&srtas&srtas\\  \hline
adsf&srtas&srtas \\ \hline
\end{tabularx}
}

\cfoot{%
\begin{tabularx}{\the\headw}{%
@{\hspace{3mm}}%
p{0.15\textwidth}%
|p{0.6\textwidth}%
|X%
@{\hspace{3mm}}%
}
\hline
\textbf{Bauteil}&srtas&Seite: \thepage\\  \hline
\textbf{Kapitel}&srtas& \\  
\end{tabularx}
}


\begin{document}
\chapter{test}
adsfasdf

\end{document}