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

Attachment: NassiTest.pdf
Description: Adobe PDF document

Attachment: Nassi.tex
Description: Binary data

___________________________________________________________________________________
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  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

Reply via email to