makecell, threeparttable 및 tableulary를 동시에 사용할 수 없습니다.

makecell, threeparttable 및 tableulary를 동시에 사용할 수 없습니다.

makecell나는 (셀 내에서 행 나누기를 달성하기 위해) 및 tabulary(테이블이 초과하지 않도록 하기 위해 ) 두 가지를 동시에 사용하는 동시에 "3부분 테이블"을 달성하려고 합니다 \linewidth. 그러나 tabulary사용하지 않는 세 부분 테이블(아래 첫 번째 코드 예제)과 사용 하지 않는 makecell테이블 (아래 두 번째 코드 예제)을 얻을 수 있지만 세 부분(세 번째 예제)을 결합하는 문서를 만들 수는 없습니다. 무엇을 해야 할까요?tabularymakecellthreeparttable

tabularx나는 이 특정 테이블을 만드는 대신 을 사용한다는 것을 알고 있지만 tabulary이러한 테이블이 많이 있습니다. 각 테이블을 개별적으로 확인하는 대신 tabulary. 또한 나는 사용하기로 결정하지는 않았지만 makecell셀 내에서 행 나누기를 가질 수 있어야 합니다(그리고 수직 정렬을 제어할 수 있어야 합니다).

어떤 도움이라도 주시면 감사하겠습니다!

첫 번째 예( threeparttable하지만 tabular아니오 makecell)

\documentclass{article}
\usepackage[para]{threeparttable}
\usepackage{tabulary}
\begin{document}
  \begin{table}
    \begin{threeparttable}
      \caption{Lorem ipsum dolor sit amet, consectetur}

      {
        \begin{tabulary}{\linewidth}{L r L r}
        \textbf{Aaa} & \textbf{Bbb} & \textbf{Ccc} \tabularnewline
         & & Ccc1 & Ccc2 \tabularnewline
        Adipisicing elit, sed do eiusmod tempor & \(0.40\) & Ut labore et dolore magna aliqua & \(7.77\) \tabularnewline
        Ut enim ad minim veniam, quis nostrud exercitation & \(0.93\) & Ullamco laboris nisi ut aliquip ex ea commodo consequat & \(62.6\) \tabularnewline
        \end{tabulary}
      }
    \end{tablenotes}
  \end{threeparttable}
\end{document}

두 번째 예( tabulary하지만 makecell아니threeparttable

\documentclass{article}
\usepackage{tabulary}
\usepackage{makecell}
\begin{document}
  \begin{table}
    \caption{Lorem ipsum dolor sit amet, consectetur}

    {
      \begin{tabulary}{\linewidth}{L r L r}
      \textbf{Aaa} & \textbf{Bbb} & \textbf{Ccc} \tabularnewline
       & & \makecell{Ccc1} & \makecell{Ccc2 \\ Ccc2} \tabularnewline
      Adipisicing elit, sed do eiusmod tempor & \(0.40\) & Ut labore et dolore magna aliqua & \(7.77\) \tabularnewline
      Ut enim ad minim veniam, quis nostrud exercitation & \(0.93\) & Ullamco laboris nisi ut aliquip ex ea commodo consequat & \(62.6\) \tabularnewline
      \end{tabulary}
    }
  \end{table}
\end{document}

세 번째 예(3개 모두 작동하지 않음)

\documentclass{article}
\usepackage[para]{threeparttable}
\usepackage{tabulary}
\usepackage{makecell}
\begin{document}
  \begin{table}
    \begin{threeparttable}
      \caption{Lorem ipsum dolor sit amet, consectetur}

      {
        \begin{tabulary}{\linewidth}{L r L r}
        \textbf{Aaa} & \textbf{Bbb} & \textbf{Ccc} \tabularnewline
         & & \makecell{Ccc1} & \makecell{Ccc2 \\ Ccc2} \tabularnewline
        Adipisicing elit, sed do eiusmod tempor & \(0.40\) & Ut labore et dolore magna aliqua & \(7.77\) \tabularnewline
        Ut enim ad minim veniam, quis nostrud exercitation & \(0.93\) & Ullamco laboris nisi ut aliquip ex ea commodo consequat & \(62.6\) \tabularnewline
        \end{tabulary}
      }

      \begin{tablenotes}
        Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
      \end{tablenotes}
    \end{threeparttable}
  \end{table}
\end{document}

답변1

다른 패키지와 충돌하지 않는 의 명령 \makecell으로 바꿀 수 있습니다 .\Centerstackstackengine

\usepackage[latin]{babel} 
\usepackage[para]{threeparttable}
\usepackage{tabulary}
\usepackage[usestackEOL]{stackengine}

\begin{document}

  \begin{table}
    \begin{threeparttable}
      \caption{Lorem ipsum dolor sit amet, consectetur}

      {
        \begin{tabulary}{\linewidth}{L r L r}
        \textbf{Aaa} & \textbf{Bbb} & \textbf{Ccc} \tabularnewline
         & & \Centerstack{Ccc1} & \Centerstack{Ccc2\\ Ccc2} \tabularnewline
        Adipisicing elit, sed do eiusmod tempor & \(0.40\) & Ut labore et dolore magna aliqua & \(7.77\) \tabularnewline
        Ut enim ad minim veniam, quis nostrud exercitation & \(0.93\) & Ullamco laboris nisi ut aliquip ex ea commodo consequat & \(62.6\) \tabularnewline
        \end{tabulary}
      }

      \begin{tablenotes}\footnotesize
        Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
      \end{tablenotes}
    \end{threeparttable}
  \end{table}

\end{document} 

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

관련 정보