ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Aditya Mahajan <adityam@umich.edu>
Subject: Re: textrules
Date: Thu, 19 Oct 2006 19:32:34 -0400 (EDT)	[thread overview]
Message-ID: <Pine.WNT.4.63.0610191910560.2144@nqvgln> (raw)
In-Reply-To: <A50E655C-F703-4B95-9E93-B6FBD418DC75@uni-bonn.de>

On Thu, 19 Oct 2006, Thomas A. Schmitz wrote:

>
> On Oct 19, 2006, at 5:04 PM, Peter Rolf wrote:
>
>> Hi Thomas,
>>
>>
>>>
>> add
>>
>> \showskips
>>
>> to your source (better a small one). I just tested a bit (between my
>> current mp examples) and 'inbetween={\blank[2*big]}' and
>> 'after={\blank[2*big]}' should do the job. If you dare, ask Hans about
>> the meaning of 'before' ;)
>>
>>
>> Greetings, Peter
>>
>
> Thanks Peter,
>
> that was very helpful. I still had to tweak a bit, but by combining
> "inbetween" and "after," I got an acceptable result. So the mystery
> thickens: what is before? :-)


\textrule[top] does

before
----------- (rule)
inbetween

\textrule[bottom] does

inbetween
----------
after

\textrule with no argumet is equal to \textrule[bottom]

There is a \domiddletextrule that does

inbetween
------------
inbetween

but this is not interfaced with \textrule. It only becomes active 
inside a \starttextrule.

\starttextrule{whatever}
\input knuth
\textrule
\input knuth
\stoptextrule


To use this, you can define your own rule as

\def\midtextrule{\dosinglegroupempty\domiddletextrule}

\setuptextrules[inbetween={\blank[big]}]

And midtextrule will use inbetween on both side.

Hans, does it make sense to add this to core-rul?

\def\complextextrule[#1]%
   {\processaction
      [#1]
      [  \v!top=>\let\next\dotoptextrule,
         \v!bottom=>\let\next\dobottomtextrule,
         middle=>\let\next\domiddletextrule, %<------- Added
       \s!default=>\let\next\dobottomtextrule,
       \s!unknown=>\let\next\dobottomtextrule]%
    \dosinglegroupempty\next}


Aditya

  reply	other threads:[~2006-10-19 23:32 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-10-19 12:37 textrules Thomas A. Schmitz
2006-10-19 15:04 ` textrules Peter Rolf
2006-10-19 17:43   ` textrules Thomas A. Schmitz
2006-10-19 23:32     ` Aditya Mahajan [this message]
2006-10-20  7:40       ` textrules Hans Hagen
2006-10-21  8:47       ` textrules Thomas A. Schmitz

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=Pine.WNT.4.63.0610191910560.2144@nqvgln \
    --to=adityam@umich.edu \
    --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).