0

When I use autoref for subsection, I want the in-text to be section 1.1 instead of subsection 1.1. How to do that. I tried to write it with ref as:

section \ref{sec:subsection}

But the problem is that I want my references to be clickable (using hyperref) and with ref the word section becomes un-clickable (only the number portion) while with autoref the whole word section 1.1 becomes clickable. Can you help?

enter image description here

\documentclass[sigconf]{acmart}
\usepackage{hyperref}
\begin{document}
\title{Title Here}

\begin{abstract}
Abstract here.
\end{abstract}

\maketitle
\section{First}\label{sec:section}
\subsection{Sub}\label{sec:subsection}
\autoref{sec:section} and \autoref{sec:subsection}
\end{document}
3

Just put like this below:

\documentclass[sigconf]{acmart}
\usepackage{hyperref}
\def\subsectionautorefname{section}
\begin{document}
\title{Title Here}

\begin{abstract}
Abstract here.
\end{abstract}

\maketitle
\section{First}\label{sec:section}
\subsection{Sub}\label{sec:subsection}
\autoref{sec:section} and \autoref{sec:subsection}
\end{document} 

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.