Am 03.11.2011 um 15:51 schrieb Alan Braslau:

> On Thu, Nov 03, 2011 at 03:33:48PM +0100, Wolfgang Schuster wrote:
>> 
>> 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.
>> 
> 
> Thanks for the explanation.
> 
> It is not too logical, however, to define a dictum or epigraph *before* the 
> start of a new section or chapter. An author does not really think this way. 
> Of course, it is logical to define a dictum or epigraph environment that can 
> be used as in:
> 
> \startchapter [title=Chapter title]
> 
> \startepigraph
> \input ward
> \stopepigraph
> 
> \stopchapter

The are reasons to put the epigraph environment before and after \startchapter 
but the purpose of my example was the inside section key and for this i needed 
to before \startchapter.

> It is indeed overkill to use a buffer as in your example. However, there may 
> be a very good reason to more closely tie the epigraph to the typesetting of 
> the chapter title. I could then see something like:
> 
> \startchapter [title={Chapter title},epigraph={\input ward}]
> 
> although I'm sure that the above (untested) syntax would cause problems
> with \input... (and probably a \par would be needed somewhere).

For a longer text \startchapter isn’t prefect but you can load a text with a 
reference from \startchapter, e.g. with this modification of my former example 
you can load a previously set buffer with the dictum key.

\def\startdictum
  {\dosingleempty\dostartdictum}

\def\dostartdictum[#1]%
  {\dostartbuffer[dictum\iffirstargument:#1\fi][startdictum][stopdictum]}

\setuphead
  [title]
  [insidesection=\texsetup{dictum}]

\startsetups dictum

  \doifelsebuffer{dictum:\structureuservariable{dictum}}
    
{\startframedtext[right][frame=off,offset=none,width=.5\textwidth,foregroundstyle=\itx]
     \getbuffer[dictum:\structureuservariable{dictum}]
     \stopframedtext}
    {\doifelsebuffer{dictum}
       
{\startframedtext[right][frame=off,offset=none,width=.5\textwidth,foregroundstyle=\itx]
        \getbuffer  [dictum]
        \resetbuffer[dictum]
        \stopframedtext}
       {\donothing}}

\stopsetups

\startdictum[zapf]
\input zapf
\stopdictum

\starttext

\starttitle[title=This is a heading with a epgigraph below][dictum=zapf]

\input knuth

\stoptitle

\stoptext

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
___________________________________________________________________________________

Reply via email to