Re: [NTG-context] MkIV problem+fix with \framed[location=depth / height / hanging]
On 5/14/2013 11:00 PM, Sietse Brouwer wrote: --- This is the fixed code \installframedlocator \v!hanging % best with strut=no {} - {\dp\b_framed_normal\scratchdimen + {\scratchdimen\ht\b_framed_normal + \setbox\b_framed_normal\hbox{\lower\scratchdimen\box\b_framed_normal}% + \dp\b_framed_normal\scratchdimen \ht\b_framed_normal\zeropoint \hbox{\box\b_framed_normal}} \installframedlocator \v!depth {} - \ht\b_framed_normal\dimexpr\ht\b_framed_normal-\strutdp\relax + {\setbox\b_framed_normal\hbox{\lower\strutdp\box\b_framed_normal}% + \ht\b_framed_normal\dimexpr\ht\b_framed_normal-\strutdp\relax \dp\b_framed_normal\strutdp \hbox{\box\b_framed_normal}} \installframedlocator \v!height {} - {\dp\b_framed_normal\dimexpr\ht\b_framed_normal-\strutht\relax + {\scratchdimen\dimexpr \ht\b_framed_normal - \strutht \relax + \setbox\b_framed_normal\hbox{\lower\scratchdimen\box\b_framed_normal}% + \dp\b_framed_normal\dimexpr\ht\b_framed_normal-\strutht\relax \ht\b_framed_normal\strutht \hbox{\box\b_framed_normal}} no need for the last \hbox then .. \installframedlocator \v!hanging % best with strut=no {} {\scratchdimen\ht\b_framed_normal \setbox\b_framed_normal\hbox{\lower\scratchdimen\box\b_framed_normal}% \dp\b_framed_normal\scratchdimen \ht\b_framed_normal\zeropoint \box\b_framed_normal} \installframedlocator \v!depth {} {\setbox\b_framed_normal\hbox{\lower\strutdp\box\b_framed_normal}% \ht\b_framed_normal\dimexpr\ht\b_framed_normal-\strutdp\relax \dp\b_framed_normal\strutdp \box\b_framed_normal} \installframedlocator \v!height {} {\scratchdimen\dimexpr \ht\b_framed_normal - \strutht \relax \setbox\b_framed_normal\hbox{\lower\scratchdimen\box\b_framed_normal}% \dp\b_framed_normal\dimexpr\ht\b_framed_normal-\strutht\relax \ht\b_framed_normal\strutht \box\b_framed_normal} - Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com | www.pragma-pod.nl - ___ 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] MkIV problem+fix with \framed[location=depth / height / hanging]
On 5/14/2013 11:00 PM, Sietse Brouwer wrote: \setupcolors[state=start] this is no longer needed in mkiv where colors are enabled by default \setupblackrules[depth=\strutdepth,height=\strutheight,width=1mm,color=red] ... .. added to test zip ... - Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com | www.pragma-pod.nl - ___ 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] MkIV problem+fix with \framed[location=depth / height / hanging]
Sietse wrote: \setupcolors[state=start] Hans wrote: this is no longer needed in mkiv where colors are enabled by default Leaving it in allowed me to use the same code to test MkII and MkIV. :-) .. added to test zip ... I haven't heard of that. Is that the unofficial test suite [1], or is it a zip in the distribution somewhere? [1] https://github.com/melmothx/context-unofficial-test-suite Cheers, Sietse ___ 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] MkIV problem+fix with \framed[location=depth / height / hanging]
Am 15.05.2013 um 12:26 schrieb Sietse Brouwer sbbrou...@gmail.com: Hans wrote: .. added to test zip ... I haven't heard of that. Is that the unofficial test suite [1], or is it a zip in the distribution somewhere? [1] https://github.com/melmothx/context-unofficial-test-suite You can find it on the pragma site: http://www.pragma-ade.nl/download-1.htm 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] MkIV problem+fix with \framed[location=depth / height / hanging]
Am 14.05.2013 um 23:00 schrieb Sietse Brouwer sbbrou...@gmail.com: Hi Hans, I believe that in MkIV some \framed[location=...] keys are not working, namely `depth`, `height`, and `hanging`. In MkIV these all place the bottom of the frame flush with the baseline, like [location=]. In MkII they behave more sensibly, as follows: * depth: place bottom of frame flush with bottom of the line (i.e. \strutdepth below baseline) * height: place top of frame flush with top of line * hanging: place top of frame flush with baseline The reason why all the location alternatives don’t work is because the original \vbox for the content is converted to a \hbox which ignores the changed values (even though the changed values for the height/depth are used as seen at the surrounding box). The process to create a \hbox happens when the background is applied with: \def\pack_framed_add_background {\setbox\b_framed_normal\hbox % was vbox ... \egroup}} 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 ___