ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Wolfgang Schuster <schuster.wolfgang@googlemail.com>
To: Alan Braslau <alan.braslau@cea.fr>
Cc: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: Re: Hello world title not flush left - beginner question?
Date: Thu, 3 Nov 2011 15:33:48 +0100	[thread overview]
Message-ID: <C0C3C6F2-1F99-4C44-BB13-4C2167A998B1@googlemail.com> (raw)
In-Reply-To: <20111103141534.GC1412@iram-ha-003840.extra.cea.fr>


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

___________________________________________________________________________________
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
___________________________________________________________________________________


  parent reply	other threads:[~2011-11-03 14:33 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-11-02 16:38 Grant William (ST-CO/ENG3.11)
2011-11-03 13:36 ` Wolfgang Schuster
     [not found]   ` <20111103141534.GC1412@iram-ha-003840.extra.cea.fr>
2011-11-03 14:33     ` Wolfgang Schuster [this message]
2011-11-03 14:51       ` Alan Braslau
2011-11-03 15:38         ` Wolfgang Schuster

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=C0C3C6F2-1F99-4C44-BB13-4C2167A998B1@googlemail.com \
    --to=schuster.wolfgang@googlemail.com \
    --cc=alan.braslau@cea.fr \
    --cc=ntg-context@ntg.nl \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).