调整图片和表格尺寸的命令:resizebox

\resizebox 是 LaTeX 中的一个命令,用于调整插入的内容(如图像、表格、文本等)的大小。它的语法如下:

latex 复制代码
\resizebox{<width>}{<height>}{<content>}

其中:

  • <width> 和 <height> 分别表示调整后的宽度和高度。可以使用长度单位(如 cm、in、pt)或相对长度(如 \textwidth、\linewidth)。
  • <content> 是要调整大小的内容。

例如,\resizebox{0.5\textwidth}{!}{内容} 将内容调整为宽度的一半,高度根据宽度比例自动调整。请注意,使用 \resizebox 可能会导致内容失真或变形,因此建议谨慎使用。

例子:

latex 复制代码
\begin{table}[thb]\centering
    \caption{A table with parallel lines for grouping and color highlight.} %
    \label{tab:ablation_study}
    \resizebox{0.48\textwidth}{!}{
    \Large
    \begin{tabular}{*{2}{l}||*{2}{c}||*{2}{c}||*{2}{c}}
        \toprule
        \multicolumn{1}{c}{} & \multicolumn{1}{c||}{} & \multicolumn{2}{c||}{Synthetic Dataset} & \multicolumn{2}{c||}{Static Data} & \multicolumn{2}{c}{Dynamicgt Data} \\
        ID & Method  & PSNRT & VDP & PSNRT & VDP & PSNRT & VDP \\
        \midrule
        0 & ANet  & 39.25 & 70.81 & 40.62 & 74.51 & 44.43 & 77.74 \\ %
        1 & BNet  & 39.69 & 70.95 & 37.61 & 75.30 & 43.70 & 78.97 \\
        \rowcolor{gray!20}
        2 & ANet + BNet  & \textbf{40.34} & \textbf{71.79} & \textbf{41.18} & \textbf{76.15} & \textbf{45.46} & \textbf{79.09} \\
        \midrule
        3 & ANet + BNet w/o C & 39.72 & 71.38 & 40.52 & 74.79 & 45.09 & 78.24 \\ %
        4 & ANet + BNet w/o D & 40.03 & 71.66 & 40.80 & 76.12 & 45.17 & 78.99 \\ %
        \bottomrule
    \end{tabular}
    }
\end{table}
相关推荐
Wang's Blog7 小时前
PostgreSQL笔记60: 权限与角色管理——从层级体系到最佳实践
数据库·笔记·postgresql
IZero0710 小时前
Elasticsearch 学习笔记筑基-文档操作篇
笔记·学习·elasticsearch
公爵爱学习10 小时前
安装Ubuntu20.04遇到的问题 简要简述笔记
笔记
Wang's Blog12 小时前
PostgreSQL笔记28: PostgreSQL ACID 特性与实现机制深度解析
大数据·笔记·postgresql
u01030552713 小时前
正则表达式find与matches区别详解
笔记
浪兎兎13 小时前
Nginx 笔记
运维·笔记·nginx
_Narcissus_14 小时前
二分算法笔记及例题
数据结构·c++·笔记·算法·蓝桥杯·查找·二分算法
Hammer_Hans14 小时前
DFT笔记112
笔记
FAREWELL0007514 小时前
学习笔记-热更新导航
笔记·学习
苏子寒15 小时前
Nano-VLLM全代码解析笔记(6)-embed_head和linear
pytorch·笔记·python·机器学习·ai·nlp·vllm