如何让表格单元格中的文本和上面的行之间的尺寸变小?

如何让表格单元格中的文本和上面的行之间的尺寸变小?

我已经创建了一个表格,并且固定了它的宽度,问题是我想让单元格中的文本和上面的表格行之间留出一个小空间,因为它们非常接近,看看 RSS 单词和上面的行之间的空间描述

我的代码:

\begin{filecontents*}{Draft Paper.eps}
%!PS-Adobe-3.0 EPSF-3.0
%%BoundingBox: 19 19 221 221
%%CreationDate: Mon Sep 29 1997
%%Creator: programmed by hand (JK)
%%EndComments
gsave
newpath
  20 20 moveto
  20 220 lineto
  220 220 lineto
  220 20 lineto
closepath
2 setlinewidth
gsave
  .4 setgray fill
grestore
stroke
grestore
\end{filecontents*}
\documentclass[twocolumn]{svjour3}          % twocolumn
\usepackage{multirow}
\usepackage{booktabs}% http://ctan.org/pkg/booktabs
\newcommand{\tabitem}{~~\llap{\textbullet}~~}

\begin{document}
\begin{center}
\begin{table*}[htp]
%\scriptsize        
\centering
%\begin{tabular}{|l|l|l|l|l|l|l|l|l|}
\begin{tabular}  {  |p{0.04\textwidth}|
p{0.04\textwidth}|p{0.12\textwidth}|p{0.12\textwidth}|p{0.13\textwidth}|p{0.13\textwidth}|p{0.12\textwidth}|p{0.12\textwidth}|p{0.02\textwidth}|} 


%%{  |p{0.04\textwidth}|
%%p{0.04\textwidth}|p{0.12\textwidth}|p{0.12\textwidth}|p{0.13\textwidth}|p{0.13\textwidth}|p{0.12\textwidth}|p{0.12\textwidth}|p{0.02\textwidth}|} 



\hline
Text Text Text
&

Text Text Text
&
Text Text Text
& 
Text  
& 
Text Text  & Text Text  & Text Text  & Text Text  & Text Text  

\\ \hline

{\multirow {10}{*}{\rotatebox{90}{ {Text Text } }}}  & 


%[origin=c] [3em]{\cellcolor{yellow}\begin{sideways}TEST\end{sideways}}


%{\multirow {2}[3em]{\cellcolor{yellow}\begin{sideways}TEST\end{sideways}}}  & 

{\multirow [c]{14}{*}{\rotatebox{90}{ Text   }}}


 & 

Text Text Text .
& 
Text Text .
& 

%\begin{tabular} {@{}l@{}}

 
\begin{tabitemize}

\item
RSS. 
\item Text Text .

\item Text Text .
\end{tabitemize}
 & 
 
 

%\begin{tabular}{@{}l@{}}
 
\begin{tabitemize}
\item Text Text .
\item Text Text  .  
\item Text Text  %\hspace{0.28cm}
rate.
\end{tabitemize}
%\end{tabular}  

&   

Text Text Text   Text Text  Text Text .

& 
Text    Text Text  Text Text .

& 

Text 



\\ \cline{3-9}&  & 

Text Text Text .
& 
Text  Text  Text  (10 Text   Text  5 Text ).
& 
 
 
 
 %\begin{tabular}{@{}l@{}}
 
\begin{tabitemize}
\item Text .
\item Text  Text . 
\item Text .
 
\end{tabitemize}
%\end{tabular}

& 

Text  Text   Text   Text .
&
Text  Text   Text   Text    Text  Text .
& 
Text  Text   Text  Text   Text  Text   Text .

& 

Text  \\ 


\cline{1-1} \cline{3-9} 

\multirow{4}{*} {\rotatebox[origin=c]{90} {   Text   }}  &  
&
Text -Text . 
 &
Text  Text   Text .
& 


Text  Text   Text   Text  in $t_{n}$.
& 

Text  Text   Text  Text   Text  Text  $t_{n+1}$.
& 
Text  Text  Text   Text  Text  Text   Text  Text .
& 
%\multicolumn{1}{c|}{
//
%} 
& 

Text  

\\ 
\hline

%\multirow{5}{*}{\rotatebox{90}{Example 3}}

\multirow{8}{*} {\rotatebox[origin=c]{90} {   Text    }} & 

\multirow{8}{*} {\rotatebox[origin=c]{90} {   Text  }}
& 
Text Text . 
&
Text Text Text .
& 
%\begin{tabular} {@{}l@{}}
 
\begin{tabitemize}
\item Text Text . 
\item Text . 
\item Text . 
\item Text . 
\item Text  Text . 
\item Text  Text . 
 
\end{tabitemize}
%\end{tabular}
&
Text  Text  Text   (Text , Text ,  Text , Text Text Text ).
& 
Text Text Text .
& 
Text Text Text Text .

& 


Text 

\\ \hline

\end{tabular}
\caption{Text Text Text Text }
\label{Text }   
\end{table*}
\end{center}

\end{document}

答案1

有了{NiceTabular}nicematrix您就有了两个钥匙cell-space-bottom-limitcell-space-top-limit

\documentclass{article}
\usepackage{geometry}
\usepackage{graphicx}
\usepackage{nicematrix}


\begin{document}
\begin{table}[htp]
\small
\centering
\NiceMatrixOptions{cell-space-top-limit=2pt,cell-space-bottom-limit=2pt}
\newcolumntype{P}[1]{>{\raggedright}p{#1\textwidth}}
\begin{NiceTabular}{P{0.04}P{0.04}P{0.12}P{0.12}P{0.12}P{0.12}P{0.12}P{0.12}C}[hvlines]
Text text text text
& Text text text text
& Text text text text
& Text text text text
& Text text text text
& & & & \\
\Block{2-1}{\rotate Example 1}
& \Block{3-1}{\rotate Example 2}
& Text text text text
& Text text text text
& Text text text text Text text text text
& Text text text text Text text text text Text text text text
& Text text text text Text text text text Text text text text Text text text text
& Text text text text
& r1 \\ 
&  
& Text text text text
& Text text text text
& Text text text text Text text text text
& Text text text text
& Text text text text
& Text text text text
& r2 \\ 
\multicolumn{1}{C}{\rotatebox[origin=b]{90}{Feedback\vphantom{p}}}
&   & Text text text text
& Text text text text
& Text text text text
& Text text text text
& Text text text text
&   & r3    \\
\multicolumn{1}{C}{\rotatebox[origin=b]{90}{Example 3}}
& \multicolumn{1}{C}{\rotatebox[origin=b]{90}{Example 4}}
& Text text text text
& Text text text text
& Text text text text Cost.
& Text text text text
& Text text text text
& Text text text text
& r4    \\
\end{NiceTabular}
\end{table}
\end{document}

上述代码的结果

相关内容