[OS X TeX] hyperref and apacite
David Watson
dewatson at mac.com
Sun Apr 6 23:47:35 CEST 2008
Ross,
With the latest hyperref and apacite, I get the same problems.
Mac OS 10.5.2, TeXShop Version 2.14-svn (2.14), Version 1.3.14 (v1008)
David
On Apr 6, 2008, at 3:02 PM, Ross Moore wrote:
> Hello Salvatore,
>
> On 07/04/2008, at 12:10 AM, Salvatore Enrico Indiogine wrote:
>> Hi Ross!
>>
>> On 05/04/2008, Ross Moore <ross at ics.mq.edu.au> wrote:
>>> If you are having this problem, doubtless others will face it too,
>>> so having the correct fix will be quite useful.
>>>
>>> Please produce a minimal example, cut-down to include just 1 or 2
>>> citations and very little text, that still exhibits the error.
>
>
> It works perfectly when you use:
>
> \documentclass[man,12pt,hyper]{apa}
>
> Note that extra 'hyper' option.
>
> Looking through apacite.sty you'll find coding:
>
>
> %%%%%% Hyperref compatibility option %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
> %%%
> % (This does not work completely satisfactory, so
> % is only a non-default option.)
> %
> \newif\if at hyper@APA at comp
> \DeclareOption{hyper}{%
> \@hyper at APA@comptrue % hyperref compatibility option is on
> }
> %%%%%% End Hyperref compatibility option %%%%%%%%%%%%%%%%%%%%%%%%%%%%
> %%
>
>
>
> and further down, the coding that does the work:
>
> %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
> %%%
> %% COMPATIBILITY WITH
> HYPERREF %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
> %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
> % Include experimental hyperref-compatibility code provided by Ross
> Moore,
> % if the hyper option is requested.
> \if at hyper@APA at comp% hyperref compatibility option is on
> %
>
>
> It seems that I've worked on this problem before!
>
>
>>>
>>> Send it directly to me, if you like. I'll try to find some time to
>>> do
>>> detailed tracing, and determine exactly what is going wrong and why.
>>> Then devise a good fix.
>
>
> In tracing your example, I did discover another problem though:
>
> At line 1266 in the expansion of \@@cite<#1>
> there is an improperly coded test:
>
> \ifx\@empty#1%
> \else%
> {\ignorespaces #1\@BAP}%
> \fi%
>
>
> This should really be:
>
> \ifx\@empty#1\@empty
> \else%
> {\ignorespaces #1\@BAP}%
> \fi%
>
> since otherwise when #1 is empty (as in your example)
> the comparison is between tokens \@empty and \else .
>
> In fact the required result is achieved, but for the
> wrong reason!
>
>>
>> I have reduced the bib and tex files to the minimum. The error is
>> still reproducible and occurs the same way using TeXShop,
>> Aquamacs+AucTeX, or even command line.
>>
>> 1. run latex -> pdf created with correct references and hyperlinks,
>> however citation is ()
>>
>> 2. run bibtex -> no error
>>
>> 3. run latex -> should still compile
>>
>> 4. run latex -> fails with always same error message. Also the
>> auxiliary files are now zero size.
>>
>> Hope it helps.
>>
>> Enrico
>>
>> --
>> Enrico Indiogine
>>
>> Hope this helps,
>
> Ross
More information about the macostex-archives
mailing list