living-papers icon indicating copy to clipboard operation
living-papers copied to clipboard

feat: use \autoref in latex

Open domoritz opened this issue 11 months ago • 3 comments

\autoref automatically adds the prefix and also makes the whole reference ("Figure 3" instead of just "3") clickable.

domoritz avatar Mar 22 '25 20:03 domoritz

This looks promising. We probably also want to add \def\sectionautorefname{\S} to generated documents preserve how we refer to sections. We also need to ensure that the hyperref package is being used.

jheer avatar Mar 24 '25 18:03 jheer

We probably also want to add \def\sectionautorefname{\S} to generated documents preserve how we refer to sections.

I think it's actually better to let each template decide how they want to render sections.

We also need to ensure that the hyperref package is being used.

All templates in this repo import it. Is there another way to ensure that a package is there?

domoritz avatar Mar 25 '25 17:03 domoritz

We probably also want to add \def\sectionautorefname{\S} to generated documents preserve how we refer to sections.

Fwiw, I'm using

\makeatletter
\renewcommand{\sectionautorefname}{\S\@gobble}
\makeatother

(which I got from Stack Overflow). The gobble is necessary because autoref adds a space after the ref name and we don't want it

joshuahhh avatar Mar 25 '25 20:03 joshuahhh