ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Hans Hagen <pragma@wxs.nl>
Subject: Re[2]: Re: Indenting in description
Date: Thu, 27 Feb 2003 19:00:44 +0100	[thread overview]
Message-ID: <5.1.0.14.1.20030227185855.024314d8@server-1> (raw)
In-Reply-To: <1112018712.20030227101037@iol.it>

At 10:10 AM 2/27/2003 +0100, Giuseppe Bilotta wrote:

>No, I think we should lobby Hans so that he adds an option to
>indent subsequent paragraphs of (all) description-like
>environments. It's a *very* important feature.

at the cost of a few bytes  ....

.... you'd better test it first in all possible description locations

(only when it is ok i will add it; it then also has to go in enumerations)

% interface=en

\unprotect

\steldoordefinierenin
   [\c!plaats=\v!links,
    \c!kopletter=\v!vet,
    \c!letter=\v!normaal,
    \c!kleur=,
    \c!kopkleur=,
    \c!breedte=8em,
    \c!afstand=0pt,
    \c!hang=,
    \c!monster=,
    \c!uitlijnen=,
    \c!marge=\v!nee,
    \c!voor=\blanko,
    \c!tussen=\blanko,
    \c!na=\blanko,
    \c!springvolgendein=\v!ja,
    \c!inspringen=\v!nooit,
    \c!commando=]

\def\dodoordefinieren[#1][#2]%
   {\copyparameters[\??dd#1][\??dd]
      [\c!plaats,\c!kopletter,\c!letter,\c!kleur,\c!kopkleur,
       \c!breedte,\c!hang,\c!monster,\c!voor,\c!tussen,\c!na,\c!marge,
       \c!inspringen,
       \c!springvolgendein,\c!uitlijnen,\c!tekst,\c!afstand,\c!commando]%
    \getparameters[\??dd#1]
      [\s!do\c!status=\v!stop,
       \s!do\c!commando=\normal@@definitiewoord,
       #2]%
    \doifvalue{\??dd#1\c!plaats}\v!boven
      {\doassign[\??dd#1][\c!tussen={\blanko}]}%
    \setvalue{#1}%
      {\dodoubleempty\@@definitie[#1]}%
    \setvalue{\e!start#1}%
      {\dodoubleempty\@@startdefinitie[#1]}%
    \setvalue{\e!stop#1}%
      {\@@stopdefinitie{#1}}}%

\def\@@dostartdefinitie#1[#2]#3%
   {\getvalue{\??dd#1\c!voor}%
    \begingroup
    \doadaptleftskip{\getvalue{\??dd#1\c!marge}}%
    \showcomposition
    \setbox\@@definitiebox\hbox
      {\forgetall
       \mindermeldingen
       \def\\{\crcr}%
       \doifelsevalue{\??dd#1\c!plaats}\v!aanelkaar
         {\@@definitiewoord{#1}[#2]{#3}{#3}}
         {\@@definitiewoord{#1}[#2]{#3}{\vbox{\halign{\strut##\hss\cr#3\crcr}}}}}%
    \!!widthb\getvalue{\??dd#1\c!afstand}\relax
    \ifdim\!!widthb=\zeropoint\relax
      \doifvalue{\??dd#1\c!breedte}\v!ruim{\!!widthb=1em}%
    \fi
    \assignwidth
      {\!!widtha}
      {\getvalue{\??dd#1\c!breedte}}
      {\doifelsevaluenothing{\??dd#1\c!monster}
         {\unhcopy\@@definitiebox}
         {\doattributes
            {\??dd#1}\c!kopletter\c!kopkleur
            {\getvalue{\??dd#1\c!tekst}\getvalue{\??dd#1\c!monster}}}}
      {\!!widthb}%
%   \parindent\zeropoint\relax
    \doifelsevalue{\??dd#1\c!titeluitlijnen}\v!nee
      {\edef\@@leftdefinitieskip {\the\leftskip }%
       \edef\@@rightdefinitieskip{\the\rightskip}}
      {\ifcase\insidedefinition
         \edef\@@leftdefinitieskip {\the\leftskip }%
         \edef\@@rightdefinitieskip{\the\rightskip}%
       \fi}%
\expanded{\inspringen[\getvalue{\??dd#1\c!inspringen}]}%
    \ifcase\insidedefinition
      \chardef\insidedefinition1
    \or
      \chardef\insidedefinition2
    \fi} % now happens elsewhere : \noindent\ignorespaces

\protect

\starttext

\setupindenting[medium] \indenting[yes]

\definedescription[testdesc][%
             width=broad,
             location=serried,
             headstyle=bold,
             way=bychapter,
indenting={yes,next},
             text={Testdescription: }]

\starttestdesc{A nonlucky one}
  This is just a test paragraph. I want to se if the next
paragraph is
indented or not. So, sooner or later we will know.

Is this indented? No, but I want it to be.
\stoptestdesc


\stoptext

-------------------------------------------------------------------------
                                   Hans Hagen | PRAGMA ADE | pragma@wxs.nl
                       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
-------------------------------------------------------------------------
                        information: http://www.pragma-ade.com/roadmap.pdf
                     documentation: http://www.pragma-ade.com/showcase.pdf
-------------------------------------------------------------------------

  reply	other threads:[~2003-02-27 18:00 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-02-26 18:55 Mikael Persson
2003-02-27  2:39 ` Guy Worthington
2003-02-27  8:46   ` Mikael Persson
2003-02-27  9:10     ` Re[2]: " Giuseppe Bilotta
2003-02-27 18:00       ` Hans Hagen [this message]
2003-02-27 18:26         ` Mikael Persson
2003-02-28  7:44           ` Hans Hagen
2003-02-28  9:29             ` Mikael Persson
2003-03-05  8:23               ` Coydell Rivers

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=5.1.0.14.1.20030227185855.024314d8@server-1 \
    --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).