Cryptosaurus / iacrtrans

LaTeX class for the IACR Transactions on Symmetric Cryptology
Creative Commons Zero v1.0 Universal
28 stars 23 forks source link

No capitals for sections when using \autoref #9

Open ikizhvatov opened 6 years ago

ikizhvatov commented 6 years ago

\def\sectionautorefname{Section} does not seem to have effect. Observed with pdflatex, TeX Live 2017.

Cryptosaurus commented 6 years ago

Hi Ilia, I don't see anything wrong with TeX Live 2017 from Fedora. Can you check if the issue is still present, and make a minimal example showing the problem? (It might be caused by another package that you load...) PS: Sorry for the delay to answer...

ikizhvatov commented 5 years ago

The issue is still present in the latest commit of iacrtrans, with MacTex 2018. Below is the minimal example.

\documentclass[journal=tches,submission]{iacrtrans}
\usepackage[utf8]{inputenc}
\usepackage[english]{babel}
\def\sectionautorefname{Section}
\begin{document}
\title{Title}
\author{John Doe}
\institute{Institute}
\maketitle
\section{Foo}
\label{sec:foo}
Nothing
\section{Bar}
In \autoref{sec:foo}, we did not describe anything.
\end{document}

Running pdflatex on it produces the following output. screenshot 2018-12-09 at 21 32 55

Logs here: test.zip

cardi commented 4 years ago

@ikizhvatov There are several ways to solve this:

If you don't need the babel package, you can remove it and \def\sectionautorefname{Section} should work as expected.

If you are using the babel package, then you'll need to also use the hyperref package and put the definitions inside \addto\extrasenglish{}:

\usepackage{hyperref}
\addto\extrasenglish{
    \def\sectionautorefname{Section}
}

This is your minimal example with the fixes applied:

\documentclass[journal=tches,submission]{iacrtrans}
\usepackage[utf8]{inputenc}
\usepackage[english]{babel}
\usepackage{hyperref}
\addto\extrasenglish{
    \def\sectionautorefname{Section}
}
\begin{document}
\title{Title}
\author{John Doe}
\institute{Institute}
\maketitle
\section{Foo}
\label{sec:foo}
Nothing
\section{Bar}
In \autoref{sec:foo}, we did not describe anything.
\end{document}

references