我使用 来\textsubscript
对非数学数据进行下标。但它太长,会导致溢出到边距。可能的解决方案是什么?(可能像在两行中写下标一样)
答案1
请始终提供示例文档,
有两种可能性
首先展示一个在单词空格处换行的可拆分下标
第二段显示一个段落,其边距中有过多的行,并且\sloppy
有\raggedright
\documentclass{article}
\def\xsubscript#1{{\scriptsize \xxsubscript#1 ^ }}
\def\xxsubscript#1 {%
\ifx^#1\else
{\normalsize\textsubscript{#1}} %space needed
\expandafter\xxsubscript
\fi
}
\begin{document}
\hrule
\bigskip
a paragraph\textsubscript{with a long subscript that
could go on for more than a line, it is really really really really really really long}
a paragraph\textsubscript{with a long subscript that
could go on for more than a line, it is really really really really really really long}
a paragraph\textsubscript{with a long subscript that
could go on for more than a line, it is really really really really really really long}
a paragraph\textsubscript{with a long subscript that
could go on for more than a line, it is really really really really really really long}
a paragraph\textsubscript{with a long subscript that
could go on for more than a line, it is really really really really really really long}
a paragraph\textsubscript{with a long subscript that
could go on for more than a line, it is really really really really really really long}
a paragraph\textsubscript{with a long subscript that
could go on for more than a line, it is really really really really really really long}
a paragraph\textsubscript{with a long subscript that
could go on for more than a line, it is really really really really really really long}
a paragraph\textsubscript{with a long subscript that
could go on for more than a line, it is really really really really really really long}
a paragraph\textsubscript{with a long subscript that
could go on for more than a line, it is really really really really really really long}!
\hrule
\bigskip
a paragraph\xsubscript{with a long subscript that
could go on for more than a line, it is really really really really really really long}
a paragraph\xsubscript{with a long subscript that
could go on for more than a line, it is really really really really really really long}
a paragraph\xsubscript{with a long subscript that
could go on for more than a line, it is really really really really really really long}
a paragraph\xsubscript{with a long subscript that
could go on for more than a line, it is really really really really really really long}
a paragraph\xsubscript{with a long subscript that
could go on for more than a line, it is really really really really really really long}
a paragraph\xsubscript{with a long subscript that
could go on for more than a line, it is really really really really really really long}
a paragraph\xsubscript{with a long subscript that
could go on for more than a line, it is really really really really really really long}
a paragraph\xsubscript{with a long subscript that
could go on for more than a line, it is really really really really really really long}
a paragraph\xsubscript{with a long subscript that
could go on for more than a line, it is really really really really really really long}
a paragraph\xsubscript{with a long subscript that
could go on for more than a line, it is really really really really really really long}!
\bigskip
\hrule
\end{document}
\documentclass{article}
\begin{document}
\hrule
\bigskip
a paragraph\textsubscript{with a long subscript}
a paragraph\textsubscript{with a long subscript}
a paragraph\textsubscript{with a long subscript}
a paragraph\textsubscript{with a long subscript}
a paragraph\textsubscript{with a long subscript}
a paragraph\textsubscript{with a long subscript}
a paragraph\textsubscript{with a long subscript}
a paragraph\textsubscript{with a long subscript}
a paragraph\textsubscript{with a long subscript}
a paragraph\textsubscript{with a long subscript}!
\bigskip
\hrule
\bigskip
{\sloppy
a paragraph\textsubscript{with a long subscript}
a paragraph\textsubscript{with a long subscript}
a paragraph\textsubscript{with a long subscript}
a paragraph\textsubscript{with a long subscript}
a paragraph\textsubscript{with a long subscript}
a paragraph\textsubscript{with a long subscript}
a paragraph\textsubscript{with a long subscript}
a paragraph\textsubscript{with a long subscript}
a paragraph\textsubscript{with a long subscript}
a paragraph\textsubscript{with a long subscript}!
}
\bigskip
\hrule
{\raggedright
a paragraph\textsubscript{with a long subscript}
a paragraph\textsubscript{with a long subscript}
a paragraph\textsubscript{with a long subscript}
a paragraph\textsubscript{with a long subscript}
a paragraph\textsubscript{with a long subscript}
a paragraph\textsubscript{with a long subscript}
a paragraph\textsubscript{with a long subscript}
a paragraph\textsubscript{with a long subscript}
a paragraph\textsubscript{with a long subscript}
a paragraph\textsubscript{with a long subscript}!
}
\bigskip
\hrule
\end{document}