Ajustes de la mesa LaTeX

Ajustes de la mesa LaTeX

Estoy escribiendo la siguiente tabla en LaTeX:

\begin{center}
\setlength\extrarowheight{5pt}
%\renewcommand{\arraystretch}{1.2}
\begin{tabular*}{3.4in}{@{\extracolsep{\fill} }  | c | c | c | c | c | c | c | }
  \hline
  \small\textit{g(t+0)} & \small\textit{g(t+1)} & \small\textit{g(t+2)} & \small\textit{f(t+3)} & \small\textit{f(t+4)} & \small\textit{g(t+5)} & \small{...}  \\
  \hline
\end{tabular*}
\end{center}

Obtengo el siguiente resultado:

salida electrónica

  1. Tenga en cuenta la superposición a la izquierda. ¿Cómo puedo eliminarlos?
  2. ¿Cómo ajusto las fuentes para que se centren en el medio de las columnas que no sean en la parte inferior?

Respuesta1

Agregue la mitad del espacio \extrarowheighty la mitad cuando rompa la fila.

Además, puedes utilizartabular en lugar de tabular*.

Para arreglar la superposición en la izquierda, tenga en cuenta que tiene un espacio falso en

@{\extracolsep{\fill} }

MWE

\documentclass{article}
\usepackage{array}

\begin{document}

\begin{center}
\setlength\extrarowheight{2.5pt}
%\renewcommand{\arraystretch}{1.2}
\begin{tabular}{@{\extracolsep{\fill}}  | c | c | c | c | c | c | c | }
  \hline
  \small\textit{g(t+0)} & \small\textit{g(t+1)} & \small\textit{g(t+2)} & \small\textit{f(t+3)} & \small\textit{f(t+4)} & \small\textit{g(t+5)} & \small{...}\\[2.5pt]
  \hline
\end{tabular}
\end{center}
\end{document} 

Producción

ingrese la descripción de la imagen aquí

Respuesta2

use un tabular simple o tabularx:

\documentclass{article}
\usepackage{tabularx}
\begin{document}

foo

{\small\itshape
\begin{tabular}{|*7{c|}}  \hline
\rule[-2ex]{0pt}{6ex} g(t+0) & g(t+1) & g(t+2) & f(t+3) & f(t+4) & g(t+5) & \ldots\\\hline
\end{tabular}}

{\small\itshape
\begin{tabularx}{3.8in}{|*6{X |}c|}  \hline
\rule[-2ex]{0pt}{6ex} g(t+0) & g(t+1) & g(t+2) & f(t+3) & f(t+4) & g(t+5) & \ldots\\\hline
\end{tabularx}}

bar
\end{document} 

ingrese la descripción de la imagen aquí

información relacionada