I'm trying to highlight some parts (paragraphs) in a document. For this I want to use a box, with the paragraph number hanging out into the left margin. However, I don't really know how to pull this off! Can someone help out? This is what I have so far. I'm using scrbook
, with pdflatex
to compile it. The issue is that first, the indentation of the text is not correct (you can see, it's a bit too far indented), and I'd really like that paragraph sign to be right-aligned and in the top (which it isn't right now). I hope someone can help fix this, or maybe suggest a package for this that I wasn't able to find?
I'll also gladly take stylistic suggestions!
Here's the minimal example code:
\documentclass[paper=a5, parskip=half, 12pt]{scrbook}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{xcolor}
\usepackage{roboto}
\usepackage{mathptmx}
\begin{document}
Vi Frederik den Niende, af Guds Nåde Konge til Danmark, de Venders og Goters, Hertug til Slesvig, Holsten, Stormarn, Ditmarsken, Lauenborg og Oldenborg, Gør vitterligt: I overensstemmelse med bestemmelserne i § 94 i Danmarks Riges Grundlov af 5. juni 1915 med ændringer af 10. september 1920 har rigsdagen 2 gange vedtaget, og folketingsvælgerne ved en den 28. maj 1953 afholdt folkeafstemning godkendt, hvorefter Vi nu ved Vort allerhøjeste samtykke stadfæster DANMARKS RIGES GRUNDLOV
\hspace{-1cm}\colorbox{gray!10!white}{\parbox{1cm}{\sffamily\bfseries § 8}\parbox{\textwidth}{ Bestemmelser angående regeringens førelse i tilfælde af kongens umyndighed, sygdom eller fraværelse fastsættes ved lov. Er der ved tronledighed ingen tronfølger, vælger folketinget en konge og fastsætter den fremtidige arvefølge.}}
\end{document}
And here is what it looks like:
Thanks a lot in advance!