使用 \raisebox 来换行吗?

使用 \raisebox 来换行吗?

我正在使用\raisebox环境longtable,但文本总是溢出框外。有什么方法可以解决这个问题吗?

在此处输入图片描述

\documentclass{article}
\usepackage{latexsym}
\usepackage{longtable}

\begin{document}
 \textbf{Table A5}: Examples of state history construction for experienced states in each continent

\begin{scriptsize}
\begin{center}
\begin{longtable}[htbp]{|p{85pt}|p{85pt}|p{86pt}|p{86pt}|p{86pt}|p{86pt}|}
\hline

\textbf{Region}& 
\textbf{AFRICA}& 
\textbf{ASIA}& 
\textbf{AMERICA}& 
\textbf{EUROPE}& 
\textbf{OCEANIA} \\
\hline
\textbf{Country}& \textbf{Egypt}&\textbf{China}&\textbf{Peru}&\textbf{France}& \textbf{Australia} \\
\hline
1-50 AD& 
\raisebox{-24.00ex}[0cm][0cm]{1, 0.5, 1 \par (under Roman's occupation)}& 
\raisebox{-4.50ex}[0cm][0cm]{1, 1, 1 \par (ruled by the Han dynasty)}& 
\raisebox{-16.50ex}[0cm][0cm]{0, 0, 0 \par (non-existence of states)}& 
\raisebox{-12.00ex}[0cm][0cm]{1, 0.5, 1 \par (Gaul was under the Roman's rule)}& 
\raisebox{-52.50ex}[0cm][0cm]{0, 0, 0 \par (non-existence of states)} \\
\cline{1-1} 
51-100 AD& 
&  &  &  &  \\
\cline{1-1} 
101-150 AD& 
& & & & \\
\cline{1-1} 
151-200 AD& 
 & &  &  &  \\
\cline{1-1} \cline{3-3} 
201-250 AD& 
 & 
\raisebox{-10.50ex}[0cm][0cm]{1, 1, 0.75 \par (the Han empire was split into several warring states)}& 
 &  &  \\
\cline{1-1} 
251-300 AD& 
 &  &  &  &  \\
\cline{1-1} 
301-350 AD&  &  &  &  &  \\
\cline{1-1} 
351-400 AD&  &  &  &  &  \\
\cline{1-1} 
401-450 AD&  & &  &  &  \\
\cline{1-1} \cline{5-5} 
451-500 AD&  &  &  &
\raisebox{-7.50ex}[0cm][0cm]{1, 1, 0.75 \par (controlled by multiple Germanic kingdoms)}& 
 \\
 \cline{1-1} 
501-550 AD&  & &  &  &  \\
\cline{1-1} 
551-600 AD&  &  &  &  &  \\
\cline{1-1} \cline{3-4} 
601-650 AD& 
 & 
\raisebox{-3.00ex}[0cm][0cm]{1, 1, 1 \par (unified under the Sui and, later, the T'ang dynasties)}& 
\raisebox{-1.50ex}[0cm][0cm]{1, 1, 0.5 \par (the Huari state existed in the southern part)}& 
 &  \\
 \cline{1-1} 
651-700 AD& 
 &  &  &  &  \\
\cline{1-1} \cline{4-4} 
701-750 AD&  &  & 
\raisebox{-1.50ex}[0cm][0cm]{1, 1, 1 \par (Huari grew to become an empire)}& &\\
\cline{1-1} \cline{3-3} \cline{5-5} 
751-800 AD& 
 & 
1, 1, 0.75 \par (central regime broke down, followed by some political chaos)& 
 & 
1, 1, 0.895 \par (rule was unified by Charlemagne in 771)& 
 \\
\cline{1-1} \cline{3-5} 
801-850 AD& 
 & 
\raisebox{-1.50ex}[0cm][0cm]{1, 1, 1 \par (the T'ang power was restored)}& 
 \raisebox{-18.00ex}[0cm][0cm]{1, 1, 0.75 \par (the Huari empire collapsed and the area was ruled by a number of smaller states)}& 
1, 1, 1 \par (under unified domestic rule)& 
 \\
\cline{1-2} \cline{5-5} 
851-900 AD& 
1, 1, 1 \par (establishment of the Tulunid dynasty)& 
 & 
 & 
\raisebox{-10.50ex}[0cm][0cm]{1, 1, 0.75 \par (rule was divided among several Frankish kingdoms)}& 
  \\
\cline{1-3} 
901-950 AD& 
1, 0.5, 1 \par (became a foreign-based caliphal province)& 
\raisebox{-1.50ex}[0cm][0cm]{1, 1, 0.75 \par (centralized order collapsed again and multiple kingdoms emerged)}& 
 &  &  \\
\cline{1-2} 
951-1000 AD& 
1, 0.77, 1 \par (the Fatimid Caliphate was established in 973)& 
 & 
 &  &  \\


% a lot more rows just like the ones above

\end{longtable}
\end{scriptsize}
\end{center}

\end{document}

答案1

我认为,如果不使用\raisebox& Co.,只需将数字和文本的行分成两行即可达到所需的效果。

我也有(当然,您可以根据自己的喜好更改以下内容):

  1. 设置一个更大的\arraystretch(带array包装)来稍微放大行
  2. 使用\setlength{\LTcapwidth}{150em}\usepackage[normalsize]{caption}避免将标题分为两行,并将其设置为正常字体大小
  3. 将第一列改为l以避免未使用的空间
  4. continues on the next page为非最后一页插入一个脚注
  5. [-2pt]在数字行的末尾放置一个,使它们更接近文本行
  6. [10pt]在页面最后一行末尾放置一个,以增加与以下内容的距离\hline
  7. 评论了\cline如果它们在页面末尾,因为已经有了\hline
  8. 插入\newpage以避免在页面末尾将数字与行以及文本分隔开。

代码如下:

\documentclass{article}
\usepackage{array}
\renewcommand{\arraystretch}{1.4}
\usepackage{longtable}
\setlength{\LTcapwidth}{150em}
\usepackage{pdflscape}
\usepackage[normalsize]{caption}

\begin{document}
    \begin{landscape}
        \begin{scriptsize}
            \begin{longtable}[c]{|l|*5{p{86pt}|}}
                \caption{Examples of state history construction for experienced states in each continent}\\
                \hline
                \textbf{Region}& 
                \textbf{AFRICA}& 
                \textbf{ASIA}& 
                \textbf{AMERICA}& 
                \textbf{EUROPE}& 
                \textbf{OCEANIA} \\
                \hline
                \textbf{Country}& \textbf{Egypt}&\textbf{China}&\textbf{Peru}&\textbf{France}& \textbf{Australia} \\
                \hline
                \endhead
                \hline
                \multicolumn{6}{r}{continues on the next page}\\
                \endfoot
                \hline
                \endlastfoot
                1-50 AD& 
                1, 0.5, 1& 
                1, 1, 1& 
                0, 0, 0& 
                1, 0.5, 1& 
                0, 0, 0 \\[-2pt]
                & 
                (under Roman's occupation)& 
                (ruled by the Han dynasty)& 
                (non-existence of states)& 
                (Gaul was under the Roman's rule)& 
                (non-existence of states) \\
                \cline{1-1} 
                51-100 AD& 
                &  &  &  &  \\
                \cline{1-1} 
                101-150 AD& 
                & & & & \\
                \cline{1-1} 
                151-200 AD& 
                & &  &  &  \\
                \cline{1-1} \cline{3-3} 
                201-250 AD& 
                & 
                1, 1, 0.75& 
                & & \\[-2pt]
                & & 
                (the Han empire was split into several warring states)& 
                &  &  \\
                \cline{1-1} 
                251-300 AD& 
                &  &  &  &  \\
                \cline{1-1} 
                301-350 AD&  &  &  &  &  \\
                \cline{1-1} 
                351-400 AD&  &  &  &  &  \\
                \cline{1-1} 
                401-450 AD&  & &  &  &  \\
                \cline{1-1} \cline{5-5} 
                451-500 AD&  &  &  &
                1, 1, 0.75& 
                \\[-2pt]
                &  &  &  &
                (controlled by multiple Germanic kingdoms)& 
                \\
                \cline{1-1} 
                501-550 AD&  & &  &  &  \\
                \cline{1-1} 
                551-600 AD&  &  &  &  &  \\
                \cline{1-1} \cline{3-4} 
                601-650 AD& 
                & 
                1, 1, 1& 
                1, 1, 0.5& 
                &  \\[-2pt]
                & 
                & 
                (unified under the Sui and, later, the T'ang dynasties)& 
                (the Huari state existed in the southern part)& 
                &  \\
                \cline{1-1} 
                651-700 AD& 
                &  &  &  &  \\
                \cline{1-1} \cline{4-4} 
                701-750 AD&  &  & 
                1, 1, 1& & \\[-2pt]
                &  &  & 
                (Huari grew to become an empire)& & \\[10pt]
                %\cline{1-1} \cline{3-3} \cline{5-5} 
                \newpage % adjustment for not separating rows when page breaks
                751-800 AD& 
                & 
                1, 1, 0.75& 
                & 
                1, 1, 0.895& \\[-2pt]
                & 
                & 
                (central regime broke down, followed by some political chaos)& 
                & 
                (rule was unified by Charlemagne in 771)& \\
                \cline{1-1} \cline{3-5} 
                801-850 AD& 
                & 
                1, 1, 1& 
                1, 1, 0.75& 
                1, 1, 1& 
                \\[-2pt]
                & 
                & 
                (the T'ang power was restored)& 
                (the Huari empire collapsed and the area was ruled by a number of smaller states)& 
                (under unified domestic rule)& 
                \\
                \cline{1-2} \cline{5-5} 
                851-900 AD& 
                1, 1, 1& 
                & 
                & 
                1, 1, 0.75& 
                \\[-2pt]
                & 
                (establishment of the Tulunid dynasty)& 
                & 
                & 
                (rule was divided among several Frankish kingdoms)& 
                \\
                \cline{1-3} 
                901-950 AD& 
                1, 0.5, 1& 
                1, 1, 0.75& 
                &  &  \\[-2pt]
                & 
                (became a foreign-based caliphal province)& 
                (centralized order collapsed again and multiple kingdoms emerged)& 
                &  &  \\
                \cline{1-2} 
                951-1000 AD& 
                1, 0.77, 1& 
                & 
                &  &   \\[-2pt]
                & 
                (the Fatimid Caliphate was established in 973)& 
                & 
                &  &   \\[10pt]
                % a lot more rows just like the ones above
            \end{longtable}
        \end{scriptsize}
    \end{landscape}
\end{document}

输出如下:

在此处输入图片描述

在此处输入图片描述

相关内容