ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* Custom list layout with PDF bookmarks
@ 2020-05-15 22:47 Bruce Horrocks
  2020-05-16  6:15 ` Henning Hraban Ramm
  2020-05-16  6:30 ` Wolfgang Schuster
  0 siblings, 2 replies; 9+ messages in thread
From: Bruce Horrocks @ 2020-05-15 22:47 UTC (permalink / raw)
  To: mailing list for ConTeXt users

When I customise the table of contents layout I lose the automatic hyperlinks. Is there a simple configuration option that I have missed or do I need to create my own links somehow?

Example:

\setupinteraction[state=start]
\setupinteractionscreen[option=bookmark] 

\define[3]\SectionListEntry
  {\par \leftaligned\bgroup
     \hbox to 2em{#3}%
         \hskip   1em
         \vtop{\hsize\dimexpr\textwidth-3em\relax#2}
  \egroup \par}

% Comment out this next line to regain section hyperlinks in the ToC
\setuplist[section][alternative=command,command=\SectionListEntry]

\starttext
Table of Contents
\placecontent[criterium=all]
\placebookmarks[chapter,subject]

\chapter{Tufte}
\section{Section 1}
\input tufte
\page
\section{Section 2}
\input tufte
\page
\section{Section 3}
\input tufte
\page
\stoptext


Thanks in advance.
--
Bruce Horrocks
Hampshire, UK

___________________________________________________________________________________
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Custom list layout with PDF bookmarks
  2020-05-15 22:47 Custom list layout with PDF bookmarks Bruce Horrocks
@ 2020-05-16  6:15 ` Henning Hraban Ramm
  2020-05-16  6:30 ` Wolfgang Schuster
  1 sibling, 0 replies; 9+ messages in thread
From: Henning Hraban Ramm @ 2020-05-16  6:15 UTC (permalink / raw)
  To: mailing list for ConTeXt users


> Am 16.05.2020 um 00:47 schrieb Bruce Horrocks <ntg@scorecrow.com>:
> 
> When I customise the table of contents layout I lose the automatic hyperlinks. Is there a simple configuration option that I have missed or do I need to create my own links somehow?
> 
> Example:
> 
> \setupinteraction[state=start]
> \setupinteractionscreen[option=bookmark] 
> 
> \define[3]\SectionListEntry
>  {\par \leftaligned\bgroup
>     \hbox to 2em{#3}%
>         \hskip   1em
>         \vtop{\hsize\dimexpr\textwidth-3em\relax#2}
>  \egroup \par}
> 
> % Comment out this next line to regain section hyperlinks in the ToC
> \setuplist[section][alternative=command,command=\SectionListEntry]
> 
> \starttext
> Table of Contents
> \placecontent[criterium=all]
> \placebookmarks[chapter,subject]

Should be \placebookmarks[chapter,section]. Move it in front of \starttext.

But that still doesn’t set chapter bookmarks - strange.


Hraban
___________________________________________________________________________________
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Custom list layout with PDF bookmarks
  2020-05-15 22:47 Custom list layout with PDF bookmarks Bruce Horrocks
  2020-05-16  6:15 ` Henning Hraban Ramm
@ 2020-05-16  6:30 ` Wolfgang Schuster
  2020-05-16 11:02   ` Henning Hraban Ramm
  1 sibling, 1 reply; 9+ messages in thread
From: Wolfgang Schuster @ 2020-05-16  6:30 UTC (permalink / raw)
  To: mailing list for ConTeXt users, Bruce Horrocks

Bruce Horrocks schrieb am 16.05.2020 um 00:47:
> When I customise the table of contents layout I lose the automatic hyperlinks. Is there a simple configuration option that I have missed or do I need to create my own links somehow?
>
> Example:
>
> \setupinteraction[state=start]
> \setupinteractionscreen[option=bookmark]
>
> \define[3]\SectionListEntry
>    {\par \leftaligned\bgroup
>       \hbox to 2em{#3}%
>           \hskip   1em
>           \vtop{\hsize\dimexpr\textwidth-3em\relax#2}
>    \egroup \par}
>
> % Comment out this next line to regain section hyperlinks in the ToC
> \setuplist[section][alternative=command,command=\SectionListEntry]

alternative=command : Cutsom TOC without hyperlinks

alternative=interactive : Custom TOC with hyperlinks

%%%% begin example
\define[3]\SectionListEntry
   {\hbox\bgroup
      \hbox to 2em{#1}%
      \hfill
      \vtop{\hsize\dimexpr\textwidth-3em\relax#2}%
    \egroup}

\setuplist
   [section]
   [alternative=interactive,
        command=\SectionListEntry,
         before=\endgraf,
          after=\endgraf]
%%%% end example

Wolfgang

___________________________________________________________________________________
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Custom list layout with PDF bookmarks
  2020-05-16  6:30 ` Wolfgang Schuster
@ 2020-05-16 11:02   ` Henning Hraban Ramm
  2020-05-17 11:38     ` Bruce Horrocks
  2020-05-17 11:47     ` Problem with \vfill in extreme table Bruce Horrocks
  0 siblings, 2 replies; 9+ messages in thread
From: Henning Hraban Ramm @ 2020-05-16 11:02 UTC (permalink / raw)
  To: mailing list for ConTeXt users


> Am 16.05.2020 um 08:30 schrieb Wolfgang Schuster <wolfgang.schuster.lists@gmail.com>:
> 
> Bruce Horrocks schrieb am 16.05.2020 um 00:47:
>> When I customise the table of contents layout I lose the automatic hyperlinks. Is there a simple configuration option that I have missed or do I need to create my own links somehow?
>> 
>> Example:
>> 
>> \setupinteraction[state=start]
>> \setupinteractionscreen[option=bookmark]
>> 
>> \define[3]\SectionListEntry
>>   {\par \leftaligned\bgroup
>>      \hbox to 2em{#3}%
>>          \hskip   1em
>>          \vtop{\hsize\dimexpr\textwidth-3em\relax#2}
>>   \egroup \par}
>> 
>> % Comment out this next line to regain section hyperlinks in the ToC
>> \setuplist[section][alternative=command,command=\SectionListEntry]
> 
> alternative=command : Cutsom TOC without hyperlinks
> 
> alternative=interactive : Custom TOC with hyperlinks

Thank you! Wikified: https://wiki.contextgarden.net/Command/setuplist

Hraban
___________________________________________________________________________________
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Custom list layout with PDF bookmarks
  2020-05-16 11:02   ` Henning Hraban Ramm
@ 2020-05-17 11:38     ` Bruce Horrocks
  2020-05-17 19:40       ` Henning Hraban Ramm
  2020-05-17 11:47     ` Problem with \vfill in extreme table Bruce Horrocks
  1 sibling, 1 reply; 9+ messages in thread
From: Bruce Horrocks @ 2020-05-17 11:38 UTC (permalink / raw)
  To: mailing list for ConTeXt users


> On 16 May 2020, at 12:02, Henning Hraban Ramm <texml@fiee.net> wrote:
> 
>> 
>> Am 16.05.2020 um 08:30 schrieb Wolfgang Schuster <wolfgang.schuster.lists@gmail.com>:
>> 
>> Bruce Horrocks schrieb am 16.05.2020 um 00:47:
>>> When I customise the table of contents layout I lose the automatic hyperlinks. Is there a simple configuration option that I have missed or do I need to create my own links somehow?
[snip]
>> alternative=command : Cutsom TOC without hyperlinks
>> 
>> alternative=interactive : Custom TOC with hyperlinks
> 
> Thank you! Wikified: https://wiki.contextgarden.net/Command/setuplist

Thank-you Wolfgang for the quick reply and also Hraban for beating me to it on the Wiki - I was going to (honest!)

--
Bruce Horrocks
Hampshire, UK

___________________________________________________________________________________
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Problem with \vfill in extreme table
  2020-05-16 11:02   ` Henning Hraban Ramm
  2020-05-17 11:38     ` Bruce Horrocks
@ 2020-05-17 11:47     ` Bruce Horrocks
  2020-05-17 15:00       ` Wolfgang Schuster
  1 sibling, 1 reply; 9+ messages in thread
From: Bruce Horrocks @ 2020-05-17 11:47 UTC (permalink / raw)
  To: mailing list for ConTeXt users

If I want the words Top and Bottom at the top and bottom of a page then "Top \vfill Bottom" works as expected. If I use the same in an extreme table I get an error and I don't know why.

What's the 'official' way to align top and bottom in an xrow? 

%%%% MWE
\setuppapersize [A4] [A4]
\starttext
\startxtable[width=\textwidth]
  \startxrow[height=150mm]
    \startxcell[align=middle]
      Top
      \vfill
      Bottom
    \stopxcell
  \stopxrow
\stopxtable
\stoptext
%%%%

The error message is:
> tex error       > tex error on line 4 in file virtual://buffer.x_table_1.2: ! Missing } inserted
> 
> <inserted text> 
> }
> <to be read again> 
> \vfill 
> l.4       \vfill
> 

Version: This is LuaTeX, Version 1.12.0 (TeX Live 2020) 
--
Bruce Horrocks
Hampshire, UK

___________________________________________________________________________________
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Problem with \vfill in extreme table
  2020-05-17 11:47     ` Problem with \vfill in extreme table Bruce Horrocks
@ 2020-05-17 15:00       ` Wolfgang Schuster
  2020-05-17 19:56         ` Hans Hagen
  0 siblings, 1 reply; 9+ messages in thread
From: Wolfgang Schuster @ 2020-05-17 15:00 UTC (permalink / raw)
  To: mailing list for ConTeXt users, Bruce Horrocks

Bruce Horrocks schrieb am 17.05.2020 um 13:47:
> If I want the words Top and Bottom at the top and bottom of a page then "Top \vfill Bottom" works as expected. If I use the same in an extreme table I get an error and I don't know why.
> 
> What's the 'official' way to align top and bottom in an xrow?
> 
> %%%% MWE
> \setuppapersize [A4] [A4]
> \starttext
> \startxtable[width=\textwidth]
>    \startxrow[height=150mm]
>      \startxcell[align=middle]
>        Top
>        \vfill
>        Bottom
>      \stopxcell
>    \stopxrow
> \stopxtable
> \stoptext
> %%%%

It's not a real fix but you can you exclude the \vfill command
when ConTeXt does its cell calculations.

\starttext

\startxtable[align=middle,width=\textwidth,height=15cm]
   \startxrow
     \startxcell
       Top
       \doifnotmode{*trialtypesetting}{\vfill}
       Bottom
     \stopxcell
   \stopxrow
\stopxtable

\stoptext

Wolfgang
___________________________________________________________________________________
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Custom list layout with PDF bookmarks
  2020-05-17 11:38     ` Bruce Horrocks
@ 2020-05-17 19:40       ` Henning Hraban Ramm
  0 siblings, 0 replies; 9+ messages in thread
From: Henning Hraban Ramm @ 2020-05-17 19:40 UTC (permalink / raw)
  To: mailing list for ConTeXt users


> Am 17.05.2020 um 13:38 schrieb Bruce Horrocks <ntg@scorecrow.com>:
> 
> 
>> On 16 May 2020, at 12:02, Henning Hraban Ramm <texml@fiee.net> wrote:
>> 
>>> 
>>> Am 16.05.2020 um 08:30 schrieb Wolfgang Schuster <wolfgang.schuster.lists@gmail.com>:
>>> 
>>> Bruce Horrocks schrieb am 16.05.2020 um 00:47:
>>>> When I customise the table of contents layout I lose the automatic hyperlinks. Is there a simple configuration option that I have missed or do I need to create my own links somehow?
> [snip]
>>> alternative=command : Cutsom TOC without hyperlinks
>>> 
>>> alternative=interactive : Custom TOC with hyperlinks
>> 
>> Thank you! Wikified: https://wiki.contextgarden.net/Command/setuplist
> 
> Thank-you Wolfgang for the quick reply and also Hraban for beating me to it on the Wiki - I was going to (honest!)

I was interested in the subject anyway and used the opportunity to add a section about list alternatives to my ConTeXt book (now at 260 pages, and still no end in sight).

Best, Hraban
___________________________________________________________________________________
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Problem with \vfill in extreme table
  2020-05-17 15:00       ` Wolfgang Schuster
@ 2020-05-17 19:56         ` Hans Hagen
  0 siblings, 0 replies; 9+ messages in thread
From: Hans Hagen @ 2020-05-17 19:56 UTC (permalink / raw)
  To: mailing list for ConTeXt users, Wolfgang Schuster, Bruce Horrocks

On 5/17/2020 5:00 PM, Wolfgang Schuster wrote:
> Bruce Horrocks schrieb am 17.05.2020 um 13:47:
>> If I want the words Top and Bottom at the top and bottom of a page 
>> then "Top \vfill Bottom" works as expected. If I use the same in an 
>> extreme table I get an error and I don't know why.
>>
>> What's the 'official' way to align top and bottom in an xrow?
>>
>> %%%% MWE
>> \setuppapersize [A4] [A4]
>> \starttext
>> \startxtable[width=\textwidth]
>>    \startxrow[height=150mm]
>>      \startxcell[align=middle]
>>        Top
>>        \vfill
>>        Bottom
>>      \stopxcell
>>    \stopxrow
>> \stopxtable
>> \stoptext
>> %%%%
> 
> It's not a real fix but you can you exclude the \vfill command
> when ConTeXt does its cell calculations.
> 
> \starttext
> 
> \startxtable[align=middle,width=\textwidth,height=15cm]
>    \startxrow
>      \startxcell
>        Top
>        \doifnotmode{*trialtypesetting}{\vfill}
>        Bottom
>      \stopxcell
>    \stopxrow
> \stopxtable
> 
> \stoptext
Neat!

Hans

-----------------------------------------------------------------
                                           Hans Hagen | PRAGMA ADE
               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
        tel: 038 477 53 69 | www.pragma-ade.nl | 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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2020-05-17 19:56 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-15 22:47 Custom list layout with PDF bookmarks Bruce Horrocks
2020-05-16  6:15 ` Henning Hraban Ramm
2020-05-16  6:30 ` Wolfgang Schuster
2020-05-16 11:02   ` Henning Hraban Ramm
2020-05-17 11:38     ` Bruce Horrocks
2020-05-17 19:40       ` Henning Hraban Ramm
2020-05-17 11:47     ` Problem with \vfill in extreme table Bruce Horrocks
2020-05-17 15:00       ` Wolfgang Schuster
2020-05-17 19:56         ` Hans Hagen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).