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
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
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
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
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}
\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
\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
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/
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
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
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
participants (5)
-
David Arnold
-
Hans Hagen
-
Jilani Khaldi
-
Peter Münster
-
Taco Hoekwater