ich versuche seit geraumer Zeit meinen Text mit xcolor grau zu hinterlegen. Ich arbeite mit der Dokumentenklasse scrartcl. Entsprechend erzeuge ich meinen Absatz im Code einfach mit einer Leerzeile, bei der Ausgabe erscheint dann ein gewollter "Einschub" des Texts.
Genau dieser Einschub wird leider nicht mehr sichtbar, wenn ich xcolor mit dem folgenden Code verwende. Kann mir hier jemand diesbezüglich helfen? Auf Stack Exchange und hier habe ich nichts gefunden, bzw. nicht die richtigen Schlagwörter eingegeben.
Beste Grüße
Flatsche
\documentclass[listof=totoc, %Abildungsverzeichnis, Bildverz.) bibliography=totocnumbered] %num. L.Verz. {scrartcl} %Dokumentklasse \usepackage[left=30mm,right=30mm,top=20mm,bottom=20mm, footskip=24pt] %Länge zwischen Text und Seitenzahl {geometry} \usepackage[math-style=ISO]{unicode-math} %erweiterte Mathe Funktionen \setmathfont{STIX Two Text} %erzeugt Times New Roman \setmathfont{STIX Two Math} %siehe https://ctan.org/pkg/unicode-math?lang=de \setkomafont{disposition}{\normalfont\bfseries} %TNR in Überschrift \usepackage{fontspec} \usepackage{xcolor} \definecolor{grey}{RGB}{204,204,204} \newcommand{\mybox}[1]{\par\noindent\colorbox{grey} {\parbox{\dimexpr\textwidth-2\fboxsep\relax}{#1}}} %zur texthinterlegung in grau \usepackage[ngerman]{babel} %Deutsche Rechtschreibung \usepackage{csquotes} %benötigt für babel -> keine Warnung \usepackage{amsfonts} \usepackage{pdfpages} %für pdf include %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %Zeilenabstand \usepackage{setspace} \linespread{1.25} %/onehalfspacing \doublespacing %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \begin{document} \section{Test} \mybox{Hallo Hallo Hallo Hallo Hallo HalloHallo HalloHallo HalloHallo Hallo Hallo Hallo Hallo HalloHallo HalloHallo HalloHallo Hallo Hallo Hallo Hallo HalloHallo HalloHallo HalloHallo Hallo Hallo Hallo Hallo HalloHallo HalloHallo HalloHallo Hallo Hallo Hallo Hallo HalloHallo HalloHallo HalloHallo Hallo Hallo Hallo Hallo HalloHallo Hallo Hallo Hallo HalloHallo HalloHallo HalloHallo Hallo Hallo Hallo Hallo HalloHallo HalloHallo HalloHallo Hallo Hallo Hallo Hallo HalloHallo HalloHallo HalloHallo Hallo Hallo Hallo Hallo HalloHallo HalloHallo HalloHallo Hallo Hallo} \end{document}