![更改章节、节等的页码(回忆录)](https://linux22.com/image/432322/%E6%9B%B4%E6%94%B9%E7%AB%A0%E8%8A%82%E3%80%81%E8%8A%82%E7%AD%89%E7%9A%84%E9%A1%B5%E7%A0%81%EF%BC%88%E5%9B%9E%E5%BF%86%E5%BD%95%EF%BC%89.png)
我将其用作abntex2
我的文档类,它扩展了 Memoir 包。在此编号方案中,默认第一节、子节等为 0.1、0.2 等。
我怎样才能改变这一点,以便我的章节、小节等能够像文章中那样表现为 1.1、1.2 等?
梅威瑟:
%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% !TeX TS-program = pdflatex
\documentclass[12pt,a4paper]{abntex2} % Use A4 paper with a 12pt font size - different paper sizes will require manual recalculation of page margins and border positions
%%%%%%%%%%%% ----------- PACOTES/PACKAGES ----------- %%%%%%%%%%%%%%
\usepackage[utf8]{inputenc}
\usepackage{lastpage}
\usepackage[T1]{fontenc}
\usepackage{lmodern}
\usepackage{lipsum}
\usepackage{graphicx}
\usepackage{textcomp}
\usepackage{microtype} % para melhorias de justificação
\usepackage{morefloats} % permite mais floats
\usepackage{parskip} % espaçamento entre os parágrafos
\usepackage[brazil]{babel} % idiomas
\usepackage{listings}
\hypersetup{
pdftitle={\@title},
pdfauthor={\@author},
pdfsubject={Modelo de artigo científico com abnTeX2},
pdfcreator={LaTeX with abnTeX2},
pdfkeywords={abnt}{latex}{abntex}{abntex2}{atigo científico},
colorlinks=true, % false: boxed links; true: colored links
linkcolor=blue, % color of internal links
citecolor=blue, % color of links to bibliography
filecolor=magenta, % color of file links
urlcolor=blue,
bookmarksdepth=4
}
\makeatother
% ---
% Pacotes de citações
% ---
\usepackage[brazilian,hyperpageref]{backref} % Paginas com as citações na bibl
\usepackage[alf]{abntex2cite} % Citações padrão ABNT
% ---
\renewcommand{\backrefpagesname}{Citado na(s) página(s):~}
% Texto padrão antes do número das páginas
\renewcommand{\backref}{}
% Define os textos da citação
\renewcommand*{\backrefalt}[4]{
\ifcase #1 %
Nenhuma citação no texto.%
\or
Citado na página #2.%
\else
Citado #1 vezes nas páginas #2.%
\fi}%
% ---
% O tamanho do parágrafo é dado por:
\setlength{\parindent}{1.3cm}
% Controle do espaçamento entre um parágrafo e outro:
\setlength{\parskip}{0.2cm} % tente também \onelineskip
% Espaçamento simples
\SingleSpacing
%%%%%% HEADERS <<<<<<<<<<<<<<
\usepackage{nicematrix} % <<<< added for an easy table
\usepackage[datesep=/,useregional=numeric]{datetime2} %<<<<< added format date
\DTMsetdatestyle{ddmmyyyy}
\usepackage{fancyhdr} % Required for header and footer configuration
\renewcommand{\headrulewidth}{0pt}
\fancypagestyle{firstpagestyle}{% to use only in the first page
\fancyhf{}% Clear default headers and footers
\input{header-footer.tex}
}%%%%%% firstpagestyle ends
\begin{document}
% Seleciona o idioma do documento (conforme pacotes do babel)
%\selectlanguage{english}
\selectlanguage{brazil}
% Retira espaço extra obsoleto entre as frases.
\frenchspacing
\section{Secção numérica}
\lipsum[0]
\section{Secção numérica 2}
\lipsum[1]
\end{document}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
答案1
abntex2
由于我只会说英语,所以我看不懂手册。不过我是 的原始开发者memoir
。
假设命令位于和类等命令之前。memoir
有一个选项,使输出看起来像一个;a的排版方式像一篇文章的,a的排版方式像 aericle 的 \subsection report article memoir` 通过类选项实现这一点,而不必更改文档的主体。\chapter
\section
book
report
memoir
article
article
\chapter
\section
\section
, and so on. I did this because sometimes people wanted to convert a
to an
or vice-versa, so
尝试以下方法:
\documentclass[article]{abntex2}
\begin{document}
\chapter{A chapter like a section}
\section{A section like a subsection}
\subsection{A subsection like a subsubsection}
\end{document}
阅读abntex2
手册,看看它对此有何评论。