I guess properly structured and styled HTML goes a long way, but I'm impressed -- the default PDF creation with Prince works nearly perfectly so far. My first PDFs already included a nice navigation/toc tree like this out of the box:
+(Document title)
├Chapter 1 title
│...
└Chapter n title
After that I fiddled a bit with bookmark levels and labels to automatically generate the exact TOC I wanted, and everything worked good as well. However, I've hit my first bump. In some of my documents, chapter titles have a <br> line break in them so they look like
First chapter
Something with a long name
and I would really like to have these included in the PDF bookmarks toc with the line break.
This is trivial to do with GhostScript and pdfmarks using \n like this:
[/Page 10 /Title (Chapter two\nA somewhat long title) /OUT pdfmark
but of course creating the pdfmarks by hand and merging the files with GhostScript is a real nag.
My problem is Prince includes the above in the TOC replacing the <br> line break with a big nothing so the chapter labels and titles are concatenated as in "Chapter NumberChapter Title".
Is there a way to make Prince insert a newline, or any other separator (an em dash, or even a space) character to replace those <br>s?
+(Document title)
├Chapter 1 title
│...
└Chapter n title
After that I fiddled a bit with bookmark levels and labels to automatically generate the exact TOC I wanted, and everything worked good as well. However, I've hit my first bump. In some of my documents, chapter titles have a <br> line break in them so they look like
First chapter
Something with a long name
and I would really like to have these included in the PDF bookmarks toc with the line break.
This is trivial to do with GhostScript and pdfmarks using \n like this:
[/Page 10 /Title (Chapter two\nA somewhat long title) /OUT pdfmark
but of course creating the pdfmarks by hand and merging the files with GhostScript is a real nag.
My problem is Prince includes the above in the TOC replacing the <br> line break with a big nothing so the chapter labels and titles are concatenated as in "Chapter NumberChapter Title".
Is there a way to make Prince insert a newline, or any other separator (an em dash, or even a space) character to replace those <br>s?