附录页面标签错误

附录页面标签错误

我想将附录中的页码标记为 A1、A2...我使用了以下代码,但是,只有第一页收到了正确的标签 A1,而第二页被标记为 2。有人知道为什么第 2 页的标签不正确吗?代码如下。谢谢!

\begin{appendices} \label{A}
    \newpage
    \renewcommand\thefigure{{A}\arabic{figure}}    %special numbering of figures
    \renewcommand\thetable{{A}\arabic{table}}    %special numbering of tables
    \renewcommand{\theequation}{{A}.\arabic{equation}}
    \renewcommand{\thesection}{A}
    \setcounter{figure}{0}
    \setcounter{table}{0}
    \setcounter{equation}{0}
    \pagenumbering{arabic}% resets `page` counter to 1
    \renewcommand*{\thepage}{A\arabic{page}}
    
\section*{Appendix}
\normalsize

\subsection{Section 1} \label{sec:1}

\begin{table} [H]
    \begin{adjustwidth}{-1in}{-1in}  
        \centering{
            \small
            \caption{caption}
            \label{tab:T_table}
            \input{Tables/T_table.tex} }
    \end{adjustwidth}
\end{table}

\clearpage

\subsection{Section 2} \label{sec:2}

\begin{figure}[H]
\centering{
\includegraphics[scale=0.5]{Figures/F_xxx.pdf}
\caption*{\footnotesize \textit{Notes}: xxx.\\}
\caption{xxx}
\label{fig:F_xxx}}
\end{figure}
   
 \end{appendices}

答案1

如果你能提供 MWE(来自\documentclass...\end{document})而不是仅提供代码片段,那确实会有所帮助。我不得不浪费时间让您的代码可处理。

更改页码更改的位置环境appendices

% pagenumprob.tex  SE 576560

\documentclass{article}
\usepackage{appendix}
\usepackage{float}
\usepackage{changepage}
\usepackage{graphicx}

\begin{document}

\section{A section}

\newpage
    \pagenumbering{arabic}% resets `page` counter to 1
    \renewcommand{\thepage}{{A}\arabic{page}}
\begin{appendices} \label{A}
%    \newpage
    \renewcommand\thefigure{{A}\arabic{figure}}    %special numbering of figures
    \renewcommand\thetable{{A}\arabic{table}}    %special numbering of tables
    \renewcommand{\theequation}{{A}.\arabic{equation}}
    \renewcommand{\thesection}{A}
    \setcounter{figure}{0}
    \setcounter{table}{0}
    \setcounter{equation}{0}
%    \pagenumbering{arabic}% resets `page` counter to 1
%    \renewcommand{\thepage}{{A}\arabic{page}}

    
\section*{Appendix}
\normalsize

\subsection{Section 1} \label{sec:1}

\begin{table} [H]
    \begin{adjustwidth}{-1in}{-1in}  
        \centering{
            \small
            \caption{caption}
            \label{tab:T_table}
   %         \input{Tables/T_table.tex} }
      TABLE.TEX}
    \end{adjustwidth}
\end{table}

\clearpage

\subsection{Section 2} \label{sec:2}

%%    \renewcommand{\thepage}{{A}\arabic{page}}

\begin{figure}[H]
\centering{
%\includegraphics[scale=0.5]{Figures/F_xxx.pdf}
 FXXX.PDF
\caption*{\footnotesize \textit{Notes}: xxx.\\}
\caption{xxx}
\label{fig:F_xxx}}
\end{figure}


   
 \end{appendices}

\end{document}

相关内容