Document Classes ⇒ hyperref problem
hyperref problem
http://www-math.bgsu.edu/~inathan/bgsu_latex_class.html
Apparently the person in charge of making sure the manuscripts look okay started deleting all the beautiful pdfbookmarks because she wanted the chapter bookmarks to link to the top of the page instead of the chapter heading.
I have searched far and wide and continue to dive into hyperref's source for clues. If you think you can help please do.
One idea I had was to link to the built-in unique page anchors (pageanchor=true option). Unfortunately, i can't seem to find a command to create a bookmark to an existing anchor.
Learn LaTeX easily with newest books:
The LaTeX Beginner's Guide: 2nd edition and perfect for students writing a thesis
The LaTeX Cookbook: 2nd edition full of practical examples for mathematics, physics, chemistry, and more
LaTeX Graphics with TikZ: the first book about TikZ for perfect drawings in your LaTeX thesis
hyperref problem
http://www.ctan.org/tex-archive/macros/ ... /oberdiek/
Now for sections that do not appear in the toc I can add a pdf bookmark using the bookmark command as follows:
Code: Select all
\newenvironment{abstract}{\clearpage
\bookmark[page=\value{page},view={FitH 800},level=0]{ABSTRACT}
\label{abstract}
\thispagestyle{myheadings}
\begin{center}\textbf{ABSTRACT}\\ \end{center}
\begin{flushleft}{\@advisor , Advisor\\} \end{flushleft}
}{\clearpage
}
Code: Select all
\documentclass{book}
\usepackage{hyperref}
\begin{document}
\chapter{Hi}
\section{less}
\section{filling}
\section{tastes}
\section{great}
\chapter{Luke I am your father}
\section{star wars}
\appendix
\clearpage
\phantomsection
\addcontentsline{toc}{chapter}{APPENDIX}
\chapter*{APPENDIX}
\end{document}
hyperref problem
Code: Select all
\hypersetup{bookmarkstype=none}
Code: Select all
% Need to define offset to get links right
\renewcommand\mainmatter{%
% My Contribution here
\newcounter{offset}\setcounter{offset}{\value{page}}
\newcounter{trupage}
% End of my contribution
\cleardoublepage
\@mainmattertrue
\pagenumbering{arabic}
}
% This is to ensure that Chapter appears before the chapter number in
% the toc and fixes pdfbookmarks to point higher on the page
\renewcommand{\chaptername}{CHAPTER}
\def\@chapter[#1]#2{\ifnum \c@secnumdepth >\m@ne
\if@mainmatter
\refstepcounter{chapter}%
\typeout{\@chapapp\space\thechapter.}%
\addcontentsline{toc}{chapter}{\chaptername\space\protect\numberline{\thechapter:}#1}%
% My contribution here
\setcounter{trupage}{\value{page}+\value{offset}}
\bookmark[page=\value{trupage},view={FitH 800},level=0]{\chaptername\space\thechapter: #1}
% End of my contribution
\else
\addcontentsline{toc}{chapter}{#1}%
\fi
\else
\addcontentsline{toc}{chapter}{#1}%
\fi
\chaptermark{#1}%
\addtocontents{lof}{\protect\addvspace{10\p@}}%
\addtocontents{lot}{\protect\addvspace{10\p@}}%
\if@twocolumn
\@topnewpage[\@makechapterhead{#2}]%
\else
\@makechapterhead{#2}%
\@afterheading
\fi}
% Adds pdfbookmarks for sections
\def\@sect#1#2#3#4#5#6[#7]#8{%
\ifnum #2>\c@secnumdepth
\let\@svsec\@empty
\else
\refstepcounter{#1}%
\protected@edef\@svsec{\@seccntformat{#1}\relax}%
\fi
% My contribution here
\pdfbookmark[#2]{{\csname the#1\endcsname}: #7}{#7}
% End of my contribution
\@tempskipa #5\relax
\ifdim \@tempskipa>\z@
\begingroup
#6{%
\@hangfrom{\hskip #3\relax\@svsec}%
\interlinepenalty \@M #8\@@par}%
\endgroup
\csname #1mark\endcsname{#7}%
\addcontentsline{toc}{#1}{%
\ifnum #2>\c@secnumdepth \else
\protect\numberline{\csname the#1\endcsname}%
\fi
#7}%
\else
\def\@svsechd{%
#6{\hskip #3\relax
\@svsec #8}%
\csname #1mark\endcsname{#7}%
\addcontentsline{toc}{#1}{%
\ifnum #2>\c@secnumdepth \else
\protect\numberline{\csname the#1\endcsname}%
\fi
#7}}%
\fi
\@xsect{#5}}
Code: Select all
% Below adds pdf bookmarks and table of contents entries (manually)
\newcommand{\addtocbookmark}[2]%
{
\ifthenelse{\equal{#1}{part}}
{ \addcontentsline{toc}{#1}{#2}%
\setcounter{trupage}{\value{page}+\value{offset}}
\bookmark[page=\value{trupage},view={FitH 800},level=0]{#2}
}
{
\ifthenelse{\equal{#1}{chapter}}
{ \addcontentsline{toc}{#1}{#2}%
\setcounter{trupage}{\value{page}+\value{offset}}
\bookmark[page=\value{trupage},view={FitH 800},level=0]{#2}
}
{
\ifthenelse{\equal{#1}{section}}
{ \addcontentsline{toc}{#1}{#2}%
\pdfbookmark[1]{#2}{#2}}
{
\ifthenelse{\equal{#1}{subsection}}
{ \addcontentsline{toc}{#1}{#2}%
\pdfbookmark[2]{#2}{#2}}
{
\ifthenelse{\equal{#1}{subsubsection}}
{ \addcontentsline{toc}{#1}{#2}%
\pdfbookmark[3]{#2}{#2}}
{
\ifthenelse{\equal{#1}{paragraph}}
{ \addcontentsline{toc}{#1}{#2}%
\pdfbookmark[4]{#2}{#2}}
{
\ifthenelse{\equal{#1}{subparagraph}}
{ \addcontentsline{toc}{#1}{#2}%
\pdfbookmark[5]{#2}{#2}}
{
}}}}}}}}
Code: Select all
\usepackage{zref-abspage}
\newcounter{pglab}
\makeatletter
\begingroup
\edef\pglab{\pglab\the\value{pglab}}%
\stepcounter{pglab}%
\zref@labelbyprops{\pglab}{abspage}%
\zref@refused{\pglab}%
\bookmark[page=\zref@extractdefault{\pglab}{abspage}{1}, ...]
...
\endgroup
\makeatother
hyperref problem
Code: Select all
\usepackage[pdfview=Fit]{hyperref}Best,
Tracey