答案1
\parbox
已编辑,如果宽度超过 2 英寸则自动转换。
\documentclass{article}
\usepackage{stackengine,xcolor}
\newcommand\specbox[3][black]{\bgroup%
\color{#1}%
\fboxsep=1.7ex\relax%
\setstackgap{S}{1.3ex}%
\setbox0=\hbox{\stackanchor{#2}{#3}}%
\ifdim\wd0>2in\relax%
\fbox{\Shortstack{{\parbox{2in}{\centering #2}} {%
\rule{1.6in}{.5pt}} {\parbox{2in}{\centering #3}}}}%
\else%
\fbox{\Shortstack{{#2} {\rule{\dimexpr\wd0-1em}{.5pt}} {#3}}}%
\fi%
\egroup}
\begin{document}
\specbox[red]{Placeholder}{Image}
\specbox[green!50!black]{This is a test of the EBS}{this is only a test}
\specbox[blue]{This is a test of the Emergency Broadcast System}
{this is only a test}
\end{document}
答案2
可能的方法不止一种。
\documentclass[twocolumn]{article}
\usepackage{todonotes}
\usepackage{blindtext}
\newcommand{\placeholder}{%
\framebox{\parbox{.9\linewidth}{\centering\huge\color{red!60!black}\itshape
Placeholder\par
\rule[.5ex]{.6\linewidth}{.8pt}\par
Wombat
}}}
\begin{document}
\blindtext
\begin{figure}
\placeholder
\end{figure}
\blindtext
\begin{figure}
\includegraphics[width=.8\linewidth]{example-image}
\end{figure}
\blindtext
\begin{figure}
\missingfigure[figwidth=\linewidth]{A figure is missing here}
\end{figure}
\end{document}