我有这个代码:
\documentclass[oneside]{oblivoir}
\usepackage{amsmath,amssymb,amsthm,mathrsfs,amsthm}
\usepackage{paralist,kotex,caption,mdframed,tabu,graphicx}
\begin{document}
\(g\) is a holomorphic function on the compact set \(\triangle\).
By the maximum modulus theorem, \(|g|\) attains its maximum on the boundary of \(\triangle\).
By symmetry of \(\triangle\), \(|g|\) attains its maximum on the segment \(ab\), where the segment can be parametrized by \(\gamma(t):[-1,1]\to\mathbb C\) as follows;
\[\gamma(t)=t\quad(-1\le t\le1)\]
The value of \(g\) on the segment can be written as
\[g(\gamma(t))=(t^2-1)(t-\sqrt3i)=t(t^2-1)-\sqrt3(t^2-1)i\]
and
\[\left|g(\gamma(t))\right|^2=t^2(t^2-1)^2+3(t^2-1)^2=(t^2-1)^2(t^2+3).\]
Since
\[
\frac{d}{dt}\left|g(\gamma(t))\right|^2
=2(t^2-1)\cdot2t(t^2+3)+(t^2-1)^2\cdot2t=2t(t^2-1)(3t^2+5)
\]
\(\left|g(\gamma(t))\right|^2\) has critical values(local maximum and local minimum) at \(t=-1\), \(t=0\), \(t=1\) where
\begin{center}
\tabulinesep=5pt
\begin{tabu}to.9\textwidth{X[1.5$c]|X[$c]|X[$c]|X[$c]|X[$c]|X[$c]}\toprule
t &-1 &\cdots &0 &\cdots &1 \\\hline
\frac d{dt}|g(\gamma(t))|^2 &0 &+ &0 &- &0 \\\hline
|g(\gamma(t))|^2 &\vbox{local minimum} &\nearrow &\vbox{ local maximum} &\searrow &\vbox{ local minimum}\\\bottomrule
\end{tabu}
\end{center}
Therefore, \(|g|\) has maximum value \(\sqrt3\) on the whole triangle \(\triangle\).
\end{document}
结果如下:
我不想扩大第二列的宽度,但希望“局部最小值”一词写成两行,而不是三行。
我试图更改字体大小(,,,,normalsize
),但没有成功,即使将字体大小设置为。small
footnotesize
scriptsize
tiny
tiny
是否有任何参数类似tabulinesep
或extrarowsep
设置单元格内的水平(非垂直)边距?
答案1
正如评论中提到的,我建议不要使用tabu
。相反,这里有一堆不同版本的表格。在这些表格中,我保留了水平线和垂直线的组合。借助,cellspace
我在水平线周围添加了一些垂直空间。
在前三个示例中,我使用了一个简单的tabular
环境并手动确定了单元格所需的宽度。由于您似乎更喜欢更自动化的解决方案,我添加了另外三个示例,它们都利用tabularx
了允许指定结果表的整体宽度的功能。
\documentclass[oneside]{oblivoir}
\usepackage{cellspace}
\setlength\cellspacetoplimit{6pt}
\setlength\cellspacebottomlimit{6pt}
\begin{document}
\begin{center}
\setlength{\tabcolsep}{5.5pt}
\begin{tabular}{|>{$}Sc<{$}|Sc*{2}{|>{$}Sc<{$}|Sc}|}
\hline
t &-1 &\cdots &0 &\cdots &1 \\\hline
\frac d{dt}|g(\gamma(t))|^2 &0 &+ &0 &- &0 \\\hline
|g(\gamma(t))|^2 &local minimum &\nearrow & local maximum &\searrow & local minimum\\\hline
\end{tabular}
\end{center}
\begin{center}
\setlength{\tabcolsep}{5.5pt}
\begin{tabular}{|>{$}Sc<{$}*{5}{|>{\raggedright\arraybackslash}S{p{1.53cm}}}|}
\hline
t &-1 & $\cdots$ &0 & $\cdots$ &1 \\\hline
\frac d{dt}|g(\gamma(t))|^2 &0 &+ &0 &- &0 \\\hline
|g(\gamma(t))|^2 &local minimum & $\nearrow$ & local maximum & $\searrow$ & local minimum\\\hline
\end{tabular}
\end{center}
\begin{center}
\setlength{\tabcolsep}{5.5pt}
\begin{tabular}{|>{$}Sc<{$}*{5}{|>{\centering\arraybackslash}S{m{1.53cm}}}|}
\hline
t &-1 & $\cdots$ &0 & $\cdots$ &1 \\\hline
\frac d{dt}|g(\gamma(t))|^2 &0 &+ &0 &- &0 \\\hline
|g(\gamma(t))|^2 &local minimum & $\nearrow$ & local maximum & $\searrow$ & local minimum\\\hline
\end{tabular}
\end{center}
\begin{center}
\setlength{\tabcolsep}{0pt}
\begin{tabularx}{0.8\textwidth}{|>{$}Sc<{$}*{5}{|>{\centering\arraybackslash}X}|}
\hline
t &-1 & $\cdots$ &0 & $\cdots$ &1 \\\hline
\frac d{dt}|g(\gamma(t))|^2 &0 &+ &0 &- &0 \\\hline
|g(\gamma(t))|^2 &local minimum & $\nearrow$ & local maximum & $\searrow$ & local minimum\\\hline
\end{tabularx}
\end{center}
\begin{center}
\setlength{\tabcolsep}{3pt}
\begin{tabularx}{0.8\textwidth}{|>{$}Sc<{$}*{5}{|>{\centering\arraybackslash}X}|}
\hline
t &-1 & $\cdots$ &0 & $\cdots$ &1 \\\hline
\frac d{dt}|g(\gamma(t))|^2 &0 &+ &0 &- &0 \\\hline
|g(\gamma(t))|^2 & \footnotesize local minimum & $\nearrow$ & \footnotesize local maximum & $\searrow$ & \footnotesize local minimum\\\hline
\end{tabularx}
\end{center}
\begin{center}
\setlength{\tabcolsep}{5.5pt}
\begin{tabularx}{\textwidth}{|>{$}Sc<{$}*{5}{|>{\centering\arraybackslash}X}|}
\hline
t &-1 & $\cdots$ &0 & $\cdots$ &1 \\\hline
\frac d{dt}|g(\gamma(t))|^2 &0 &+ &0 &- &0 \\\hline
|g(\gamma(t))|^2 &local minimum & $\nearrow$ & local maximum & $\searrow$ & local minimum\\\hline
\end{tabularx}
\end{center}
\end{document}
答案2
万一您仍然坚持使用tabu
,那么以下解决方案可能会对您有所帮助:
\documentclass{article} % I haven't your document class
\usepackage{tabu} % used is version v2.9
\begin{document}
\begin{center}
\tabulinesep=5pt
\setlength\tabcolsep{4pt}
\begin{tabu}to.8\textwidth{X[1.5$c]|X[1.5$cm]|X[$c]|X[$c]|X[$c]|X[$c]}
\tabucline [1pt]{-}
t &-1 &\cdots & 0 & \cdots &1 \\
\hline
\frac d{dt}|g(\gamma(t))|^2 &0 &+ & 0 & - &0 \\
\hline
|g(\gamma(t))|^2 & \vbox{local
minimum}& \nearrow & & \searrow &\\
\tabucline [1.5pt]{-}
\end{tabu}
\end{center}
\end{document}
附录:
使用tabularx
而不是tabu
,使用makecell
修复用于m
列类型和mathtools
定义分隔符,考虑到编辑的问题,上述解决方案可以重写为:
\documentclass{article}
\usepackage{mathtools}
\DeclarePairedDelimiter\abs{\lvert}{\rvert}
\usepackage{makecell}
\makeatletter %% fix of incompability between \makegapedcells and m column type
%% provided by Ulrike Fisher: http://tex.stackexchange.com/questions/319768/
\renewcommand\mcell@classz{\@classx
\@tempcnta \count@
\prepnext@tok
\@addtopreamble{%\mcell@mstyle
\ifcase\@chnum
\hfil
\mcell@agape{\d@llarbegin\insert@column\d@llarend}\hfil \or
\hskip1sp
\mcell@agape{\d@llarbegin\insert@column\d@llarend}\hfil \or
\hfil\hskip1sp
\mcell@agape{\d@llarbegin \insert@column\d@llarend}\or
\mcell@agape{$\vcenter
\@startpbox{\@nextchar}\insert@column\@endpbox$}\or
\mcell@agape{\vtop
\@startpbox{\@nextchar}\insert@column\@endpbox}\or
\mcell@agape{\vbox
\@startpbox{\@nextchar}\insert@column\@endpbox}%
\fi
\global\let\mcell@left\relax\global\let\mcell@right\relax
}\prepnext@tok}
\makeatletter
\usepackage{tabularx}
\newcolumntype{C}{>{\centering\arraybackslash}X}
\begin{document}
\begin{center}
\setcellgapes{5pt}
\makegapedcells
\setlength\tabcolsep{4pt}
\renewcommand\tabularxcolumn[1]{m{#1}} % <---
\begin{tabularx}{.9\textwidth}{@{} >{$}c<{$} | C | >{$}C<{$} | C | >{$}C<{$} | C @{}} % <---
\Xhline{1pt}
t & $-1$ & \cdots & 0 & \cdots & 1 \\
\hline
\frac{d}{dt}\abs{g(\gamma(t))}^2
& 0 & + & 0 & - & 0 \\
\hline
\abs*{g(\gamma(t))}^2
& local minimum & \nearrow & local minimum & \searrow & local minimum \\
\Xhline{1pt}
\end{tabularx}
\end{center}
\end{document}
这使:
答案3
考虑到该包仍然处于活动状态,因为一些 Latex 核心专家对其进行了修复,使其与当前数组包一起使用,谁知道其他更新是否会使其很难修复,我们中的一些人继续使用它,因为当时它是最容易使用的,因为它有出色的手册和用比例权重实现的列宽计算方法、文本管理和间距、样式和颜色控制,例如,今天用于为单元格着色的命令不起作用,它也是不完整的,但它可以与一些命令一起使用tabular
,在错误出现\toprule
在禁忌环境中的示例的情况下,您必须使用\tabucline -
,对于文本,这是一个玩弄增加列的比例的问题,您需要文本填充更少的行。您还可以设置线条的颜色,但对于那些不属于禁忌的线条,您必须使用相应的命令,并且不要忘记将其放在表格环境中;我添加了一个例子来测试到目前为止可以做什么,而不用死心塌地地尝试。
结果:
梅威瑟:
\documentclass[oneside]{oblivoir}
\usepackage{amsmath,amssymb,amsthm,mathrsfs,amsthm}
\usepackage{array}
\usepackage{paralist,kotex,caption,mdframed,tabu,graphicx,multirow}
\usepackage[table]{xcolor}
\usepackage{arydshln}
\usepackage{boldline,array,makecell}
\usepackage{tikzducks}
\usepackage{lipsum}
\begin{document}
\lipsum[1]\\
\begin{table}[h!]
\tabulinesep = 5pt
\centering
\footnotesize
\begin{tabu} to .9\textwidth{X[1.7$c]|X[1.6cm]|X[$cm]|X[1.6cm]|X[$cm]|X[1.6cm]}
\tabucline -
%1
t
&-1
&\cdots
&0
&\cdots
&1\\ \tabucline -
%2
\frac d{dt}|g(\gamma(t))|^2
&0
&+
&0
&-
&0\\ \tabucline -
%3
|g(\gamma(t))|^2
&local minimum
&\nearrow
&local maximum
&\searrow
&local minimum\\ \tabucline -
\end{tabu}
\caption{Maybe a coment or table enumeration control}
\end{table}
\begin{table}[!ht]
\centering
\sffamily
\scriptsize
\def\Thickness{2pt} % Set the thickness for the vertical and horizontal rules.
\arrayrulewidth=\Thickness % Thickness for \cline
\tabulinesep = _3pt^5pt % Celll text separation _{texbox-bottomRule}^{textbox-topRule}
\tabulinestyle{\Thickness black!50!green} % Thickness and color for \tabucline
\begin{tabu} to \linewidth {X[0.1]|X[0.5r]|*6{X[$c]}|*3{X[mc]}|}
\arrayrulecolor{black!50!green} %needed for \cline \hline and similars
\cline{3-11}
%Row2
\multicolumn{2}{c|}{}
& \multicolumn{6}{c|}{\bfseries SOME OTHER HEADER}
& \multicolumn{3}{c|}{\bfseries HEADER} \\ \cline{3-11}
%Row3
\multicolumn{2}{c|}{}
&A
&B
&C
&D
&E
&F
&G
&H
&I\\ \cline{2-11}
%Row4
\rowfont{\leavevmode\color{black!50!green}}
&A
&|g(\gamma(t))|^2
&\nearrow
&0
&0
&0
&0
&maybe some short text
&\tiny maybe some short text
&\begin{tikzpicture}[scale=0.35]\randuck\end{tikzpicture} \\
%Row5
&B
&|g(\gamma(t))|^3
&0
&\nearrow
&0
&0
&0
&0.00
&0.00
&0.00\\
%Row6
&C
&|g(\gamma(t))|^4
&0
&0
&\nearrow
&0
&0
&0.00
&0.00
&0.00\\
%Row7
\rowfont{\leavevmode\color{black!50!red}}
&D
&|g(\gamma(t))|^5
&0
&0
&0
&\nearrow
&0
&0.00
&0.00
&0.00\\ \cdashline{2-11}[4pt/2pt]
%Row8
&E
&|g(\gamma(t))|^6
&0
&0
&0
&0
&\nearrow
&0.00
&0.00
&0.00\\ \Xcline{2-11}{0.5pt}
%Row9
\multirow{-6}{*}{\rotatebox{90}{\bfseries OTHER HEADER}}
&F
&|g(\gamma(t))|^7
&0
&0
&0
&0
&0
&0.00
&0.00
&0.00\\[-\Thickness] \tabucline{2-11}
\end{tabu}
\caption{The caption}
\end{table}
Therefore, \(|g|\) has maximum value \(\sqrt3\) on the whole triangle \(\triangle\).
\end{document}