任何字符都会自动换行吗?

任何字符都会自动换行吗?

我正在根据数据库中的某些信息生成一些 latex。我将所有这些信息放在一个表中,但单元格中的某些数据非常长,并且没有明显的断点。因此,信息只是继续超出单元格的范围,因此无法被看到。

有没有办法告诉 LaTeX 在任何字符上换行/断行?或者说,有没有办法告诉 LaTeX 在全部人物?

答案1

\documentclass{article}
\usepackage{tabularray}
\usepackage{seqsplit}
\begin{document}
\setlength{\parindent}{0pt}
\section{Wrap word with \texttt{X} column of \texttt{tabularray} package in table}
\begin{tblr}{colspec={X[l,m]Q[c,m]},vlines,hlines}
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod
tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam,
quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo
consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse
cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non
proident, sunt in culpa qui officia deserunt mollit anim id est laborum.&Test\\
\end{tblr}
\section{Wrap word with \texttt{seqsplit} package in text}
\seqsplit{Lorem\ ipsum\ dolor\ sit\ amet,\ consectetur\ adipisicing\ elit,\ sed\ do\ eiusmod\
tempor\ incididunt\ ut\ labore\ et\ dolore\ magna\ aliqua.\ Ut\ enim\ ad\ minim\ veniam,\
quis\ nostrud\ exercitation\ ullamco\ laboris\ nisi\ ut\ aliquip\ ex\ ea\ commodo\
consequat.\ Duis\ aute\ irure\ dolor\ in\ reprehenderit\ in\ voluptate\ velit\ esse\
cillum\ dolore\ eu\ fugiat\ nulla\ pariatur.\ Excepteur\ sint\ occaecat\ cupidatat\ non\
proident,\ sunt\ in\ culpa\ qui\ officia\ deserunt\ mollit\ anim\ id\ est\ laborum.}
\section{Wrap word with \texttt{tabularray} and \texttt{seqsplit} package in table}
\begin{tblr}{colspec={X[l,m]Q[c,m]},vlines,hlines}
\seqsplit{Lorem\ ipsum\ dolor\ sit\ amet,\ consectetur\ adipisicing\ elit,\ sed\ do\ eiusmod\
tempor\ incididunt\ ut\ labore\ et\ dolore\ magna\ aliqua.\ Ut\ enim\ ad\ minim\ veniam,\
quis\ nostrud\ exercitation\ ullamco\ laboris\ nisi\ ut\ aliquip\ ex\ ea\ commodo\
consequat.\ Duis\ aute\ irure\ dolor\ in\ reprehenderit\ in\ voluptate\ velit\ esse\
cillum\ dolore\ eu\ fugiat\ nulla\ pariatur.\ Excepteur\ sint\ occaecat\ cupidatat\ non\
proident,\ sunt\ in\ culpa\ qui\ officia\ deserunt\ mollit\ anim\ id\ est\ laborum.}&Test\\
\end{tblr}
\end{document}

在此处输入图片描述

相关内容