ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Hans Hagen <pragma@wxs.nl>
Cc: "'ntg-context@ntg.nl'" <ntg-context@ntg.nl>
Subject: Re: \paragraph should give warning when \startkantlijn active
Date: Fri, 09 Oct 1998 14:09:23 +0100	[thread overview]
Message-ID: <361E0B03.72A0333C@wxs.nl> (raw)

Berend de Boer wrote:

> I'm using \startkantlijn a lot, but frequently I forget or delete a
> stopkantlijn. TeX gives the following error:

Ah, the trick margin rules. Maybe you should use text annotations
(\startcomment text \stopcomment in interactive mode}. You can color
them, and they automatically stack in the margin of the next paragraph.
See 1998-001.pdf .  

> Searching through large documents (with many subdocuments is time
> consuming). Can \paragraph not give an error when a \startkantlijn is
> active? A \startkantlijn cannot go across different paragraphs anyway (at
> least it doesn't work, either intentional or not).

\def\setupmarginrules%
  {\dodoubleargument\getparameters[\??ka]}

\definecomplexorsimple\startmarginrule

\def\simplestartmarginrule%
  {\bgroup
   \let\drawmarginrule=\relax
   \let\stopmarginrule=\dostopmarginrule
   \beginofshapebox}

\def\complexstartmarginrule[#1]%
  {\bgroup
   \let\drawmarginrule=\relax
   \ifnum#1<\@@kaniveau\relax
     \let\stopmarginrule=\egroup
   \else
     \def\@@kadefaultwidth{#1}%
     \let\stopmarginrule=\dostopmarginrule
     \expandafter\beginofshapebox
   \fi}

\def\dostopmarginrule%
  {\endofshapebox
   \reshapebox
     {\hbox{\inlinkermarge{\dodrawmarginrule}\box\shapebox}}%
   \flushshapebox
   \egroup}

This comes from core-rul.tex and works with multiple paragraphs, and as
far as I can test does not generate the message when a \stop.. is
missing. 

This mechanism does not work well with e.g. opsommingen, ifonly because
tex does not offer hooks to unroll boxes etc etc savely (interfering
whatsits and so on).   

Hans

-----------------------------------------------------------------
                                          Hans Hagen | PRAGMA ADE
              Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
    tel: 038 477 53 69 | fax: 038 477 53 74 | mail: pragma@wxs.nl
-----------------------------------------------------------------


             reply	other threads:[~1998-10-09 13:09 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1998-10-09 13:09 Hans Hagen [this message]
  -- strict thread matches above, loose matches on Subject: below --
1998-10-09  7:39 Berend de Boer

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=361E0B03.72A0333C@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).