ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Hans Hagen <pragma@wxs.nl>
Cc: ntg-context@ntg.nl
Subject: Re: Paragraph indentation
Date: Thu, 28 Dec 2000 16:37:11 +0100	[thread overview]
Message-ID: <3.0.6.32.20001228163711.013cc470@pop.wxs.nl> (raw)
In-Reply-To: <SAK.2000.12.22.kbfeoblm@irnerio>

At 11:41 AM 12/22/00 +0100, Max Lambertini wrote:
>Hello all,
>
>I would like to know if it's possible to have main text paragraph with a
left block 
>indent, while having no indentation on chapter, section and subsection 
>
>I hope this example will clarify what I would like to get. 
>
>1. Chapter text
>                  Le ore del mattino hanno sempre l'oro in bocca. Le ore
del mattino
>                  Le ore del mattino hanno sempre l'oro in bocca. Le ore
del mattino
>
>                   Le ore del mattino hanno sempre l'oro in bocca. Le ore
del mattino
>< abt 2cm->Le ore del mattino hanno sempre l'oro in bocca. Le ore del mattino
>                   Le ore del mattino hanno sempre l'oro in bocca. Le ore
del mattino
>
>                   Le ore del mattino hanno sempre l'oro in bocca. Le ore
del mattino
>                   Le ore del mattino hanno sempre l'oro in bocca. Le ore
del mattino
>                   Le ore del mattino hanno sempre l'oro in bocca. Le ore
del mattino
>                   Le ore del mattino hanno sempre l'oro in bocca. Le ore
del mattino
>
>1.1. Section 
>                   Le ore del mattino hanno sempre l'oro in bocca. Le ore
del mattino
>                   Le ore del mattino hanno sempre l'oro in bocca. Le ore
del mattino
>                   Le ore del mattino hanno sempre l'oro in bocca. Le ore
del mattino
>                   Le ore del mattino hanno sempre l'oro in bocca. Le ore
del mattino
>                   Le ore del mattino hanno sempre l'oro in bocca. Le ore
del mattino
>                   Le ore del mattino hanno sempre l'oro in bocca. Le ore
del mattino
>
>I have found the way to restrict paragraph width, but I would like to make
this 
>restriction constant for the body text, that is, setting up a style
information.

I would go for the next alternative, since it leave the main text flow
intact and has no interference with other mechanisms. Instead of moving the
text margin right, we move the section titles into the margin, which is
also more consistent with the layout. The macro \MyHead is just a bit of tex. 

\setuplayout[margin=1cm] \showframe

\def\MyHead#1#2%
  {\vbox 
     {\leftskip-\leftmarginwidth
      \advance\leftskip-\leftmargindistance
      #1\quad#2}}

\setuphead[chapter,section][command=\MyHead]

\starttext 

\chapter{A chapter heading} \input tufte 
\chapter{A chapter heading} \input tufte 
\chapter{A chapter heading} \input tufte 

\stoptext 

-------------------------------------------------------------------------
                                                  Hans Hagen | PRAGMA ADE
                      Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
 tel: +31 (0)38 477 53 69 | fax: +31 (0)38 477 53 74 | www.pragma-ade.com
-------------------------------------------------------------------------


      reply	other threads:[~2000-12-28 15:37 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-12-22 10:41 Max Lambertini
2000-12-28 15:37 ` Hans Hagen [this message]

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=3.0.6.32.20001228163711.013cc470@pop.wxs.nl \
    --to=pragma@wxs.nl \
    --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).