* section prefix=+
@ 2005-12-22 7:21 David Arnold
2005-12-22 7:25 ` section prefix=+ (oops) David Arnold
2005-12-22 10:31 ` Red framed text Jilani Khaldi
0 siblings, 2 replies; 12+ messages in thread
From: David Arnold @ 2005-12-22 7:21 UTC (permalink / raw)
Hans et al,
We'll have different teachers writing different sections of a multi-
chapter, multi-section document. The following use of prefix=+, as
far as I can see, will keep them from stumbling over each other's
references while they are working independently. I wonder how this
will work in the project-product-component structure?
% output=pdf
\environment bookenv
\setuphead[section]
[prefix=+]
\starttext
\startuseMPgraphic{david}
draw unitsquare scaled 2cm withpen pencircle scaled 5mm withcolor red;
\stopuseMPgraphic
\startbuffer[table]
\starttable[|c|c|]
\HL
\VL This \VL is \VL\FR
\VL a \VL table \VL\LR
\HL
\stoptable
\stopbuffer
\startbuffer[figure]
\startcombination[2*1]
{\useMPgraphic{david}}{First caption}
{\useMPgraphic{david}}{Second caption}
\stopcombination
\stopbuffer
\completecontent
\chapter[quadratic]{Quadratic Functions}
\input tufte
\section[parabola]{The Parabola}
\input tufte
\placefigure[][fig:1]
{This is the caption of the figure.}
{\getbuffer[figure]}
\input tufte
\placetable[][tab:1]
{A very simple example of a table.}
{\getbuffer[table]}
\input tufte
\placefigure[][fig:2]
{This is the caption of the figure.}
{\getbuffer[figure]}
\input tufte
In \in{Figure}[fig:1] on \at{page}[fig:1], we see \ldots.
\section[vertex]{Vertex Form}
\input tufte
\placefigure[][fig:1]
{This is the caption of the figure.}
{\getbuffer[figure]}
\input tufte
\placetable[][tab:1]
{A very simple example of a table.}
{\getbuffer[table]}
\input tufte
\placefigure[][fig:2]
{This is the caption of the figure.}
{\getbuffer[figure]}
\input tufte
In \in{Figure}[fig:1] on \at{page}[fig:1], we see \ldots.
\chapter[poly]{Polynomial Functions}
\input tufte
\section[end]{End Behavior}
\input tufte
\placefigure[][fig:1]
{This is the caption of the figure.}
{\getbuffer[figure]}
\input tufte
\placetable[][tab:1]
{A very simple example of a table.}
{\getbuffer[table]}
\input tufte
\placefigure[][fig:2]
{This is the caption of the figure.}
{\getbuffer[figure]}
\input tufte
In \in{Figure}[fig:1] on \at{page}[fig:1], we see \ldots.
\section[zeros]{Zeros}
\input tufte
\placefigure[][fig:1]
{This is the caption of the figure.}
{\getbuffer[figure]}
\input tufte
\placetable[][tab:1]
{A very simple example of a table.}
{\getbuffer[table]}
\input tufte
\placefigure[][fig:2]
{This is the caption of the figure.}
{\getbuffer[figure]}
\input tufte
In \in{Figure}[parabola:fig:1] on \at{page}[parabola:fig:1], we see
\ldots.
\stoptext
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: section prefix=+ (oops)
2005-12-22 7:21 section prefix=+ David Arnold
@ 2005-12-22 7:25 ` David Arnold
2005-12-22 10:31 ` Red framed text Jilani Khaldi
1 sibling, 0 replies; 12+ messages in thread
From: David Arnold @ 2005-12-22 7:25 UTC (permalink / raw)
Oops. Sorry. You should omit that \environment bookenv.
On Dec 21, 2005, at 11:21 PM, David Arnold wrote:
> Hans et al,
>
> We'll have different teachers writing different sections of a multi-
> chapter, multi-section document. The following use of prefix=+, as
> far as I can see, will keep them from stumbling over each other's
> references while they are working independently. I wonder how this
> will work in the project-product-component structure?
>
> % output=pdf
>
>
> \environment bookenv
>
> \setuphead[section]
> [prefix=+]
>
> \starttext
>
> \startuseMPgraphic{david}
> draw unitsquare scaled 2cm withpen pencircle scaled 5mm withcolor red;
> \stopuseMPgraphic
>
> \startbuffer[table]
> \starttable[|c|c|]
> \HL
> \VL This \VL is \VL\FR
> \VL a \VL table \VL\LR
> \HL
> \stoptable
> \stopbuffer
>
> \startbuffer[figure]
> \startcombination[2*1]
> {\useMPgraphic{david}}{First caption}
> {\useMPgraphic{david}}{Second caption}
> \stopcombination
> \stopbuffer
>
> \completecontent
>
> \chapter[quadratic]{Quadratic Functions}
>
> \input tufte
>
> \section[parabola]{The Parabola}
>
> \input tufte
>
> \placefigure[][fig:1]
> {This is the caption of the figure.}
> {\getbuffer[figure]}
>
> \input tufte
>
> \placetable[][tab:1]
> {A very simple example of a table.}
> {\getbuffer[table]}
>
> \input tufte
>
> \placefigure[][fig:2]
> {This is the caption of the figure.}
> {\getbuffer[figure]}
>
> \input tufte
>
> In \in{Figure}[fig:1] on \at{page}[fig:1], we see \ldots.
>
> \section[vertex]{Vertex Form}
>
> \input tufte
>
> \placefigure[][fig:1]
> {This is the caption of the figure.}
> {\getbuffer[figure]}
>
> \input tufte
>
> \placetable[][tab:1]
> {A very simple example of a table.}
> {\getbuffer[table]}
>
> \input tufte
>
> \placefigure[][fig:2]
> {This is the caption of the figure.}
> {\getbuffer[figure]}
>
> \input tufte
>
> In \in{Figure}[fig:1] on \at{page}[fig:1], we see \ldots.
>
> \chapter[poly]{Polynomial Functions}
>
> \input tufte
>
> \section[end]{End Behavior}
>
> \input tufte
>
> \placefigure[][fig:1]
> {This is the caption of the figure.}
> {\getbuffer[figure]}
>
> \input tufte
>
> \placetable[][tab:1]
> {A very simple example of a table.}
> {\getbuffer[table]}
>
> \input tufte
>
> \placefigure[][fig:2]
> {This is the caption of the figure.}
> {\getbuffer[figure]}
>
> \input tufte
>
> In \in{Figure}[fig:1] on \at{page}[fig:1], we see \ldots.
>
>
> \section[zeros]{Zeros}
>
> \input tufte
>
> \placefigure[][fig:1]
> {This is the caption of the figure.}
> {\getbuffer[figure]}
>
> \input tufte
>
> \placetable[][tab:1]
> {A very simple example of a table.}
> {\getbuffer[table]}
>
> \input tufte
>
> \placefigure[][fig:2]
> {This is the caption of the figure.}
> {\getbuffer[figure]}
>
> \input tufte
>
> In \in{Figure}[parabola:fig:1] on \at{page}[parabola:fig:1], we see
> \ldots.
>
> \stoptext
> _______________________________________________
> ntg-context mailing list
> ntg-context@ntg.nl
> http://www.ntg.nl/mailman/listinfo/ntg-context
^ permalink raw reply [flat|nested] 12+ messages in thread
* Red framed text
2005-12-22 7:21 section prefix=+ David Arnold
2005-12-22 7:25 ` section prefix=+ (oops) David Arnold
@ 2005-12-22 10:31 ` Jilani Khaldi
2005-12-22 10:42 ` Taco Hoekwater
1 sibling, 1 reply; 12+ messages in thread
From: Jilani Khaldi @ 2005-12-22 10:31 UTC (permalink / raw)
Hi All,
1) I looks correct but I can't get the word "Attention!" written in red
color inside a red frame.
\setupframedtexts[bodyfont=small,framecolor=red]
\startframedtext[width=.8\makeupwidth]
\color[red]{\bf Attention!}\blank
bla bla bla...
\stopframedtext
What am I missing? And what about a shaded frame?
Thanks!
jk
--
Jilani KHALDI
http://jkhaldi.oltrelinux.com
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: Red framed text
2005-12-22 10:31 ` Red framed text Jilani Khaldi
@ 2005-12-22 10:42 ` Taco Hoekwater
2005-12-22 17:07 ` Jilani Khaldi
0 siblings, 1 reply; 12+ messages in thread
From: Taco Hoekwater @ 2005-12-22 10:42 UTC (permalink / raw)
Jilani Khaldi wrote:
> What am I missing?
Missing \setupcolors[state=start] maybe? (works for me)
> And what about a shaded frame?
You mean like a dropshadow or so?
Cheers,
Taco
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: Red framed text
2005-12-22 10:42 ` Taco Hoekwater
@ 2005-12-22 17:07 ` Jilani Khaldi
2005-12-22 21:15 ` Hans Hagen
0 siblings, 1 reply; 12+ messages in thread
From: Jilani Khaldi @ 2005-12-22 17:07 UTC (permalink / raw)
> Missing \setupcolors[state=start] maybe? (works for me)
Yes it is.
>
>> And what about a shaded frame?
>
>
> You mean like a dropshadow or so?
Something like " \shadowbox{..}" using LaTeX package "fancybox"
I just want to translate the simple macro I wrote time ago from LaTeX to
ConTeXt:
\newcommand{\attenzione}[1]
{
\begin{center}
\(
\shadowbox{
\begin{minipage}{0.8\textwidth}
\color{red}\underline{\textbf{Attenzione}}\\
\color{black}
#1
\end{minipage}
}
\)
\end{center}
}
jk
--
Jilani KHALDI
http://jkhaldi.oltrelinux.com
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: Red framed text
2005-12-22 17:07 ` Jilani Khaldi
@ 2005-12-22 21:15 ` Hans Hagen
2005-12-22 22:36 ` Jilani Khaldi
2005-12-22 23:22 ` David Arnold
0 siblings, 2 replies; 12+ messages in thread
From: Hans Hagen @ 2005-12-22 21:15 UTC (permalink / raw)
Jilani Khaldi wrote:
>
>> Missing \setupcolors[state=start] maybe? (works for me)
>
>
> Yes it is.
>
>>
>>> And what about a shaded frame?
>>
>>
>>
>> You mean like a dropshadow or so?
>
>
> Something like " \shadowbox{..}" using LaTeX package "fancybox"
> I just want to translate the simple macro I wrote time ago from LaTeX
> to ConTeXt:
> \newcommand{\attenzione}[1]
> {
> \begin{center}
> \(
> \shadowbox{
> \begin{minipage}{0.8\textwidth}
> \color{red}\underline{\textbf{Attenzione}}\\
> \color{black}
> #1
> \end{minipage}
> }
> \)
> \end{center}
> }
>
> jk
>
\setupcolors[state=start]
\startuniqueMPgraphic{shadow}
fill OverlayBox shifted (3pt,-3pt) withcolor .8white ;
fill OverlayBox withcolor white ;
draw OverlayBox withcolor red ;
setbounds currentpicture to OverlayBox ;
\stopuniqueMPgraphic
\defineoverlay[shadow][\uniqueMPgraphic{shadow}]
\framed
[align=middle,background=shadow,frame=off]
{\input tufte \relax}
\blank
\framed
[align=middle,background=shadow,frame=off]
{\input zapf \relax}
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: Red framed text
2005-12-22 21:15 ` Hans Hagen
@ 2005-12-22 22:36 ` Jilani Khaldi
2005-12-23 7:59 ` Jilani Khaldi
2005-12-22 23:22 ` David Arnold
1 sibling, 1 reply; 12+ messages in thread
From: Jilani Khaldi @ 2005-12-22 22:36 UTC (permalink / raw)
> \setupcolors[state=start]
>
> \startuniqueMPgraphic{shadow}
> fill OverlayBox shifted (3pt,-3pt) withcolor .8white ;
> fill OverlayBox withcolor white ;
> draw OverlayBox withcolor red ;
> setbounds currentpicture to OverlayBox ;
> \stopuniqueMPgraphic
>
> \defineoverlay[shadow][\uniqueMPgraphic{shadow}]
>
> \framed
> [align=middle,background=shadow,frame=off]
> {\input tufte \relax}
>
> \blank
>
> \framed
> [align=middle,background=shadow,frame=off]
> {\input zapf \relax}
>
Very nice! Thank you.
jk
--
Jilani KHALDI
http://jkhaldi.oltrelinux.com
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: Red framed text
2005-12-22 21:15 ` Hans Hagen
2005-12-22 22:36 ` Jilani Khaldi
@ 2005-12-22 23:22 ` David Arnold
2005-12-23 9:28 ` Hans Hagen
1 sibling, 1 reply; 12+ messages in thread
From: David Arnold @ 2005-12-22 23:22 UTC (permalink / raw)
Very cool. First time I ever could figure out what \relax does. When
I deleted it from this source, I got:
! I can't find file `zapf}'.
l.25 {\input zapf}
Please type another input file name:
Good learning experience for me. I've seen and ignored this type of
error message before, looking elsewhere in the code. A very good
heads up for me.
Now is there anyway I can visualize the importance of the line
setbounds currentpicture to OverlayBox ;
in this example? I deleted it and recompiled but didn't see much
difference. What is the import of this line?
On Dec 22, 2005, at 1:15 PM, Hans Hagen wrote:
> Jilani Khaldi wrote:
>
>>
>>> Missing \setupcolors[state=start] maybe? (works for me)
>>
>>
>> Yes it is.
>>
>>>
>>>> And what about a shaded frame?
>>>
>>>
>>>
>>> You mean like a dropshadow or so?
>>
>>
>> Something like " \shadowbox{..}" using LaTeX package "fancybox"
>> I just want to translate the simple macro I wrote time ago from
>> LaTeX to ConTeXt:
>> \newcommand{\attenzione}[1]
>> {
>> \begin{center}
>> \(
>> \shadowbox{
>> \begin{minipage}{0.8\textwidth}
>> \color{red}\underline{\textbf{Attenzione}}\\
>> \color{black}
>> #1
>> \end{minipage}
>> }
>> \)
>> \end{center}
>> }
>>
>> jk
>>
> \setupcolors[state=start]
>
> \startuniqueMPgraphic{shadow}
> fill OverlayBox shifted (3pt,-3pt) withcolor .8white ;
> fill OverlayBox withcolor white ;
> draw OverlayBox withcolor red ;
> setbounds currentpicture to OverlayBox ;
> \stopuniqueMPgraphic
>
> \defineoverlay[shadow][\uniqueMPgraphic{shadow}]
>
> \framed
> [align=middle,background=shadow,frame=off]
> {\input tufte \relax}
>
> \blank
>
> \framed
> [align=middle,background=shadow,frame=off]
> {\input zapf \relax}
>
> _______________________________________________
> ntg-context mailing list
> ntg-context@ntg.nl
> http://www.ntg.nl/mailman/listinfo/ntg-context
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: Red framed text
2005-12-22 22:36 ` Jilani Khaldi
@ 2005-12-23 7:59 ` Jilani Khaldi
2005-12-23 8:25 ` Peter Münster
0 siblings, 1 reply; 12+ messages in thread
From: Jilani Khaldi @ 2005-12-23 7:59 UTC (permalink / raw)
>> \setupcolors[state=start]
>>
>> \startuniqueMPgraphic{shadow}
>> fill OverlayBox shifted (3pt,-3pt) withcolor .8white ;
>> fill OverlayBox withcolor white ;
>> draw OverlayBox withcolor red ;
>> setbounds currentpicture to OverlayBox ;
>> \stopuniqueMPgraphic
>>
>> \defineoverlay[shadow][\uniqueMPgraphic{shadow}]
>>
>> \framed
>> [align=middle,background=shadow,frame=off]
>> {\input tufte \relax}
>>
>> \blank
>>
>> \framed
>> [align=middle,background=shadow,frame=off]
>> {\input zapf \relax}
>>
> Very nice! Thank you.
But is there a simple way to get the text left justified with a centered
title "Attention!"?
jk
--
Jilani KHALDI
http://jkhaldi.oltrelinux.com
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: Red framed text
2005-12-23 7:59 ` Jilani Khaldi
@ 2005-12-23 8:25 ` Peter Münster
0 siblings, 0 replies; 12+ messages in thread
From: Peter Münster @ 2005-12-23 8:25 UTC (permalink / raw)
On Fri, 23 Dec 2005, Jilani Khaldi wrote:
> >> \framed
> >> [align=middle,background=shadow,frame=off]
> >> {\input zapf \relax}
> >>
> > Very nice! Thank you.
>
> But is there a simple way to get the text left justified with a centered
> title "Attention!"?
\framed
[align=flushleft,background=shadow,frame=off]
{\midaligned{Attention!}\par
\input zapf \relax}
Cheers, Peter
--
http://pmrb.free.fr/contact/
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: Red framed text
2005-12-22 23:22 ` David Arnold
@ 2005-12-23 9:28 ` Hans Hagen
2005-12-23 17:44 ` setbounds question David Arnold
0 siblings, 1 reply; 12+ messages in thread
From: Hans Hagen @ 2005-12-23 9:28 UTC (permalink / raw)
David Arnold wrote:
> Very cool. First time I ever could figure out what \relax does. When
> I deleted it from this source, I got:
>
> ! I can't find file `zapf}'.
> l.25 {\input zapf}
>
> Please type another input file name:
>
> Good learning experience for me. I've seen and ignored this type of
> error message before, looking elsewhere in the code. A very good
> heads up for me.
>
> Now is there anyway I can visualize the importance of the line
>
> setbounds currentpicture to OverlayBox ;
>
> in this example? I deleted it and recompiled but didn't see much
> difference. What is the import of this line?
take a bigger pen ... since the background is bigger than the overlaybox
it will get centered in the background which si not what you want,
therefore the bounding
Hans
^ permalink raw reply [flat|nested] 12+ messages in thread
* setbounds question
2005-12-23 9:28 ` Hans Hagen
@ 2005-12-23 17:44 ` David Arnold
0 siblings, 0 replies; 12+ messages in thread
From: David Arnold @ 2005-12-23 17:44 UTC (permalink / raw)
Ah,
Not a bigger pen, but a bigger background shows the difference.
% output=pdf
\setupcolors[state=start]
\startuniqueMPgraphic{shadow}
fill OverlayBox shifted (20pt,-20pt) withcolor .8white ;
fill OverlayBox withcolor white ;
draw OverlayBox withcolor red ;
setbounds currentpicture to OverlayBox ;
\stopuniqueMPgraphic
\defineoverlay[shadow][\uniqueMPgraphic{shadow}]
\startuniqueMPgraphic{shadow2}
fill OverlayBox shifted (20pt,-20pt) withcolor .8white ;
fill OverlayBox withcolor white ;
draw OverlayBox withcolor red ;
% setbounds currentpicture to OverlayBox ;
\stopuniqueMPgraphic
\defineoverlay[shadow2][\uniqueMPgraphic{shadow2}]
\starttext
\framed
[align=middle,background=shadow,frame=off]
{\input tufte\relax}
\blank[5*big]
\framed
[align=middle,background=shadow2,frame=off]
{\input tufte\relax}
\stoptext
On Dec 23, 2005, at 1:28 AM, Hans Hagen wrote:
> David Arnold wrote:
>
>> Very cool. First time I ever could figure out what \relax does.
>> When I deleted it from this source, I got:
>>
>> ! I can't find file `zapf}'.
>> l.25 {\input zapf}
>>
>> Please type another input file name:
>>
>> Good learning experience for me. I've seen and ignored this type
>> of error message before, looking elsewhere in the code. A very
>> good heads up for me.
>>
>> Now is there anyway I can visualize the importance of the line
>>
>> setbounds currentpicture to OverlayBox ;
>>
>> in this example? I deleted it and recompiled but didn't see much
>> difference. What is the import of this line?
>
> take a bigger pen ... since the background is bigger than the
> overlaybox it will get centered in the background which si not what
> you want, therefore the bounding
>
> Hans
> _______________________________________________
> ntg-context mailing list
> ntg-context@ntg.nl
> http://www.ntg.nl/mailman/listinfo/ntg-context
^ permalink raw reply [flat|nested] 12+ messages in thread
end of thread, other threads:[~2005-12-23 17:44 UTC | newest]
Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-12-22 7:21 section prefix=+ David Arnold
2005-12-22 7:25 ` section prefix=+ (oops) David Arnold
2005-12-22 10:31 ` Red framed text Jilani Khaldi
2005-12-22 10:42 ` Taco Hoekwater
2005-12-22 17:07 ` Jilani Khaldi
2005-12-22 21:15 ` Hans Hagen
2005-12-22 22:36 ` Jilani Khaldi
2005-12-23 7:59 ` Jilani Khaldi
2005-12-23 8:25 ` Peter Münster
2005-12-22 23:22 ` David Arnold
2005-12-23 9:28 ` Hans Hagen
2005-12-23 17:44 ` setbounds question David Arnold
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).