答案1
您还没有给出确切的详细规格,所以这里只是一个大概的想法。
\documentclass{article}
\usepackage{graphicx}
\usepackage{lipsum}% for dummy text
\makeatletter
\newenvironment{foobox}[1]{%
\setbox0=\hbox{\space\ignorespaces\strut#1\unskip\space}%
\setbox1=\hbox\bgroup\minipage[b]{.9\linewidth}%
}{%
\endminipage\egroup
\dimen@\dimexpr\wd0+2em\relax
\ifdim\dimen@<\ht1\dimen@\ht1\fi
\par\medskip\noindent
\hbox to .1\linewidth{%
\m@th
\hfil$
\vcenter to \dimen@{\leaders\vrule\vfill\hbox{\kern\dimexpr.5ex-\ht0\relax\rotatebox{90}{\box0}}\leaders\vrule\vfill}
$\hfil
}%
$\m@th\vcenter{\box1}$%
\par\medskip\noindent
\ignorespacesafterend
}
\makeatother
\begin{document}
\lipsum[66]
\begin{foobox}{2021}
Bla bla bla
\end{foobox}
\lipsum[75]
\begin{foobox}{Whatever}
Some text here
\begin{itemize}
\item foo
\item bar
\item baz
\end{itemize}
and some text there
\end{foobox}
or an example with only a list
\begin{foobox}{A}
\begin{itemize}
\item foo
\item bar
\item baz
\end{itemize}
\end{foobox}
\end{document}
该结构不能跨页面拆分。最小高度等于“标签”宽度加上两个空格,再加1em
上两边各一行。