我用:
\documentclass[14pt]{extarticle}
\usepackage[T2A]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[ukrainian]{babel}
\begin{document}
\tableofcontents
\newpage
\section*{The name of one of the section without numbering}\addcontentsline{toc}{section}{The name of one of the section without numbering}
\section{Long title of one of the section in several lines in Ukrainian with numbering in the table of contents}
\subsection{Subsection name}
\subsubsection{Subsubsection name}
\end{document}
并得到:
第一页:
第二页:
我想:
对于第一页:
1.a)将目录标题居中;
1.b) 在章节(小节和小小节)编号后添加一个点。
对于第二页:
2.a) 删除第二部分的编号,但保留其用于链接和公式编号;
2.b) 将第二部分的页眉居中;
2.c) 对没有编号的章节标题进行手动换行;
2.d) 在小节和小节编号后添加一个点;
获得类似的结果(对于第二页):
答案1
这应该可以满足您的所有要求。对于节标题中的手动换行符,您需要编写在目录中输入的可选节标题,并在将在文档中输入的强制参数中放置一些手动换行符。
\documentclass[14pt]{extarticle}
\usepackage[T2A]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[ukrainian]{babel}
\usepackage{etoolbox}
\patchcmd{\tableofcontents}{\contentsname}{\centering\contentsname}{}{}
\makeatletter
\patchcmd{\@sect}{\csname the#1\endcsname}{\csname the#1\endcsname.}{}{}
\def\@seccntformat#1{\csname the#1\endcsname.\quad}
\patchcmd{\@sect}{#6}{\ifstrequal{#1}{section}{\centering#6}{#6}}{}{}
\patchcmd{\@sect}{\@hangfrom{\hskip #3\relax\@svsec}}{\@hangfrom{\hskip #3\relax\ifstrequal{#1}{section}{Розділ~\thesection}{\@svsec}}\ifstrequal{#1}{section}{\par\nopagebreak}{}}{}{}
\makeatother
\begin{document}
\tableofcontents
\newpage
\section*{The name of one of the section without numbering}\addcontentsline{toc}{section}{The name of one of the section without numbering}
\section[Long title of one of the section in several lines in Ukrainian with numbering in the table of contents]{Long title of one\\ of the\\ section in several lines in Ukrainian with numbering in the table of contents}
\subsection{Subsection name}
\subsubsection{Subsubsection name}
\section{Long title of one of the section in several lines in Ukrainian with numbering in the table of contents}
\subsection{Subsection name}
\subsubsection{Subsubsection name}
\end{document}