In this code
\documentclass[11pt]{article}
\usepackage{amsmath}
\usepackage[ngerman]{babel}
\usepackage{siunitx}
\usepackage[a4paper,margin=2cm]{geometry}
\usepackage{graphicx}
\usepackage{lastpage}
\usepackage{xltabular,array}
\usepackage{showframe}
\sisetup{per-mode=fraction}
\pagestyle{empty}
\begin{document}
\vspace*{-2cm}
\noindent % it doesn't seem to make a difference
\begin{tabular}{|>{\raggedright\arraybackslash}m{3cm}|>{\raggedright\arraybackslash}m{7cm}|>{\raggedright\arraybackslash}m{5cm}|>{\raggedright\arraybackslash}m{2cm}|}
\hline
%\rule[-1ex]{0pt}{0.5ex}
\includegraphics[width=3cm]{example-image} &
\multicolumn{2}{|>{\raggedright\arraybackslash}m{12cm}|}{\rule[-1ex]{0pt}{4.5ex}{\LARGE \textbf{Mein-wunderschönes-Gymnasium}}} & \\
&
\multicolumn{2}{|>{\raggedright\arraybackslash}m{12cm}|}{{\rule[-2ex]{0pt}{6.5ex} \textbf{\Large Aufbau eines Versuchsprotokolls}}} &
\rule[-2ex]{0pt}{6.5ex} {\Large \textbf{(WHO)}} \\
\rule[-1ex]{0pt}{7.5ex} {\Large Klasse:} &
\rule[-1ex]{0pt}{7.5ex} {\Large Name:} &
\rule[-1ex]{0pt}{7.5ex} {\Large Datum:} &
\rule[-1ex]{0pt}{7.5ex} {\Large Seite \thepage\ von \pageref{LastPage}} \\
\hline
\end{tabular}
\section*{Section title begins here}
Text begins here.
\end{document}
I get a table that doesn't start flush left at the text margin. I added the frame to show what I mean. I get
I know I could pull the table to the left with a \hspace
, but that would require trial and error. Is there a length I need to adjust to fix this automatically? (Nevermind that the table is also too wide: I will fix that as soon as I got it aligned properly).
\noindent
and\begin{tabular}
.