\documentclass[fontset=fandol]{ctexart}
\usepackage{tikz,tabularray,amsmath,graphicx,showframe}
\begin{document}
\begin{center}
\zihao{-6}
\begin{minipage}{.5\linewidth}
\centering
\begin{tblr}{baseline=c,columns={c,m},hlines,vlines}
级数 & 名称 & {风速大小\\(单位: $\mathrm{m/s}$)}\\
2 & 轻风 & $1.6\,\text{{}\~{}}\,3.3$ \\
3 & 微风 & $3.4\,\text{{}\~{}}\,5.4$ \\
4 & 和风 & $5.5\,\text{{}\~{}}\,7.9$ \\
5 & 劲风 & $8.0\,\text{{}\~{}}\,10.7$ \\
\end{tblr}\\[1ex]图1
\end{minipage}%
\begin{minipage}{.5\linewidth}
\centering
\begin{tikzpicture}[baseline={(current bounding box.center)},scale=.6875]
\draw[dash pattern=on 2pt off 2pt,gray] (0,0) grid (3,3);
\draw[-stealth] (-.5,0) -- (3.5,0);
\draw[-stealth] (0,-.5) -- (0,3.5);
\draw[-stealth] (3,3) -- (0,2);
\draw[-stealth] (2,0) -- (3,3);
\foreach \x in {1,2,3} {
\node at (\x,0) [below] {$\x$};
\node at (0,\x) [left] {$\x$};
}
\node at (0,0) [below left] {$O$};
\node at (3.5,0) [below] {$x$};
\node at (0,3.5) [left] {$y$};
\node at (1,3) [below] {视风风速};
\node at (2.5,0) [above] {船速};
\end{tikzpicture}\\[1ex]图2
\end{minipage}
\end{center}
\bigskip
\newsavebox{\tmpbox}
\newcommand{\matchtmpboxdepth}[1]{%
\raisebox{-\dp\tmpbox}{#1}%
}
\begin{lrbox}{\tmpbox}%
\zihao{-6}%
\begin{tblr}{baseline=c,columns={c,m},hlines,vlines}
级数 & 名称 & {风速大小\\(单位: $\mathrm{m/s}$)}\\
2 & 轻风 & $1.6\,\text{{}\~{}}\,3.3$ \\
3 & 微风 & $3.4\,\text{{}\~{}}\,5.4$ \\
4 & 和风 & $5.5\,\text{{}\~{}}\,7.9$ \\
5 & 劲风 & $8.0\,\text{{}\~{}}\,10.7$ \\
\end{tblr}%
\end{lrbox}
\begin{center}
\zihao{-6}
\begin{minipage}{.5\linewidth}
\centering
\usebox{\tmpbox}\\[1ex]图1%
\end{minipage}%
\begin{minipage}{.5\linewidth}
\centering
\matchtmpboxdepth{%
\resizebox{!}{\dimexpr\ht\tmpbox+\dp\tmpbox\relax}{%
\begin{tikzpicture}
\draw[dash pattern=on 2pt off 2pt,gray] (0,0) grid (3,3);
\draw[-stealth] (-.5,0) -- (3.5,0);
\draw[-stealth] (0,-.5) -- (0,3.5);
\draw[-stealth] (3,3) -- (0,2);
\draw[-stealth] (2,0) -- (3,3);
\foreach \x in {1,2,3} {
\node at (\x,0) [below] {$\x$};
\node at (0,\x) [left] {$\x$};
}
\node at (0,0) [below left] {$O$};
\node at (3.5,0) [below] {$x$};
\node at (0,3.5) [left] {$y$};
\node at (1,3) [below] {视风风速};
\node at (2.5,0) [above] {船速};
\draw[red, dashed, thick, overlay]
([xshift=.5\pgflinewidth,yshift=.5\pgflinewidth]current bounding box.south west) rectangle
([xshift=-.5\pgflinewidth,yshift=-.5\pgflinewidth]current bounding box.north east);
\end{tikzpicture}
}}\\[1ex]图2
\end{minipage}
\end{center}
\begin{center}
\zihao{-6}
\begin{minipage}{.5\linewidth}
\centering
\usebox{\tmpbox}\\[1ex]图1%
\end{minipage}%
\begin{minipage}{.5\linewidth}
\centering
\matchtmpboxdepth{%
\includegraphics[height=\dimexpr\ht\tmpbox+\dp\tmpbox\relax]{example-image-duck}%
}
\\[1ex]图2
\end{minipage}
\end{center}
\end{document}
真实的题目排版里是不是也不是非要「严格对齐」不可呢?考虑到代码的可读性,直接用例如scale=0.65我个人觉得也是合适的。



















问 怎么调整由 tikzpicture 环境生成的 TikZ 图片在 PDF 中的尺寸?