我想将表格的标题行和摘要行扩展到页面宽度。请有人帮我解决,我不知道该怎么做。
我的代码:
\begin{longtable}{l@{\extracolsep{\fill}\hspace{\tabcolsep}} p{.6\textwidth} l r r r r }
\hline
\rowcolor{black}
\textcolor{white} {POS} &\textcolor{white} {DESCRIPTION} & \textcolor{white} {QTY} & \textcolor{white} {PRICE (\pounds)} & \textcolor{white} {AMOUNT (\pounds)} \\*
\hline\hline
\endhead
}{
& & & {MWSt \taxval \%} & {\taxes{\arabic{cost}}{\taxval}} \\
\hline\hline\hline
& & & {Summe EUR} & {\addtaxes{\arabic{cost}}{\taxval}} \\
\end{longtable}
答案1
调整表格位置的变化\oddsidemargin -1in
\documentclass[a4paper,10pt]{article}
\usepackage{geometry}
\begin{document}
\marginparwidth 0pt
\marginparsep 0pt
\oddsidemargin \dimexpr .5in -1in
\textwidth \dimexpr \pdfpagewidth \oddsidemargin -1in
\begin{table} %
\centering
\caption{Obtained marks.}
\begin{tabular}{p{16cm} l l l l }
\hline Name & Math & Phy & Chem & man \\
\hline Salah & 80 & 68 & 60 & 57\\
\hline Muhammed & 72 & 62 & 66 & 63\\
\hline Ahmad & 75 & 70 & 71 & 69\\
\hline
\end{tabular}
\end{table}
\end{document}