From 7cc26feaa9c80f89e64ac7343062df89c2d278a5 Mon Sep 17 00:00:00 2001 From: carry <2641257231@qq.com> Date: Fri, 25 Apr 2025 17:56:05 +0800 Subject: [PATCH] =?UTF-8?q?fix(latex):=20=E4=B8=AD=E6=96=87=E6=A0=B7?= =?UTF-8?q?=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 调整了 LaTeX 文档中的标题格式和目录样式,使其更加统一和规范。移除了旧的章节计数器,并重新定义了 `titlesec` 和 `titletoc` 的样式,以更好地符合文档需求。 --- paper/latex/main.tex | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/paper/latex/main.tex b/paper/latex/main.tex index b41a770..1e7cbf4 100644 --- a/paper/latex/main.tex +++ b/paper/latex/main.tex @@ -5,12 +5,6 @@ %\graphicspath{{chapter/}{figures/}} \usepackage{CJK} \usepackage{amsmath}%数学 -\usepackage{titlesec} - -\newcounter{mychapter} -\titleformat{\section} - {\normalfont\Large\bfseries}{\stepcounter{mychapter}第\themychapter 章}{1em}{} - %\usepackage[colorlinks,linkcolor=red]{hyperref}%超链接 @@ -97,6 +91,14 @@ } +\usepackage{titlesec} +\titleformat{\section}{\centering\Large\bfseries}{第\,\thesection\,章}{1em}{} + + +\usepackage{titletoc} +\titlecontents{section}[0pt]{\addvspace{1.5pt}\filright\bf} +{\contentspush{第\thecontentslabel\ 章\quad}} +{}{\titlerule*[8pt]{.}\contentspage} %设置页面格式