
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}
다음과 같은 결과가 나타납니다.
- 왼쪽의 겹치는 부분에 주목하세요. 어떻게 제거할 수 있나요?
- 하단이 아닌 열 중앙에 글꼴이 중앙에 오도록 어떻게 조정합니까?
답변1
\extrarowheight
행을 끊을 때 간격의 절반을 추가 하고 절반을 추가하십시오.
tabular
또한 대신 사용할 수도 있습니다 tabular*
.
잘못된 공간이 있는 왼쪽 음표의 겹침을 수정하려면
@{\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}
산출
답변2
간단한 표 또는 표 형식을 사용하십시오.x:
\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}