尝试使用longtable
组合来换行文本seqsplit
,但格式不正确,例如
thisisareallylongexamplethisisareallylongexamplethisisareallylongexamplethisisareallylongexample with a space
因为seqsplit
删除了所有空格
\documentclass[pdftex]{report}
\usepackage[left=65pt,top=28pt,right=65pt,bottom=65pt]{geometry}
\usepackage{longtable}
\usepackage{seqsplit}
\begin{document}
\begin{longtable}{p{50pt} p{360pt} p{50pt}}
& \seqsplit{thisisareallylongexamplethisisareallylongexamplethisisareallylongexamplethisisareallylongexample with a space} & test \\
\end{longtable}
\end{document}
答案1
为了保留空格,请在单词之间使用控制空格\
或连线:
~
\documentclass{report}
\usepackage[left=65pt,top=28pt,right=65pt,bottom=65pt]{geometry}% http://ctan.org/pkg/geometry
\usepackage{longtable}% http://ctan.org/pkg/longtable
\usepackage{seqsplit}% http://ctan.org/pkg/seqsplit
\begin{document}
\begin{longtable}{p{50pt} p{360pt} p{50pt}}
& \seqsplit{thisisareallylongexamplethisisareallylongexamplethisisareallylongexamplethisisareallylongexample with a space} & test1 \\
& \seqsplit{thisisareallylongexamplethisisareallylongexamplethisisareallylongexamplethisisareallylongexample\ with\ a\ space} & test2 \\
& \seqsplit{thisisareallylongexamplethisisareallylongexamplethisisareallylongexamplethisisareallylongexample~with~a~space} & test3 \\
\end{longtable}
\end{document}
第一行显示原始内容,第二行使用控制空间\
,而第三行使用领带
~
来保留间距。