[NTG-context] Help understanding framed!

2013-05-20 Thread Keith J. Schultz
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



NassiTest.pdf
Description: Adobe PDF document


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
___

Re: [NTG-context] Help understanding framed!

2013-05-20 Thread Wolfgang Schuster

Am 20.05.2013 um 21:28 schrieb Keith J. Schultz keithjschu...@web.de:

 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. 

I suggest to read chapter 8 in Einführung in TeX [1], a german book about plain 
TeX
because basic knowledge about boxes can help a lot in your case.

[1] http://www.ruhr-uni-bochum.de/www-rz/schwanbs/TeX/

Wolfgang
___
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
___


Re: [NTG-context] Help understanding framed!

2013-05-20 Thread Keith J. Schultz
Hi Wolfgang,

Thanx for the pointer I have downloaded.

As I do not no how framed is actually implemented, I am not sure it will help 
much.

One of the reason I used LaTeX, then XeLaTeX, then LuaLaTeX, and now ConTeXt is
because I do not grock TeX. 

I realized by misusing the framed environment and metafun I could achieve 
what I need
without a lot of calculations. I already have a similar module for LuaLaTeX 
using TikZ, but
I can get more milage levagering framed.  

Right, now I working out the visual representation and will develop and 
interface so that 
that the user does not need to worry about finer parts of the context syntax.

regards
Keith.


Am 20.05.2013 um 22:01 schrieb Wolfgang Schuster schuster.wolfg...@gmail.com:

 
 Am 20.05.2013 um 21:28 schrieb Keith J. Schultz keithjschu...@web.de:
 
 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. 
 
 I suggest to read chapter 8 in Einführung in TeX [1], a german book about 
 plain TeX
 because basic knowledge about boxes can help a lot in your case.
 
 [1] http://www.ruhr-uni-bochum.de/www-rz/schwanbs/TeX/
 

___
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
___