세로 방향 텍스트가 있는 셀이 있는 긴 테이블 표시

세로 방향 텍스트가 있는 셀이 있는 긴 테이블 표시

다음은 내가 이해하는 한 내 테이블에 대한 설명입니다. 첫 번째 행은 두 행의 조합입니다. 첫 번째 행의 첫 번째 셀은 비어 있고, 첫 번째 행의 두 번째 셀은 5개 열의 조합(text=GrpNumber1), 첫 번째 행 열의 세 번째 셀은 4개 열의 조합(text= GrpNumber2), 첫 번째 행의 4번째 셀은 2개 열의 조합(text=GrpNumber3), 1번째 행의 5번째, 6번째 및 7번째 셀은 (text=GrpNumber4), (text=GrpNumber5), (text)의 3개 열 조합입니다. =GrpNumber6) 각각. 두 번째 행에는 각 셀에 대해 동일한 수의 열이 있으며, 네 번째 셀에만 "Task"라는 텍스트가 있습니다. 세 번째 행에는 각 셀에 대해 동일한 수의 열이 있지만 각 셀의 텍스트는 아래에서 위로 수직 방향으로 표시됩니다. 나머지 행에는 텍스트가 있습니다. 첫 번째 셀에 눈금을 표시하고 나머지 셀에 십자 표시를 하면 20행까지 계속됩니다.

테이블의 샘플 이미지가 업로드됩니다.

Word의 샘플 이미지

텍스트를 만들었습니다. 첫 번째와 두 번째 행은 올바르게 코딩할 수 있지만 세로 방향 텍스트가 있는 세 번째 행은 코딩할 수 없습니다. 그 이후에는 진행할 수 없습니다. 세로 방향 텍스트를 인쇄하기 위해 '\rot'을 사용했습니다.

내 코드는 다음과 같습니다

\documentclass[manuscript,screen]{acmart}
\usepackage{listings}
\input{solidity-highlighting.tex}
\usepackage[colorinlistoftodos]{todonotes} 
\AtBeginDocument{%
  \providecommand\BibTeX{{%
    \normalfont B\kern-0.5em{\scshape i\kern-0.25em b}\kern-0.8em\TeX}}}


\setcopyright{acmcopyright}
\copyrightyear{2020}
\acmYear{2020}
\acmDOI{10.1145/1122445.1122456}


\begin{document}

\title{A Test of Latex}

\author{Khan}
\email{Khan@edu}

\affiliation{}
  \institution{University} 

\renewcommand{\shortauthors}{Trovato and Tobin, et al.}


\begin{abstract}
  Testing abstract
\end{abstract}


\begin{CCSXML}
<ccs2012>
<concept>
<concept_id>10002978.10003022</concept_id>
<concept_desc> and application security</concept_desc>
<concept_significance>500</concept_significance>
</concept>
<concept>
<concept_id>10002944.10011122.10002945</concept_id>
<concept_desc>General and reference~Surveys and overviews</concept_desc>
<concept_significance>500</concept_significance>
</concept>
</ccs2012>
\end{CCSXML}

\ccsdesc[500]{Security and privacy~Software and application security}
\ccsdesc[500]{General and reference~Surveys and overviews}



\maketitle

\section{Introduction}

Hello. \citet{1}, \citet{2}, \citet{3} %\cite{8} \cite{105} \cite{112} %\cite{48} \cite{87}.

\begin{lstlisting}[language=Solidity] 
contract TestList1{

}
\end{lstlisting}

\begin{table}[]
   \centering
    \begin{tabular}{l|ccccc|cccc|cc|ccc|ccc|ccc}
 \hline
        & \multicolumn{5}{c|}{\bf GrpNumber1} &     \multicolumn{4}{c|}{\bf GrpNumber2} & \multicolumn{2}{c|}{\bf GrpNumber3} & \multicolumn{3}{c|}{\bf GrpNumber4} & \multicolumn{3}{c|}{\bf GrpNumber5} & \multicolumn{3}{c}{\bf GrpNumber6} \\
        & \multicolumn{5}{c|}{\bf } &   \multicolumn{4}{c|}{\bf } & \multicolumn{2}{c|}{\bf Task} & \multicolumn{3}{c|}{\bf } & \multicolumn{3}{c|}{\bf } & \multicolumn{3}{c}{\bf } \\
    \hline

이 줄 아래의 코드는 제대로 작동하지 않습니다.

& \rot{Grp1Member1} & \rot{Grp1Member2} & \rot{Grp1Member3}     & \rot{Grp1Member4}
    & \multicolumn{1}{c|}{\rot{Grp1Member5}} 
    & \rot{Grp2Member1} 
    & \rot{Grp2Member2} 
    & \rot{Grp2Member3} 
    & \multicolumn{1}{c|}{\rot{Grp2Member4}} 
    & \rot{Grp3Member1} 
    & \multicolumn{1}{c|}{\rot{Grp3Member2}} 
    & \rot{Grp4Member1} 
    & \rot{Grp4Member2} 
    & \multicolumn{1}{c|}{\rot{Grp4Member3}}
     & \rot{Grp5Member1} 
     & \rot{Grp5Member2} 
     & \multicolumn{1}{c|}{\rot{Grp5Member3}} 
     & \rot{Grp6Member1} 
     & \rot{Grp6Member2} 
     & \multicolumn{1}{c|} {\rot{Grp6Member3}} \\
     \hline
    \end{tabular}
    \caption{Testing Table for Classification.}
   \label{tab:classification}
 \vspace{-0.1in} 
\end{table}
\bibliographystyle{ACM-Reference-Format}
\bibliography{sourcefile-bib}


\end{document}
\endinput

또한 "체크 표시"를 인쇄하는 방법도 알고 싶습니다.

전체 작업 코드를 보여주세요.

줄피.

답변1

문서 예에서

  • 최소한은 아니고,
  • 제가 이해한 바로는 테이블에 문제가 있는 것으로 보입니다. 따라서 테이블과 관련되지 않은 다른 것들을 모두 제거해 주시기 바랍니다.
  • 테이블을 컴파일하는 데 필요한 정의와 패키지가 누락되었습니다.
  • 테이블 헤더가 너무 넓어서 테이블이 페이지에 들어갈 수 있습니다. 솔루션은 아래 MWE에서 수행된 것처럼 이름을 일부 약어(예: "GN")로 바꾸고 캡션에서 그 의미를 설명할 수 있습니다.
  • 테이블에만 초점을 맞춘 가능한 MWE는 다음과 같습니다.
\documentclass[manuscript,screen]{acmart}
%\usepackage{listings}
%\input{solidity-highlighting.tex}
%\usepackage[colorinlistoftodos]{todonotes}
%\AtBeginDocument{%
%  \providecommand\BibTeX{{%
%    \normalfont B\kern-0.5em{\scshape i\kern-0.25em b}\kern-0.8em\TeX}}}


%\setcopyright{acmcopyright}
%\copyrightyear{2020}
%\acmYear{2020}
%\acmDOI{10.1145/1122445.1122456}

%%% new packages and definitions  ------------------------------%
\usepackage{rotating}
\usepackage{array, makecell}
\renewcommand\rotheadgape{}
\usepackage{xparse}
\NewExpandableDocumentCommand\mcc{O{1}m}
    {\multicolumn{#1}{>{\bfseries\small}c|}{#2}}
%---------------- show page layout. don't use in a real document!
\usepackage{showframe}
\renewcommand\ShowFrameLinethickness{0.15pt}
\renewcommand*\ShowFrameColor{\color{red}}
\usepackage{lipsum}  % for dummy text
%---------------------------------------------------------------%

%\title{A Test of Latex}
%\author{Khan}
%\email{Khan@edu}
%\affiliation{}
%\institution{University}
%\renewcommand{\shortauthors}{Trovato and Tobin, et al.}

\begin{document}
%   \maketitle


%\begin{abstract}
%  Testing abstract
%\end{abstract}


%\begin{CCSXML}
%<ccs2012>
%<concept>
%<concept_id>10002978.10003022</concept_id>
%<concept_desc> and application security</concept_desc>
%<concept_significance>500</concept_significance>
%</concept>
%<concept>
%<concept_id>10002944.10011122.10002945</concept_id>
%<concept_desc>General and reference~Surveys and overviews</concept_desc>
%<concept_significance>500</concept_significance>
%</concept>
%</ccs2012>
%\end{CCSXML}

%\ccsdesc[500]{Security and privacy~Software and application security}
%\ccsdesc[500]{General and reference~Surveys and overviews}



%\maketitle

%\section{Introduction}

Hello. %\citet{1}, \citet{2}, \citet{3} %\cite{8} \cite{105} \cite{112} %\cite{48} \cite{87}.

%\begin{lstlisting}[language=Solidity]
%contract TestList1{
%}
%\end{lstlisting}

\lipsum[11]
\begin{table}[ht]
\settowidth\rotheadsize{Grp1Member1}
\setlength\tabcolsep{4pt}
\centering
    \begin{tabular}{|l|ccccc|cccc|cc|ccc|ccc|ccc|}
 \hline
    &   \mcc[20]{task}                      \\
    \cline{2-21}
    &   \mcc[5]{GN 1}
        &   \mcc[4]{GN 2}
            &   \mcc[2]{GN 3}
                &   \mcc[3]{GN 4}
                    &   \mcc[3]{GN 5}
                        &   \mcc[3]{GN 6}   \\
    \hline
    & \rothead{Grp1Member1} & \rothead{Grp1Member2} & \rothead{Grp1Member3} 
    & \rothead{Grp1Member4} & \rothead{Grp1Member5} & \rothead{Grp2Member1}
    & \rothead{Grp2Member2} & \rothead{Grp2Member3} & \rothead{Grp2Member4}
    & \rothead{Grp3Member1} & \rothead{Grp3Member2} & \rothead{Grp4Member1}
    & \rothead{Grp4Member2} & \rothead{Grp4Member3} & \rothead{Grp5Member1}
    & \rothead{Grp5Member2} & \rothead{Grp5Member3} & \rothead{Grp6Member1}
    & \rothead{Grp6Member2} & \rothead{Grp6Member3} \\
    \hline
    \end{tabular}
    \caption{Testing Table for Classification. GN stands for GrpNumber.}
   \label{tab:classification}
\end{table}
\end{document}

여기에 이미지 설명을 입력하세요

(빨간색 선은 페이지 레이아웃을 나타냅니다)

MWE는 Overleaf에서 컴파일되었습니다.

관련 정보