2


I have a counter called Sols. I want to create a label as follows:

\label{Sol:\arabic{Sols}}

From some reason I get errors. What is the solution to that?

Thank you!

2
  • Can you provide some more context here? What is the error, for example? Perhaps also include your .log.
    – Werner
    Sep 16, 2019 at 16:33
  • It should normally work, unless something is redefining \arabic or some of its internals (if I recall correctly, some babel language does that). Please provide us a compilable example that shows the problem. Sep 16, 2019 at 16:33

1 Answer 1

1

This works:

\documentclass{article}
\newcounter{foo}
\setcounter{foo}{7}
\begin{document}
\section{Baz}
\null\newpage
bar\label{baz\thefoo}
\newpage
On page~\pageref{baz7} or in section~\ref{baz7}

\end{document}

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .