https://wiki.contextgarden.net/index.php?title=Horizontal_Table_of_Contents&feed=atom&action=history
Horizontal Table of Contents - Revision history
2024-03-29T13:08:26Z
Revision history for this page on the wiki
MediaWiki 1.34.1
https://wiki.contextgarden.net/index.php?title=Horizontal_Table_of_Contents&diff=31315&oldid=prev
Hraban: add link to ToC
2020-09-05T08:32:34Z
<p>add link to ToC</p>
<table class="diff diff-contentalign-left" data-mw="interface">
<col class="diff-marker" />
<col class="diff-content" />
<col class="diff-marker" />
<col class="diff-content" />
<tr class="diff-title" lang="en">
<td colspan="2" style="background-color: #fff; color: #222; text-align: center;">← Older revision</td>
<td colspan="2" style="background-color: #fff; color: #222; text-align: center;">Revision as of 08:32, 5 September 2020</td>
</tr><tr><td colspan="2" class="diff-lineno" id="mw-diff-left-l1" >Line 1:</td>
<td colspan="2" class="diff-lineno">Line 1:</td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><ins style="font-weight: bold; text-decoration: none;">< [[Table of Contents]]</ins></div></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><ins style="font-weight: bold; text-decoration: none;"></ins></div></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>This is an example which displays horizontal aligned table of contents from luigi:</div></td><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>This is an example which displays horizontal aligned table of contents from luigi:</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"></td><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"></td></tr>
</table>
Hraban
https://wiki.contextgarden.net/index.php?title=Horizontal_Table_of_Contents&diff=28738&oldid=prev
Garulfo at 14:36, 8 June 2020
2020-06-08T14:36:08Z
<p></p>
<table class="diff diff-contentalign-left" data-mw="interface">
<col class="diff-marker" />
<col class="diff-content" />
<col class="diff-marker" />
<col class="diff-content" />
<tr class="diff-title" lang="en">
<td colspan="2" style="background-color: #fff; color: #222; text-align: center;">← Older revision</td>
<td colspan="2" style="background-color: #fff; color: #222; text-align: center;">Revision as of 14:36, 8 June 2020</td>
</tr><tr><td colspan="2" class="diff-lineno" id="mw-diff-left-l80" >Line 80:</td>
<td colspan="2" class="diff-lineno">Line 80:</td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div></texcode></div></td><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div></texcode></div></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>--[[User:58.35.85.255|58.35.85.255]] 06:37, 2 September 2008 (CEST)yue wang</div></td><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>--[[User:58.35.85.255|58.35.85.255]] 06:37, 2 September 2008 (CEST)yue wang</div></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><ins style="font-weight: bold; text-decoration: none;"></ins></div></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><ins style="font-weight: bold; text-decoration: none;">[[Category:Basics]]</ins></div></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><ins style="font-weight: bold; text-decoration: none;">[[Category:Sample documents]]</ins></div></td></tr>
</table>
Garulfo
https://wiki.contextgarden.net/index.php?title=Horizontal_Table_of_Contents&diff=8902&oldid=prev
58.35.85.255 at 16:05, 7 September 2008
2008-09-07T16:05:32Z
<p></p>
<table class="diff diff-contentalign-left" data-mw="interface">
<col class="diff-marker" />
<col class="diff-content" />
<col class="diff-marker" />
<col class="diff-content" />
<tr class="diff-title" lang="en">
<td colspan="2" style="background-color: #fff; color: #222; text-align: center;">← Older revision</td>
<td colspan="2" style="background-color: #fff; color: #222; text-align: center;">Revision as of 16:05, 7 September 2008</td>
</tr><tr><td colspan="2" class="diff-lineno" id="mw-diff-left-l66" >Line 66:</td>
<td colspan="2" class="diff-lineno">Line 66:</td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div></texcode></div></td><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div></texcode></div></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"></td><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><ins style="font-weight: bold; text-decoration: none;"></ins></div></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><ins style="font-weight: bold; text-decoration: none;">Later, Yue Wang wrote a new implementation of the horizontal table of contents as follows:</ins></div></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><ins style="font-weight: bold; text-decoration: none;"></ins></div></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><ins style="font-weight: bold; text-decoration: none;"><texcode></ins></div></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><ins style="font-weight: bold; text-decoration: none;">\newcount\chapcounter \chapcounter=0</ins></div></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><ins style="font-weight: bold; text-decoration: none;">\def\tocchap#1#2#3{\hskip0pt plus 0.02\textwidth minus 0pt\advance\chapcounter by 1</ins></div></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><ins style="font-weight: bold; text-decoration: none;"> \framedtext[height=\textheight,frame=off,width=.48\textwidth,offset=none]%</ins></div></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><ins style="font-weight: bold; text-decoration: none;"> {\framedtext[height=.7\textheight,frame=off,width=.48\textwidth,offset=none,top=\vss,bottom=]{{\red\BigFont\setupinterlinespace#1\par}{\tfb\setupinterlinespace #2\par}}%</ins></div></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><ins style="font-weight: bold; text-decoration: none;"> \framedtext[height=.3\textheight,width=.48\textwidth,offset=none,frame=off,top=,bottom=\vss,align=right]%</ins></div></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><ins style="font-weight: bold; text-decoration: none;"> {\placelist[section][criterium=chapter,number=\chapcounter,alternative=command, command=\tocsec]}}}</ins></div></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><ins style="font-weight: bold; text-decoration: none;">\def\tocsec#1#2#3{{\black #2~(#3)}\par}</ins></div></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><ins style="font-weight: bold; text-decoration: none;">\def\placecontent{\placelist[chapter][alternative=command,command=\tocchap]}</ins></div></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><ins style="font-weight: bold; text-decoration: none;"></texcode></ins></div></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>--[[User:58.35.85.255|58.35.85.255]] 06:37, 2 September 2008 (CEST)yue wang</div></td><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>--[[User:58.35.85.255|58.35.85.255]] 06:37, 2 September 2008 (CEST)yue wang</div></td></tr>
<!-- diff cache key wikidb16_33:diff::1.12:old-8889:rev-8902 -->
</table>
58.35.85.255
https://wiki.contextgarden.net/index.php?title=Horizontal_Table_of_Contents&diff=8889&oldid=prev
58.35.85.255: New page: This is an example which displays horizontal aligned table of contents from luigi: <texcode> \startluacode document.yue = document.yue or {} document.yue.chapter = document.yue.ch...
2008-09-02T04:37:39Z
<p>New page: This is an example which displays horizontal aligned table of contents from luigi: <texcode> \startluacode document.yue = document.yue or {} document.yue.chapter = document.yue.ch...</p>
<p><b>New page</b></p><div>This is an example which displays horizontal aligned table of contents from luigi:<br />
<br />
<texcode><br />
\startluacode<br />
document.yue = document.yue or {}<br />
document.yue.chapter = document.yue.chapter or {}<br />
document.yue.section = document.yue.section or {}<br />
document.yue.chcount = 0<br />
document.yue.seccount = 0<br />
\stopluacode<br />
<br />
<br />
\def\ListSectionCommand#1#2#3{#1 #2 #3}<br />
<br />
\setupcolors[state=start]<br />
\def\ListChapterCommand#1#2#3%<br />
{\startluacode<br />
document.yue.chcount = document.yue.chcount +1<br />
document.yue.chapter[document.yue.chcount] = "{\\red\\switchtobodyfont[55pt]\\os #1} {\\blue\\switchtobodyfont[34pt] #2}"<br />
\stopluacode%<br />
}<br />
<br />
<br />
\def\PlaceContent%<br />
{\startluacode<br />
tprint = function(s) tex.sprint(tex.ctxcatcodes,s) end<br />
format = string.format<br />
local tab<br />
tab = ""<br />
if document.yue.chcount > 0<br />
then<br />
for i=1,document.yue.chcount do<br />
tab = tab.."\|p"<br />
end<br />
tab = tab.."\|"<br />
tprint("\\starttabulate["..tab.."]")<br />
for i=1,document.yue.chcount do<br />
tprint("\\NC<br />
"..document.yue.chapter[i].."\\vskip8pt"..format("\\placelist[section][criterium=chapter,number=\%i,before=,after=\\vskip2pt]",i))<br />
end<br />
tprint("\\NC\\NR")<br />
tprint("\\stoptabulate")<br />
end<br />
\stopluacode<br />
}<br />
<br />
\setuplist[section][alternative=none,command=\ListSectionCommand]<br />
\setuplist[chapter][alternative=none,command=\ListChapterCommand]<br />
<br />
\setuppapersize [A4,landscape][A4,landscape]<br />
\starttext<br />
\setupbackgrounds[page][backgound=color,backgroundcolor=darkyellow]<br />
%% Do nothing except store chapters<br />
<br />
\framed[height=6cm,frame=off,align=middle,top=\vss,bottom=]{\switchtobodyfont[ss, 55pt] \darkgreen Table of Contents}<br />
{ \magenta<br />
\switchtobodyfont[ss,21pt]<br />
\placelist[chapter]%<br />
\PlaceContent<br />
}<br />
<br />
\chapter{first} \section{AA}\dorecurse{10}{\input tufte} \section{BB} \dorecurse{10}{\input knuth}<br />
\chapter{second} \section{CC} \dorecurse{10}{\input zapf}\section{DD} \dorecurse{10}{\input bryson}<br />
\chapter{third} \section{EE} \dorecurse{10}{\input ward}<br />
\stoptext<br />
</texcode><br />
<br />
--[[User:58.35.85.255|58.35.85.255]] 06:37, 2 September 2008 (CEST)yue wang</div>
58.35.85.255