I have a list where each item has a number of points assigned to it, which should be in the same row on the right side. This works very well in almost all cases with \hfill
. However, if the line becomes too long and there is no more space for the number of points, it is moved to the next line but not right-justified, but left-justified.
Is there a way to keep this for all points, independent of the length of the line, always on the right side?
\documentclass[a4paper,12pt]{scrartcl}
\usepackage[ngerman]{babel}
\usepackage[T1]{fontenc}
\usepackage[sfdefault]{libertine}
\begin{document}
\begin{enumerate}
\item blablabla \hfill 1~P
\item Beschreiben Sie ausführlich eine Maßnahme zur Förderung der Gesundheit in der Kita\hfill 3~P
\end{enumerate}
\end{document}
Best Answer
Try using
\hspace*{\fill}
instead of\hfill
. Moreover, I'd pack the formatting into a macro, just in case you have to adjust the formatting. Putinto the preamble and use it as