\ref{key}
返回标题名称(使用 配置\captionsetup
)和编号\autoref{key}
。我怎样才能仅返回编号?
下面是我的包含主要软件包和的序言\captionsetup
。例如,我\ref{key}
在编译后使用“FIGURA 1.1”而不是“1.1”。在另一个包含几乎相同序言的文档中,我得到了预期的结果。
\documentclass[12pt,letterpaper,openany]{book}
\usepackage[brazil]{babel}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{lmodern}
\usepackage{graphicx}
\usepackage[usenames,dvipsnames,svgnames,table]{xcolor}
\usepackage{amsmath, amsthm, amssymb, amsfonts}
\usepackage[hidelinks]{hyperref}
\usepackage{chngcntr}
\usepackage{tabto}
\usepackage{extsizes}
\usepackage{mathptmx}
\usepackage{chemformula}
\usepackage{chemarrow}
\usepackage{shadow}
\usepackage{microtype}
\usepackage{multicol}
\usepackage{chemfig}
\usepackage{chemmacros}
\usepackage[shortlabels]{enumitem}
\usepackage{sectsty}
\usepackage{floatrow}
\usepackage{tabu}
\usepackage{subfiles}
\usepackage{booktabs}
\usepackage{siunitx}
\usepackage{chemstyle}
\usepackage[version=4]{mhchem}
\usepackage{cancel}
\usepackage{tikz}
\usetikzlibrary{calc,shadows}
\usepackage{pgfplots}
\pgfplotsset{table/search path={data}}
\usepackage{fontspec}
\usepackage{titlesec}
\usepackage{caption}
\newfontfamily\MProBoldCn[Mapping=tex-text, Numbers=Lining]{Minion Pro Bold Cond}
\newfontfamily\MProBoldCnIt[Mapping=tex-text, Numbers=Lining]{Minion Bold Condensed Italic}
\newfontfamily\RokkirrBold[Mapping=tex-text, Numbers=Lining]{Rokkitt}
\newfontfamily\AcuminPro[Mapping=tex-text, Numbers=Lining]{Acumin Pro}
\DeclareCaptionFont{rok}{\RokkirrBold}
\DeclareCaptionFont{acuminP}{\AcuminPro}
\definecolor{azulE1}{RGB}{0,93,171}
\begin{document}
\chapter{Chapter}
\section{Section}
As cited in \ref{test}.
\begin{figure}[H]
\centering
\tikz\draw[red,fill=red] (0,0) circle (.5ex);
\caption{Figure example.}
\label{test}
\end{figure}
\end{document}
答案1
为了获得期望的结果,请chemstyle
从序言中删除该包。
无关:
该
hyperref
包应该在大多数其他包之后加载不要用作
[H]
浮动说明符 - 这几乎总是导致图形放置不当你的序言看起来有点……拥挤。你应该只使用特定文档所需的包。例如,你确定需要多个互相覆盖的字体包吗?
\documentclass[12pt,letterpaper,openany]{book}
\usepackage[brazil]{babel}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{lmodern}
\usepackage{graphicx}
\usepackage[usenames,dvipsnames,svgnames,table]{xcolor}
\usepackage{amsmath, amsthm, amssymb, amsfonts}
\usepackage{chngcntr}
\usepackage{tabto}
\usepackage{extsizes}
\usepackage{mathptmx}
\usepackage{chemformula}
\usepackage{chemarrow}
\usepackage{shadow}
\usepackage{microtype}
\usepackage{multicol}
\usepackage{chemfig}
\usepackage{chemmacros}
\usepackage[shortlabels]{enumitem}
\usepackage{sectsty}
\usepackage{floatrow}
\usepackage{tabu}
\usepackage{subfiles}
\usepackage{booktabs}
\usepackage{siunitx}
%\usepackage{chemstyle}
\usepackage[version=4]{mhchem}
\usepackage{cancel}
\usepackage{tikz}
\usetikzlibrary{calc,shadows}
\usepackage{pgfplots}
\pgfplotsset{table/search path={data}}
%\usepackage{fontspec}
\usepackage{titlesec}
\usepackage{caption}
\usepackage[hidelinks]{hyperref}
\definecolor{azulE1}{RGB}{0,93,171}
\begin{document}
\chapter{Chapter}
\section{Section}
As cited in \ref{test}.
\begin{figure}[htbp]
\centering
\tikz\draw[red,fill=red] (0,0) circle (.5ex);
\caption{Figure example.}
\label{test}
\end{figure}
\end{document}