Hello all, I am willing to use ConTeXt to produce a bunch of stickers. My stickers are grouped into categories but I don't want any headers or titles to interfere with the layout of the stickers, so I didn't use \startchapter and the likes. However, I would like to add pdf bookmarks in order to quickly jump to the start of a category. After taking a look at strc-bkm.mkiv, I tried the following \setupinteraction[state=start] \definelist[building] \definelist[aisle] \placebookmarks[building,aisle] \starttext \bookmark[building]{B1} \bookmark[aisle]{A1} Sticker 1 Sticker 2 \page \bookmark[aisle]{A2} Sticker 3 Sticker 4 \page \bookmark[building]{B2} \bookmark[aisle]{A3} Sticker 5 Sticker 6 \stoptext But it didn't worked. I didn't get any error message but no bookmark either. How can I directly add a bookmark to the pdf table of contents ? Previously I was using the ReportLab toolkit which provided for this purpose the bookmarkPage and addOutlineEntry functions. Is there a similar solution with ConTeXt ? Thanks for your help, -- Jean-Philippe Rey Professeur - École Centrale Paris jean-philippe.rey@ecp.fr 92295 Châtenay-Malabry Cedex - France Empreinte PGP : 807A 5B2C 69E4 D4B5 783A 428A 1B5E E83E 261B BF51
On 03/22/2014 04:35 PM, Jean-Philippe Rey wrote:
Hello all,
I am willing to use ConTeXt to produce a bunch of stickers. My stickers are grouped into categories but I don't want any headers or titles to interfere with the layout of the stickers, so I didn't use \startchapter and the likes.
Hi Jean-Philippe, I think there is workaround for your case: not placing heads in document. Here you have a shorter sample \setupinteraction[state=start] \placebookmarks[chapter,section] \setuphead[chapter,section][placehead=no] \starttext \chapter{B1} \section{A1} Sticker 1 Sticker 2 \page \chapter{A2} Sticker 3 Sticker 4 \stoptext BTW, those links doesn’t seem to works with evince or xpdf. SumatraPDF seems to have no problem with them. (Just in case you happen to use any of these PDF viewers [I’m reporting the issue to evince developers].) I hope it helps, Pablo -- http://www.ousia.tk
Hi Pablo,
Le 22 mars 2014 à 17:31, Pablo Rodriguez
On 03/22/2014 04:35 PM, Jean-Philippe Rey wrote:
Hello all,
I am willing to use ConTeXt to produce a bunch of stickers. My stickers are grouped into categories but I don't want any headers or titles to interfere with the layout of the stickers, so I didn't use \startchapter and the likes.
I think there is workaround for your case: not placing heads in document.
Very good hint, thank you. It works perfectly fine with MkII. With MkIV, although the head is not printed, some whitespace is added that disturbs the layout. I tried \setuphead[chapter,section][placehead=hidden] and got rid of the spurious whitespace ... but also of the pdf bookmarks :-( \setuphead[chapter,section][placehead=no,page=no,before=,after=] don't work either. Here is an example to demonstrate the problem (again, it works fine with MkII, unfortunately I am using lua to compose my stickers). \setupinteraction[state=start] \placebookmarks[chapter,section] \setuphead[chapter,section][placehead=no] \starttext \chapter{B1} \section{A1} Sticker 1 Sticker 2 \page Sticker 3 \section{A2} Sticker 4 \page \chapter{B2} Sticker 5 \section{A3} Sticker 6 \stoptext -- Jean-Philippe Rey Professeur - École Centrale Paris jean-philippe.rey@ecp.fr 92295 Châtenay-Malabry Cedex - France Empreinte PGP : 807A 5B2C 69E4 D4B5 783A 428A 1B5E E83E 261B BF51
On 03/22/2014 07:11 PM, Jean-Philippe Rey wrote:
[...] Very good hint, thank you. It works perfectly fine with MkII. With MkIV, although the head is not printed, some whitespace is added that disturbs the layout. I tried
\setuphead[chapter,section][placehead=hidden]
and got rid of the spurious whitespace ... but also of the pdf bookmarks :-(
\setuphead[chapter,section][placehead=no,page=no,before=,after=]
don't work either.
Jean-Philippe, my fault, this is the right head configuration: \setuphead[chapter,section][placehead=empty,before=,after=,] This should work now: \showgrid \setupinteraction[state=start] \placebookmarks[chapter,section] \setuphead[chapter,section][placehead=empty,before=,after=,] \starttext \chapter{B1} \section{A1} Sticker 1 Sticker 2 \page Sticker 3 \section{A2} Sticker 4 \page \chapter{B2} Sticker 5 \section{A3} Sticker 6 \stoptext I hope it helps now, Pablo -- http://www.ousia.tk
Hello Pablo,
Le 22 mars 2014 à 20:00, Pablo Rodriguez
my fault, this is the right head configuration:
\setuphead[chapter,section][placehead=empty,before=,after=,]
Works perfectly. Thank you very much. -- Jean-Philippe Rey Professeur - École Centrale Paris jean-philippe.rey@ecp.fr 92295 Châtenay-Malabry Cedex - France Empreinte PGP : 807A 5B2C 69E4 D4B5 783A 428A 1B5E E83E 261B BF51
participants (2)
-
Jean-Philippe Rey
-
Pablo Rodriguez