%20%E7%AB%A0%E8%8A%82%E5%90%8D%E7%A7%B0%E5%92%8C%E7%9B%AE%E5%BD%95%E4%B8%AD%E6%98%AF%E5%90%A6%E8%87%AA%E5%8A%A8%E6%8D%A2%E8%A1%8C%EF%BC%9F.png)
我有一些很长的单词小节标题,其中(部分)标题本身和目录中没有正确使用连字符。
\documentclass[12pt,a4paper]{scrartcl}
\usepackage{fontspec}
\setmainfont{Times New Roman}
\usepackage[ngerman]{babel}
\usepackage[left=2.5cm,right=2.5cm,
top=2.5cm,bottom=2.5cm]
{geometry}
\usepackage{sectsty,ragged2e}
\allsectionsfont{\RaggedRight}
\begin{document}
\tableofcontents
\section{Section}
\subsection{Ethyl (5\textit{R},6\textit{E},8\textit{E})-2-hydroxy-5-[(2-methoxyethoxy)methoxy]-\textit{N}-methoxy-\textit{N}-methyldeca-6,8-dienoat}
\subsection{Dimethyl 2-[(4\textit{S})-4-benzyl-2-oxo-1,3-oxazolidin-3-yl]-2-oxoethylphosphonat}
\end{document}