열 항목과 새로 정의된 열 구분 기호 사이의 공백을 억제합니다.

열 항목과 새로 정의된 열 구분 기호 사이의 공백을 억제합니다.

다른 게시물에서 설명했듯이 열 구분 기호를 다음과 같이 정의했습니다.

\newcolumntype{"}{@{\hskip\tabcolsep\vrule width 1pt\hskip\tabcolsep}}

일반 구분 기호를 사용 |하여 @{}열 항목을 차례로 만들었습니다. 이것은 더 이상 작동하지 않습니다. 새 구분 기호에서도 작동하게 할 수 있는 방법이 있습니까?

최소한의 완전한 작업 예로서, 첫 번째 표에서는 텍스트가 Round구분 기호에서 멀리 떨어져 있고 두 번째 표에서는 텍스트가 그 옆에 있습니다.

\documentclass[a4paper,twoside]{article}

\usepackage{epsfig}
\usepackage{subfigure}
\usepackage{calc}
\usepackage{amssymb}
\usepackage{amstext}
\usepackage{amsmath}
\usepackage{amsthm}
\usepackage{multicol}
\usepackage{pslatex}
\usepackage{apalike}
\usepackage{ulem}
\usepackage{tabularx}
\makeatletter
\newcommand{\thickhline}{%
    \noalign {\ifnum 0=`}\fi \hrule height 1.2pt
    \futurelet \reserved@a \@xhline
}
\newcolumntype{"}{@{\hskip\tabcolsep\vrule width 1pt\hskip\tabcolsep}}
\makeatother

\begin{document}

\title{Title}
\maketitle
\begin{table} % Add the following just after the closing bracket on this line to specify a position for the table on the page: [h], [t], [b] or [p] - these mean: here, top, bottom and on a separate page, respectively
\centering % Centres the table on the page, comment out to left-justify
\tiny
\begin{tabular}{@{}c@{}" c@{ }|@{ }c " c@{}|@{}c  " c@{}|@{}c" c@{}|@{}c} 
%\toprule % Top horizontal line
\textbf{\footnotesize{Round}} & \multicolumn{8}{c}{\textbf{\footnotesize{Test run}}} \\ % Amalgamating several columns into one cell 
%\cline{2-9}
%\cmidrule(l){2-5} % Horizontal line spanning less than the full width of the table - you can add (r) or (l) just before the opening curly bracket to shorten the rule on the left or right side
 & \multicolumn{2}{c"}{\textbf{1}} & \multicolumn{2}{c"}{\textbf{2}} & \multicolumn{2}{c"}{\textbf{3}} & \multicolumn{2}{c}{\textbf{4}}\\ % Column names row
%\cline{2-9}
& devices&users & devices&users & devices&users & devices&users\\
\thickhline

\textbf{1} & $440$                &    $10$    & $440 $               &   $10^2$      & $440$        &           $10^3$     & $440$           &           $ 10^4$ 

\end{tabular}
\caption{Table caption text} 
\label{tab:template} 
\end{table}


\begin{table} 
\centering 
\tiny
\begin{tabular}{@{}c@{}| c@{ }|@{ }c " c@{}|@{}c  " c@{}|@{}c" c@{}|@{}c} 

\textbf{\footnotesize{Round}} & \multicolumn{8}{c}{\textbf{\footnotesize{Test run}}} \\ % Amalgamating several columns into one cell 

 & \multicolumn{2}{c"}{\textbf{1}} & \multicolumn{2}{c"}{\textbf{2}} & \multicolumn{2}{c"}{\textbf{3}} & \multicolumn{2}{c}{\textbf{4}}\\
& devices&users & devices&users & devices&users & devices&users\\
\thickhline

\textbf{1} & $440$                &    $10$    & $440 $               &   $10^2$      & $440$        &           $10^3$     & $440$           &           $ 10^4$ 

\end{tabular}
\caption{Table caption text} 
\label{tab:template} 
\end{table}


\end{document}

답변1

사용

\newcolumntype{"}{!{\vrule width 1pt}}

~ 아니다

\newcolumntype{"}{@{\hskip\tabcolsep\vrule width 1pt\hskip\tabcolsep}}

!@자동 공간을 억제하지 않지만 \tabcolsep인접한 것은 자동 공간 @{}을 억제합니다.

관련 정보