![带有倾斜文本的迷你页面垂直居中](https://linux22.com/image/447806/%E5%B8%A6%E6%9C%89%E5%80%BE%E6%96%9C%E6%96%87%E6%9C%AC%E7%9A%84%E8%BF%B7%E4%BD%A0%E9%A1%B5%E9%9D%A2%E5%9E%82%E7%9B%B4%E5%B1%85%E4%B8%AD.png)
答案1
因为\caption
以 par 开始和结束,所以添加了两个额外的空白行。 \cramit
使标题就像一行文本一样。
我使用\raisebox
多行来代替,这样我就可以调整高度。
\documentclass{article}
\usepackage{adjustbox}% \rotatebox
\usepackage{tabularx}
\usepackage{subcaption}
\newcommand{\cramit}[1]{\raisebox{0pt}[\ht\strutbox][\dp\strutbox]{%
\begin{minipage}[b]{\linewidth}#1\end{minipage}}}
\begin{document}
\begin{figure}
\captionsetup{skip=0pt, justification=raggedright}%
\tabcolsep=2pt
\begin{tabularx}{\textwidth}{cXXX|X}
& \multicolumn{3}{c|}{This is a very Long Legend} & \multicolumn{1}{c}{Legend} \\
\raisebox{1cm}{\rotatebox[origin=c]{90}{COVID}} &
\rule{\linewidth}{2cm} & \rule{\linewidth}{2cm} & \rule{\linewidth}{2cm} &
\rule{\linewidth}{2cm} \\
& \cramit{\subcaption{Yada}} & \cramit{\subcaption{Yada}} & \cramit{\subcaption{Yada}} & \\[\floatsep]
& \multicolumn{3}{p{\dimexpr 0.75\textwidth-8\tabcolsep}|}{\cramit{\caption{Cost comparison}}} &
\raisebox{\floatsep}[\ht\strutbox][\dp\strutbox]{% adjusted for looks
\begin{minipage}{\linewidth}
\caption{\raggedright A two line caption}
\end{minipage}} \\
\end{tabularx}
\end{figure}
\end{document}