1

In chinese, the word order generated by \autoref is different from english, e.g.,

Section 2.1 in chinese reads Di 2.1 jie

So is there any possible to redefine \sectionautorefname to generate the required cross reference? e.g.

\documentclass{article}
\usepackage{hyperref}
\renewcommand{\sectionautorefname}{di secnum jie}
\begin{document}
\section{test}\label{sec:test}
\subsection{test2}
\autoref{sec:test} will looks like `di 1 jie` instead of `di secnum jie 1`?
\end{document}
  • I guess you want to look at cleveref – egreg Sep 14 '16 at 15:31
1

You want to use the more powerful package cleveref:

\documentclass{article}
\usepackage{hyperref}
\usepackage{cleveref}

\crefformat{section}{di~#2#1#3~jie}

\begin{document}

\section{test}\label{sec:test}

\cref{sec:test} will look like `di 1 jie'

\end{document}

enter image description here

  • yes, in fact, I googled to know this can be done by cleveref, but is there any possibility to archive what I want without it? – user19832 Sep 15 '16 at 2:18
0

I find an answer inspired by Heiko Oberdiek , of course this fix is not strong as mentioned in this remark.

I define a command to deal with the chapter/section/subsection one in all:

\newcommand{\myautoref}[2]{
\expandafter\def\csname #1autorefname\endcsname##1##2\null{The ##2#2}
}

then we can use it as

\myautoref{chapter}{Chapter}
\myautoref{section}{jie}

then \auroref{lab} will produce something like The 1 Chapter, The 2 jie, depending on the level of lab.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.