Tabu에서 테이블을 양쪽에 균등하게 중앙에 배치하는 방법

Tabu에서 테이블을 양쪽에 균등하게 중앙에 배치하는 방법

tabu환경 에 작성되고 래핑된 테이블이 있지만 을 table사용하고 있으며 1.1\textwidth왼쪽 여백에 고정되어 있는 동안 페이지의 오른쪽 여백을 넘어 확장됩니다. 양쪽 여백을 넘어 동일하게 확장되도록 중앙에 맞추려면 어떻게 해야 합니까? 감사해요.

이것은 내 코드입니다.

\documentclass[11pt]{article}
\usepackage[utf8]{inputenc}

\usepackage{geometry}
\geometry{a4paper}
\geometry{margin=2cm}

\usepackage[version=4]{mhchem}
\usepackage{float}
\usepackage{tabu}

\begin{document}

\begin{table}[H]
\begin{tabu} to 1.1\textwidth{| X[l] | X[l] | X[l] |}
\hline
\textbf{Apparatus/material} & \textbf{Quantity/amount/mass used} & \textbf{Uncertainty}\\
\hline 
Magnesium sulfate & 0.05, 0.10, 0.15, 0.20, 0.25 mol & $\pm$0.01g\\
\hline
Yeast, dried & 2.000g & $\pm$0.01g\\
\hline
Glucose (dextrose) & 3.000g & $\pm$0.01g\\
\hline
200cm\textsuperscript{3} beaker & 1 & NIL\\  
\hline
Test tube & 4 & NIL\\
\hline
250cm\textsuperscript{3} measuring cylinder & 1 & $\pm$1cm\textsuperscript{3}\\
\hline
10cm\textsuperscript{3} measuring cylinder & 1 & $\pm$0.1cm\textsuperscript{3}\\
\hline
Glass rod & 1 & NIL\\
\hline
Filter funnel & 1 & NIL\\
\hline
Vernier gas pressure sensor & 4 & $\pm$0.4mmHg\\
\hline
Vernier LabQuest datalogger & 1 & NIL\\
\hline
Excell BH-600 electronic balance & 1 & $\pm$0.01g\\
\hline
Apollo vortex mixer & 1 & NIL\\
\hline
Parafilm & NIL & NIL\\
\hline
\end{tabu}
\caption{Table of materials and apparatus}
\label{tab:ma}
\end{table}

이것은 테이블을 제공합니다 :

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

답변1

이와 같이?

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

\documentclass[11pt]{article}
\usepackage[utf8]{inputenc}

\usepackage{geometry}
\geometry{a4paper, margin=2cm}

%\usepackage[version=4]{mhchem}% <-- I had issues with this package, it gives error
%\usepackage{float} % not needed in this example
\usepackage{tabu}

\usepackage[strict]{changepage}% <-- added

\usepackage{showframe}% only for this example

\begin{document}
    \begin{table}%[H]
\begin{adjustwidth}{-0.05\linewidth}{-0.05\linewidth}
\begin{tabu} to 1.1\textwidth{| X[l] | X[l] | X[l] |}
\hline
\textbf{Apparatus/material} & \textbf{Quantity/amount/mass used} & \textbf{Uncertainty}\\
\hline
Magnesium sulfate & 0.05, 0.10, 0.15, 0.20, 0.25 mol & $\pm$0.01g\\
\hline
Yeast, dried & 2.000g & $\pm$0.01g\\
\hline
Glucose (dextrose) & 3.000g & $\pm$0.01g\\
\hline
200cm\textsuperscript{3} beaker & 1 & NIL\\
\hline
Test tube & 4 & NIL\\
\hline
250cm\textsuperscript{3} measuring cylinder & 1 & $\pm$1cm\textsuperscript{3}\\
\hline
10cm\textsuperscript{3} measuring cylinder & 1 & $\pm$0.1cm\textsuperscript{3}\\
\hline
Glass rod & 1 & NIL\\
\hline
Filter funnel & 1 & NIL\\
\hline
Vernier gas pressure sensor & 4 & $\pm$0.4mmHg\\
\hline
Vernier LabQuest datalogger & 1 & NIL\\
\hline
Excell BH-600 electronic balance & 1 & $\pm$0.01g\\
\hline
Apollo vortex mixer & 1 & NIL\\
\hline
Parafilm & NIL & NIL\\
\hline
\end{tabu}
\caption{Table of materials and apparatus}
    \label{tab:ma}
\end{adjustwidth}
    \end{table}
\end{document}

단위의 경우 패키지를 고려해야 합니다 siunitx.

부록:1.1\textwidth예를 들어 마지막 열의 셀 내용을 더 좁은 열에 저장할 수 있는 경우 테이블 너비가 왜 필요한지 궁금합니다 . 예를 들어

\begin{tabu} to \textwidth {| X[5] | X[5] | X[4] |}

adjustwidth테이블을 제거하면 다음과 같습니다.

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

이 접근 방식을 사용하면 테이블에도 문제가 발생하지 않습니다 longtabu.

관련 정보