<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii">
<META NAME="Generator" CONTENT="MS Exchange Server version 6.0.6603.0">
<TITLE>RE: Cross-referencing paragraphs not in the Table of Contents</TITLE>
</HEAD>
<BODY>
<!-- Converted from text/rtf format -->
<P><FONT COLOR="#0000FF" SIZE=2 FACE="Arial">Hey again!</FONT>
</P>
<P><FONT COLOR="#0000FF" SIZE=2 FACE="Arial">Today I found a solution of the enquiry I sent you yesterday, namely replacing the '\addtocounter{paragraph}{1}'-statement by '\refstepcounter{paragraph}'. Now everything works fine!</FONT></P>
<P><FONT COLOR="#0000FF" SIZE=2 FACE="Arial">I apologize if my inquiry may have caused any problems for you.</FONT>
</P>
<P><FONT COLOR="#0000FF" SIZE=2 FACE="Arial">Kind regards</FONT>
<BR><FONT COLOR="#0000FF" SIZE=2 FACE="Arial">Jan Teigen</FONT>
</P>
<P><FONT FACE="Arial"></FONT> <FONT SIZE=1 FACE="Tahoma">-----Opprinnelig melding-----</FONT>
<BR><B><FONT SIZE=1 FACE="Tahoma">Fra: </FONT></B> <FONT SIZE=1 FACE="Tahoma">Teigen Jan Gunnar </FONT>
<BR><B><FONT SIZE=1 FACE="Tahoma">Sendt: </FONT></B> <FONT SIZE=1 FACE="Tahoma">12. november 2005 17:43</FONT>
<BR><B><FONT SIZE=1 FACE="Tahoma">Til: </FONT></B> <FONT SIZE=1 FACE="Tahoma">'support@tug.org'</FONT>
<BR><B><FONT SIZE=1 FACE="Tahoma">Emne: </FONT></B> <FONT SIZE=1 FACE="Tahoma">Cross-referencing paragraphs not in the Table of Contents</FONT>
</P>
<P><FONT SIZE=2 FACE="Arial">Hey</FONT>
</P>
<P><FONT SIZE=2 FACE="Arial">I am writing on a document for some 'rules and regulations' in pdfTex where I use the paragraph sectioning command a lot. It is not practical to include these paragraphs in the Table of Content since they are numerous and without heading (but I include them as bookmarks). However, it is 'a must' to be able cross-referencing the individual paragraphs. So far, I have used a LaTex-structure like this for each paragraph:</FONT></P>
<P><FONT SIZE=2 FACE="Arial">%··················································</FONT>
<BR><FONT SIZE=2 FACE="Arial">\addtocounter{paragraph}{1}</FONT>
<BR><FONT SIZE=2 FACE="Arial">\paragraph*{\theparagraph\hspace{-1em}}</FONT>
<BR><FONT SIZE=2 FACE="Arial">\pdfbookmark[4]{\theparagraph}{\theparagraph}</FONT>
<BR><FONT SIZE=2 FACE="Arial">\label{key}</FONT>
<BR><FONT SIZE=2 FACE="Arial">%··················································</FONT>
<BR><FONT SIZE=2 FACE="Arial">Text of the paragraph ……….</FONT>
</P>
<P><FONT SIZE=2 FACE="Arial">This works fine for the bookmark, and also for the hyperlink when I write '\ref{key}' or '\pageref{key}' (I jump to the correct paragraph). However, the problem is that '\ref{key}' yields the overlaying subsection-number (which is in ToC), instead of the actual paragraph-number.</FONT></P>
<P><FONT SIZE=2 FACE="Arial">I understand that this is not a bug in LaTex, just the way it is meant to work. However, what I miss here is the following extention of the ref-command: \ref[counter]{key}, with a counter optional (in my case paragraph). Maybe this can be enabled using the \renewcommand, but I don't have the skills.</FONT></P>
<P><FONT SIZE=2 FACE="Arial">C</FONT><FONT SIZE=1 FACE="Times New Roman">Ø</FONT><FONT SIZE=2 FACE="Arial">an you help me finding a way around this problem?</FONT>
</P>
<P><FONT SIZE=2 FACE="Arial">Kind regards</FONT>
<BR><FONT SIZE=2 FACE="Arial">Jan Teigen</FONT>
</P>
</BODY>
</HTML>