如何防止描述文字超出边距

如何防止描述文字超出边距

文本超出了我的页面。我该如何解决?

在此处输入图片描述

\documentclass[DIV=15, paper=a4, paper=portrait, pagesize=auto]{scrartcl}

\usepackage[inline]{enumitem}
\usepackage[table]{xcolor}
\usepackage{ltxtable}
\usepackage{float}
\usepackage{longtable}
\usepackage{mathptmx}
\usepackage[11pt]{moresize}
\usepackage{anyfontsize}
\restylefloat{table}
\usepackage[tableposition=top]{caption}
\newcommand{\indentitem}{\setlength\itemindent{25pt}}
\newcommand*{\sectioncolor}{blue}
\newcommand*{\sectionformat}{\centering\color{\sectioncolor}}
\usepackage{titlesec}
\definecolor{orange}{HTML}{FFC296}
\begin{document}
\SetLabelAlign{rightbox}{\hspace{-19ex}\rlap{#1\quad}}
\setlist[description,1]{align=rightbox,labelsep=0pt,rightmargin=0pt}
% \rowcolors{2}{gray!25}{white}


            \section{Student 55d5396fed}
            \begin{tabular}{@{\hspace{19ex}}p{2em}}
            \begin{description}

                \item[Project Number] 55d5396fed

                \item[Project Name] We have already seen that a case of
                semigrammaticalness of a different sort is necessary to impose
an interpretation on irrelevant intervening contexts in selectional rules.

                \item[Proponent] Of course, the fundamental error of regarding functional notions as categorial is to be regarded as
nondistinctness in the sense of distinctive feature theory.

            \end{description}
            \end{tabular}



                       \hangindent2em
                        \hangafter=0


\end{document}

我在 writelatex.com 上的代码

答案1

很少会像您那样将description环境嵌套在tabular环境中,尤其是对于如此窄的列;2em非常非常窄(“em”是与字体相关的长度,对应于所用字体的“M”的宽度)。摆脱环境tabular

此外,您description使用\setlistfrom修改环境的做法enumitem并不明智:它使其从页面左侧突出。我建议删除该行。

在此处输入图片描述

\documentclass[DIV=15, paper=a4, paper=portrait, pagesize=auto]{scrartcl}

\usepackage[inline]{enumitem}
\usepackage[table]{xcolor}
\usepackage{ltxtable}
\usepackage{float}
\usepackage{longtable}
\usepackage{mathptmx}
\usepackage[11pt]{moresize}
\usepackage{anyfontsize}
\restylefloat{table}
\usepackage[tableposition=top]{caption}
\newcommand{\indentitem}{\setlength\itemindent{25pt}}
\newcommand*{\sectioncolor}{blue}
\newcommand*{\sectionformat}{\centering\color{\sectioncolor}}
\usepackage{titlesec}
\definecolor{orange}{HTML}{FFC296}
\begin{document}
\SetLabelAlign{rightbox}{\hspace{-19ex}\rlap{#1\quad}}
%\setlist[description,1]{align=rightbox,labelsep=0pt,rightmargin=0pt} <---- unwise
% \rowcolors{2}{gray!25}{white}

\section{Student 55d5396fed}
\begin{description}            
    \item[Project Number] 55d5396fed                
    \item[Project Name] We have already seen that a case of semigrammaticalness
        of a different sort is necessary to impose an interpretation on irrelevant
        intervening contexts in selectional rules.
    \item[Proponent] Of course, the fundamental error of regarding functional
        notions as categorial is to be regarded as nondistinctness in the sense of
        distinctive feature theory.
\end{description} 



\end{document}

相关内容