1

I try to make a thesis in pdf and i like to put two things in:

  1. Change the style of chapters (Lenny);
  2. Put the chapter in a header top on the page;

When i use \usepackage{fancyhdr} to do that the bookmarks disappear !

I put here my template so you can see better where I am wrong:

\documentclass[11pt,a4paper]{book}
 \usepackage[dvips,colorlinks=true]{hyperref}
 \hypersetup{
    bookmarksnumbered=false,
    linkcolor=black,
    citecolor=black,
    pagecolor=black,
    urlcolor=black,
 }
\usepackage{amsmath,amstext}
\usepackage{amsthm}
\usepackage{amsfonts}

\theoremstyle{plain}
\newtheorem{thm}{Teorema}[chapter]
\newtheorem{cor}[thm]{Corollario}
\newtheorem{lem}[thm]{Lemma}
\newtheorem{prop}[thm]{Proposizione}

\theoremstyle{definition}
\newtheorem{defn}{Definizione}[chapter]

\theoremstyle{remark}
\newtheorem{oss}{Osservazione}

\usepackage[english,italian]{babel}

\frenchspacing 
\usepackage{verbatim}
\usepackage{alltt}

\usepackage{graphicx}

\graphicspath{{./imgs/}}

\usepackage{subfigure}

\usepackage[bf]{caption2}

\addtolength{\oddsidemargin}{30pt}
\addtolength{\evensidemargin}{-30pt}

\usepackage{multirow}


\usepackage{natbib}

\usepackage{lscape}

\usepackage{fancyhdr}
% \usepackage[Sonny]{fncychap}
% \usepackage[]{hyperref}

Thanks a lot for Your help !!!!

5

1 Answer 1

1

Your two questions can be solved as follows:

  1. Load the package hyperref as last package: Which packages should be loaded after hyperref instead of before?
  2. You are loading the package fancyhdr so you can use the package to modify your headers. In your case the following should work:

    \usepackage{fancyhdr}
    \fancyhead{}
    \fancyhead[RO,LE]{\leftmark}
    \pagestyle{fancy}
    

Here I made a minimal working example (MWE) without unnecessary information:

\documentclass[11pt,a4paper]{book}

\usepackage{blindtext}%filling text

\usepackage{fancyhdr}
\fancyhead{}
\fancyhead[RO,LE]{\leftmark}
\pagestyle{fancy}

\usepackage[Sonny]{fncychap}

\usepackage[colorlinks=true]{hyperref}
 \hypersetup{
    bookmarksnumbered=false,
    linkcolor=black,
    citecolor=black,
    pagecolor=black,
    urlcolor=black,
 }
\begin{document}
\tableofcontents

\Blinddocument
\Blinddocument

\end{document}
3
  • The command \usepackage{blindtext}%filling text \usepackage{fancyhdr} \fancyhead{} \fancyhead[RO,LE]{\leftmark} \pagestyle{fancy} dosen't change the output of my .pdf there aren't headers on the pages ! :( Jul 7, 2013 at 13:35
  • @PanichiPattumerosPapaCastoro: Which pages do you mean? Jul 7, 2013 at 13:42
  • I finally SOLVE the problem. I must put INTO the \begins{document} ... \end{document} up the chapter i recall (\input{chapterN}) the style !!!! Before i put the pagestyle{fancy} out of the document !! Thanks a lot ! Jul 7, 2013 at 15:44

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .