\documentclass[12pt,a4paper]{mwrep}
\usepackage{polski}
\usepackage[cp1250]{inputenc}
\usepackage{pdfpages}
\usepackage[hidelinks]{hyperref}
\renewcommand\baselinestretch{1.5}
\usepackage{etoolbox}
\patchcmd{\thebibliography}{*}{}{}{}
\makeatletter
\pretocmd{\tableofcontents}{%
\if@openright\cleardoublepage\else\clearpage\fi
\pdfbookmark[0]{\contentsname}{toc}%
}{}{}%
\makeatother
\begin{document}
%\begin{titlepage}
%\includepdf[pages=1-]{titlepage.pdf}
%\end{titlepage}
\tableofcontents
\chapter{A}
a\dots
\chapter{B}c\dots
\chapter{D}
d\dots
\chapter{E}
e\dots
\begin{thebibliography}{999}
\bibitem{bib1}Author:
\emph{Title},
Publisher, Year
\end{thebibliography}
\end{document}
Everything works good, I have nice links in pdf viewer. But when I uncomment three lines with includepdf I got errors when trying to compile. titlepage.pdf contains two pages but I don't think this is relevant.
Second question, how can I add something to bookmars (generated by hyperref)? I want to add ToC as well as first page of titlepage.pdf.
Also, adding titlepage.pdf brokes page numeration in pdf viewer (bookmarks). When I try to go to page 7, I to to page 5 instead. Can it be fixed? (I know it is the result of adding two extra pages at the beginning).
Also, hyperref changes Polish letters.
I have chapter Wstęp but in bookmarks there is Wstep.
Can it be fixed?
EDIT:
Bookmark to ToC solved.
EDIT 2:
One more thing that I need is adding included pdf's first page to bookmarks.
(Although I'm by no means expert as far as pdf format goes - this may as well be wrong nowadays, pdf wizards please correct me if its the case!)
– mbork Jul 13 '11 at 23:22unicodeoption tohyperrefpackage, but you possibly should convert your doc to UTF-8 before (and obviously change theninputencoption toutf8). – przemoc Jul 14 '11 at 00:14utf8in Notepad++, but now LEd wont work with them :(. It displaysWstÄ™pinstead ofWstęp(but compiles correctly) – Ichibann Jul 14 '11 at 00:25Currently we are working on: adding support for Unicode and UTF-7, UTF-8, UTF-16, UTF-32 encodings,... Notepad++ isn't best tool for conversion, because it's damn easy to screw there encoding (BTW you should go w/o BOM). Also add\usepackage[T1]{fontenc}to your preamble apart from fixedinputencsetting. You may also go withT1,OT4, but it is more tricky if you use some other fonts, thus it requires switching via\fontencoding{T1}. Gain is only in a few KBs, so I suggest sticking just toT1. – przemoc Jul 14 '11 at 00:31\usepackage[T1]{fontenc}etc) do? – Ichibann Jul 14 '11 at 00:39