
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
このアプローチでは、テーブルに関する問題も発生しません。