이 테이블이 중앙에 표시되지 않는 이유는 무엇입니까?

이 테이블이 중앙에 표시되지 않는 이유는 무엇입니까?
\documentclass[landscape]{scrartcl}
\usepackage{booktabs,array,enumitem,ragged2e}

\newcommand{\tablistcommand}{%
  \leavevmode\par\vspace{-\baselineskip}%
}

\newlist{tabitemize}{itemize}{1}
\setlist[tabitemize]{%
  leftmargin = *               ,
  label      = \textbullet     ,
  nosep                        ,
  before     = \tablistcommand ,
  after      = \tablistcommand
}

\begin{document}
\thispagestyle{empty}
\begin{table}
  \centering
  \caption{Wide Itemized Mixed Table}
  \label{tab:wide-item-tbl}
  \begin{tabular}{@{}l*{4}{>{\RaggedRight}p{2in}}@{}}
    \toprule
    \textbf{BSL} & \textbf{Agents} & \textbf{Practices}
    & \textbf{Primary barriers} & \textbf{Secondary barriers} \\
    \midrule
    1 & Not known to consistently cause diseases in healthy adults
      & standard microbiological practices
      & \begin{tabitemize}
        \item no primary barriers required,
        \item  PPE
        \end{tabitemize}
      & bench and sink required \tabularnewline
    2 & \begin{tabitemize}
        \item Agents associated with human diseases
        \item Routes of transmission include per-cutaneous injury,
          ingestion, mucous membrane exposure
        \end{tabitemize}
      & BSL-1 practice plus:
        \begin{tabitemize}[before=]
        \item limited access
        \item Biohazard warning signs
        \item ``Sharps'' precautions
        \item Biosafety manual defining any needed waste
          decontamination or medical surveillance polices
        \end{tabitemize}
      & Primary barriers:
        \begin{tabitemize}[before=]
        \item BSCs or other physical containment devices used for all
          manipulations of agents that cause splashes or aerosols of
          infectious materials
        \item PPE: Laboratory coats, gloves, face and eye protection,
          as needed
        \end{tabitemize}
      & BSL-1 plus:
        \begin{tabitemize}[before=]
        \item Autoclave available
        \end{tabitemize}\tabularnewline
    \bottomrule
  \end{tabular}
\end{table}
\end{document}

답변1

페이지에 비해 너무 넓고 오른쪽 여백을 초과하기 때문에 중앙에 표시되지 않습니다. 예를 들어기하학패키지. 또한 옵션을 통해 여백을 시각화할 수도 있습니다 showframe. 두 가지를 모두 달성하려면 다음을 추가하세요.

\usepackage[showframe,left=2cm,right=2cm]{geometry}

서문에.

답변2

tabularx너비 \linewidth와 열 유형을 사용해 보세요 >{\RaggedRight}X}. 이를 통해 테이블은 텍스트 너비에 맞습니다. 페이지 레이아웃을 보려면 예를 들어 패키지를 \uasepackage{showframe}사용하여 레이아웃을 디자인하거나 직접 도울 수 있습니다 .geometry\usepackage[margin=1in,showframe]{geometry}

이 조치를 사용하면 다음과 같은 결과를 얻을 수 있습니다.

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

앞서 언급한 내용을 고려하여 코드의 시작 부분은 다음과 같습니다.

\documentclass[landscape]{scrartcl}
\usepackage{array,booktabs,tabularx}
\usepackage{enumitem,ragged2e}
\usepackage{showframe}

\newcommand{\tablistcommand}{%
  \leavevmode\par\vspace{-\baselineskip}%
}

\newlist{tabitemize}{itemize}{1}
\setlist[tabitemize]{%
  leftmargin = *               ,
  label      = \textbullet     ,
  nosep                        ,
  before     = \tablistcommand ,
  after      = \tablistcommand
}

\begin{document}
\thispagestyle{empty}
\begin{table}
  \caption{Wide Itemized Mixed Table}
  \label{tab:wide-item-tbl}
  \begin{tabularx}{\linewidth}{@{}l*{4}{>{\RaggedRight}X}@{}}
...

관련 정보