ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* Setup narrower body text for sections
@ 2015-05-14 16:16 Kate F
  2015-05-14 20:29 ` Pablo Rodriguez
  2015-05-14 20:33 ` Aditya Mahajan
  0 siblings, 2 replies; 4+ messages in thread
From: Kate F @ 2015-05-14 16:16 UTC (permalink / raw)
  To: ntg-context

Hi,

I'm typesetting unix manpages, where I want each section heading to be
outset slightly relative to the body text of that section. In other
words, I want the body text to have a left margin which is narrower
than the page width.

I know I can do this with something like:

    \startsection[title=Synopsis]
    \startnarrower
    blah blah blah
    \stopnarrower
    \stopsection

But I'd much rather set the left margin (or achieving the effect of
\startnarrower by some other means) using the setups for \startsection
instead. That way I won't need to have \startnarrower .. \stopnarrower
all over my document.

I tried \setuphead[section][margin=3cm] but the margin applies to the
heading, not to the body text of the section. Of course I could set
margin=-3cm and make the entire page narrower, but then I'd also need
to adjust the headers and footers to match.

I thought I could perhaps use before= and after=, but those are of
course before and after the heading, not before and after the body
text.

Is there a setup to wrap some commands around the body text?
Or must I define my own \startxyz .. \stopxyz thingy, or is there a better way?

Thanks,

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Setup narrower body text for sections
  2015-05-14 16:16 Setup narrower body text for sections Kate F
@ 2015-05-14 20:29 ` Pablo Rodriguez
  2015-05-14 20:33 ` Aditya Mahajan
  1 sibling, 0 replies; 4+ messages in thread
From: Pablo Rodriguez @ 2015-05-14 20:29 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On 05/14/2015 06:16 PM, Kate F wrote:
> Hi,
> 
> I'm typesetting unix manpages, where I want each section heading to be
> outset slightly relative to the body text of that section. In other
> words, I want the body text to have a left margin which is narrower
> than the page width.

Hi Kate,

a quick reply:

    %~ \setuphead[section][margin=-1cm]
    \setuphead[section][alternative=inmargin]
    \starttext
    \startsection[title=Synopsis]
    \input zapf
    \stopsection
    \stoptext

Doesn’t any option suit your needs?

I hope it may help,


Pablo
-- 
http://www.ousia.tk
___________________________________________________________________________________
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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Setup narrower body text for sections
  2015-05-14 16:16 Setup narrower body text for sections Kate F
  2015-05-14 20:29 ` Pablo Rodriguez
@ 2015-05-14 20:33 ` Aditya Mahajan
  2015-05-14 21:01   ` Kate F
  1 sibling, 1 reply; 4+ messages in thread
From: Aditya Mahajan @ 2015-05-14 20:33 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On Thu, 14 May 2015, Kate F wrote:

> Hi,
>
> I'm typesetting unix manpages, where I want each section heading to be
> outset slightly relative to the body text of that section. In other
> words, I want the body text to have a left margin which is narrower
> than the page width.
>
> I know I can do this with something like:
>
>    \startsection[title=Synopsis]
>    \startnarrower
>    blah blah blah
>    \stopnarrower
>    \stopsection
>
> But I'd much rather set the left margin (or achieving the effect of
> \startnarrower by some other means) using the setups for \startsection
> instead. That way I won't need to have \startnarrower .. \stopnarrower
> all over my document.

\setuphead[section][after={\startnarrower}, aftersection={\stopnarrower}]

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Setup narrower body text for sections
  2015-05-14 20:33 ` Aditya Mahajan
@ 2015-05-14 21:01   ` Kate F
  0 siblings, 0 replies; 4+ messages in thread
From: Kate F @ 2015-05-14 21:01 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On 14 May 2015 at 21:33, Aditya Mahajan <adityam@umich.edu> wrote:
> On Thu, 14 May 2015, Kate F wrote:
>
>> Hi,
>>
>> I'm typesetting unix manpages, where I want each section heading to be
>> outset slightly relative to the body text of that section. In other
>> words, I want the body text to have a left margin which is narrower
>> than the page width.
>>
>> I know I can do this with something like:
>>
>>    \startsection[title=Synopsis]
>>    \startnarrower
>>    blah blah blah
>>    \stopnarrower
>>    \stopsection
>>
>> But I'd much rather set the left margin (or achieving the effect of
>> \startnarrower by some other means) using the setups for \startsection
>> instead. That way I won't need to have \startnarrower .. \stopnarrower
>> all over my document.
>
>
> \setuphead[section][after={\startnarrower}, aftersection={\stopnarrower}]
>
> Aditya
>

Thank you! That's exactly what I was hoping for!

aftersection= doesn't appear to be documented in cont-enp.pdf :)

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2015-05-14 21:01 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-05-14 16:16 Setup narrower body text for sections Kate F
2015-05-14 20:29 ` Pablo Rodriguez
2015-05-14 20:33 ` Aditya Mahajan
2015-05-14 21:01   ` Kate F

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).