繁体   English   中英

如何修复 latex 中的报告编号

[英]how to fix report numbering in latex

我正在使用 latex 来写我的论文,它具有以下编号结构,当我参考前面的章节时,这很令人困惑。 例如,如果我在第 3 章中并且想要引用第 2 章中的小节,我使用 section \ref{section 1} 并且不清楚我想要哪个第 1 节(第 1 章或第 2 章)。

在此处输入图像描述

那么,我该如何更改上面的内容,如下图所示

在此处输入图像描述

下面是我的 header 中的代码,然后在文档中我使用 \chapter、\section 和 \subsection 来区分它们。

\documentclass[a4paper,11pt]{report}
% Preamble
\usepackage[utf8x]{inputenc}
\setcounter{tocdepth}{3}
\setcounter{secnumdepth}{3}
\usepackage{subfig}
\usepackage{fullpage}
\usepackage{tabularx}
\usepackage{comment}
\usepackage{color, colortbl}
\usepackage{graphicx}
\usepackage{url}
\usepackage{setspace}
\usepackage{float}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{varioref}
\usepackage{multirow}
\usepackage{hhline}
\renewcommand\thesection{\arabic{section}}
\usepackage{parskip}
\usepackage{algorithm}
\usepackage{algpseudocode}
\usepackage{caption}
\usepackage{tikz}
\usetikzlibrary{shapes.geometric, arrows}
\renewcommand{\arraystretch}{1.3}
\usepackage{lscape}
 \usepackage{multirow}
 
\usepackage{hyperref}
\hypersetup{
    colorlinks,
    citecolor=black,
    filecolor=black,
    linkcolor=black,
    urlcolor=black
}


\usepackage{longtable}

\setlength{\parindent}{0pt}

  [1]: https://i.stack.imgur.com/tsJLC.png
  [2]: https://i.stack.imgur.com/xNruu.png

\renewcommand\bibname{References}  % change title of references section
\newcommand{\myquote}[2]{\begin{center}\fbox{\begin{minipage}{.95\linewidth}#1\hfill #2\end{minipage}}\end{center}}
\newcommand{\source}[1]{\caption*{{#1}} }

\usepackage{natbib} \input{natbib-add}
\bibliographystyle{named}
\bibpunct{[}{]}{;}{a}{}{}
%\setlength{\skip\footins}{1.5cm}
\setlength{\intextsep}{10pt plus 2pt minus 2pt}

就是这一行:

\renewcommand\thesection{\arabic{section}}

它将章节编号更改为从 1 开始,就像章节已经是一样。 只需删除该行,部分编号为 1.1、1.2 等。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM