![在章节标题和小节中出现不需要的小数位](https://linux22.com/image/373363/%E5%9C%A8%E7%AB%A0%E8%8A%82%E6%A0%87%E9%A2%98%E5%92%8C%E5%B0%8F%E8%8A%82%E4%B8%AD%E5%87%BA%E7%8E%B0%E4%B8%8D%E9%9C%80%E8%A6%81%E7%9A%84%E5%B0%8F%E6%95%B0%E4%BD%8D.png)
我得到了这些不需要的小数,如 7.0 或 4.4.4,而对于子节来说,应该是 7 和 4.4。以下是与节号相关的代码:
\documentclass[12]{article}
\usepackage {amsmath}
\usepackage {amsfonts}
\usepackage{setspace}
\usepackage{cite}
\usepackage{graphicx}
\usepackage{helvet}
\usepackage{verbatim}
%\usepackage{arydshln}
%\usepackage{lipsum}
\renewcommand{\familydefault}{\sfdefault}
\begin{document}
\renewcommand{\thepage}{\roman{page}} %front matter of document
\title{X-Ray Tube Operation}
\author{CCDP 2100-Z, Cheryl Cundell}
\date{April 5,2018}
\maketitle
\singlespacing
\newpage
\doublespacing
\newpage %table of contents
\tableofcontents
\newpage
\renewcommand{\thesection}{\Roman{section}}
\section*{\centering{Abstract}}
X-ray imaging a fundamental part of modern day medicine \cite{1}. X-ray imaging, also known as radiology, takes advantage of the properties of X-ray radiation to image bones and organs in the human body. The capacity to produce X-ray radiation is fundamental to the practice of radiology. I will be discussing the mechanism of X-Ray production within a component know as a X-ray tube. and why the
\addcontentsline{toc}{section}{Abstract}
\newpage
\section{List of figures}
\begin{enumerate} %list of figures and tables etc
\item Figure 1 Relative energies carried by electromagnetic waves.........pg.2
\item Figure 2 The main components of an X-ray tube........................pg.3
\item Figure 3 The flow of current in a X-ray production apparatus.........pg.4
\item Figure 4 The Mechanism of the Focusing Cup.........pg.6
\end{enumerate}
\section{Nomenclature definitions}
$F$\hspace{2.5cm} Force acting upon an electron \newline
$q_e$\hspace{2.5cm} Charge of electron \newline
$q_2$\hspace{2.5cm} Charge on cathode or anode \newline
$r $\hspace{2.5cm} Distance between charges \newline
$m$\hspace{2.5cm} The mass of an object\newline
$a$\hspace{2.5cm} The acceleration of an object\newline
$a_e$ \hspace{2.5cm} The acceleration of an electron in a X-ray tube
\section{Abbreviations}
\begin{enumerate} %list of figures and tables etc
\item \textbf{TE} Thermionic Emission
\item \textbf{DC} Direct Current
\end{enumerate}
\doublespacing
\newpage
\pagenumbering{arabic}
\renewcommand{\thesection}{\arabic{section}.\arabic{subsection}}
\section{X-ray use in Hospitals}%intro
\setcounter{section}{1}
Radiology is a common medical imaging technique due to its ability to diagnose sub-dermal abnormalities in the human body\cite{X1}. This ability to obtain internal images of the human body in a non-intrusive fashion makes X-ray scanning, also known as radiology, a fundamental technology in modern healthcare.
\section{Radiology} %brackground
\end{document}
答案1
命令
\renewcommand{\thesection}{\arabic{section}.\arabic{subsection}}
意味着每次您需要章节编号(例如,在(子)章节标题中)时,您也会获得当前子章节。
这\section{Section Title}
意味着
\arabic{section}.0 Section Title
(因为子部分计数器刚刚重置),而
\subsection{Subsection Title}
变成
\thesection.\arabic{subsection} Subsection Title
变成
\arabic{section}.\arabic{subsection}.\arabic{subsection} Subsection Title
我不确定你用这个命令的目的是什么。你能直接删除它吗?