如何更改默认 autoref 类别以将 autoref 用于不受支持的语言?

7 latex

使用代码片段时

\autoref{chapter:chapter1}
\autoref{table:table1}
\autoref{figure:figure1}
Run Code Online (Sandbox Code Playgroud)

最低代码

\documentclass[11pt]{article}
\usepackage{hyperref}
\begin{document}
\subsection{my section}
\label{chapter:mychapter}
\begin{figure}[!ht]
\centering

\caption{foo.}
\label{fig:myfigure}
\end{figure}
As seen in\autoref{fig:myfigure} in \autoref{chapter:mychapter}
\end{document}
Run Code Online (Sandbox Code Playgroud)

文本中的输出将是“section 1.1”、“table 1.1”和“figure 1.1”,但我希望它说些别的东西。

前任:

“第 1.1 节”到“foo 1.1”

“表 1.1”至“栏 1.1”

“图1.1”到“foobar 1.1”

如何更改默认输出?

sam*_*ter 9

\documentclass[11pt]{article}
\usepackage{hyperref}


\renewcommand{\figureautorefname}{foo}
\renewcommand{\tableautorefname}{bar}
\renewcommand{\sectionautorefname}{foobar}
\renewcommand{\subsectionautorefname}{foobarbaz}

\begin{document}
\subsection{my section}
\label{chapter:mychapter}
\begin{figure}[!ht]
\centering

\caption{foo.}
\label{fig:myfigure}
\end{figure}
As seen in\autoref{fig:myfigure} in \autoref{chapter:mychapter}
\end{document}
Run Code Online (Sandbox Code Playgroud)