clipping bug [or the return of the long cat]
hi, this time fully 'context live' approved, only with natural ingredients and even more tasty. yummy yum :D % engine=luatex \starttext \definelayer[stack] \setlayer[stack][x=0pt,y=0pt]{% \clip[hoffset=0pt,voffset=0pt,width=20cm,height=1cm]% {Clipping some layer text}} %\flushlayer[stack] \setbox\scratchbox\hbox{The cat was too long to fit in this small sentence.} \framed[offset=overlay]{\clip[hoffset=0pt,voffset=0pt,width=110pt,height=15pt]{\box\scratchbox}} \stoptext the second clip uses the width value of the prior clip (20cm). but if the layer is flushed, the second clip works nearly as expected (only frame is missing). interesting. there also seems to be some mess (or only a side effect?) with the setting of \setupsystem[\c!n=2,\c!m=2] sometimes the number one is used, sometimes the number two. must break, it's supper time. regards, peter
* PUSH * still not fixed. Peter Rolf schrieb:
hi,
this time fully 'context live' approved, only with natural ingredients and even more tasty. yummy yum :D
% engine=luatex \starttext
\definelayer[stack]
\setlayer[stack][x=0pt,y=0pt]{% \clip[hoffset=0pt,voffset=0pt,width=20cm,height=1cm]% {Clipping some layer text}}
%\flushlayer[stack]
\setbox\scratchbox\hbox{The cat was too long to fit in this small sentence.} \framed[offset=overlay]{\clip[hoffset=0pt,voffset=0pt,width=110pt,height=15pt]{\box\scratchbox}}
\stoptext
the second clip uses the width value of the prior clip (20cm). but if the layer is flushed, the second clip works nearly as expected (only frame is missing). interesting. there also seems to be some mess (or only a side effect?) with the setting of
\setupsystem[\c!n=2,\c!m=2]
sometimes the number one is used, sometimes the number two. must break, it's supper time.
regards, peter
___________________________________________________________________________________ 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 : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________________
Peter Rolf wrote:
* PUSH *
still not fixed.
meta-ini.mkiv \def\grabMPclippath#1#2#3#4#5% {\blabelgroup \edef\width {#3\space}\let\overlaywidth \width \edef\height{#4\space}\let\overlayheight\height \doifdefinedelse{MPC:#1} {\xdef\MPclippath{\getvalue{MPC:#1}}% \ifx\MPclippath\empty\xdef\MPclippath{#5}\fi \setxvalue{MPC:#1}{\MPclippath}} {\xdef\MPclippath{#5}}% \elabelgroup}
Peter Rolf schrieb:
hi,
this time fully 'context live' approved, only with natural ingredients and even more tasty. yummy yum :D
% engine=luatex \starttext
\definelayer[stack]
\setlayer[stack][x=0pt,y=0pt]{% \clip[hoffset=0pt,voffset=0pt,width=20cm,height=1cm]% {Clipping some layer text}}
%\flushlayer[stack]
\setbox\scratchbox\hbox{The cat was too long to fit in this small sentence.} \framed[offset=overlay]{\clip[hoffset=0pt,voffset=0pt,width=110pt,height=15pt]{\box\scratchbox}}
\stoptext
the second clip uses the width value of the prior clip (20cm). but if the layer is flushed, the second clip works nearly as expected (only frame is missing). interesting. there also seems to be some mess (or only a side effect?) with the setting of
\setupsystem[\c!n=2,\c!m=2]
sometimes the number one is used, sometimes the number two. must break, it's supper time.
regards, peter
___________________________________________________________________________________ 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 : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________________
___________________________________________________________________________________ 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 : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________________
-- ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------
Hans Hagen schrieb:
meta-ini.mkiv
\def\grabMPclippath#1#2#3#4#5% {\blabelgroup \edef\width {#3\space}\let\overlaywidth \width \edef\height{#4\space}\let\overlayheight\height \doifdefinedelse{MPC:#1} {\xdef\MPclippath{\getvalue{MPC:#1}}% \ifx\MPclippath\empty\xdef\MPclippath{#5}\fi \setxvalue{MPC:#1}{\MPclippath}} {\xdef\MPclippath{#5}}% \elabelgroup}
there seem to be an ugly sideeffect in combination with \startTEXpage .. \stopTEXpage. I use this to encapsulate my test graphics. The resulting page is only 1.1mm width (tested with several different sized gfx; width is always this value, height is normal). all tested with the beta from 07.06.2008 and luatex trunk (08.06.2008). todays beta has additional problems with text color (always black) and also some unicolored backgrounds appear black only. so i went back to the prior beta version and changed only the clip part. regards, peter
Peter Rolf wrote:
Hans Hagen schrieb:
meta-ini.mkiv
\def\grabMPclippath#1#2#3#4#5% {\blabelgroup \edef\width {#3\space}\let\overlaywidth \width \edef\height{#4\space}\let\overlayheight\height \doifdefinedelse{MPC:#1} {\xdef\MPclippath{\getvalue{MPC:#1}}% \ifx\MPclippath\empty\xdef\MPclippath{#5}\fi \setxvalue{MPC:#1}{\MPclippath}} {\xdef\MPclippath{#5}}% \elabelgroup}
there seem to be an ugly sideeffect in combination with \startTEXpage .. \stopTEXpage. I use this to encapsulate my test graphics. The resulting page is only 1.1mm width (tested with several different sized gfx; width is always this value, height is normal).
all tested with the beta from 07.06.2008 and luatex trunk (08.06.2008). todays beta has additional problems with text color (always black) and also some unicolored backgrounds appear black only. so i went back to the prior beta version and changed only the clip part.
hm ... example ... (keep in mind that mkiv's color handling is like fonts, i.e. no coloring of unboxed stuff as in \color[red]{\box\whatever}) Hans ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------
Hans Hagen schrieb:
Peter Rolf wrote:
Hans Hagen schrieb:
meta-ini.mkiv
\def\grabMPclippath#1#2#3#4#5% {\blabelgroup \edef\width {#3\space}\let\overlaywidth \width \edef\height{#4\space}\let\overlayheight\height \doifdefinedelse{MPC:#1} {\xdef\MPclippath{\getvalue{MPC:#1}}% \ifx\MPclippath\empty\xdef\MPclippath{#5}\fi \setxvalue{MPC:#1}{\MPclippath}} {\xdef\MPclippath{#5}}% \elabelgroup}
there seem to be an ugly sideeffect in combination with \startTEXpage .. \stopTEXpage. I use this to encapsulate my test graphics. The resulting page is only 1.1mm width (tested with several different sized gfx; width is always this value, height is normal).
all tested with the beta from 07.06.2008 and luatex trunk (08.06.2008). todays beta has additional problems with text color (always black) and also some unicolored backgrounds appear black only. so i went back to the prior beta version and changed only the clip part.
hm ... example ...
:) only a very big one (with non public code). currently no time, but i will try to create some small examples later.
(keep in mind that mkiv's color handling is like fonts, i.e. no coloring of unboxed stuff as in \color[red]{\box\whatever})
yes. it's also possible, that i have to adapt my code again. all i can say at the moment is, that it works with the beta from 07.06.2008 and fails with the current. we will see (shouldn't be a hard problem). peter
Hans
----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | fax: 038 477 53 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 : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________________
On Tue, Jun 10, 2008 at 2:40 PM, Hans Hagen
Peter Rolf wrote:
Hans Hagen schrieb:
meta-ini.mkiv
\def\grabMPclippath#1#2#3#4#5% {\blabelgroup \edef\width {#3\space}\let\overlaywidth \width \edef\height{#4\space}\let\overlayheight\height \doifdefinedelse{MPC:#1} {\xdef\MPclippath{\getvalue{MPC:#1}}% \ifx\MPclippath\empty\xdef\MPclippath{#5}\fi \setxvalue{MPC:#1}{\MPclippath}} {\xdef\MPclippath{#5}}% \elabelgroup}
there seem to be an ugly sideeffect in combination with \startTEXpage .. \stopTEXpage. I use this to encapsulate my test graphics. The resulting page is only 1.1mm width (tested with several different sized gfx; width is always this value, height is normal).
all tested with the beta from 07.06.2008 and luatex trunk (08.06.2008). todays beta has additional problems with text color (always black) and also some unicolored backgrounds appear black only. so i went back to the prior beta version and changed only the clip part.
hm ... example ...
\setupcolors[state=start] \starttext \color[red]{Colored test?} \stoptext Tested on ConTeXt live. Wolfgang
Hans Hagen schrieb:
Peter Rolf wrote:
Hans Hagen schrieb:
meta-ini.mkiv
\def\grabMPclippath#1#2#3#4#5% {\blabelgroup \edef\width {#3\space}\let\overlaywidth \width \edef\height{#4\space}\let\overlayheight\height \doifdefinedelse{MPC:#1} {\xdef\MPclippath{\getvalue{MPC:#1}}% \ifx\MPclippath\empty\xdef\MPclippath{#5}\fi \setxvalue{MPC:#1}{\MPclippath}} {\xdef\MPclippath{#5}}% \elabelgroup}
there seem to be an ugly sideeffect in combination with \startTEXpage .. \stopTEXpage. I use this to encapsulate my test graphics. The resulting page is only 1.1mm width (tested with several different sized gfx; width is always this value, height is normal).
all tested with the beta from 07.06.2008 and luatex trunk (08.06.2008). todays beta has additional problems with text color (always black) and also some unicolored backgrounds appear black only. so i went back to the prior beta version and changed only the clip part.
hm ... example ...
% engine=luatex \startuniqueMPgraphic {foo} fill OverlayBox; \stopuniqueMPgraphic \starttext \startTEXpage \hsize10cm \vsize10cm \uniqueMPgraphic{foo} \stopTEXpage \stoptext
(keep in mind that mkiv's color handling is like fonts, i.e. no coloring of unboxed stuff as in \color[red]{\box\whatever})
already fixed.. @wolfgang: it's good to have the freedom of choice. i take the black car then :D
Hans
----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | fax: 038 477 53 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 : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________________
Peter Rolf wrote:
Hans Hagen schrieb:
Peter Rolf wrote:
Hans Hagen schrieb:
meta-ini.mkiv
\def\grabMPclippath#1#2#3#4#5% {\blabelgroup \edef\width {#3\space}\let\overlaywidth \width \edef\height{#4\space}\let\overlayheight\height \doifdefinedelse{MPC:#1} {\xdef\MPclippath{\getvalue{MPC:#1}}% \ifx\MPclippath\empty\xdef\MPclippath{#5}\fi \setxvalue{MPC:#1}{\MPclippath}} {\xdef\MPclippath{#5}}% \elabelgroup}
there seem to be an ugly sideeffect in combination with \startTEXpage .. \stopTEXpage. I use this to encapsulate my test graphics. The resulting page is only 1.1mm width (tested with several different sized gfx; width is always this value, height is normal).
all tested with the beta from 07.06.2008 and luatex trunk (08.06.2008). todays beta has additional problems with text color (always black) and also some unicolored backgrounds appear black only. so i went back to the prior beta version and changed only the clip part. hm ... example ...
% engine=luatex
\startuniqueMPgraphic {foo} fill OverlayBox; \stopuniqueMPgraphic
\starttext
\startTEXpage
\hsize10cm \vsize10cm \uniqueMPgraphic{foo}
\stopTEXpage
\stoptext
hmm this is actually undefined behaviour since there is no background ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------
Hans Hagen schrieb:
Peter Rolf wrote:
Hans Hagen schrieb:
Peter Rolf wrote:
Hans Hagen schrieb:
meta-ini.mkiv
\def\grabMPclippath#1#2#3#4#5% {\blabelgroup \edef\width {#3\space}\let\overlaywidth \width \edef\height{#4\space}\let\overlayheight\height \doifdefinedelse{MPC:#1} {\xdef\MPclippath{\getvalue{MPC:#1}}% \ifx\MPclippath\empty\xdef\MPclippath{#5}\fi \setxvalue{MPC:#1}{\MPclippath}} {\xdef\MPclippath{#5}}% \elabelgroup}
there seem to be an ugly sideeffect in combination with \startTEXpage .. \stopTEXpage. I use this to encapsulate my test graphics. The resulting page is only 1.1mm width (tested with several different sized gfx; width is always this value, height is normal).
all tested with the beta from 07.06.2008 and luatex trunk (08.06.2008). todays beta has additional problems with text color (always black) and also some unicolored backgrounds appear black only. so i went back to the prior beta version and changed only the clip part. hm ... example ...
% engine=luatex
\startuniqueMPgraphic {foo} fill OverlayBox; \stopuniqueMPgraphic
\starttext
\startTEXpage
\hsize10cm \vsize10cm \uniqueMPgraphic{foo}
\stopTEXpage
\stoptext
hmm this is actually undefined behaviour since there is no background
hmmm, another try (but same result) % engine=luatex \startuniqueMPgraphic {foo} fill OverlayBox; \stopuniqueMPgraphic \defineoverlay[foo][\uniqueMPgraphic{foo}] \starttext \startTEXpage \framed[width=10cm,height=10cm,offset=overlay,background=foo]{} \stopTEXpage \stoptext
----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | fax: 038 477 53 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 : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________________
Peter Rolf wrote:
hmmm, another try (but same result)
can you try the latest beta? i added some hboxes around the graphics ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------
Hans Hagen schrieb:
Peter Rolf wrote:
hmmm, another try (but same result)
can you try the latest beta? i added some hboxes around the graphics
sorry, still not working here.
----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | fax: 038 477 53 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 : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________________
Peter Rolf wrote:
Hans Hagen schrieb:
Peter Rolf wrote:
hmmm, another try (but same result) can you try the latest beta? i added some hboxes around the graphics
sorry, still not working here.
it's not related to mp at all \starttext \startTEXpage \framed[width=10cm,height=10cm]{} \stopTEXpage \stoptext does not work, while \starttext \startTEXpage \noindent \framed[width=10cm,height=10cm]{} \stopTEXpage \stoptext does; it has to do with the new autowidth calculator; i hope that i fixed it Hans ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------
Hans Hagen schrieb:
Peter Rolf wrote:
Hans Hagen schrieb:
Peter Rolf wrote:
hmmm, another try (but same result) can you try the latest beta? i added some hboxes around the graphics
sorry, still not working here.
it's not related to mp at all
\starttext \startTEXpage
\framed[width=10cm,height=10cm]{}
\stopTEXpage \stoptext
does not work, while
\starttext \startTEXpage
\noindent \framed[width=10cm,height=10cm]{}
\stopTEXpage \stoptext
does; it has to do with the new autowidth calculator; i hope that i fixed it
looks good :) clipping is also working (now that i can see the page). thank you! regards, peter
Hans
----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | fax: 038 477 53 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 : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________________
On Tue, Jun 10, 2008 at 12:42 PM, Peter Rolf
Hans Hagen schrieb:
meta-ini.mkiv
\def\grabMPclippath#1#2#3#4#5% {\blabelgroup \edef\width {#3\space}\let\overlaywidth \width \edef\height{#4\space}\let\overlayheight\height \doifdefinedelse{MPC:#1} {\xdef\MPclippath{\getvalue{MPC:#1}}% \ifx\MPclippath\empty\xdef\MPclippath{#5}\fi \setxvalue{MPC:#1}{\MPclippath}} {\xdef\MPclippath{#5}}% \elabelgroup}
there seem to be an ugly sideeffect in combination with \startTEXpage .. \stopTEXpage. I use this to encapsulate my test graphics. The resulting page is only 1.1mm width (tested with several different sized gfx; width is always this value, height is normal).
all tested with the beta from 07.06.2008 and luatex trunk (08.06.2008). todays beta has additional problems with text color (always black) and also some unicolored backgrounds appear black only. so i went back to the prior beta version and changed only the clip part.
Any customer can have a car painted any colour that he wants so long as it is black. (Henry Ford) ;-) Wolfgang
participants (3)
-
Hans Hagen
-
Peter Rolf
-
Wolfgang Schuster