[NTG-context] Help understanding framed!

Keith J. Schultz keithjschultz at web.de
Mon May 20 21:28:00 CEST 2013


Hi Everybody,

I am trying to develop a module for writing Nassi-Schneidermann-Diagrams.

I thought I would use framed and metafun. But, I have run into, for me at least,
strange behaviour. I have given MWE and attach the result and a second file which is required.

What I do not understand is why the first line after \MyBoxit is "indented" (see source and result below).

The second is why when I nest \MyBoxit do I get extra vertical space?

Yes, I have found a work around, as I was preparing this mail. Notice, the use of location!
What I would want is to leave "location=top" in the setup. 

Thanx for any help.

regards
	Keith.

MWE:
\useMPlibrary [txt]

\input {Nassi.tex}

\defineframed[MyBoxit][framed]
\setupframed[MyBoxit]
[%background=Statement,%
 frame=none,%
 width=10cm,%
 align=right,%
 location=top,%
 framecolor=yellow,%
 rulethickness=2pt,%
 %backgroundcolor=white,%
 strut=no,%
 heigth=fit,%
 offset=0pt,
 frameoffset=0pt,
 depth=0pt,
 top=,
 backgroundoffset=0pt%
]
      
\defineoverlay[MyBoxit][MyBoxit]

\starttext

Here is the First Problem\par
\MyBoxit[width=10cm]
{
\Statement{First Statement}
\Statement{Second Statement}
}

\crlf
With a \% after the opening brace no problem! \par
\MyBoxit[width=10cm]
{%
\Statement{First Statement}
\Statement{Second Statement}
}
\crlf

Second problem:\par
How do I avoid added space!\par

\MyBoxit[width=10cm]
{%
\IfStatement{$\frac{(x < y)}{z} \gt gh$ OR $x \neq z$ AND \| \\ $z ≥ 2$ AND $z  2$}
\MyBoxit[width=10cm]{%
\MyBoxit[width=5cm]{%
\Statement{First Left}
\Statement{Second Left}
}%
\MyBoxit[width=5cm]{%
\Statement{On the right want to be moved up} 
}
}
\Statement{Third}
}
\crlf
Should look like this\par
\MyBoxit[width=10cm]
{%
\IfStatement{$\frac{(x < y)}{z} \gt gh$ OR $x \neq z$ AND \| \\ $z ≥ 2$ AND $z  2$}
\MyBoxit[width=10cm, location=]{%
\MyBoxit[width=5cm, location=top]{%
\Statement{First Left}
\Statement{Second Left}
}%
\MyBoxit[width=5cm, location=top]{%
\Statement{On the right want to be moved up} 
}
}
\Statement{Third}
}

\stoptext

-------------- next part --------------
A non-text attachment was scrubbed...
Name: NassiTest.pdf
Type: application/pdf
Size: 15660 bytes
Desc: not available
URL: <http://www.ntg.nl/pipermail/ntg-context/attachments/20130520/277f3275/attachment-0001.pdf>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Nassi.tex
Type: application/octet-stream
Size: 1311 bytes
Desc: not available
URL: <http://www.ntg.nl/pipermail/ntg-context/attachments/20130520/277f3275/attachment-0001.obj>


More information about the ntg-context mailing list