是否可以将表格中心置于 0.75 倍宽度文本处?我希望将表格置于页面宽度的中心,而不是页面宽度的 3/4 处。
\begin{table}
\begin{minipage}{0.75\linewidth}
\caption[]{cap}\label{l}
\begin{flushleft}
\begin{tabular}{lccc}
\hline\hline\noalign{\smallskip}
a&b&c&d\\
\noalign{\smallskip}\hline\noalign{\smallskip}
a&b&c&d\\
\noalign{\smallskip}\hline\noalign{\smallskip}
\end{tabular}
\end{flushleft}
\end{minipage}
\end{table}
答案1
您可以像使用中心环境一样将表格环境居中:
\documentclass{article}
\usepackage{showframe}
\begin{document}
\noindent\begin{minipage}{.75\linewidth}
\begin{center}
\begin{tabular}{lccc}
\hline\hline\noalign{\smallskip}
a&b&c&d\\
\noalign{\smallskip}\hline\noalign{\smallskip}
a&b&c&d\\
\noalign{\smallskip}\hline\noalign{\smallskip}
\end{tabular}
\end{center}
\end{minipage}
\end{document}
注意:仅当小页面按原样出现在文本段落之后时,才需要\noindent
前面的。\begin{minipage}
答案2
假设环境的自然宽度tabular
小于,您可以通过将环境置于宽度为0.75\textwidth
的中心来实现格式化目标。tabular
minipage
\0.75\textwidth
\documentclass{article}
\usepackage{showframe} % show framelnes around text block
\usepackage{tabularx} % for tabularx environment
\begin{document}
\noindent
\begin{minipage}{0.75\textwidth}
\centering
\begin{tabular}{|*{6}{c|}}
\hline
A & B & C & D & E & F \\
\hline
\end{tabular}
\end{minipage}%
\begin{tabularx}{0.25\textwidth}{|>{\centering\arraybackslash}X|}
\hline
abcdefhij\\
\hline
\end{tabularx}
\noindent
\begin{tabularx}{0.25\textwidth}{|>{\centering\arraybackslash}X|}
\hline
abcdefhij\\
\hline
\end{tabularx}%
\begin{tabularx}{0.25\textwidth}{|>{\centering\arraybackslash}X|}
\hline
abcdefhij\\
\hline
\end{tabularx}%
\begin{tabularx}{0.25\textwidth}{|>{\centering\arraybackslash}X|}
\hline
abcdefhij\\
\hline
\end{tabularx}%
\begin{tabularx}{0.25\textwidth}{|>{\centering\arraybackslash}X|}
\hline
abcdefhij\\
\hline
\end{tabularx}
\end{document}