Margen horizontal en tabú

Margen horizontal en tabú

Tengo este código:

\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}

con el feo resultado parecido a este:

este

No quiero ampliar el ancho de la segunda columna, pero quiero que la palabra "mínimo local" se escriba en dos líneas, no en tres líneas.

Intenté cambiar el tamaño de la fuente ( ,,,, normalsize) sin éxito , incluso cuando el tamaño estaba configurado como .smallfootnotesizescriptsizetinytiny

¿Existe algún parámetro como tabulinesepo extrarowseppara establecer el margen horizontal (no vertical) dentro de la celda?

Respuesta1

Como ya se mencionó en los comentarios, recomendaría no usar tabu. En cambio, aquí hay un montón de versiones diferentes de su tabla. En estos he mantenido la combinación de líneas horizontales y verticales. Con la ayuda de cellspacehe añadido algo de espacio vertical alrededor de las líneas horizontales.

En los primeros tres ejemplos, utilicé un tabularentorno simple y determiné manualmente el ancho requerido para las celdas. Dado que parece preferir una solución más automatizada, he agregado otro conjunto de tres ejemplos tabularxque también permiten especificar un ancho total de la tabla resultante.

ingrese la descripción de la imagen aquí

\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}

Respuesta2

En caso de que aún persista en usarlo tabu, la siguiente solución puede ayudarlo:

\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}

ingrese la descripción de la imagen aquí

Apéndice: Con tabularxen lugar de tabu, usando makecellwith fix para usar en mtipos de columnas y mathtoolspara definir delimitadores, considerando la pregunta editada, la solución anterior se puede reescribir en:

\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}

lo que da:

ingrese la descripción de la imagen aquí

Respuesta3

Teniendo en cuenta que el paquete todavía está activo porque algunos expertos en látex lo arreglaron para que funcione con el paquete de matriz actual, y quién sabe si alguna otra actualización hará que sea muy difícil de arreglar, algunos de nosotros seguimos usándolo porque en ese momento era el más fácil de usar por su excelente manual y su método de cálculo de ancho de columna implementado con pesos proporcionales, manejo y espaciado de texto, control de estilo y color, hoy por ejemplo los comandos para colorear las celdas no funcionan, también está incompleto pero puede se puede usar junto con algunos comandos para tabular, en el caso del ejemplo donde el error es usar \topruleen un entorno tabú, donde debes usar \tabucline -, para el texto es cuestión de jugar con las proporciones de columnas crecientes donde necesitas que el texto llenar menos líneas. También puedes establecer el color de las líneas, pero para aquellas que no pertenecen a tabú debes utilizar los comandos correspondientes y no olvides colocarlo dentro del entorno de tabla; Agrego un ejemplo probando lo que se puede hacer hasta ahora sin morir en el intento.

RESULTADO:

ingrese la descripción de la imagen aquí

MWE:

\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}

información relacionada