答案1
如果你愿意的话,你可以用 TikZ 轻松做到这一点,例如
\documentclass[tikz,border=5mm]{standalone}
\begin{document}
\begin{tikzpicture}
\node[text width=10cm,draw,inner sep=1em](mybox) {Another text here};
\node[anchor=west,fill=white,xshift=0.5em] at (mybox.north west){\textsc{Lecture} 1}; %This line is optional, remove it to get your first box without text on the edge.
\end{tikzpicture}
\end{document}
结果是