latex 表格“tabular”跨多行笔记

本文介绍了在LaTeX中使用多行标题、调整表格布局、编辑数学公式的方法,涵盖了从基本到进阶的表格设计与公式排版技巧。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

\documentclass[]{article}
\usepackage{multirow}
\begin{document}
\renewcommand{\multirowsetup}{\centering}  
    \begin{tabular}{|l|l|l|l|} 
       	\hline  
       	\multirow{4}{2cm}{This is a demo table}  & a & \multirow{4}{2cm}{This is another one} & \\ 
       	& b &  & \\ 
       	& c &  & \\ 
       	& d & & \\ 
       	\hline 
     \end{tabular} 
\end{document}

显示:

另外方法:

\documentclass{article}
\usepackage{amsmath,varwidth,array,ragged2e}
\newcolumntype{L}{>{\varwidth[c]{\linewidth}}l<{\endvarwidth}}
\newcolumntype{M}{>{$}l<{$}}
\def\ds{\mathrm{d}s}%  don't know what your \ds should be ....
\begin{document}

\def\arraystretch{1.7}
\begin{tabular}{rMrL}
(A) & \ds u=\sqrt{x^2+y^2} &(B) & $\ds u=\sqrt{x^4+y^4}$\tabularnewline
(C) & \ds u=\sqrt[3]{xy}   &(D) & $\ds u=\sqrt[3]{x^2+y^2}$\tabularnewline
(E) & \ds u=\sqrt[3]{x^4+y^4} & (F) & 
  \[ u=\begin{cases}e^{\frac{-1}{x^2+y^2}}; &x^2+y^2\neq 0\\ 0; &x^2+y^2=0\end{cases} \] \tabularnewline
(G) & \ds u=\sqrt[3]{x}\sin y & (H) & $\ds u=\sqrt[3]{y}\tan x$
\end{tabular}

\end{document}

显示:

另外一种:

\documentclass[oneside]{article}
\usepackage{chngpage}
\usepackage{array}
\begin{document}
\begin{adjustwidth}{-1cm}{-1cm}
 \begin{tabular}{|p{.2\textwidth}| p{.2\textwidth}| m{.7\textwidth}|}
 \hline
  new & old &   all boring, all boring, all boring, all boring, all boring, all boring, all boring, all boring, all boring, all boring, all boring, all boring, all boring, all boring, \\ \hline
 \end{tabular}
\end{adjustwidth}
\end{document}
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值