Latex 如何在没有乳胶的情况下工作?

Latex 如何在没有乳胶的情况下工作?,latex,figure,Latex,Figure,我试图用1、2、3等数字来编号。但LaTeX只使用节号来计算它们,例如1.1、1.2等等,即使我使用了\counter而不使用{figure}{section}。没有错误消息。可能是什么问题 \usepackage{chngcntr} \counterwithout{figure}{section} \usepackage[pdfborder={0 0 0}]{hyperref} \begin{document} \input{chapter/01_introduction} %the fi

我试图用1、2、3等数字来编号。但LaTeX只使用节号来计算它们,例如1.1、1.2等等,即使我使用了\counter而不使用{figure}{section}。没有错误消息。可能是什么问题

\usepackage{chngcntr}
\counterwithout{figure}{section}
\usepackage[pdfborder={0 0 0}]{hyperref}

\begin{document}

\input{chapter/01_introduction}
%the figure is in a subsection as part of the introduction

\end{document}
这是01_简介文件的外观:

% !TEX root = ../root.tex
\section{Introduction}
\subsectiction{Title of the subsection}

\begin{figure}[htbp]
\begin{center}
\includegraphics[width=\textwidth]{chapter/figures/fig_bsp.png}
\captionof{figure}{caption of the figure}
\label{fig:1}
\end{center}
\end{figure}

在做一个简单的工作示例时,我发现了我的错误:我使用了一个模板,其中包含:'\renewcommand{\thefigure}{\thesection.\arabic{figure}}',这阻止了我的计算1、2、3。谢谢你的帮助

请制作一个而不是代码片段如果我将这些片段拼凑到一个可编译的文档中并更正一些打字错误,我确实得到了与问题无关的图1,但您确实不应该在图中使用中心环境,这只会增加额外的间距。更好地使用\对中。另外,也不必使用\caption of,简单的\caption就可以了,因为它已经在一个图中了。在做一个最小的工作示例时,我发现了我的错误:我使用了一个模板,其中包含:\renewcommand{\thefigure}{\thesection.\arabic{figure}},它阻止了我的数字1、2、3。谢谢你的帮助@桑德拉希克曼很高兴你找到了答案!你应该将你的解决方案作为你自己问题的答案发布,并将其标记为已接受。