[pdftex] nameref

Aleks Kleyn Aleks_Kleyn at MailAPS.org
Mon Jan 9 23:31:06 CET 2006


It works. I had to skip line used @ifundefined because it was not able to
find reference. But I tested with wrong label and got "??" also.
Thank you very much. I designed macro which allows to add bookmarks to
sections from another pdf file
\newcommand\setPdfOutline[4]
{
%1-external link
%2-ref
%3-file
%4-anchor
\pdfstringdef\tempa{\ref{#1-#2} }
\pdfstringdef\tempb
{
    \expandafter\expandafter\expandafter\@thirdoffive
      \csname r@#1-#2\endcsname
      \@empty\@empty\@empty\@empty\@empty
}
\pdfoutline goto file{#3.pdf} name{#4} {\tempa\tempb}
}
This macro works and may be useful for others. Somebody can see it on my web
page http://www.geocities.com/aleks_kleyn/Relativity/Relativity.htm

Aleks Kleyn
http://www.geocities.com/aleks_kleyn


-----Original Message-----
From: pdftex-bounces at tug.org [mailto:pdftex-bounces at tug.org] On Behalf Of
Heiko Oberdiek
Sent: Monday, January 09, 2006 9:50 AM
To: 'PDF-TeX mailing list'
Subject: Re: [pdftex] nameref

\pdfstringdef\mytemp{%
  \@ifundefined{reference}{%
    ??%
  }{%
    \expandafter\expandafter\expandafter\@thirdoffive
      \csname r at reference\endcsname
      \@empty\@empty\@empty\@empty\@empty
  }%
}
% untested 

Yours sincerely
  Heiko <oberdiek at uni-freiburg.de>
-- 

_______________________________________________
pdftex mailing list
pdftex at tug.org
http://tug.org/mailman/listinfo/pdftex



More information about the pdftex mailing list