[NTG-context] Bookmarks with the specified label on
I have specified the headnumber of chapter to be the Number chpt. By using \setuplist and \placelist with the attributes label=yes, I could get a content with the label as what I want. But the headnumber of chapter label on bookmarks is still using Number intead of the Number chpt. What should I do to enable this feature? A minimal example: \setuplabeltext[en][chapter={the , chpt}] \setupinteraction[state=start] \placebookmarks[chapter,section] \setupinteractionscreen[option=bookmark] \setuplist[chapter,section,subsection][alternative=c] \setuplist[chapter][distance=3em] \setuplist[section][margin=2em] \setuplist[subsection][margin=4em] \starttext \placelist[chapter,section,subsection][label=yes] \chapter{first} \input knuth \chapter{second} \input knuth \section{second2} \input knuth \subsection{second3} \input knuth \stoptext ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
[NTG-context] bookmarks: frontpart, bodypart, etc. ???
Hello, The bookmark mechanism has changed in a very recent beta and now \startfrontmatter \stopfrontmatter \startbodymatter \stopbodymatter \startappendices \stopappendices \startbackmatter \stopbackmatter ALL now add bookmarks to the PDF document??? This is VERY strange! I am using: \setupinteraction [state=start,option=bookmark] \setupinteractionscreen [option=bookmark] \placebookmarks [part,chapter,title,section,subsection] [part,chapter,title] Alan ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] bookmarks: frontpart, bodypart, etc. ???
On 11/7/2013 10:00 AM, Alan BRASLAU wrote: Hello, The bookmark mechanism has changed in a very recent beta and now \startfrontmatter \stopfrontmatter \startbodymatter \stopbodymatter \startappendices \stopappendices \startbackmatter \stopbackmatter ALL now add bookmarks to the PDF document??? This is VERY strange! I am using: \setupinteraction [state=start,option=bookmark] \setupinteractionscreen [option=bookmark] \placebookmarks [part,chapter,title,section,subsection] [part,chapter,title] the next beta will have \setupbookmarks [sectionblock=yes] (default=no) - Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com | www.pragma-pod.nl - ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] bookmarks: frontpart, bodypart, etc. ???
Le jeudi 7 novembre 2013, 10:00:00 Alan BRASLAU a écrit : Hello, The bookmark mechanism has changed in a very recent beta and now \startfrontmatter \stopfrontmatter \startbodymatter \stopbodymatter \startappendices \stopappendices \startbackmatter \stopbackmatter ALL now add bookmarks to the PDF document??? This is VERY strange! I am using: \setupinteraction [state=start,option=bookmark] \setupinteractionscreen [option=bookmark] \placebookmarks [part,chapter,title,section,subsection] [part,chapter,title] Alan This is because I asked for… See the joined discussion. You do not like it? Le lundi 4 novembre 2013, 20:11:25 Hans Hagen a �crit : On 10/21/2013 6:45 PM, pol stra wrote: Hello, In my document, when I use a meta-structure, I only get introduction and content bookmarks, while not using a meta-structure, I have my part and chapter (which is the desired behaviour). How can I get the same behaviour in both structures? (by the way, how can I change the bookmarks of the table of contents, I tried \completecontent[bookmark=mytitle] and \setupcombinedlist[mytitle] without success). Thank you all Here is my sample code: \setupinteraction [state=start] \placebookmarks[part, chapter, section, title, subject][force=yes] \setupcombinedlist[content][ list={title, part, chapter, subject, subsubject, section, subsection}, alternative=c] \setuphead[part][placehead=yes, bodypartlabel=part] \startmode[meta] \startfrontmatter \startchapter[title={Introduction}] % \component c_introduction \stopchapter \completecontent[criterium=all] \stopfrontmatter \startbodymatter \startpart[title={part}] \startchapter[title={chapter1}] \stopchapter \stoppart \stopbodymatter \stopmode \startmode[nonmeta] \startchapter[title={Introduction}] % \component c_introduction \stopchapter \completecontent[criterium=all] \startpart[title={part}] \startchapter[title={chapter1}] \stopchapter \stoppart \stopmode If you want to influence the bookmark title you should explicitly set if (and then not use \complete ... but \place...). Anyhow, I've added an extra level to the bookmarks where you can also set the block titles. \setupinteraction [state=start] \placebookmarks [part,chapter,section,title,subject] [force=yes] \setupcombinedlist [content] [list={part,chapter,section,subsection}, alternative=c] \setuphead [part] [placehead=yes, bodypartlabel=part] \starttext \startfrontmatter[bookmark=A fancy title] \startchapter[title={The introduction}] \stopchapter \startchapter[title=Contents] \placecontent[criterium=all] \stopchapter \stopfrontmatter \startbodymatter \startpart[title={part}] \startchapter[title={Some chapter}] \stopchapter \stoppart \stopbodymatter \stoptext - Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com | www.pragma-pod.nl - Thank you for the job Hans! ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] bookmarks: frontpart, bodypart, etc. ???
On Thu, 7 Nov 2013 19:30:08 +0100 pol stra r...@hotmail.fr wrote: Le jeudi 7 novembre 2013, 10:00:00 Alan BRASLAU a écrit : Hello, The bookmark mechanism has changed in a very recent beta and now \startfrontmatter \stopfrontmatter \startbodymatter \stopbodymatter \startappendices \stopappendices \startbackmatter \stopbackmatter ALL now add bookmarks to the PDF document??? This is VERY strange! I am using: \setupinteraction [state=start,option=bookmark] \setupinteractionscreen [option=bookmark] \placebookmarks [part,chapter,title,section,subsection] [part,chapter,title] Alan This is because I asked for… See the joined discussion. You do not like it? Not at all, and certainly NOT by default. It seems that Hans has fixed this, adding an optional flag. Alan ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] bookmarks: frontpart, bodypart, etc. ???
On Thu, 7 Nov 2013 16:51:40 +0100 Hans Hagen pra...@wxs.nl wrote: On 11/7/2013 10:00 AM, Alan BRASLAU wrote: Hello, The bookmark mechanism has changed in a very recent beta and now \startfrontmatter \stopfrontmatter \startbodymatter \stopbodymatter \startappendices \stopappendices \startbackmatter \stopbackmatter ALL now add bookmarks to the PDF document??? This is VERY strange! I am using: \setupinteraction [state=start,option=bookmark] \setupinteractionscreen [option=bookmark] \placebookmarks [part,chapter,title,section,subsection] [part,chapter,title] the next beta will have \setupbookmarks [sectionblock=yes] (default=no) Would it not be cleaner, rather, to have: \placebookmarks [sectionblock,part,chapter,title,section,subsection] [sectionblock,part,chapter,title] instead of a special setupbookmarks option? Just a suggestion. Alan ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] bookmarks: frontpart, bodypart, etc. ???
On 11/7/2013 9:07 PM, Alan Braslau wrote: On Thu, 7 Nov 2013 16:51:40 +0100 Hans Hagen pra...@wxs.nl wrote: On 11/7/2013 10:00 AM, Alan BRASLAU wrote: Hello, The bookmark mechanism has changed in a very recent beta and now \startfrontmatter \stopfrontmatter \startbodymatter \stopbodymatter \startappendices \stopappendices \startbackmatter \stopbackmatter ALL now add bookmarks to the PDF document??? This is VERY strange! I am using: \setupinteraction [state=start,option=bookmark] \setupinteractionscreen [option=bookmark] \placebookmarks [part,chapter,title,section,subsection] [part,chapter,title] the next beta will have \setupbookmarks [sectionblock=yes] (default=no) Would it not be cleaner, rather, to have: \placebookmarks [sectionblock,part,chapter,title,section,subsection] [sectionblock,part,chapter,title] instead of a special setupbookmarks option? Just a suggestion. sectionblock is not in the category of part, chapter etc (ok, maybe nowadays i would make it zero level but such a change is not on the short term agenda) Hans - Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com | www.pragma-pod.nl - ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
[NTG-context] Bookmarks
Hi all, what is wrong with the following example? I would expect Erstes Kapitel etc. instead of Kapitel Eins in the bookmarks. Further Inhaltsverzeichnis don‘t appear in the bookmarks. \setupinteraction[state=start] \placebookmarks[all] \starttext \starttitle[title=Inhaltsverzeichnis,bookmark=Inhaltsverzeichnis] \placecombinedlist[content] \stoptitle \startchapter[title=Kapitel Eins,bookmark=Erstes Kapitel] \input tufte \stopchapter \startchapter[title=Kapitel Zwei,bookmark=Zweites Kapitel] \input tufte \stopchapter \startchapter[title=Kapitel Drei,bookmark=Drittes Kapitel] \input tufte \stopchapter \stoptext Thanks in advance Andreas ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] bookmarks point to page, not to section start
On Tue, Mar 2, 2010 at 12:00, Hans Hagen wrote: On 26-2-2010 14:09, Mojca Miklavec wrote: The behaviour seems to be the same in both MKII and MKIV (MKII only doesn't respect the accented characters; but I understand the pain of recoding). technically mkii should be able to to the right accents when you enable unicode pdf output but by default it's doing pdfdoc which is somewhat limited; chinese can have chinese bookmarks even in mkii but why bother about mkii and unicode ... MKIV still happens to have problems from time to time ... so it's better to have a backup. I'm using the following code to place the bookmarks: \setupinteraction [state=start] \setupinteractionscreen [option=bookmark] \placebookmarks [section,subsection,subsubsection] [section,subsection] \starttext \dorecurse{20}{\section{title} \input tufte} \stoptext ok, here's a little secret \setupinteraction [focus=width] But it doesn't make any difference. Mojca ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] bookmarks point to page, not to section start
On 26-2-2010 14:09, Mojca Miklavec wrote: The behaviour seems to be the same in both MKII and MKIV (MKII only doesn't respect the accented characters; but I understand the pain of recoding). technically mkii should be able to to the right accents when you enable unicode pdf output but by default it's doing pdfdoc which is somewhat limited; chinese can have chinese bookmarks even in mkii but why bother about mkii and unicode ... I'm using the following code to place the bookmarks: \setupinteraction [state=start] \setupinteractionscreen [option=bookmark] \placebookmarks [section,subsection,subsubsection] [section,subsection] \starttext \dorecurse{20}{\section{title} \input tufte} \stoptext ok, here's a little secret \setupinteraction [focus=width] don't tell anybody as i consider it useless (in dviwindo the cursor positioned itself, not so in acrobat) Hans - Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com | www.pragma-pod.nl - ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
[NTG-context] bookmarks point to page, not to section start
Hello Hans, I suspect that bookmarks to sections point to pages only, not to the exact position where the sections start. I have another document generated with Word and when I click to it, the viewer (Preview.app) goes straight to section start, while when I generate the document with ConTeXt, it only goes to the page, not to exact section start. The behaviour seems to be the same in both MKII and MKIV (MKII only doesn't respect the accented characters; but I understand the pain of recoding). I'm using the following code to place the bookmarks: \setupinteraction [state=start] \setupinteractionscreen [option=bookmark] \placebookmarks [section,subsection,subsubsection] [section,subsection] \starttext \dorecurse{20}{\section{title} \input tufte} \stoptext Mojca PS: I can send a sample word-generated document off-list for comparison if needed. ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] bookmarks using linebreaks in chapter titles
On Fri, 3 Nov 2006 01:08:46 -0500 (EST) Aditya Mahajan [EMAIL PROTECTED] wrote: On Thu, 2 Nov 2006, Sanjoy Mahajan wrote: I was trying out line breaks for long titles (at least, long when set in 36 or 48pt text), as well as have pdf bookmarks, so I defined a \1 shorthand local to the chapter heading: Maybe I am missing something here, but why not just use \\. Inside titles it is defined as \crlf\ignorespaces == \setupinteraction[state=start] \placebookmarks[chapter] \setupinteractionscreen[option=bookmark] \setuphead[chapter][before={\bgroup\def\1{\hfil\break}}, after={\egroup}] \starttext \chapter{Long\1 title} hello \stoptext == If I inline the \1, as in \chapter{Long\hfil\break title}, then it's mostly fine except that the bookmark has hfil penalty ... Is there's another way to avoid that problem? Perhaps a magic option that says what the bookmark should be, the way one can tell \index what to typeset in the index when it is different from the inline text. Usual way is \appendtoks\def\1{}\to\simplifiedcommands but something seems to be broken. It seems that you can not use any macro inside a chapter title, while using bookmarks. Here is a simple test file. \setupinteraction[state=start] \placebookmarks[chapter] \setupinteractionscreen[option=bookmark] \def\macro{long word} \starttext \chapter{Long\macro title} \stoptext You can also make a extra bookmarkentry by hand. \starttext \chapter{A rather long title} \bookmark{Short title} \stoptext I get same error as you (ConTeXt ver: 2006.11.01 09:59 MK II) One solution is to forbid hyphens during the \chapter (with before= and after= definitions) and also shrink the \hsize enough so that tex line You do not require before...after for this. Something like \setuphead[chapter][align={nothyphenated,stretch,tolerant}] should work. breaks where I want, but that method requires unintuitive, fontsize-dependent dimension guessing for each chapter. Putting in line breaks by hand is not too bad. Plus one might want to break the lines according to meaning, which does not always produce the same results as where breaks would go according to line length. I agree, for headings, it is better to do linebreak by hand. But meanwhile trying the hack method above, I get this error (./q.tuo) (./q.tuo) ! Undefined control sequence. argument Long\1 title \sanitizePDFdocencoding ...docencoding \edef #2{#1 } \doPDFinsertbookmark ...oding #3\to \bookmarktext \stripstring \bookmarktext.. \doplacebookmarks ...okmarkelement \flushbookmark \egroup \else \expanded {\.. to be read again \setupinteractionscreen l.3 \setupinteractionscreen [option=bookmark] It's from this line in q.tuo \listentry{chapter}{1}{1}{Long\1 title}{2--0-1-0-0-0-0-0--1}{1} and the \1 is not defined during \listentry, only during the \chapter. I didn't have a problem when the same code was part of a product (each component being chapter in a book, with the \setuphead in an environment file) -- only had it when I compiled one component, which is how I got to the test case above. [All with ConTeXt ver: 2006.10.24 13:47 MK II fmt: 2006.10.24] -Sanjoy ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
Re: [NTG-context] bookmarks using linebreaks in chapter titles
Thanks Aditya and Wolfgang for the information. I've added it all to the wiki http://wiki.contextgarden.net/PDF_Bookmarks_and_Headers so let me know if you find any problems there. I noticed two possible bugs when trying out a few examples -- see below. If I inline the \1, as in \chapter{Long\hfil\break title}, then it's mostly fine except that the bookmark has hfil penalty ... Usual way is \appendtoks\def\1{}\to\simplifiedcommands Thanks, that's useful (and now I found it elsewhere in the wiki). One solution is to forbid hyphens during the \chapter (with before= and after= definitions) and also shrink the \hsize enough so that tex line You do not require before...after for this. Something like \setuphead[chapter][align={nothyphenated,stretch,tolerant}] should work. You can also make a extra bookmarkentry by hand. \starttext \chapter{A rather long title} \bookmark{Short title} \stoptext Also useful and wikified. Now for the two possible bugs. 1. An empty chapter breaks \bookmark: \setupinteraction[state=start] \placebookmarks[chapter] \setupinteractionscreen[option=bookmark] \starttext \chapter{A very long chapter\\ about splines} \bookmark{Splines} \stoptext The bookmark text is A very long chapter about splines. But adding a letter or word to the chapter body fixes that: \setupinteraction[state=start] \placebookmarks[chapter] \setupinteractionscreen[option=bookmark] \starttext \chapter{A very long chapter\\ about splines} \bookmark{Splines} hello \stoptext 2. The second problem is perhaps my misunderstanding. The wiki page said to use \placebookmarks[chapter,section,subsection][chapter] to make only chapter bookmarks visible. But I find that chapter bookmarks are open by default in the bookmark window, so I tried the following example instead: \setupinteraction[state=start] \placebookmarks[chapter,section,subsection][chapter,section] \setupinteractionscreen[option=bookmark] \starttext \chapter{The beginning} Hi! \chapter{A very, very\\ long title} Greetings! \section{Why so long} I don't know \subsection{Why not?} Good point. \chapter{The never-ending story} Oh no. \chapter{The never-ending story} \bookmark{Forever!} Oh no. \stoptext I expected chapter and section bookmarks to be open, which they were, but so were the subsection bookmarks. And \placebookmarks[chapter,section,subsection][chapter] made chapter and section bookmarks open. Is there an 'off by one' error \placebookmarks? Or have I misunderstood the purpose of the command (I'll then fix the wiki)? 3. And a third question is whether the bookmark window is open by default. I use xpdf (Ubuntu Linux) and it always opens the bookmark window, whether or not \setupinteractionscreen[option=bookmark] is given. Perhaps that's an xpdf-specific behavior but acroread acts differently? -Sanjoy `Never underestimate the evil of which men of power are capable.' --Bertrand Russell, _War Crimes in Vietnam_, chapter 1. ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
Re: [NTG-context] bookmarks using linebreaks in chapter titles
Sanjoy Mahajan wrote: Now for the two possible bugs. 1. An empty chapter breaks \bookmark: \setupinteraction[state=start] \placebookmarks[chapter] \setupinteractionscreen[option=bookmark] \starttext \chapter{A very long chapter\\ about splines} \bookmark{Splines} \stoptext The bookmark text is A very long chapter about splines. But adding a letter or word to the chapter body fixes that: indeed, bookmarks are flushed at the next paragraph, otherwise they would end up at undefined places Hans - Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com | www.pragma-pod.nl - ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
Re: [NTG-context] bookmarks using linebreaks in chapter titles
The bookmark text is A very long chapter about splines. But adding a letter or word to the chapter body fixes that: indeed, bookmarks are flushed at the next paragraph, otherwise they would end up at undefined places Good point. Does the \bookmark then belong before the \chapter or \section, in case the section ends up as the last line on a page? -Sanjoy `Never underestimate the evil of which men of power are capable.' --Bertrand Russell, _War Crimes in Vietnam_, chapter 1. ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
[NTG-context] bookmarks using linebreaks in chapter titles
I was trying out line breaks for long titles (at least, long when set in 36 or 48pt text), as well as have pdf bookmarks, so I defined a \1 shorthand local to the chapter heading: == \setupinteraction[state=start] \placebookmarks[chapter] \setupinteractionscreen[option=bookmark] \setuphead[chapter][before={\bgroup\def\1{\hfil\break}}, after={\egroup}] \starttext \chapter{Long\1 title} hello \stoptext == If I inline the \1, as in \chapter{Long\hfil\break title}, then it's mostly fine except that the bookmark has hfil penalty ... Is there's another way to avoid that problem? Perhaps a magic option that says what the bookmark should be, the way one can tell \index what to typeset in the index when it is different from the inline text. One solution is to forbid hyphens during the \chapter (with before= and after= definitions) and also shrink the \hsize enough so that tex line breaks where I want, but that method requires unintuitive, fontsize-dependent dimension guessing for each chapter. Putting in line breaks by hand is not too bad. Plus one might want to break the lines according to meaning, which does not always produce the same results as where breaks would go according to line length. But meanwhile trying the hack method above, I get this error (./q.tuo) (./q.tuo) ! Undefined control sequence. argument Long\1 title \sanitizePDFdocencoding ...docencoding \edef #2{#1 } \doPDFinsertbookmark ...oding #3\to \bookmarktext \stripstring \bookmarktext.. \doplacebookmarks ...okmarkelement \flushbookmark \egroup \else \expanded {\.. to be read again \setupinteractionscreen l.3 \setupinteractionscreen [option=bookmark] It's from this line in q.tuo \listentry{chapter}{1}{1}{Long\1 title}{2--0-1-0-0-0-0-0--1}{1} and the \1 is not defined during \listentry, only during the \chapter. I didn't have a problem when the same code was part of a product (each component being chapter in a book, with the \setuphead in an environment file) -- only had it when I compiled one component, which is how I got to the test case above. [All with ConTeXt ver: 2006.10.24 13:47 MK II fmt: 2006.10.24] -Sanjoy ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
Re: [NTG-context] bookmarks using linebreaks in chapter titles
On Thu, 2 Nov 2006, Sanjoy Mahajan wrote: I was trying out line breaks for long titles (at least, long when set in 36 or 48pt text), as well as have pdf bookmarks, so I defined a \1 shorthand local to the chapter heading: Maybe I am missing something here, but why not just use \\. Inside titles it is defined as \crlf\ignorespaces == \setupinteraction[state=start] \placebookmarks[chapter] \setupinteractionscreen[option=bookmark] \setuphead[chapter][before={\bgroup\def\1{\hfil\break}}, after={\egroup}] \starttext \chapter{Long\1 title} hello \stoptext == If I inline the \1, as in \chapter{Long\hfil\break title}, then it's mostly fine except that the bookmark has hfil penalty ... Is there's another way to avoid that problem? Perhaps a magic option that says what the bookmark should be, the way one can tell \index what to typeset in the index when it is different from the inline text. Usual way is \appendtoks\def\1{}\to\simplifiedcommands but something seems to be broken. It seems that you can not use any macro inside a chapter title, while using bookmarks. Here is a simple test file. \setupinteraction[state=start] \placebookmarks[chapter] \setupinteractionscreen[option=bookmark] \def\macro{long word} \starttext \chapter{Long\macro title} \stoptext I get same error as you (ConTeXt ver: 2006.11.01 09:59 MK II) One solution is to forbid hyphens during the \chapter (with before= and after= definitions) and also shrink the \hsize enough so that tex line You do not require before...after for this. Something like \setuphead[chapter][align={nothyphenated,stretch,tolerant}] should work. breaks where I want, but that method requires unintuitive, fontsize-dependent dimension guessing for each chapter. Putting in line breaks by hand is not too bad. Plus one might want to break the lines according to meaning, which does not always produce the same results as where breaks would go according to line length. I agree, for headings, it is better to do linebreak by hand. But meanwhile trying the hack method above, I get this error (./q.tuo) (./q.tuo) ! Undefined control sequence. argument Long\1 title \sanitizePDFdocencoding ...docencoding \edef #2{#1 } \doPDFinsertbookmark ...oding #3\to \bookmarktext \stripstring \bookmarktext.. \doplacebookmarks ...okmarkelement \flushbookmark \egroup \else \expanded {\.. to be read again \setupinteractionscreen l.3 \setupinteractionscreen [option=bookmark] It's from this line in q.tuo \listentry{chapter}{1}{1}{Long\1 title}{2--0-1-0-0-0-0-0--1}{1} and the \1 is not defined during \listentry, only during the \chapter. I didn't have a problem when the same code was part of a product (each component being chapter in a book, with the \setuphead in an environment file) -- only had it when I compiled one component, which is how I got to the test case above. [All with ConTeXt ver: 2006.10.24 13:47 MK II fmt: 2006.10.24] -Sanjoy ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
Re: [NTG-context] bookmarks problems
Hans Hagen said this at Wed, 15 Dec 2004 18:32:22 +0100: I haven't looked at this in detail lately, and barely at all with the pdftex drivers. Hans, do you think it would be hard to turn direct page links into indirect links (point to page object)? can you check this: \def\doPDFbookmark level #1 n #2 text #3 page #4 open #5% {\scratchcounter#4\advance\scratchcounter\plusone % temp hack, better here \expanded{\doPDFgetpagereference{\the\scratchcounter}}\PDFobjectreference \pdfoutline user {/S /GoTo /D [\PDFobjectreference\space\PDFpageviewwrd]}% \ifcase#2 \else count \ifcase#5-\fi#2 \fi {#3}} Yes! much happier in Apple's Preview! Cheers, adam -- =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= Adam T. Lindsay, Computing Dept. [EMAIL PROTECTED] Lancaster University, InfoLab21+44(0)1524/510.514 Lancaster, LA1 4WA, UK Fax:+44(0)1524/510.492 -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- ___ ntg-context mailing list [EMAIL PROTECTED] http://www.ntg.nl/mailman/listinfo/ntg-context
Re: [NTG-context] bookmarks problems
Adam Lindsay wrote: I haven't looked at this in detail lately, and barely at all with the pdftex drivers. Hans, do you think it would be hard to turn direct page links into indirect links (point to page object)? can you check this: \def\doPDFbookmark level #1 n #2 text #3 page #4 open #5% {\scratchcounter#4\advance\scratchcounter\plusone % temp hack, better here \expanded{\doPDFgetpagereference{\the\scratchcounter}}\PDFobjectreference \pdfoutline user {/S /GoTo /D [\PDFobjectreference\space\PDFpageviewwrd]}% \ifcase#2 \else count \ifcase#5-\fi#2 \fi {#3}} \setupinteraction[state=start] \placebookmarks[chapter] \starttext \chapter{one} \chapter{two} \stoptext - Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com | www.pragma-pod.nl - ___ ntg-context mailing list [EMAIL PROTECTED] http://www.ntg.nl/mailman/listinfo/ntg-context
[NTG-context] bookmarks problems
Salvete, I have two problems with bookmarks: - Preview.App does display the list of bookmarks, but they do not work. The same file has no such problems in Adobe. (There are files with bookmarks that work ok in Preview.App, such as the Adobe JavaScript reference.) - I fail to provide a bookmark different from a chapter title, if that title is not followed by text, but directly by a \section command. Whether I place \bookmark in front of or behind the \chapter command, it affects the next section command with text behind it. \setupinteraction[state=start] \placebookmarks[chapter,section] \starttext \chapter{normal chapter} \section{one} \chapter{\quotation{special} chapter} \bookmark{special chapter} \section{two} \section{three} test \stoptext regards, Christopher Creutzig ___ ntg-context mailing list [EMAIL PROTECTED] http://www.ntg.nl/mailman/listinfo/ntg-context
Re: [NTG-context] bookmarks problems
Christopher Creutzig said this at Mon, 13 Dec 2004 16:40:13 +0100: - Preview.App does display the list of bookmarks, but they do not work. The same file has no such problems in Adobe. (There are files with bookmarks that work ok in Preview.App, such as the Adobe JavaScript reference.) Apple has a limited idea of what's a reference in the bookmark list. They only have a partial implementation of the spec. Hans's use of the PDF spec with the bookmarks is a little loose. I studied this in more detail with respect to XeTeX. I might be able to find some of that correspondence. Oh, here it is: If so, I'd be interested to see the PDF that results (pdfTeX, at least, can be told not to compress the PDF streams, can't it?), so as to get some idea of the link types that Preview understands. It turns out that it understands indirect links very well. That is, the first fails: /S/GoTo/D [ 4/Fit] ...where 4 is the page number, but the second succeeds: /S/GoTo/D [ 36 0 R /Fit] ...where 36 is the object number of a /Type /Page object in the PDF file. Yeah, that sums up the difference between a link that doesn't work, and one that does, in Preview.app. ConTeXt may use a bit of JavaScript in some of its links, which Preview.app has a tough time with. I haven't looked at this in detail lately, and barely at all with the pdftex drivers. Hans, do you think it would be hard to turn direct page links into indirect links (point to page object)? adam -- =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= Adam T. Lindsay, Computing Dept. [EMAIL PROTECTED] Lancaster University, InfoLab21+44(0)1524/510.514 Lancaster, LA1 4WA, UK Fax:+44(0)1524/510.492 -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- ___ ntg-context mailing list [EMAIL PROTECTED] http://www.ntg.nl/mailman/listinfo/ntg-context
Re: [NTG-context] bookmarks problems
Christopher Creutzig wrote: I have two problems with bookmarks: - Preview.App does display the list of bookmarks, but they do not work. The same file has no such problems in Adobe. (There are files with bookmarks that work ok in Preview.App, such as the Adobe JavaScript reference.) preview is buggy and weak on interactive features - I fail to provide a bookmark different from a chapter title, if that title is not followed by text, but directly by a \section command. Whether I place \bookmark in front of or behind the \chapter command, it affects the next section command with text behind it. i'll fix this, for the moment say: \appendtoks\def\quotation#1{#1}\to\simplifiedcommands \appendtoks\def\quote#1{'#1'}\to\simplifiedcommands - Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com | www.pragma-pod.nl - ___ ntg-context mailing list [EMAIL PROTECTED] http://www.ntg.nl/mailman/listinfo/ntg-context
Re: [NTG-context] bookmarks, accented caracters, breaking URLs
At 20:07 17/12/2003, you wrote: Hello, (first: Thanks, Hans for the answer, I added some space in \unknownreference and a $\blacktriangleright$, but otherwise I won't miss any reference anymore; fingers crossed.) an option is to move the mark in the margin, \inleftmargin{...} or something similar Hans ___ ntg-context mailing list [EMAIL PROTECTED] http://www.ntg.nl/mailman/listinfo/ntg-context
Re: [NTG-context] bookmarks, accented caracters, breaking URLs
Tobias Burnus said this at Wed, 17 Dec 2003 20:07:56 +0100: (a) I fail somehow to produce bookmarks (or 'outlines') for the Acrobat Reader. I tried \placebookmarks[chapter,section,subsection] \starttext \chapter{foo} \stoptext but the outline is completely empty. Tobias, Add: \setupinteraction[state=start] ...works for me. I kept tripping on that one, and I'm not sure I'd agree with the choice made. Also, you might like to add this at the same time, to make the bookmarks visible by default: \setupinteractionscreen[option=bookmark] adam -- =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= Adam T. Lindsay [EMAIL PROTECTED] Computing Dept, Lancaster University +44(0)1524/594.537 Lancaster, LA1 4YR, UK Fax:+44(0)1524/593.608 -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- ___ ntg-context mailing list [EMAIL PROTECTED] http://www.ntg.nl/mailman/listinfo/ntg-context
Re: [NTG-context] bookmarks, accented caracters, breaking URLs
Hello, On Thu, Dec 18, 2003 at 11:52:11AM +, Adam Lindsay wrote: \placebookmarks[chapter,section,subsection] Add: \setupinteraction[state=start] ...works for me. Ok, now I finally figured out what went wrong in my real document: I had first \placebookmarks and then \setupinteraction. It has to be the other way round! Thanks a lot for the hint! I kept tripping on that one, and I'm not sure I'd agree with the choice made. I agree that it is counter-intuitive that one needs to have \setupinteraction in order to get bookmarks placed. But that the order matters is even worse. (Playing around with Acrobat 6, I saw that using /C [colorvalues] and /F n, n=1...5, one could even have the bookmark items in color or in italic/bold/..., if one wants to play ...) I tested the accented characters again (not including bookmarks): \setupinteraction[state=start,title={F\ur / Na\\i ve}] \placebookmarks[chapter] \setupinteractionscreen[option=bookmark] \starttext \chapter{F\ur / Na\\i ve} \stoptext I expect 'Für / Naïve' but I get a) in the bookmarks: 'Für / Nadobuildtextaccebt char 127 {char 10}ve' b) in the document info dialogue: 'Fdobuildtextaccent char 127 ur / Nadobuildtextaccebt char 127 {char 10}ve' If I replace {\\i} by \idiaeresis, nothing changes for \chapter and bookmarks, but I get an error message for 'title='. Puzzled. Tobias ___ ntg-context mailing list [EMAIL PROTECTED] http://www.ntg.nl/mailman/listinfo/ntg-context
[NTG-context] bookmarks, accented caracters, breaking URLs
Hello, (first: Thanks, Hans for the answer, I added some space in \unknownreference and a $\blacktriangleright$, but otherwise I won't miss any reference anymore; fingers crossed.) (a) I fail somehow to produce bookmarks (or 'outlines') for the Acrobat Reader. I tried \placebookmarks[chapter,section,subsection] \starttext \chapter{foo} \stoptext but the outline is completely empty. This is with pdfeTeX (Web2C 7.4.5) 3.14159-1.10b-2.1, ConTeXt ver:2003.11.27 and acroread 5.0.5 for Linux. I don't insist on bookmarks, but I think they are nice if you get them for free. (b) Accented characters in bookmarks (I think) or the 'general info' dialog An {\a} is shown as 'dobuildtextaccent char 127 a'. Having a 'ä' would be nice since then the indexer would find this. Since it is only 'Universität' (a proper name) this is not an important search term, though. (c) With some URLs in my literature reference list, I run into the problem that they are not (properly) hyphenized. I use \def\gotoURL#1{\useURL[foo][#1]\goto{\url[foo]}[url(foo)]} for this purpose. I would like to see a linebreak at '/' and in long words (with out printing a '-'). I get ('|' denotes the column width and the page width): | | DOI: 10.1016/S0009-2614(01)01361-6 | | | | http://mathworld.wolfram.com/CylindricalCoordinates. html. Tobias ___ ntg-context mailing list [EMAIL PROTECTED] http://www.ntg.nl/mailman/listinfo/ntg-context
[NTG-context] Bookmarks question
Good evening. I dare to ask one more question: For many years I use a dirty approach to typesetting quotes. I the document I simply type words in quotes, and then I switch the quotes to be an active character with some macros. But this brings a lot of garbage to bookmarks. Now it even makes an error with the new version of ConTeXt (ver: 2003.8.21). Can I temporaryly switch quotes to category 12 (just for bookmark processing)? How? With many thanks Michal Kvasnicka P.S. My code is like this: \chardef\clqq=254 \sfcode254=0 \lccode254=0 \chardef\crqq=255 \sfcode255=0 \lccode255=0 \catcode`\=\active \def\firstquote{\clqq\let=\secondquote} \def\secondquote{\crqq{}\let=\firstquote} \let=\firstquote The error message is this: ! TeX capacity exceeded, sorry [input stack size=3000]. -\clqq \let =\secondquote -\clqq \let =\secondquote -\clqq \let =\secondquote -\clqq \let =\secondquote -\clqq \let =\secondquote -\clqq \let =\secondquote ... l.156 ...ional Banking}{2::0:A:2:5:0:0:0::64}{66} ___ ntg-context mailing list [EMAIL PROTECTED] http://www.ntg.nl/mailman/listinfo/ntg-context