ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Giuseppe Bilotta <gip.bilotta@iol.it>
Subject: Re[2]: Displayed material, again
Date: Mon, 10 Mar 2003 21:22:14 +0100	[thread overview]
Message-ID: <2527490639.20030310212214@iol.it> (raw)
In-Reply-To: <6888666D-5318-11D7-93AD-0050E4258255@fastmail.fm>

Monday, March 10, 2003 Bruce D'Arcus wrote:

BDA> Since I've earlier agreed with you on this Giuseppe, I'll do so here
BDA> too.

BDA> However, there seems to be something weird with this sample file.  In
BDA> the first Knuth entry, the first paragraph is not indented, while in
BDA> the second (at the end) it is.  This is a matter of trivial detail
BDA> though, and I agree with your basic request.

Actually that indent/noindent for the first line of the displayed
material was just a personal test to see if I could make it work
(so as to distinguish when the displayed material started a new
paragraph and when not --when there is indentation on the first
line it's because it starts a new paragraph ...)

Anyway, I built a "quick and dirty" patch which seems to work for
most environments which, I think, require it: itemgroups,
definitions, formulas, verbatim. You can put it in your cont-loc
between \unprotect ... \protect pairs:

=== BEGIN PATCH ===
\startvariables all
    auto: auto
\stopvariables

\def\@@stopdefinitie#1%
  {\par
   \dostopattributes
   \endgroup
   \getvalue{\??dd#1\c!na}%
   \egroup % temporary hack
   \doifvalue{\??dd#1\c!springvolgendein}\v!nee\noindentation
   \doifvalue{\??dd#1\c!springvolgendein}\v!auto\noindent}
 
\def\stopitemgroup
  {\iftextitems
     \removeunwantedspaces\space\ignorespaces
   \else
     \par
   \fi
   \ifnum\itemcolumndepth=\zerocount \dolistreference \fi % beware !
   \iffirstlist \else \endgroup \fi % toegevoegd, eerste \som opent groep
   \ifnum\itemcolumndepth=\itemlevel\relax
     \stopkolommen
     \doglobal\newcounter\itemcolumndepth
     \getitemparameter\itemlevel\c!na
   \else
     \ifnum\itemlevel=\plusone
       \doitembreak\allowbreak           % toegevoegd
       \getitemparameter1\c!na
       \doif\@@oospringvolgendein\v!nee\noindentation
       \doif\@@oospringvolgendein\v!auto\noindent
     \fi
   \fi
   \endgroup
   \doglobal\decrement(\itemlevel,\itemincrement)%
   \egroup}

\def\dostopformula
  {\doplaceformulanumber
   \getvalue{\e!stop\getvalue{\??fm\currentformula\c!variant}\e!formule}%
    \resetlastlinewidth
    \nonoindentation
    \doifvalue{\??fm\currentformula\c!springvolgendein}\v!nee\noindentation
    \doifvalue{\??fm\currentformula\c!springvolgendein}\v!auto\noindent
    \egroup}

\def\dostoptyping#1%
  {\stopverbatimcolor
     \stopopelkaar  % includes \egroup
        \getvalue{\??tp#1\c!na}%
           \doifvalue{\??tp#1\c!springvolgendein}\v!nee\noindentation
           \doifvalue{\??tp#1\c!springvolgendein}\v!auto\noindent}
            
=== END PATCH ===

Remember to issue the following instructions:

\setupformulas[indentnext=auto]
\setupitemgroups[indentnext=auto]

to make it work. No need to regenerate the formats (you may need
to refresh the filename database if you didn't have a cont-loc.tex
before that). Hans, can we hope for this to go into the core for
the next beta?

Note: while I think it should be done for quotations as well, this
seems to be a feature "in development" so I won't touch it for
now.

-- 
Giuseppe "Oblomov" Bilotta

  reply	other threads:[~2003-03-10 20:22 UTC|newest]

Thread overview: 46+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-03-10 16:25 Giuseppe Bilotta
2003-03-10 16:50 ` Bruce D'Arcus
2003-03-10 20:22   ` Giuseppe Bilotta [this message]
2003-03-10 22:15     ` s-mag-01 Bruce D'Arcus
2003-03-11  8:00       ` s-mag-01 Hans Hagen
2003-03-11 14:11         ` s-mag-01 Bruce D'Arcus
2003-03-11 14:31           ` s-mag-01 Hans Hagen
2003-03-11 14:34         ` s-mag-01 Bruce D'Arcus
2003-03-11 14:46           ` Fonts again in ConTeXt Patrick Gundlach
2003-03-11 15:10             ` Bruce D'Arcus
2003-03-12 13:04               ` Maarten Sneep
2003-03-12 13:23                 ` Bruce D'Arcus
2003-03-12 13:26                   ` Maarten Sneep
2003-03-12 14:05                     ` Patrick Gundlach
2003-03-12 15:11                       ` Hans Hagen
2003-03-12 15:43                         ` Patrick Gundlach
2003-03-12 19:35                           ` Jens-Uwe Morawski
2003-03-13  8:31                             ` Patrick Gundlach
2003-03-14  8:27                               ` Hans Hagen
2003-03-12 20:26                           ` Hans Hagen
2003-03-13  8:54                             ` Patrick Gundlach
2003-03-13 12:37                               ` Hans Hagen
2003-03-13 15:07                                 ` John Culleton
2003-03-13 15:52                                   ` Hans Hagen
2003-03-21 18:05                                 ` Patrick Gundlach
2003-03-22 11:10                                   ` Hans Hagen
2003-03-14 21:34                             ` Henning Hraban Ramm
2003-03-14 21:24                           ` Henning Hraban Ramm
2003-03-21 18:06                             ` Patrick Gundlach
2003-03-12 15:09                 ` Hans Hagen
2003-03-11 15:02           ` s-mag-01 Adam Lindsay
2003-03-11 20:52             ` s-mag-01 Hans Hagen
2003-03-11  9:13       ` s-mag-01 Patrick Gundlach
2003-03-10 17:00 ` Displayed material, again Hans Hagen
2003-03-10 23:24 ` Hans Hagen
2003-03-11 10:08   ` Re[2]: " Giuseppe Bilotta
2003-03-11 10:52     ` Hans Hagen
2003-03-11 11:47       ` Re[3]: " Giuseppe Bilotta
2003-03-11 14:57         ` Hans Hagen
2003-03-11 17:04           ` Re[4]: " Giuseppe Bilotta
2003-03-12 20:36             ` Hans Hagen
2003-03-13  9:36               ` Re[5]: " Giuseppe Bilotta
2003-03-13 12:23                 ` Hans Hagen
2003-03-11 15:12         ` Re[3]: " Hans Hagen
2003-03-12 21:07         ` Hans Hagen
2003-03-13  9:38           ` Re[4]: " Giuseppe Bilotta

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=2527490639.20030310212214@iol.it \
    --to=gip.bilotta@iol.it \
    --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).