General\refname and \refstepcounter

LaTeX specific issues not fitting into one of the other forums of this category.
Post Reply
pozzyx
Posts: 8
Joined: Fri Jun 18, 2010 12:20 pm

\refname and \refstepcounter

Post by pozzyx »

Hello,

I'm trying to do subsections like:
2.1 V1 - xxx
xxxxxxxx
2.2 V2 - yyy
xxxxxxxxx
2.3 V3 - zzz
xxxxxxxxxx

for the number y from Vy, I used a counter :

Code: Select all

\newcounter{mycounter}
...
\subsubsection{V\arabic{mycounter} - xxx}
\label{xxx}
\refstepcounter{mycounter}
xxxxxxxxxxxx

\subsubsection{V\arabic{mycounter} - yyy}
\label{yyy}
\refstepcounter{mycounter}
xxxxxxxxxxxx

\subsubsection{V\arabic{mycounter} - zzz}
\label{zzz}
\refstepcounter{mycounter}
xxxxxxxxxxxx
BEFORE this part in my document, I want to have references to the pages after likes :
As you will see in V2 - yyy, ......

So I use nameref, but the counter doesn't seem to work in the nameref and I get :
As you will see in V0 - yyy, ....

But the subsection titles are fine.

Can somebody help me please ?

Thank you

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p

Post Reply