* Bug with custom TOC
@ 2014-11-07 14:04 Michał Goliński
2014-11-08 9:47 ` Wolfgang Schuster
0 siblings, 1 reply; 2+ messages in thread
From: Michał Goliński @ 2014-11-07 14:04 UTC (permalink / raw)
To: ntg-context
The following example is taken from the wiki
(http://wiki.contextgarden.net/Command/setuplist):
\define[3]\SectionToCEntry{
\leftaligned\bgroup
\hbox to 2em{#3}%
\hskip 1em
\vtop{\hsize\dimexpr\textwidth-3em\relax#2}%
\egroup
}
\setuplist
[part]
[alternative=interactive,
command=\SectionToCEntry]
\setuplist
[chapter]
[alternative=interactive,
command=\SectionToCEntry]
\setuplist
[section]
[alternative=interactive,
command=\SectionToCEntry]
\starttext
\startcolor[darkgreen]
\completecontent[criterium=all]
\stopcolor
\page[yes]
\part{I}
\chapter{1}
\section{1.1}
\section{1.2}
\section{1.3}
\stoptext
The fresh beta prints all the sections in TOC in a single line (so TOC
has three lines only), while texlive prints it as expected: each section
on its own line. I've tried adding \par after \egroup, but it doesn't
help.
Curiously, it works if there are no sections in the TOC.
Best regards
Michał
___________________________________________________________________________________
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
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Bug with custom TOC
2014-11-07 14:04 Bug with custom TOC Michał Goliński
@ 2014-11-08 9:47 ` Wolfgang Schuster
0 siblings, 0 replies; 2+ messages in thread
From: Wolfgang Schuster @ 2014-11-08 9:47 UTC (permalink / raw)
To: mailing list for ConTeXt users
> Am 07.11.2014 um 15:04 schrieb Michał Goliński <golinski@amu.edu.pl>:
>
> The following example is taken from the wiki (http://wiki.contextgarden.net/Command/setuplist):
>
> \define[3]\SectionToCEntry{
> \leftaligned\bgroup
> \hbox to 2em{#3}%
> \hskip 1em
> \vtop{\hsize\dimexpr\textwidth-3em\relax#2}%
> \egroup
> }
>
> \setuplist
> [part]
> [alternative=interactive,
> command=\SectionToCEntry]
> \setuplist
> [chapter]
> [alternative=interactive,
> command=\SectionToCEntry]
> \setuplist
> [section]
> [alternative=interactive,
> command=\SectionToCEntry]
You have to add “after=\endgraf” to all \setuplist settings. There was a change a while ago
for the interactive alternative which forces horizontal mode at the begin of each entry to ensure
the hyperlinks areas are positioned correct.
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://tex.aanhet.net
archive : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2014-11-08 9:47 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-11-07 14:04 Bug with custom TOC Michał Goliński
2014-11-08 9:47 ` Wolfgang Schuster
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).