Open main menu

Changes

m
no edit summary
With the new head syntax (MkIV) one can easy add information An example on how to chapters, sections, etcgenerate a sorted list of all authors contributed to a conference proceeding.
Here is an example from Wolfgang Schuster (<texcode>\setuphead [http://archive.contextgarden.net/message/20100919.163604.e1f8cb40.en.htmltitle] [page=no,command=,])
<texcode>\setuphead\define [3chapter]\ChapterList {\bTABLE [offset=0pt,strut=yes,frame=off,widthcommand=.5\textwidthMyChapCMD] \bTR \bTD \structurelistuservariable{date} \eTD \bTD #2 \eTD \bTD (\structurelistuservariable{author}) \eTD \eTR \eTABLE}
\setuplist
[chapter]
[criterium=all,alternative=command, command=\ChapterListMyChapListCMD] \definesorting[author][authors]\setupsorting [author][criterium=all,expansion=yes]
\define[2]\ChapterHeadMyChapCMD {#1\enspace #2 {\doifsomething {\structureuservariable{author}} \expanded{\author [\structureuservariable{name}] % -> sorted by "name"-variable {\startframedtextbTABLE[frame=off,width=broad,offset=0pt,align=middle] \doifsomethingbTR \bTD \structureuservariable{author} \eTD \bTD \structureuservariable{date}city} \eTD { \bTD \structureuservariable{date} \blankeTD \bTD \structureuservariable{email} \eTD #2 \doifsomething {bTD \structureuservariable{authornote} \eTD \eTR \eTABLE\nointerlineskip}% { \blanktfxx (\structureuservariable{author}, \structureuservariable{city})}} \stopframedtext}
\setupheaddefine[3]\MyChapListCMD {#1 #2 (\structurelistuservariable{author})\hfill #3\blank}  \starttext \showframe[text] \starttitle[title=Contents] \placelist[chapter] \stoptitle \starttitle[commandtitle=List of Authors in Alphabetical Order] \placelistofauthors\ChapterHead]stoptitle
\startchapter
[title=Text by Ward]
[name=ward,
author=Peter D. Ward,
city=Washington,
email=ward@sample.com]
\starttextinput ward\stopchapter
\completecontentstartchapter [title=Text by Zapf] [name=zapf, author=Hermann Zapf, city=Nürnberg, date=8. November 1918, email=zapf@sample.de]
\startchapter[title=Rom][date=12.06.2010,author=Knuth] \input knuthzapf
\stopchapter
\startchapter [title=PisaText by Bryson] [name=bryson, author=Bill Bryson, city=Norfolk, date=14.06.2010{December 8, 1951}, note=best-selling American author]  \input Bryson\stopchapter \startchapter [title=Text by Tufte] [name=tufte, author=Edward R. Tufte, city=Kansas City, date=1942, note=has criticized the way Microsoft PowerPoint is typically used
\input tufte
\stopchapter
\stoptext
 
</texcode>
 
[[Category:Sample documents]]