von Trickser » Di 24. Mai 2022, 07:44
\documentclass[english,egregdoesnotlikesansseriftitles]{scrartcl}
\usepackage{babel}% babel ohne Sprachoption ergibt wenig Sinn, deshalb oben die Sprachoption
\usepackage{graphicx}
\title{Unterschrift}
\author{}
\date{May 2022}
\begin{document}
\begingroup
\let\raggedsection\centering% Eigentlich ist es schlechter Stil, nur eine Überschrift zu zentrieren.
\section*{Declaration in Lieu of Oath}
``I hereby declare, under oath, that this has been my independent work and has not been aided with any prohibited means. I declare, to the best of my knowledge and belief, that all passages taken from published and unpublished sources or docments have been reproduced whether as original, slightlychanged or in thought, have been mentioned as such at the corresponding placesof the thesis, by citation, where the extend of the original quotes is indicated.''
\vspace{5\baselineskip}
\parbox{5cm}{\centering\rule{\linewidth}{0.2pt}\\Place, Date}\hfill
\makebox[5cm][c]{\raisebox{\ht\strutbox}[0pt][\ht\strutbox]{\includegraphics[height=1.8cm]{example-image-a}}}\hspace{-5cm}%
\parbox{5cm}{\centering\rule{\linewidth}{0.2pt}\\Signature}
\endgroup
\end{document}
Wenn du alle Überschriften zentrieren möchtest, verschiebe die Änderung von
\raggedsection einfach in die Dokumentpräambel und lass
\begingroup und
\endgroup weg. Übrigens: Die Leerzeile vor
\endgroup ist wichtig!
Statt dem Gefummel mit
\parbox,
\makebox,
\rule und
\raisebox könnte man auch einfach eine Tabelle verwenden.
[code]
\documentclass[english,egregdoesnotlikesansseriftitles]{scrartcl}
\usepackage{babel}% babel ohne Sprachoption ergibt wenig Sinn, deshalb oben die Sprachoption
\usepackage{graphicx}
\title{Unterschrift}
\author{}
\date{May 2022}
\begin{document}
\begingroup
\let\raggedsection\centering% Eigentlich ist es schlechter Stil, nur eine Überschrift zu zentrieren.
\section*{Declaration in Lieu of Oath}
``I hereby declare, under oath, that this has been my independent work and has not been aided with any prohibited means. I declare, to the best of my knowledge and belief, that all passages taken from published and unpublished sources or docments have been reproduced whether as original, slightlychanged or in thought, have been mentioned as such at the corresponding placesof the thesis, by citation, where the extend of the original quotes is indicated.''
\vspace{5\baselineskip}
\parbox{5cm}{\centering\rule{\linewidth}{0.2pt}\\Place, Date}\hfill
\makebox[5cm][c]{\raisebox{\ht\strutbox}[0pt][\ht\strutbox]{\includegraphics[height=1.8cm]{example-image-a}}}\hspace{-5cm}%
\parbox{5cm}{\centering\rule{\linewidth}{0.2pt}\\Signature}
\endgroup
\end{document}[/code]
Wenn du alle Überschriften zentrieren möchtest, verschiebe die Änderung von [tt]\raggedsection[/tt] einfach in die Dokumentpräambel und lass [tt]\begingroup[/tt] und [tt]\endgroup[/tt] weg. Übrigens: Die Leerzeile vor [tt]\endgroup[/tt] ist wichtig!
Statt dem Gefummel mit [tt]\parbox[/tt], [tt]\makebox[/tt], [tt]\rule[/tt] und [tt]\raisebox[/tt] könnte man auch einfach eine Tabelle verwenden.