조경 환경의 롱테이블

조경 환경의 롱테이블

7개의 열이 있는 긴 테이블이 필요하므로 가로 형식을 선택했습니다. 올바른 위치에 있지 않은 마지막 열의 텍스트를 제외하고 모든 것이 잘 작동합니다. 텍스트가 페이지의 여백을 준수하지 않는 이유를 이해할 수 없습니다(표 뒤에 쓴 텍스트는 다음과 같습니다). 그림에는 이에 대한 예가 나와 있습니다.

다음은 문제를 재현하는 몇 줄의 코드입니다.

\documentclass{report}
\usepackage{array}
\usepackage{pdflscape}
\usepackage{colortbl}
\usepackage{longtable}

\begin{document}

\begin{landscape}

\footnotesize
\begin{longtable}
{>{\centering\hspace{0pt}}m{0.055\linewidth}>
{\centering\hspace{0pt}}m{0.06\linewidth}>
{\centering\hspace{0pt}}m{0.22\linewidth}>
{\centering\hspace{0pt}}m{0.04\linewidth}>
{\centering\hspace{0pt}}m{0.15\linewidth}>
{\centering\hspace{0pt}}m{0.05\linewidth}>
{\centering\arraybackslash\hspace{0pt}}m{0.3\linewidth}}
\caption{EEG table} \\
\label{tab:EEG}
\textbf{} & \textbf{Cohort} & \textbf{MI Task} & \textbf{NC} &
\textbf{Network Nodes} & \textbf{Metrics} & \textbf{Main Findings} 
\endfirsthead

\multicolumn{7}{c}%
{{\bfseries \tablename\ \thetable{} -- continued from previous page}} \\
\\
 \textbf{} & \textbf{Cohort} & \textbf{MI Task} & \textbf{NC} 
& \textbf{Network Nodes} & \textbf{Metrics} & \textbf{Main Findings}\\ \hline 
\endhead

\hline
\multicolumn{7}{>{\centering\arraybackslash\hspace{0pt}}m{1.089\linewidth}}
{{\cellcolor[rgb]{0.714,0.714,0.714}}\textbf{Effective Connectivity}}   
\\
\hline 

\rowcolor[rgb]{0.871,0.871,0.871} Vukelić, Mathias et al. (2014)                 & 16 HS                                                                            & kinesthetic imagination of opening the right hand; each trial consisted of a preparation (2s), MI (6s), and rest (8s) phase                                                                                                                                                                                                      & 32                                                                      & 24 electrodes as nodes                                                                                                                                                                                   & PSI                                                  & activation of an ipsilateral sensorimotor–parietal EC network is an indicator of a low ability for regional sensorimotor $\beta$-modulation                                                                                                                                                                                                                                               \\
Yi, Weibo et al. (2014)                                                          & 10 HS                                                                            & imagine left hand, right hand, feet, both hands and hand combined with foot movements; each trial consisted of a preparation cue (1s), MI (4s) and rest (1s) phase                                                                                                                                                               & 64                                                                      & 21 electrodes as nodes                                                                                                                                                                                   & \textcolor{red}{PLV}, SDTF       & findings imply that there exist apparent intrinsic distinctions of neural mechanism between simple and compound limb MI, which presents a more complex EC network and may involve a more complex cognitive process during information processing                                                                                                                                                           \\
\rowcolor[rgb]{0.871,0.871,0.871} Liang, Shuang et al. (2016)                    & 9 HS                                                                             & imagination of movement of the left hand, right hand, both feet and tongue; each trial consisted of a cue (1.25s), MI (3s, no feedback was provided) and rest (1.5s) phase                                                                                                                                                       & 22                                                                      & 9 electrodes used as nodes                                                                                                                                                                               & PDC                                                  & significant EC exists in the bilateral hemisphere during the tasks, regardless of the left or right-hand MI tasks. Furthermore, the out-in rate results of the information flow reveal the existence of contralateral lateralisation; \textcolor{red}{using PDC to compute EC provides efficient features for the detection of MI tasks and has great potential to be applied in BCIs}  

\end{longtable}

\textbf{Abbreviations:}
\textbf{ADTF} Adaptive Directed Transfer Function,
\textbf{BCI} Brain Computer Interface,
\textbf{CCorr} Cross Correlation,
\textbf{CMA} Cingulate Motor Areas,
\textbf{Coh} Coherence,
\textbf{Corr} Correlation,
\textbf{DCM} Dynamic Causal Modelling


\end{landscape}

\end{document}

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

답변1

대신 패키지를 longtblr사용 하면 더 짧은 코드를 작성하여 더 나은 형식의 테이블을 제공할 수 있습니다. 열을 사용하면 테이블 너비가 (= )와 같고 두 번째 및 네 번째 열을 제외하고 열 너비 간의 비율을 결정할 수도 있습니다. 이 열에서는 셀 내용에 따라 결정된 자연 너비가 유지됩니다. 두 번째와 마지막 열에는 정렬된 텍스트가 있는데, 제 생각에는 표가 더 보기 좋게 보입니다.tabularraylongtalbleX\linewidth\textheight

\documentclass{report}
\usepackage{pdflscape}
\usepackage{xcolor}
\usepackage{tabularray}
\UseTblrLibrary{booktabs}

\begin{document}
    \begin{landscape}
    \footnotesize
\begin{longtblr}[
caption = {EEG table},
  label = {tab:EEG}
                ]{colsep=4pt,
                  colspec = {X[0.5,l,m] Q[c,m]
                             X[1.8,j,m] Q[c,m] X[0.7,l,m] X[0.3,c,m]
                             X[2.2,j,m]
                            },
                  cell{2}{1} = {c=7}{c},
                  row{1,2} = {c, font=\bfseries},
                  row{2}   = {font=\bfseries, bg=gray!45},
                  row{odd[3]} = {bg=gray!15},
                  rowhead  = 1}
    \toprule
    &   Cohort  
        &   MI Task 
            &   NC  
                &   Network Nodes   
                    &   Met\-rics 
                        &   Main Findings   \\
    \midrule
Effective Connectivity
    &   &   &   &   &   &                   \\
Vukelić, Mathias et al. (2014)                 
    &   16 HS   
        &   kinesthetic imagination of opening the right hand; each trial consisted of a preparation (2s), MI (6s), and rest (8s) phase
            &   32
                &   24 electrodes as nodes
                    &   PSI
                        &   activation of an ipsilateral sensorimotor–parietal EC network is an indicator of a low ability for regional sensorimotor $\beta$-modulation
                        \\
Yi, Weibo et al. (2014)
    &   10 HS 
        &   imagine left hand, right hand, feet, both hands and hand combined with foot movements; each trial consisted of a preparation cue (1s), MI (4s) and rest (1s) phase
            &   64
                &   21 electrodes as nodes
                    & \textcolor{red}{PLV}, SDTF
                        &   findings imply that there exist apparent intrinsic distinctions of neural mechanism between simple and compound limb MI, which presents a more complex EC network and may involve a more complex cognitive process during information processing                                                                                                                                                           \\
Liang, Shuang et al. (2016)                    
    &   9 HS                                                                             
        &   imagination of movement of the left hand, right hand, both feet and tongue; each trial consisted of a cue (1.25s), MI (3s, no feedback was provided) and rest (1.5s) phase                                                                                                                                                     
            &   22
                &   9 electrodes used as nodes
                    &   PDC
                        &   significant EC exists in the bilateral hemisphere during the tasks, regardless of the left or right-hand MI tasks. Furthermore, the out-in rate results of the information flow reveal the existence of contralateral lateralisation; \textcolor{red}{using PDC to compute EC provides efficient features for the detection of MI tasks and has great potential to be applied in BCIs}
                        \\
    \bottomrule
\end{longtblr}

\textbf{Abbreviations:}
\textbf{ADTF} Adaptive Directed Transfer Function,
\textbf{BCI} Brain Computer Interface,
\textbf{CCorr} Cross Correlation,
\textbf{CMA} Cingulate Motor Areas,
\textbf{Coh} Coherence,
\textbf{Corr} Correlation,
\textbf{DCM} Dynamic Causal Modelling
    \end{landscape}
\end{document}

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

답변2

1.089\linewidth여러 열에 명시적 텍스트 블록을 사용하여 표를 텍스트 블록보다 넓게 강제로 설정했는데 열 너비와 \tabcolsep간격의 합이 가 넘었기 때문에 여기서 \linewidth줄였습니다 .\tabcolsep

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

\documentclass{report}
\usepackage{array}
\usepackage{pdflscape}
\usepackage{colortbl}
\usepackage{longtable}

\begin{document}

\begin{landscape}
\noindent X\dotfill X

\footnotesize
\setlength\tabcolsep{4.9pt}
\begin{longtable}
{>{\centering\hspace{0pt}}m{0.055\linewidth}>
{\centering\hspace{0pt}}m{0.06\linewidth}>
{\centering\hspace{0pt}}m{0.22\linewidth}>
{\centering\hspace{0pt}}m{0.04\linewidth}>
{\centering\hspace{0pt}}m{0.15\linewidth}>
{\centering\hspace{0pt}}m{0.05\linewidth}>
{\centering\arraybackslash\hspace{0pt}}m{0.3\linewidth}}
\caption{EEG table} \\
\label{tab:EEG}
\textbf{} & \textbf{Cohort} & \textbf{MI Task} & \textbf{NC} &
\textbf{Network Nodes} & \textbf{Metrics} & \textbf{Main Findings} 
\endfirsthead

\multicolumn{7}{c}%
{{\bfseries \tablename\ \thetable{} -- continued from previous page}} \\
\\
 \textbf{} & \textbf{Cohort} & \textbf{MI Task} & \textbf{NC} 
& \textbf{Network Nodes} & \textbf{Metrics} & \textbf{Main Findings}\\ \hline 
\endhead

\hline
\multicolumn{7}{c}
{{\cellcolor[rgb]{0.714,0.714,0.714}}\textbf{Effective Connectivity}}   
\\
\hline 

\rowcolor[rgb]{0.871,0.871,0.871} Vukelić, Mathias et al. (2014)                 & 16 HS                                                                            & kinesthetic imagination of opening the right hand; each trial consisted of a preparation (2s), MI (6s), and rest (8s) phase                                                                                                                                                                                                      & 32                                                                      & 24 electrodes as nodes                                                                                                                                                                                   & PSI                                                  & activation of an ipsilateral sensorimotor–parietal EC network is an indicator of a low ability for regional sensorimotor $\beta$-modulation                                                                                                                                                                                                                                               \\
Yi, Weibo et al. (2014)                                                          & 10 HS                                                                            & imagine left hand, right hand, feet, both hands and hand combined with foot movements; each trial consisted of a preparation cue (1s), MI (4s) and rest (1s) phase                                                                                                                                                               & 64                                                                      & 21 electrodes as nodes                                                                                                                                                                                   & \textcolor{red}{PLV}, SDTF       & findings imply that there exist apparent intrinsic distinctions of neural mechanism between simple and compound limb MI, which presents a more complex EC network and may involve a more complex cognitive process during information processing                                                                                                                                                           \\
\rowcolor[rgb]{0.871,0.871,0.871} Liang, Shuang et al. (2016)                    & 9 HS                                                                             & imagination of movement of the left hand, right hand, both feet and tongue; each trial consisted of a cue (1.25s), MI (3s, no feedback was provided) and rest (1.5s) phase                                                                                                                                                       & 22                                                                      & 9 electrodes used as nodes                                                                                                                                                                               & PDC                                                  & significant EC exists in the bilateral hemisphere during the tasks, regardless of the left or right-hand MI tasks. Furthermore, the out-in rate results of the information flow reveal the existence of contralateral lateralisation; \textcolor{red}{using PDC to compute EC provides efficient features for the detection of MI tasks and has great potential to be applied in BCIs}  

\end{longtable}

\textbf{Abbreviations:}
\textbf{ADTF} Adaptive Directed Transfer Function,
\textbf{BCI} Brain Computer Interface,
\textbf{CCorr} Cross Correlation,
\textbf{CMA} Cingulate Motor Areas,
\textbf{Coh} Coherence,
\textbf{Corr} Correlation,
\textbf{DCM} Dynamic Causal Modelling


\end{landscape}

\end{document}

관련 정보