我已经获得了一个LaTeX文档,可以使用以下代码进行编辑,以便对图形和表格使用单个计数.
\makeatletter
\newcounter{unisequence}
\def\ucaption{
\ifx\@captype\@undefined
\@latex@error{\noexpand\ucaption outside float}\@ehd
\expandafter\@gobble
\else
\refstepcounter{unisequence}
\expandafter\@firstofone
\fi
{\@dblarg{\@caption\@captype}}
}
\def\thetable{\@arabic\c@unisequence}
\def\thefigure{\@arabic\c@unisequence}
\makeatother
Run Code Online (Sandbox Code Playgroud)
这适用于为表格和图形的字幕提供单个计数器但是,我发现如果我点击此代码生成的.pdf中的任何标题数字,我总是返回到文档中的第一个数字或表格比我想要的那个,例如点击表[3]将把我带到表1.
有谁知道如何解决这一问题?或者任何人都可以建议替代方案吗?
我是一名乳头新手.
谢谢
摩根先生.
latex ×1