[NTG-context] framed and align=no

Hans Hagen pragma at wxs.nl
Tue Jul 4 17:24:59 CEST 2006


Hans van der Meer wrote:
> On Jun 29, 2006, at 17:16, Hans van der Meer wrote:
>
>   
>> On Jun 29, 2006, at 13:53, Hans Hagen wrote:
>>
>>     
>>>> Thanks. I installed it and it works. Witness the examples below.
>>>> Will this be installed in next ConTeXt versions? I would be  
>>>> grateful.
>>>> One question of naming:
>>>> 	I think "none" is a better descriptive name then "disable"
>>>>
>>>>         
>>> other keywords are already taken
>>>       
>> A pity, but I think one could live with that.
>>  From your reply I infer that the next ConTeXt release will contain
>> this option.
>> If not expressis verbis denied, I will count on it.
>>     
>
> I am afraid I was too optimistic here.
>
> 1. the keyword "disable" seems already been taken in relation to  
> \blanksdisabletrue in core-spa.tex. I changed it to the unused   
> "disabled" in order to experiment without interference.
>   
blank has its own namespace, so there cannot be interference

> 2. the solution given by Taco was:
> % added (Taco Hoekwater 2006-06-28)
> \def\v!disabled{disabled}
> \setvalue{\@@ragged@@command\v!disabled}%
> {\appendtoks \raggedright \parfillskip\zeropoint
> 	 \to\everyraggedcommand}
> There must be another interference here, because surprisingly this  
> silently changes the default alignment in vertical sense to "high".  
> The code below shows it in the leftmost box, that I added to the  
> previous examples that Hans Hagen has sent back.
>   
it depends ... align={disable,high}  (or whatever combination wanted)

> 3. Alignment in these examples is not correct. I add some \hfil's to  
> show that. In the combination {disable,lohi} somehow the horizontal  
> alignment change from the disable is killed by the lohi. The order  
> {lohi,disabled} or {disabled,lohi} has no effect. I looked into cor- 
> spa.tex but could not figure out how setting top and bottom vglue  
> could re-enable the old parfillskip value. I did add the parfillskip= 
> \zeropoint code to lohi/high/low but could not get a good result.
>   

> Do you mind looking further into this? It would be much nicer if  
> horizontal and vertical alignment could behave orthogonal to each  
> other, instead of having some seemingly complex interdepency.
>
> \hbox{%
> \vbox{\vskip5mm\framed 
> [frame=on,strut=no,align=disabled,width=1cm,height=2cm,offset=0pt]%
> {\framed[frame=on,strut=no,offset=0pt]{lp}}\vskip5mm}%
> \vbox{\vskip5mm\framed[frame=on,strut=no,align= 
> {disable,high},width=1cm,height=2cm,offset=0pt]%
> {\framed[frame=on,strut=no,offset=0pt]{l}\hfil}\vskip5mm}%
> \vbox{\vskip5mm\framed[frame=on,strut=no,align= 
> {disable,low},width=1cm,height=2cm,offset=0pt]%
> {\hfil\framed[frame=on,strut=no,offset=0pt]{c}\hfil}\vskip5mm}%
> \vbox{\vskip5mm\framed[frame=on,strut=no,align= 
> {disable,lohi},width=1cm,height=2cm,offset=0pt]%
> {\hfil\framed[frame=on,strut=no,offset=0pt]{r}}\vskip5mm}%
> }
>   
according to taco (sitting next to me): tex removes the last hfil before 
applying parfilskip

you need to keep in mind that begin/end paragraph handling is also 
influenced by hard coded tex behaviour

if we start messing around with tricks to bypass that we end up in a mess

this is one reason for using struts (adding kern 0 pt may also help: ... 
\hfil \kern0pt




Hans 


More information about the ntg-context mailing list