I am writing a document for my students (MWE and latex output at the end), where a chapter has a very long title:
\chapter{Inadequacy of the classical physics, and the birth of a new theory for microscopic phenomena}
This title appears split over two lines, both in the TOC and in the page where the chapter starts, and I am not at odds with the split, it's good enough for me. (an awful lot of questions I found, about disagreement with this, but it is not my problem.)
Enters package hyperref. It works, that is, it makes the title in the TOC clickable, and clicking takes me to that chapter, but refuses to split the line in the TOC: it goes off the left edge of the paper, with a horrible effect.
The documentation for hyperref mentions the option [breaklinks=true], thus:
\usepackage[breaklinks=true]{hyperref}
but at the same time tells me that breaking a link over two lines won't do, because of the "PDF drivers", and suggests not to use the option because the link will be "displaced". And displaced it is, and very much, because (after turning on the option) the chapter title comes out split alright: but clicking either line, and actually all over the page does nothing at all.
Does anybody know how to solve my problem (besides the obvious, that is, shortening the chapter title) ?
I mention (in many postings much seems to be made of it) that I am using the command "latex" on Xubuntu, but that seems anyhow to invoke for me "pdflatex". Or possibly "pdfTeX"?
latex -interaction=batchmode Ift.tex
This is pdfTeX, Version 3.14159265-2.6-1.40.18 (TeX Live 2017/Debian) (preloaded format=latex)
restricted \write18 enabled.
entering extended mode
Thanks to you all for any help!
\documentclass[12pt]{book}
\usepackage[small]{titlesec}
% Make internal hyperlinks
\usepackage[breaklinks=true]{hyperref}
\hypersetup{
colorlinks=true,
linkcolor=blue,
filecolor=magenta,
urlcolor=cyan,
}
\urlstyle{same}
%
% Set the beginning of a LaTeX document
\begin{document}
% Set to use the "plain" pagestyle
\pagestyle{plain}
\tableofcontents
\clearpage
\chapter{Inadequacy of the classical physics, and the birth of a new theory for microscopic phenomena}
\label{ch:Intro}
% Set the ending of a LaTeX document
\end{document}
LaTeX2e <2017-04-15>
Babel <3.18> and hyphenation patterns for 22 language(s) loaded.
(/usr/share/texlive/texmf-dist/tex/latex/base/book.cls
Document Class: book 2014/09/29 v1.4h Standard LaTeX document class
(/usr/share/texlive/texmf-dist/tex/latex/base/bk12.clo))
(/usr/share/texlive/texmf-dist/tex/latex/titlesec/titlesec.sty)
(/usr/share/texlive/texmf-dist/tex/latex/hyperref/hyperref.sty
(/usr/share/texlive/texmf-dist/tex/generic/oberdiek/hobsub-hyperref.sty
(/usr/share/texlive/texmf-dist/tex/generic/oberdiek/hobsub-generic.sty))
(/usr/share/texlive/texmf-dist/tex/latex/graphics/keyval.sty)
(/usr/share/texlive/texmf-dist/tex/generic/ifxetex/ifxetex.sty)
(/usr/share/texlive/texmf-dist/tex/latex/oberdiek/auxhook.sty)
(/usr/share/texlive/texmf-dist/tex/latex/oberdiek/kvoptions.sty)
(/usr/share/texlive/texmf-dist/tex/latex/hyperref/pd1enc.def)
(/usr/share/texlive/texmf-dist/tex/latex/latexconfig/hyperref.cfg)
(/usr/share/texlive/texmf-dist/tex/latex/url/url.sty))
(/usr/share/texlive/texmf-dist/tex/latex/hyperref/hdvips.def
(/usr/share/texlive/texmf-dist/tex/latex/hyperref/pdfmark.def
Package hyperref Warning: You have enabled option `breaklinks'.
(hyperref) But driver `hdvips.def' does not suppport this.
(hyperref) Expect trouble with the link areas of broken links.
(/usr/share/texlive/texmf-dist/tex/latex/oberdiek/rerunfilecheck.sty)))
(./Ift.aux) (/usr/share/texlive/texmf-dist/tex/latex/graphics/color.sty
(/usr/share/texlive/texmf-dist/tex/latex/graphics-cfg/color.cfg)
(/usr/share/texlive/texmf-dist/tex/latex/graphics-def/dvips.def)
(/usr/share/texlive/texmf-dist/tex/latex/graphics/dvipsnam.def))
(/usr/share/texlive/texmf-dist/tex/latex/hyperref/nameref.sty
(/usr/share/texlive/texmf-dist/tex/generic/oberdiek/gettitlestring.sty))
(./Ift.out) (./Ift.out) (./Ift.toc) [1] [2]
Chapter 1.
Overfull \hbox (1.70032pt too wide) in paragraph at lines 23--23
|\OT1/cmr/bx/n/20.74 Inadequacy of the clas-si-cal physics, and
[3] (./Ift.aux) )
(see the transcript file for additional information)
Output written on Ift.dvi (3 pages, 4476 bytes).
Transcript written on Ift.log.