尊敬的各位同事,大家下午好。
如何使第一列的元素与行的中心垂直对齐?
\begin{landscape}
\begin{figure}[!ht]
\centering
\begin{tabular}{ccccccc}
$R a_{L_{P}}$ & \begin{tabular}[c]{@{}c@{}}$r=1.00$\\ (Reference Geometry)\end{tabular} & $r=1.05$ & $r=1.10$ & $r=1.20$ & $r=1.50$ & \begin{tabular}[c]{@{}c@{}}$r=1.50$\\ (Convex Profile)\end{tabular} \\
$3\cdot10^{6}$ & \includegraphics[width=0.12\linewidth]{Figuras/Figuras2/14-1.png} & \includegraphics[width=0.12\linewidth]{Figuras/Figuras2/14-4.png} & \includegraphics[width=0.12\linewidth]{Figuras/Figuras2/14-7.png} & \includegraphics[width=0.12\linewidth]{Figuras/Figuras2/14-10.png} & \includegraphics[width=0.12\linewidth]{Figuras/Figuras2/14-13.png} & \includegraphics[width=0.1425\linewidth]{Figuras/Figuras2/14-16.png} \\
$7\cdot10^{6}$ & \includegraphics[width=0.12\linewidth]{Figuras/Figuras2/14-2.png} & \includegraphics[width=0.12\linewidth]{Figuras/Figuras2/14-5.png} & \includegraphics[width=0.12\linewidth]{Figuras/Figuras2/14-8.png} & \includegraphics[width=0.12\linewidth]{Figuras/Figuras2/14-11.png} & \includegraphics[width=0.12\linewidth]{Figuras/Figuras2/14-14.png} & \includegraphics[width=0.1425\linewidth]{Figuras/Figuras2/14-17.png} \\
$1\cdot10^{7}$ & \includegraphics[width=0.12\linewidth]{Figuras/Figuras2/14-3.png} & \includegraphics[width=0.12\linewidth]{Figuras/Figuras2/14-6.png} & \includegraphics[width=0.12\linewidth]{Figuras/Figuras2/14-9.png} & \includegraphics[width=0.12\linewidth]{Figuras/Figuras2/14-12.png} & \includegraphics[width=0.12\linewidth]{Figuras/Figuras2/14-15.png} & \includegraphics[width=0.1425\linewidth]{Figuras/Figuras2/14-18.png}
\end{tabular}
\caption{2D schematic visualization of the flow lines over the plates with rectangular corrugations with (a) $r=1.00$ (Reference Geometry), (b) $r=1.50$ e (c) $r=1.50$ (Convex Profile)).
Source: Authors' own work.}
\label{fig:Fig14}
\end{figure}
\end{landscape}
答案1
这是我尝试使用tabularray
1包和\raisebox
命令2 .
解决方案
代码
\documentclass[12pt,a4paper,landscape]{article}
\usepackage{graphicx}
\usepackage{tabularray}
\usepackage[margin=2cm]{geometry}
\begin{document}
\begin{figure}[!ht]
\centering
\begin{tblr}{
colspec={X[1,c,mode=dmath]*6{X[3,c,m]}},
row{1}={mode=dmath},
cell{1}{2,7}={h,mode=text},
width=\linewidth
}
R a_{L_{P}} & {$$r=1.00$$\\ \vspace{-\belowdisplayskip} (Reference Geometry)} & r=1.05 & r=1.10 & r=1.20 & r=1.50 & {$$r=1.50$$\\ \vspace{-\belowdisplayskip} (Convex Profile)} \\
3\cdot10^{6} & \raisebox{-.5\height}{\includegraphics[width=0.5\linewidth]{Figures/TestPicture.png}} & \raisebox{-.5\height}{\includegraphics[width=0.5\linewidth]{Figures/TestPicture.png}} & \raisebox{-.5\height}{\includegraphics[width=0.5\linewidth]{Figures/TestPicture.png}} & \raisebox{-.5\height}{\includegraphics[width=0.5\linewidth]{Figures/TestPicture.png}} & \raisebox{-.5\height}{\includegraphics[width=0.5\linewidth]{Figures/TestPicture.png}} & \raisebox{-.5\height}{\includegraphics[width=0.6\linewidth]{Figures/TestPicture.png}} \\
7\cdot10^{6} & \raisebox{-.5\height}{\includegraphics[width=0.5\linewidth]{Figures/TestPicture.png}} & \raisebox{-.5\height}{\includegraphics[width=0.5\linewidth]{Figures/TestPicture.png}} & \raisebox{-.5\height}{\includegraphics[width=0.5\linewidth]{Figures/TestPicture.png}} & \raisebox{-.5\height}{\includegraphics[width=0.5\linewidth]{Figures/TestPicture.png}} & \raisebox{-.5\height}{\includegraphics[width=0.5\linewidth]{Figures/TestPicture.png}} & \raisebox{-.5\height}{\includegraphics[width=0.6\linewidth]{Figures/TestPicture.png}} \\
1\cdot10^{7} & \raisebox{-.5\height}{\includegraphics[width=0.5\linewidth]{Figures/TestPicture.png}} & \raisebox{-.5\height}{\includegraphics[width=0.5\linewidth]{Figures/TestPicture.png}} & \raisebox{-.5\height}{\includegraphics[width=0.5\linewidth]{Figures/TestPicture.png}} & \raisebox{-.5\height}{\includegraphics[width=0.5\linewidth]{Figures/TestPicture.png}} & \raisebox{-.5\height}{\includegraphics[width=0.5\linewidth]{Figures/TestPicture.png}} & \raisebox{-.5\height}{\includegraphics[width=0.6\linewidth]{Figures/TestPicture.png}} \\
\end{tblr}
\caption{
2D schematic visualization of the flow lines over the plates with rectangular corrugations with (a) $r=1.00$ (Reference Geometry), (b) $r=1.50$ e (c) $r=1.50$ (Convex Profile)).
Source: Authors' own work.
}
\label{fig:Fig14}
\end{figure}
\end{document}
结果
评论
我建议将命令转换为宏,但目前我不会这样做。
答案2
像这样?
- 不幸的是,您没有提供 MWE(最小工作示例),因此有关您的文档的任何信息都是未知的。
- 由于我们没有您的图片(也不知道它们的尺寸),在下面的 MWE 中使用草稿选项来记录类别,在实际文档中您需要将其删除。
- 通过
adjustbox
包的帮助将图像基线移动到垂直中心。 - 为了缩短代码,并使用 来为图像提供通用设置
\adjincludegraphics
,而不是\includegraphics
并为它们定义设置\adjustboxset
。 - 包装
tblr
中使用了表格中图像的更佳间距tabularray
\documentclass[demo]{article}
%--------------- show page layout. don't use in a real document!
\usepackage{showframe}
\renewcommand\ShowFrameLinethickness{0.15pt}
\renewcommand*\ShowFrameColor{\color{red}}
%---------------------------------------------------------------%
\usepackage{rotating}
\usepackage[export]{adjustbox}
\usepackage{tabularray}
\begin{document}
\begin{sidewaysfigure}[!ht]
\adjustboxset{height=3cm, % dropout in real document
width=\linewidth,
valign = m,
}
\begin{tblr}{colspec = {Q[c, mode=math] *{5}{X[c]} X[1.1,c]},
colsep = 3pt,
}
R a_{L_{P}}
& {$r=1.00$\\ (Reference\\ Geometry)}
& $r=1.05$
& $r=1.10$
& $r=1.20$
& $r=1.50$
& {$r=1.50$\\ (Convex Profile)r} \\
3\cdot10^{6}
& \adjincludegraphics{Figuras/Figuras2/14-1.png}
& \adjincludegraphics{Figuras/Figuras2/14-4.png}
& \adjincludegraphics{Figuras/Figuras2/14-7.png}
& \adjincludegraphics{Figuras/Figuras2/14-10.png}
& \adjincludegraphics{Figuras/Figuras2/14-13.png}
& \adjincludegraphics{Figuras/Figuras2/14-16.png} \\
7\cdot10^{6}
& \adjincludegraphics{Figuras/Figuras2/14-2.png}
& \adjincludegraphics{Figuras/Figuras2/14-5.png}
& \adjincludegraphics{Figuras/Figuras2/14-8.png}
& \adjincludegraphics{Figuras/Figuras2/14-11.png}
& \adjincludegraphics{Figuras/Figuras2/14-14.png}
& \adjincludegraphics{Figuras/Figuras2/14-17.png} \\
1\cdot10^{7}
& \adjincludegraphics{Figuras/Figuras2/14-3.png}
& \adjincludegraphics{Figuras/Figuras2/14-6.png}
& \adjincludegraphics{Figuras/Figuras2/14-9.png}
& \adjincludegraphics{Figuras/Figuras2/14-12.png}
& \adjincludegraphics{Figuras/Figuras2/14-15.png}
& \adjincludegraphics{Figuras/Figuras2/14-18.png}
\end{tblr}
\caption{2D schematic visualization of the flow lines over the plates with rectangular corrugations with (a) $r=1.00$ (Reference Geometry), (b) $r=1.50$ e (c) $r=1.50$ (Convex Profile)).
Source: Authors' own work.}
\label{fig:Fig14}
\end{sidewaysfigure}
\end{document}
如果你更喜欢landscape
环境,那么可以rotating
加载软件包lanndscape
并替换sidewaystable
为landscape
。编译结果将与以前类似。