From: Hans Hagen <pragma@wxs.nl>
Subject: Re: How to do this in ConTeXt
Date: Wed, 04 Jan 2006 22:48:40 +0100 [thread overview]
Message-ID: <43BC42B8.5020408@wxs.nl> (raw)
In-Reply-To: <43BC3564.1090202@uqam.ca>
FabriceL. wrote:
> Hi,
>
> Hans, it's so instructive to read yout post... I have learned from
> this last post 2 new commands !
> However, I think the original poster wish a line who run to the right
> margin, so I added to your code
> in the "defineenumeration" a "inbetween=\vskip-4pt{\hrule height
> 1.5pt}\blank". This is not very elegant,
> but this works. By the way, I'm interested to know if there is a
> better solution.
>
> > Hans wrote:
> > one of you has to wikify this answer ...
>
> I'm not sure how to do this, but I can try how this works.
> The complete code follows.
> FL.
>
> \setupcolors[state=start]
> \setupbackgrounds[text][text][background=color,backgroundcolor=darkred,backgroundoffset=3pt]
>
>
> \defineenumeration
> [example]
> [way=bychapter,
> separator=\compoundhyphen,
> chapternumber=yes,
> color=white,
> command=\exampleframed,
> inbetween=\vskip-4pt{\hrule height 1.5pt}\blank]
if you say \showstruts you will notice why you need to skip back; your
4pt is a gamble, best do something:
\defineenumeration
[example]
[way=bychapter,
separator=\compoundhyphen,
chapternumber=yes,
color=white,
command=\exampleframed,
inbetween=\setups{example:inbetween}]
\startsetups example:inbetween
\removedepth % nils strut depth
\nointerlineskip
\blackrule[height=1.5pt,width=\hsize,depth=0pt]
\blank
\nobreak
\stopsetups
btw, this makes a nice example for a regression test
> \defineframed
> [exampleframed]
> [background=color,
> backgroundcolor=black,
> foregroundcolor=white,
> style=bold,
> frame=off]
>
> \starttext
>
> \chapter{One}
>
> \input tufte
>
> \startexample
> \input tufte
> \stopexample
>
> \input tufte
>
> \stoptext
>
> _______________________________________________
> ntg-context mailing list
> ntg-context@ntg.nl
> http://www.ntg.nl/mailman/listinfo/ntg-context
next prev parent reply other threads:[~2006-01-04 21:48 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <B3C24EA955FF0C4EA14658997CD3E25E5AE657@CAHIER.gst.uqam.ca>
[not found] ` <43BC 16BF.9030502@uqam.ca>
2006-01-04 18:41 ` Fabrice Larribe
2006-01-04 19:42 ` Hans Hagen
[not found] ` <B3C24EA955FF0C4EA14658997CD3E25E5AE664@CAHIER.gst.uqam.ca>
2006-01-04 20:51 ` FabriceL.
2006-01-04 21:48 ` Hans Hagen [this message]
2006-01-05 10:33 ` R S Ananda Murthy
2006-01-04 18:20 R S Ananda Murthy
-- strict thread matches above, loose matches on Subject: below --
2006-01-04 16:52 R S Ananda Murthy
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=43BC42B8.5020408@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).