Hello Everybody,

Hans reacted on the question of how to move a framed text 
relative to another framed text by: "search for 'layers' on the wiki; 
they provide precise positioning" 
Looking to the wiki site, I read at the first sentence:
"Layers are ConTeXt's mechanism for absolute positioning of elements"
But I don't want absolute postitioning, and I don't want a background 
which is repeated every page. Here an example I tried but it is not 
what I want. ( Don't look to the way how it is programmed 
and I mean the \startdefinition \stopdefinition. I want to do that 
on another nice way, but no idea how. Trying out this example 
gives a dummy file before the word "Definition", I want to put 
on that place certain figures. That is no problem.)

### Begin Example:

% otherwise you get greyscale

\setupcolors[state=start]

\setupcolor[rgb] % Default

% default

%\setupbodyfont[10pt]

\setupbodyfont[lucida,10pt] % works!

% pagenumbering

\setuppagenumbering[location={header,right}, style=bold]

% set inter-paragraph spacing

\setupwhitespace[medium]

% printed on A4 paper

\setuppapersize[A4][A4] 

% the layout ( 1 inch =2.54 centimeter)

\setuplayout[backspace=25mm,

width=170mm,

topspace=10mm,

top=0mm,

header=20mm,

footer=10mm,

height=270mm,

leftmargin=10mm,

rightmargin=10mm,

leftedge=0mm,

rightedge=0mm]

% uncomment the next line to see the layout

%\showframe

% make hyperlinks active

\setupinteraction[state=start, color=orange]

% use module newmat

\usemodule[newmat]

%\usemodule[amsl]

% \usemodule[nath] not use this module, otherwise amsl doesn't work
anymore.

% define colors

\definecolor[LightBlue][r=.5,g=.5,b=1.0]

\definecolor[LightYellow][r=.8,g=.8,b=.6]

\definecolor[LightRed][r=1.0,g=.4,b=.4]

\definecolor[indexgray][s=0.925]

\definecolor[indexred][r=0.9]

\definecolor[indexyellow][y=0.9]

\definecolor[secorange][r=1.0,g=0.8,b=0.6]

\definecolor[subsecorange][r=0.9,g=0.8,b=0.6]

\definecolor[examgreen][g=0.6]

\definecolor[agvgreen][r=.8,g=1.0,b=.8]

\definecolor[agvblue][r=.8,g=1.0,b=1.0]

\definecolor[agvmauve][r=.6862,g=.2392,b=.8]

\definecolor[agvbrown][r=.8,g=.4078,b=.2392]

% define other things

\setuplabeltext[en][chapter=Chapter\,]

\setuplabeltext[en][section=Section\,]

% Enumeration

\defineenumeration[definition][text=Definition]

\setupenumerations[definition][location=serried,width=broad,headstyle=italic,

inbetween=\blank, before=\blank, after=\blank, way=bysection]

% Tryout logotext

% #1: Definition,Lemma,Section, #2: reference, #3: title

\define[4]\logotext{%

\doif{#1}{Definition}{% 

\startmyframe

\framed[corner=00,

background=color,

backgroundcolor=agvgreen,

foreground=color,

foregroundcolor=black,

offset=0.5ex,

rulethickness=2pt,

framecolor=agvbrown]{\,\externalfigure[Figures/#4.pdf][width=12pt]\,
\startdefinition[#2] \stopdefinition}{#3}

\stopmyframe}

\doif{#1}{Lemma}{%

\framed[corner=00,

background=color,

backgroundcolor=agvblue,

foreground=color,

foregroundcolor=black,

rulethickness=2pt,

framecolor=agvmauve]{#3}}

\doif{#1}{Section}{%

\framed[corner=00,

background=color,

backgroundcolor=agvgreen,

foreground=color,

foregroundcolor=black,

foregroundstyle=normal,

offset=0.75ex,

rulethickness=1pt,

framecolor=agvbrown]{\section[#2]{#3}}}}

\defineframedtext

[myframe]

[width=\textwidth,

offset=1.0ex,

background=color,

backgroundcolor=agvblue,

foregroundstyle=normal,

before={\blank[medium]},

after={\blank[medium]},

corner=00,

rulethickness=1pt,

framecolor=agvmauve]

\starttext

\section{Puh}

\logotext{Definition}{DefAap}{

The numbers $\{x^{i}\}$ are called the 

\underbar{contravariant components}\index{contravariant components} of
the vector 

$\text{\bf x}$ with respect tot the basis $\{\text{\bf e}_{i}\}$.}{}

\logotext{Definition}{DefAap-1}{

The numbers $\{x^{i}\}$ are called the 

\underbar{contravariant components}\index{contravariant components} of
the vector 

$\text{\bf x}$ with respect tot the basis $\{\text{\bf e}_{i}\}$.}{}

% Show next sample

\logotext{Definition}{DefAap-2}{

Let $\Omega$ be an open subset of $\Bbb{R}^{n}$. A system of $n$
real-valued functions 

$\{ f^{i}(X)\}$, defined on $\Omega$, is called a
(curvilinear)\index{curvilinear} 

\underbar{coordinate system}\index{coordinate system} for $\Omega$, if
the 

following conditions are satisfied:

\startitemize[1,packed,broad]

\item The map $\text{\bf f}\,=\,(f^{1},\cdots,f^{n})^{T}$ of $\Omega$ to
$\Bbb{R}^{n}$ 

is injective. The following notations is used $u^{i}\,=
\,f^{i}(x^{i}E_{i})$. Notice that 

the functions $f^{i}$ are functions of the variables $x^{i}$.

\item The set $U\,=\,f(\Omega)$ is an open subset of $\Bbb{R}^{n}$.

\item The map $\text{\bf f}$ is differentiable at every point $X\in
\Omega$ and there holds also

that $\text{det}\startmatrix[left={\left[\,},right={\,\right]}] 

\NC {\displaystyle \frac{\partial f^{i}}{\partial x^{j}}}(X)\NR
\stopmatrix \neq 0$

for every $X\in\Omega$.

\stopitemize}{}

%\QED}{}

\stoptext

### End Example.

Question is now: How to move the frames, with the text "Definition",
Not only inside the frame, where they are positioned but also 
just like the "zapf-examples" of MetaFun, to the boundary of that other 
frame, or may be completely outside that frame? Just like the idea of a
table. I'm interested in a solution,


best regards,

Rene' van Hassel




___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

Reply via email to