* Back to sidebars.
@ 2005-12-05 16:28 John R. Culleton
2005-12-05 19:57 ` John R. Culleton
0 siblings, 1 reply; 6+ messages in thread
From: John R. Culleton @ 2005-12-05 16:28 UTC (permalink / raw)
Some time back (maybe three years ago) Hans showed me a way to
create a sidebar, with optional background and hanging out half
way into the margin. Now I would like to encapsulate the commands
into a simple \start \stop sequence. But I don't know how to do
it.
Hans started off with some definitions:
\setupfloat
[intermezzo]
[leftmargindistance=-\outercombitotal,
rightmargindistance=-\outercombitotal,
default={outer,high}]
\setupcaption[intermezzo][location=none]
\defineframedtext
[myohmy]
[width=6cm,bodyfont=small,
frame=off,
backgroundcorner=round,
backgroundradius=16pt,background=screen,backgroundscreen=.7]
Then he called these two definitions with a sequence like:
(some text)
\placeintermezzo{}{\startmyohmy\input dawkins \relax\stopmyohmy}
(some text)
What I would like to do is boil down the last mentioned command
sequence into
\startsidebar
(some text)
\stopsidebar
But I am stumped by the task. If there were a \startintermezzo
and \stopintermezzo pairing then the task would be simpler.
John Culleton
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Back to sidebars.
2005-12-05 16:28 Back to sidebars John R. Culleton
@ 2005-12-05 19:57 ` John R. Culleton
2005-12-06 9:24 ` Taco Hoekwater
0 siblings, 1 reply; 6+ messages in thread
From: John R. Culleton @ 2005-12-05 19:57 UTC (permalink / raw)
On Monday 05 December 2005 11:28 am, John R. Culleton wrote:
> Some time back (maybe three years ago) Hans showed me a way to
> create a sidebar, with optional background and hanging out half
> way into the margin. Now I would like to encapsulate the commands
> into a simple \start \stop sequence. But I don't know how to do
> it.
>
> Hans started off with some definitions:
>
> \setupfloat
> [intermezzo]
> [leftmargindistance=-\outercombitotal,
> rightmargindistance=-\outercombitotal,
> default={outer,high}]
> \setupcaption[intermezzo][location=none]
>
> \defineframedtext
> [myohmy]
> [width=6cm,bodyfont=small,
> frame=off,
> backgroundcorner=round,
> backgroundradius=16pt,background=screen,backgroundscreen=.7]
>
>
> Then he called these two definitions with a sequence like:
> (some text)
> \placeintermezzo{}{\startmyohmy\input dawkins \relax\stopmyohmy}
> (some text)
>
> What I would like to do is boil down the last mentioned command
> sequence into
>
> \startsidebar
> (some text)
> \stopsidebar
>
> But I am stumped by the task. If there were a \startintermezzo
> and \stopintermezzo pairing then the task would be simpler.
>
> John Culleton
After writing the above I went back to my roots and came up with
this:
\long\def\sidebar#1{\placeintermezzo{}{\startmyohmy #1 \relax\stopmyohmy}}
...which seems to work. Can anyone find a hole in this method?
Thanks,
John C.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Back to sidebars.
2005-12-05 19:57 ` John R. Culleton
@ 2005-12-06 9:24 ` Taco Hoekwater
2005-12-06 17:40 ` Willi Egger
0 siblings, 1 reply; 6+ messages in thread
From: Taco Hoekwater @ 2005-12-06 9:24 UTC (permalink / raw)
Hi,
John R. Culleton wrote:
>
> \long\def\sidebar#1{\placeintermezzo{}{\startmyohmy #1 \relax\stopmyohmy}}
>
> ...which seems to work. Can anyone find a hole in this method?
Should be fine. If you like \start ... stop pairs, you can also do
it like this if you prefer:
\long\def\startJCsidebar#1\stopJCsidebar%
{\placeintermezzo{}{\startmyohmy #1 \relax\stopmyohmy}}
There already is a sidebar mechanism, so \startsidebar is 'taken'.
Cheers, Taco
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Back to sidebars.
2005-12-06 9:24 ` Taco Hoekwater
@ 2005-12-06 17:40 ` Willi Egger
2005-12-06 18:14 ` Taco Hoekwater
0 siblings, 1 reply; 6+ messages in thread
From: Willi Egger @ 2005-12-06 17:40 UTC (permalink / raw)
Hi,
since wich version is this command in the distro?
At least in my case with ConTeXt ver: 2005.11.16 fmt: 2005.11.17
there is not.
Willi
Taco Hoekwater wrote:
>
> Hi,
>
> John R. Culleton wrote:
>
>>
>> \long\def\sidebar#1{\placeintermezzo{}{\startmyohmy #1
>> \relax\stopmyohmy}}
>>
>> ...which seems to work. Can anyone find a hole in this method?
>
>
> Should be fine. If you like \start ... stop pairs, you can also do
> it like this if you prefer:
>
> \long\def\startJCsidebar#1\stopJCsidebar%
> {\placeintermezzo{}{\startmyohmy #1 \relax\stopmyohmy}}
>
> There already is a sidebar mechanism, so \startsidebar is 'taken'.
>
> Cheers, Taco
> _______________________________________________
> ntg-context mailing list
> ntg-context@ntg.nl
> http://www.ntg.nl/mailman/listinfo/ntg-context
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Back to sidebars.
2005-12-06 17:40 ` Willi Egger
@ 2005-12-06 18:14 ` Taco Hoekwater
2005-12-06 20:55 ` Willi Egger
0 siblings, 1 reply; 6+ messages in thread
From: Taco Hoekwater @ 2005-12-06 18:14 UTC (permalink / raw)
Willi Egger wrote:
> Hi,
>
> since wich version is this command in the distro?
> At least in my case with ConTeXt ver: 2005.11.16 fmt: 2005.11.17
> there is not.
It is defined in plus-rul.tex, activated by
\usemodule[plus]
I don't know whether it is documented or not, i found
it by grep-ping the context source files. (that is a
routine action for me: it helps prevent redefinitions)
Cheers, Taco
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Back to sidebars.
2005-12-06 18:14 ` Taco Hoekwater
@ 2005-12-06 20:55 ` Willi Egger
0 siblings, 0 replies; 6+ messages in thread
From: Willi Egger @ 2005-12-06 20:55 UTC (permalink / raw)
Aha! Thanks Taco!
Willi
Taco Hoekwater wrote:
> Willi Egger wrote:
>
>> Hi,
>>
>> since wich version is this command in the distro?
>> At least in my case with ConTeXt ver: 2005.11.16 fmt: 2005.11.17
>> there is not.
>
>
> It is defined in plus-rul.tex, activated by
>
> \usemodule[plus]
>
> I don't know whether it is documented or not, i found
> it by grep-ping the context source files. (that is a
> routine action for me: it helps prevent redefinitions)
>
> Cheers, Taco
>
> _______________________________________________
> ntg-context mailing list
> ntg-context@ntg.nl
> http://www.ntg.nl/mailman/listinfo/ntg-context
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2005-12-06 20:55 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-12-05 16:28 Back to sidebars John R. Culleton
2005-12-05 19:57 ` John R. Culleton
2005-12-06 9:24 ` Taco Hoekwater
2005-12-06 17:40 ` Willi Egger
2005-12-06 18:14 ` Taco Hoekwater
2005-12-06 20:55 ` Willi Egger
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).