[texhax] memoir, hyperref, nameref

Lars Madsen daleif at imf.au.dk
Fri Apr 16 01:06:39 CEST 2010


Heiko Oberdiek wrote:
> On Thu, Apr 15, 2010 at 04:06:46PM +0200, Uwe Lueck wrote:
> 
>> -----Ursprüngliche Nachricht-----
>> Von: Lars Madsen <daleif at imf.au.dk>
>> Gesendet: Apr 15, 2010 2:54:25 PM
>> An: Heiko Oberdiek <oberdiek at uni-freiburg.de>,Victor Ivrii <vivrii at gmail.com>,TeXhax <texhax at tug.org>
>> Betreff: Re: [texhax] memoir, hyperref, nameref
>>>> we change the \label contents after nameref, because we emulate titleref 
>>>> and thus otherwise could not get our hands on the title. So the 
>>>> \let\nameref\titleref fixed that problem
>>> this now fails
>>> just adding a
>>> \AtBeginDocument{\typeout{test}}
>>> at the very end of memhfixc shows that this AtBeginDocument gets 
>>> executed before nameref is even loaded
>>> This also means that the
>>> \AtBeginDocument{%
>>>   \@ifpackageloaded{nameref}{\let\nameref\titleref}{}%
>>> }
>>>
>>> is never executed
>> So try ctan.org/pkg/afterpackage: 
>>
>>     \usepackage{afterpackage}
>>     \AfterPackage{nameref}{\let\nameref\titleref}
> 
> And the star form of \nameref is unsupported ...
> 
> Yours sincerely
>   Heiko Oberdiek

replace it with

\DeclareRobustCommand\nameref{\@ifstar{\@mem at titlerefnolink}{\@mem at titleref}}

that is how titleref is defined internally

\@mem at titlerefnolink gets redefined if hyperref is loaded


/daleif





More information about the texhax mailing list