我有一些很长的单词小节标题,其中(部分)标题本身和目录中没有正确使用连字符。
\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}