I have a more specific request. My text should be no longer than half the page. I was able to realize this with minibox. But that is only the maximum. But in this case I want it to be broken earlier. But it is important that no "-" is used but only broken at spaces. Should the text be smaller, of course, it should not automatically break. What I don't want is the spacing of the words to be stretched. But here's some more info: The text varies, so I can't just use \newline.
\documentclass[12pt,oneside,titlepage,listof=totoc,bibliography=totoc,toc=sectionentrywithdots]{scrartcl}
\usepackage{scrlayer-scrpage}
\clearpairofpagestyles
\setkomafont{pageheadfoot}{\normalfont}
\lofoot{\begin{minipage}{0.5\textwidth}
Here is a sample title of the latex page which is slightly longer than example.%\thepage
\end{minipage}}
\begin{document}
\section{test}
test
\end{document}
returns
Here is a sample title of the latex page which
is slightly longer than example.
What I would like to achieve, however, would be this:
Here is a sample title of the latex page
which is slightly longer than example.
What I don't want:
Here is a sample title of the latex pa- %only as an example! I know it is wrong here
ge which is slightly longer than example.
Here is a sample title of the latex page% here is the end of the box
which is slightly longer than example.