0

I want to create a custom listing/structured display for some data that is enumerated (in my case a list of FOI requests.

This is a MWE I've already created with enumitem mostly:

% !TeX program = lualatex
% !TeX encoding = UTF-8
% !TeX spellcheck = de_DE

\documentclass{article} \usepackage[utf8]{inputenc}

\usepackage{enumitem}

% description with better font \renewcommand{\descriptionlabel}[1]{\hspace{\labelsep}\textsf{#1}} % better right align % https://tex.stackexchange.com/a/195775/98645 \SetLabelAlign{parright}{\parbox[t]{\labelwidth}{\raggedleft#1}}

\begin{document}

\section{Titel}

\begin{enumerate}[itemsep=2em,font=\vspace{-2em}\normalsize] \item % left {\small % \hphantom{\normalsize\textsc{An:,}} \textsf{Anfrage nach dem IFG} % right {\hspace*{\fill}\textsf{ Az.: J-0123/00/42 $\cdot$ Nummer: #133742% }}} \vspace{1pt} \ \textsc{An:} {\large Bundesbeauftragter für den Datenschutz und die Informationsfreiheit} \begin{description}[ labelindent=0em, leftmargin=10.5em, style=multiline, itemsep=1pt, parsep=1pt, labelsep=1em, align=parright ]

            \item [Anfragedatum:]
            8. Juni 2020
            \item [Anfragetext:]
            Anfrage an Datenschutzbehörde\\
            {\small (ohne Anfrage nach Datenschutzverletzungen nach Art.~33 DSGVO)}
            \item [Adresse:]
            \texttt{https://fragdenstaat.de/anfrage/…}
            \item [Status:]
            Bearbeitung ausstehend
            \item [Antwortdatum:]
            -
            \item [Ergebnis:]
            -
        \end{description}
        \item
        % left
        {\small
%               \hphantom{\normalsize\textsc{An:\,}}
            \textsf{Anfrage nach dem Informationsfreiheitsgesetz}
            % right
            {\hspace*{\fill}\textsf{
                    Nummer: \#ABC123%
        }}}
        \vspace{1pt}
        \\
        \textsc{An:} {\large Bundesbeauftragter für Anderes} \\
        …
    \end{enumerate}

\end{document}

screenshot of the result


The only problem I still have is the “label“, i.e. I want to move that down one line, i.e. it should be shown before the \textsc{An:} as if the first line would not exist. The reason is just that the first line is purely “cosmetic” and should not influence where the bzu. What I've already accomplished is resetting the font to the normal size for that bullet point/list item.

Please make your answer agnostic of whether I use enumerate or itemize or so there, because possibly I'd change that later.

I've also checked the usual spacings, but I can as far as I see I can only move the whole item, not the label/bullet point alone.

But as these are likely the same settings in enumitem or so, I guess that is not hard.

So, how can I move the label/bullet point/number down or up?

rugk
  • 1,090
  • 1
  • 10
  • 27

1 Answers1

2
\documentclass{article}
\usepackage[utf8]{inputenc}

\usepackage{enumitem}


% description with better font
\renewcommand{\descriptionlabel}[1]{\hspace{\labelsep}\textsf{#1}}
% better right align
% https://tex.stackexchange.com/a/195775/98645
\SetLabelAlign{parright}{\parbox[t]{\labelwidth}{\raggedleft#1}}

\newcommand\loweritemlabel[1]{\normalsize\raisebox{\dimexpr-\baselineskip-1pt}[0pt][0pt]{#1}}
\begin{document}

\section{Titel}

\begin{enumerate}[itemsep=2em,format=\loweritemlabel]
            \item
            % left
            {\small
%               \hphantom{\normalsize\textsc{An:\,}}
                \textsf{Anfrage nach dem IFG}
                % right
                {\hspace*{\fill}\textsf{
                        Az.: J-0123/00/42
                        $\cdot$
                        Nummer: \#133742%
            }}}
            \vspace{1pt}
            \\
            \textsc{An:} {\large Bundesbeauftragter für den Datenschutz und die Informationsfreiheit}
            \begin{description}[
                    labelindent=0em,
                    leftmargin=10.5em,
                    style=multiline,
                    itemsep=1pt,
                    parsep=1pt,
                    labelsep=1em,
                    align=parright
                ]

                \item [Anfragedatum:]
                8. Juni 2020
                \item [Anfragetext:]
                Anfrage an Datenschutzbehörde\\
                {\small (ohne Anfrage nach Datenschutzverletzungen nach Art.~33 DSGVO)}
                \item [Adresse:]
                \texttt{https://fragdenstaat.de/anfrage/…}
                \item [Status:]
                Bearbeitung ausstehend
                \item [Antwortdatum:]
                -
                \item [Ergebnis:]
                -
            \end{description}
            \item
            % left
            {\small
    %               \hphantom{\normalsize\textsc{An:\,}}
                \textsf{Anfrage nach dem Informationsfreiheitsgesetz}
                % right
                {\hspace*{\fill}\textsf{
                        Nummer: \#ABC123%
            }}}
            \vspace{1pt}
            \\
            \textsc{An:} {\large Bundesbeauftragter für Anderes} \\
            …
        \end{enumerate}

\end{document}

enter image description here

Ulrike Fischer
  • 327,261
  • Thanks for the reply and code helps very much, but AFAIK it's best practice on Stackexchange also to write at least one or two sentences of what exactly you know changed in the code and how that does work, so people can learn from that. – rugk Aug 20 '20 at 09:11
  • E.g. how can I adjust that if I change the font size. If I replace \normalsize with \large in \loweritemlabel it does not fit anymore. – rugk Aug 20 '20 at 09:23
  • 1
    sorry I looked at it shortly and offered a solution, but I don't have the time to write an article about it. – Ulrike Fischer Aug 20 '20 at 09:30