附录图表引用自‘附录 .II’

附录图表引用自‘附录 .II’

我尝试使用 \ref 命令引用我的附录图表,但出于某种原因,它将引用显示为“附录 .I”,我想删除数字前的句号。有什么想法吗?这是我的最小工作示例:

  \documentclass[11pt,a4paper]{article}
  \usepackage[utf8]{inputenc}
  \usepackage[english]{babel}
   \usepackage{amsmath}
  \usepackage{amsfonts}
  \usepackage{amssymb}
  \usepackage{graphicx}
  \usepackage[left=2cm,right=2cm,top=2cm,bottom=2cm]{geometry}
  \author{Maria}
  \begin{document}


\ref{alignment}



\appendix
\renewcommand{\figurename}{Appendix}
\renewcommand{\tablename}{Appendix}
\setcounter{figure}{0}
\setcounter{table}{0}
\renewcommand\thefigure{\thesection.\Roman{figure}}  
\renewcommand\thetable{\thesection.\Roman{table}} 
\pagestyle{plain}
\pagenumbering{Roman}
\makeatletter
\newcommand*{\dupcntr}[2]{%
\expandafter\let\csname c@#1\expandafter\endcsname\csname c@#2\endcsname
}
\makeatother
\dupcntr{table}{figure}

\begin{table}[h]
\caption{Alignment species primers, including NCBI accession number.}
\label{alignment}
\resizebox{\textwidth}{!}{%
\begin{tabular}{lll}
\textbf{Species}                                    & \textbf{Gene} &                
\end{tabular}%
}
\end{table}
\end{document}

答案1

如果你不想在附录图表前使用“。”(“句号”)前缀,只需更改

\renewcommand\thefigure{\thesection.\Roman{figure}}  
\renewcommand\thetable{\thesection.\Roman{table}} 

\renewcommand\thefigure{\Roman{figure}}  
\renewcommand\thetable{\Roman{table}} 

相关内容