latex 源码,\section如何居左显示

目录

问题描述:

问题解决:

不显示序号的办法:

居左对齐的方法:


问题描述:

一般无论是投稿期刊还是投稿会议,默认的.tex源码中的\section未必是居左显示的,有时候,需要在不更改.sty的前提下,让Section的标题居左显示,且不显示序号

问题解决:

不显示序号的办法:

在section后面,加上*,如

\section*{title}

居左对齐的方法:

插入相应的包,并且在对应的位置使用如下的代码:

\usepackage{titlesec}
% 保存原始 \section 格式
\newcommand{\sectionbackup}{\titleformat*{\section}{\Large\bfseries\centering}}

% 设置 \section 居左
\titleformat*{\section}{\Large\bfseries\raggedright}

% 你的居左 \section
\section{Your Left-Justified Section}

% 恢复原始 \section 格式
\sectionbackup

注意,上述的代码,仅对局部做处理,即只控制你想要更改位置的section,其余部分不会受到影响。

猜你喜欢

转载自blog.csdn.net/weixin_41862755/article/details/132831634