[pdftex] problems w/pdflatex and hyperref in the book class
Wilson, Peter R
peter.r.wilson at boeing.com
Mon Nov 17 19:31:54 CET 2003
> -----Original Message-----
> From: franciszek holop [mailto:fred at pentacom.sk]
> Sent: Monday, November 17, 2003 5:24 AM
> To: pdftex at tug.org
> Subject: [pdftex] problems w/pdflatex and hyperref in the book class
>
>
>
> hello list,
>
> i know, this list is more for pdftex. if there's a list
> for pdflatex please direct me to it.
>
> i am typesetting a book but not for printing just regular
> electronic publishing. for convinience i would like to have
> links to the particular chapters. i have 2 test cases: with
> and without the tocloft package. my problem is, that the
> links go nowhere.
>
> without the tocloft package after clicking on the link (in
> xpdf) the same page is diplayed, with the tocloft package
> always the first chapter is displayed. frankly, i lack the
> skills to debug this issue, and i am not sure whose fault is
> this (pdflatex, hyperref, tocloft). i use hyperref regularly
> and this is the first time the links are not right. somebody
> else could test this book? (3.14159-1.10b, hyperref
> 2003/01/22 v6.73n, tocloft 2003/01/20 v2.3b)
>
> please see the example at the end of this mail which is the
> skeleton of the book i am working on.
>
> %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
> \documentclass[10pt,openright,twoside]{book}
> \usepackage[a5paper]{geometry}
> \usepackage[T1]{fontenc}
> \usepackage[latin2]{inputenc}
> \usepackage[magyar]{babel}
> \usepackage{fancyhdr}
> \usepackage{tocloft}
> \usepackage{pslatex}
> \usepackage[pdftex]{hyperref}
>
> \pagestyle{fancy}
> \renewcommand{\headrulewidth}{0pt}
> \fancyhf{}
> \fancyhead[LE,RO]{\thepage} \fancypagestyle{plain}{\fancyhead{}}
>
> \hypersetup{
> pdfauthor={simple sample},
> pdftitle={the sample book}
> }
>
> \clubpenalty=10000
> \widowpenalty=10000
> \lineskip 1pt
> \normallineskip 1pt
> \setlength\parskip{0.01pt}
>
> \AtBeginDocument{%
> \renewcommand{\contentsname}{}
> \renewcommand{\chaptername}{}}
>
> \renewcommand{\thechapter}{\Roman{chapter}}
>
> \renewcommand{\cftchapfont}{\mdseries}
> \newlength{\len}
> \setlength{\len}{0.5em}
> \renewcommand{\cftchappresnum}{\hfill}
> \renewcommand{\cftchapaftersnum}{\hspace*{\len}}
> \addtolength{\cftchapnumwidth}{\len}
> \renewcommand{\cftchapleader}{}
> \renewcommand{\cftchapafterpnum}{\cftparfillskip}
>
> \begin{document}
>
> \title{the sample book}
> \author{simple sample}
> \date{}
>
> \maketitle
>
> \clearpage
> \tableofcontents
> \clearpage
>
> \chapter{one}
> \chapter{two}
> \chapter{three}
> \chapter{four}
>
> \end{document}
> %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
>
The above worked for me provided I removed the line:
\usepackage[magyar]{babel}
This was using pdflatex with hyperref 2002/05/27 v6.72r and viewing via Acrobat Reader.
Peter W.
More information about the pdftex
mailing list