Latex Cross-page table
--The table width is equal to page widths. Table Total 4 columns, telescopic length.
Reference book: "Latex2e and common Macro package use guide", Li Ping, Tsinghua University Press
Description
① @extracolsep {width}: Indicates that the width of a blank is inserted between all columns before the next command \extracolsep. If the table is a fixed-width table, you must use the @{\extracolsep\fill} command so that all subsequent column spacing can be stretched to the predefined table
The width of the grid.
② This example is a fixed-width table with width equal to page width. So there is a certain length of elasticity between columns and columns. It can be seen from the end of the running result.
\documentclass{article}
\usepackage{amsmath}
\USEPACKAGE{AMSSYMB}
\usepackage{latexsym}
\USEPACKAGE{CJK}
\usepackage{longtable}
\begin{document}
\begin{cjk*}{gbk}{song}
\SETLENGTH{\LTLEFT}{0PT} \setlength{\ltright}{0pt}% the moment between the table and the left and right edge of the page is 0
\begin{longtable}{|l@{\extracolsep{\fill}}lrr|} The% @{\extracolsep{\fill}} setting allows all subsequent column spacing to be stretched to a predefined table width.
\caption{\label{tab:test} My cross-page table}\\
\hline
\multicolumn{4}{|c|} {\BF International telephone access Country, code and tariff standard} \ \ \hline
Country & Chinese Name & Code & Tariff/min \ \hline \hline \endfirsthead%1 first page header
\multicolumn{4}{r}{continuation table ~\ref{tab:test}} \ \ \hline
Country & Chinese Name & Code & Tariff/min \ \hline \hline \endhead%2 cont. page Header
\hline
\multicolumn{2}{|c|} {first two column string} & \multicolumn{2}{|c|} {The last two columns are numbers} \ \ \hline \endfoot%3 except for the final page footer
\multicolumn{2}{|c|} {last page string} & \multicolumn{2}{|c|} {last page number} \ \ \hline \endlastfoot% 4 last page footer
Afghanistan & Afghanistan & & 23.00\\\hline
Albania & Albania & 356 & 20.70\\\hline
Algeria & Algeria & 213 & 27.60\\\hline
Andorra & Andorra & 376 & 20.70\\\hline
Angola & Angola & 244 & 27.60\\\hline
Argentina & Argentina & & 27.60\\\hline
Armenia & Armenia & 374 & 18.90\\\hline
Ascension & Ascension (UK) &247 & 27.60\\\hline
Australia & Australia & 18.40\\\hline &
Austria & Austria & 20.70\\\hline &
Azerbaijan & Assebay-M & 994 & 18.90\\\hline
Bahrain & Bahrain & 973 & 27.60\\\hline
Bangladesh & Bangladesh & 880 & 17.20, \\\hline
Belarus & Belarus & 375 & 18.90\\\hline
Afghanistan & Afghanistan & & 23.00\\\hline
Albania & Albania & 356 & 20.70\\\hline
Algeria & Algeria & 213 & 27.60\\\hline
Andorra & Andorra & 376 & 20.70\\\hline
Angola & Angola & 244 & 27.60\\\hline
Argentina & Argentina & & 27.60\\\hline
Armenia & Armenia & 374 & 18.90\\\hline
Ascension & Ascension (UK) &247 & 27.60\\\hline
Australia & Australia & 18.40\\\hline &
Austria & Austria & 20.70\\\hline &
Azerbaijan & Assebay-M & 994 & 18.90\\\hline
Bahrain & Bahrain & 973 & 27.60\\\hline
Bangladesh & Bangladesh & 880 & 17.20, \\\hline
Belarus & Belarus & 375 & 18.90\\\hline
Afghanistan & Afghanistan & & 23.00\\\hline
Albania & Albania & 356 & 20.70\\\hline
Algeria & Algeria & 213 & 27.60\\\hline
Andorra & Andorra & 376 & 20.70\\\hline
Angola & Angola & 244 & 27.60\\\hline
Argentina & Argentina & & 27.60\\\hline
Armenia & Armenia & 374 & 18.90\\\hline
Ascension & Ascension (UK) &247 & 27.60\\\hline
Australia & Australia & 18.40\\\hline &
Austria & Austria & 20.70\\\hline &
Azerbaijan & Assebay-M & 994 & 18.90\\\hline
Bahrain & Bahrain & 973 & 27.60\\\hline
Bangladesh & Bangladesh & 880 & 17.20, \\\hline
Belarus & Belarus & 375 & 18.90\\\hline
Afghanistan & Afghanistan & & 23.00\\\hline
Albania & Albania & 356 & 20.70\\\hline
Algeria & Algeria & 213 & 27.60\\\hline
Andorra & Andorra & 376 & 20.70\\\hline
Angola & Angola & 244 & 27.60\\\hline
Argentina & Argentina & & 27.60\\\hline
Armenia & Armenia & 374 & 18.90\\\hline
Ascension & Ascension (UK) &247 & 27.60\\\hline
Australia & Australia & 18.40\\\hline &
Austria & Austria & 20.70\\\hline &
Azerbaijan & Assebay-M & 994 & 18.90\\\hline
Bahrain & Bahrain & 973 & 27.60\\\hline
Bangladesh & Bangladesh & 880 & 17.20, \\\hline
Belarus & Belarus & 375 & 18.90\\\hline
\end{longtable}
\end{cjk*}
\end{document}
Operation Result: