Dear all,
In a document I want to start new page with each section, and follow
this recipe for that:
http://tex.stackexchange.com/questions/9497/start-new-page-with-each-section/9505?noredirect=1#comment829734_9505

\usepackage{titlesec}
\newcommand{\sectionbreak}{\clearpage}

The problem arises because if you use hyperref and a ToC, the links
get off-sync. For instance, clicking on Section 2 in the ToC will
bring you to p3, whereas this section is on p4 (see attached). The
solution it seems is to make sure that hyperref is loaded before
titlesec, but I'm at a loss as to how to achieve this.

I tried:
\AtBeginDocument{
\usepackage{titlesec}
\newcommand{\sectionbreak}{\clearpage}
}

but it (as expected) doesn't improve things. Any ideas?

I remember order of package loading in LyX has been discussed before,
but I can't recall what's the current state of things...

Regards,
Liviu

Attachment: lyx-titlesec-hyperref.lyx
Description: Binary data

Attachment: lyx-titlesec-hyperref.pdf
Description: Adobe PDF document

Reply via email to