Am 2009-04-29 um 15:53 schrieb Mohamed Bana:
Would it be possible to go through a deprecation phase? E.g., allow
\section hello world
to compile, but prompt the user to acknowledge that it's going to be
replaced with \section{hello world} in future versions.
Please don't mix your concern about structurals without braces into
this thread, would you please? Or is it the same topic?
I agree that it would be nice to know if commands disappear.
I try to understand here, how to redo my chapter setup that once
worked using sectionworld commands.
At the moment I get no output for the chapter title at all.
My input reads:
\Titel{Author}{Title}{Subtitle}
The output as chapter title should become like:
\vbox{
{\rm\tf Author\crlf}
{\ss\bfb Title\crlf}
{\ss\bf Subtitle}
}
In the table of contents I need:
Author: Title \hfill pagenumber
So, using \startchapter, I define \Titel like this:
\def\Titel#1#2#3{\startchapter[title={#2},bookmark={#2}]
[author={#1},subtitle={#3}]}
I guess, even \startchapter should obey to \setuphead[chapter]:
\setuphead[chapter][
header=high,
incrementnumber=no,
command=\ChapterCommand,
page=yes, number=no,
align={flushleft,nothyphenated,verytolerant},
style=,]
Therefore I define (i.e. Wolfgang defined) \ChapterCommand like:
\def\ChapterCommand#1#2{\vbox{\ChapterAuthor\ChapterTitle
\ChapterSubTitle}}
While \ChapterAuthor cum suis is defined in a setup.
Now, what's the replacement for:
\setupsectionworld[chapter][setups={chapter:list},author=]
I tried to adapt Wolfgang's code to Hans' sparse hints:
\unprotect
\resetvalue{\??sw\v!chapter}
\startsetups chapter:list
\doiftextelse{\structureuservalue{author}}
{\expanded{\writetolist[\v!chapter]
{\structureuservalue{author}:\space
\structurevalue{title}}{}}}
{\expanded{\writetolist[\v!chapter]
{\structurevalue{title}}{}}}
\def\ChapterAuthor{%
\doiftextelse%
{\structureuservalue{author}}%
{\rm\tf\structureuservalue{author}\crlf\vskip0.25em}
{}%
}
\def\ChapterTitle{{\ss\bfb\structurevalue{title}}}
\def\ChapterSubTitle{%
\doiftextelse%
{\structureuservalue{subtitle}}%
{\crlf\vskip0.2em\ss\bf\structureuservalue{subtitle}}%
{}%
}
\stopsetups
\def\ChapterCommand#1#2{\vbox{\ChapterAuthor\ChapterTitle
\ChapterSubTitle}}
% why is/was this needed?
\let\ChapterAuthor\relax
\let\ChapterTitle\relax
\let\ChapterSubTitle\relax
\protect
(The original code is still in http://wiki.contextgarden.net/Proceedings_style)
Greetlings from Lake Constance!
Hraban
---
http://www.fiee.net/texnique/
http://wiki.contextgarden.net
https://www.cacert.org (I'm an assurer)
___________________________________________________________________________________
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 : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___________________________________________________________________________________