Am 03.11.2011 um 15:15 schrieb Alan Braslau:
On Thu, Nov 03, 2011 at 02:36:06PM +0100, Wolfgang Schuster wrote:
\def\startdictum {\dostartbuffer[dictum][startdictum][stopdictum]}
\setuphead [title] [insidesection=\texsetup{dictum}]
\startsetups dictum
\doifelsebuffer{dictum} {\startframedtext[right][frame=off,offset=none,width=.5\ textwidth,foregroundstyle=\itx] \getbuffer [dictum] \resetbuffer[dictum] \stopframedtext} {\donothing}
\stopsetups
\starttext
\startdictum \input ward \stopdictum
\starttitle[title=This is a heading with a epgigraph below]
\input knuth
\stoptitle
\stoptext
Wolfgang,
Looking at your message above, I do not really understand why it is best to set a buffer for a one-time use: to be typeset after the title and then reset.
This was just a example to demonstrate the “insidesection” key to add something after the heading. When you want to use it only one time the above is overkill but it’s useful when you want a epigraph for each chapter. With \doifelsebuffer I can check if there the user set a epigraph and only when there is one i want the framedtext but I have to reset the buffer for the next chapter.
Would it not be better (or more logical, in fact) to simply use:
\setupframedtext [frame=off,offset=none,width=.5\textwidth, foregroundstyle=\itx] % I did not check, but I imagine that this works...
\starttitle [title=This is a heading with an epigraph below]
\startframedtext [right] \input ward \stopframedtext
Of course, one could (and probably should) define a special sort of framed text? I don't remember the proper syntax for this, though.
How is a framedtext more logical than a dictum or epigraph environment, with my solution you can also change the definition of the code to place the epigraph format without any change in the text while your framed text is always a framedtext (I know you can avoid this with a named framedtext) and changes to the layout require more work.
I am interested, as in one of my documents, I do something like this (without any special typesetting, for the moment) stupidly as:
\def\sectionbis#1{{\it #1}\blank}
\startsection [title=Section title]
\sectionbis{\input ward}
\input tufte
\definestartstop[sectionbis][style=italic,inbetween=\blank] Wolfgang