Re: [NTG-context] clipping in metafun has weird side effects

2014-10-31 Thread Tobias Columbus
On Fri, Oct 31, 2014 at 12:22:37PM +0100, Hans Hagen wrote: On 10/31/2014 10:15 AM, Tobias Columbus wrote: def a_impl text t = begingroup save c ; picture c ; c := mycircle ; clip c to bbox c scaled 0.5 ; try this to see what happens: % clip c to bbox c scaled 0.5 ; draw

Re: [NTG-context] Trying to emulate CSS object-fit behaviour...

2014-10-16 Thread Hans Hagen
: cover; object-position : top left; overflow: hidden; (http://www.w3.org/TR/css3-images/#the-object-fit) That is, scale the PDF until all the frame is covered with some part of the PDF, even if means overflowing the frame. The overflow: hidden would then clip the overflow to the frame

[NTG-context] Trying to emulate CSS object-fit behaviour...

2014-10-15 Thread Stuart Hungerford
/css3-images/#the-object-fit) That is, scale the PDF until all the frame is covered with some part of the PDF, even if means overflowing the frame. The overflow: hidden would then clip the overflow to the frame. Different PDF's could have different scalings applied to make this work, which is fine

Re: [NTG-context] Strange behavior with Metapost

2014-05-27 Thread Fabrice
; drawarrow ((xmin,0) -- (xmax,0)) scaled u; drawarrow ((0,ymin) -- (0,ymax)) scaled u; draw tightfunction (x, -2*(x-1)*(x-1)+2, xmin, xmax, (xmax-xmin)/20) scaled u; path screen; screen=(xmin,ymin)*u--(xmax,ymin)*u--(xmax,ymax)*u--(xmin,ymax)*u--cycle; clip currentpicture

[NTG-context] Metapost and Metafun

2014-05-21 Thread Fabrice Couvreur
; draw pts_f withpen pencircle scaled 1; clip currentpicture to screen; \stopMPcode \stoptext Are there any routines with Metafun to improve this code? thank you, Fabrice ___ If your question is of interest to others as well

Re: [NTG-context] Metapost and Metafun

2014-05-21 Thread Hans Hagen
-- (0,ymax)*u; drawarrow axe_x; drawarrow axe_y; draw pts_f withpen pencircle scaled 1; clip currentpicture to screen; \stopMPcode \stoptext Are there any routines with Metafun to improve this code? define 'improve' .. anyway: \starttext \startMPpage numeric xmin, xmax, ymin, ymax; xmin

[NTG-context] resize and center and clip image

2014-05-01 Thread Mikael P. Sundqvist
Hi! Assume that I want to fill in the text area with images, and I want to clip and scale them according to these rules: 1) If the image is too wide (in sense of proportions), then scale it so that the height fits the text area height, center it, and clip it to the text area. (See the attached

Re: [NTG-context] resize and center and clip image

2014-05-01 Thread Mikael P. Sundqvist
OK, sorry for the noise. I think I have the solution: \startexternalfigurecollection[k.jpg] \useexternalfigure[k.jpg][k.jpg] \stopexternalfigurecollection \externalfigurecollectionminwidth{k.jpg} \externalfigurecollectionmaxheight{k.jpg} \clip[width=8cm,height=7cm]{% \framed[width=8cm

Re: [NTG-context] resize and center and clip image

2014-05-01 Thread Otared Kavian
/Context/essais/mkii/figures/resize-and-center.tex: ! Undefined control sequence \startexternalfigurecollection ...igurecollection {#1}\settrue \c_grph_inclu... l.13 \clip[width=8cm,height=7cm] {% 3

Re: [NTG-context] resize and center and clip image

2014-05-01 Thread Mikael P. Sundqvist
]) context(\\hskip%ssp, skalning) context.externalfigure({str},{height=hojd}) context.sprint(bar) end end \stopluacode \unexpanded\def\lundklippfyllbild#1#2#3{% \startexternalfigurecollection[#1]% \useexternalfigure[#1][#1]% \stopexternalfigurecollection% \clip[ width=#2, height=#3, hoffset

Re: [NTG-context] resize and center and clip image

2014-05-01 Thread Otared Kavian
},{height=hojd}) context.sprint(bar) end end \stopluacode \unexpanded\def\lundklippfyllbild#1#2#3{% \startexternalfigurecollection[#1]% \useexternalfigure[#1][#1]% \stopexternalfigurecollection% \clip[ width=#2, height=#3, hoffset=0mm, voffset=0mm, ]{% \framed[width=#2,height=#3

Re: [NTG-context] resize and center and clip image

2014-05-01 Thread Aditya Mahajan
end \stopluacode \unexpanded\def\lundklippfyllbild#1#2#3{% \startexternalfigurecollection[#1]% \useexternalfigure[#1][#1]% \stopexternalfigurecollection% \clip[ width=#2, height=#3, hoffset=0mm, voffset=0mm, ]{% \framed[width=#2,height=#3,align={middle,lohi},offset=overlay,frame=off]{% \dimen0

Re: [NTG-context] resize and center and clip image

2014-05-01 Thread Mikael P. Sundqvist
, skalning) context.externalfigure({str},{height=hojd}) context.sprint(bar) end end \stopluacode \unexpanded\def\lundklippfyllbild#1#2#3{% \startexternalfigurecollection[#1]% \useexternalfigure[#1][#1]% \stopexternalfigurecollection% \clip[ width=#2, height=#3, hoffset=0mm

Re: [NTG-context] resize and center and clip image

2014-05-01 Thread Wolfgang Schuster
) context.externalfigure({str},{height=hojd}) context.sprint(bar) end end \stopluacode \unexpanded\def\lundklippfyllbild#1#2#3{% \startexternalfigurecollection[#1]% \useexternalfigure[#1][#1]% \stopexternalfigurecollection% \clip[ width=#2, height=#3, hoffset=0mm, voffset=0mm

[NTG-context] Metapost: I only need a little bit padding

2014-04-05 Thread Jan Heinen
}lrcorner currentpicture+(0mm,3mm)-- urcorner currentpicture+(0mm,-3mm){up}..{left}urcorner currentpicture+(-3mm,0mm)-- ulcorner currentpicture+(3mm,0mm){left}..{down}ulcorner currentpicture+(0mm,-3mm)--cycle; pickup pencircle scaled 0.5pt; clip currentpicture to p; draw p; currentpicture

Re: [NTG-context] Metapost: I only need a little bit padding

2014-04-05 Thread Peter Rolf
}urcorner currentpicture+(-3mm,0mm)-- ulcorner currentpicture+(3mm,0mm){left}..{down}ulcorner currentpicture+(0mm,-3mm)--cycle; pickup pencircle scaled 0.5pt; clip currentpicture to p; draw p; currentpicture := currentpicture rotated 90; \stopuseMPgraphic \starttext \useMPgraphic

Re: [NTG-context] Pgfplots - passing point coordinates by Lua

2014-02-16 Thread Jaroslav Hajtmar
[scale=1] \tikzset{style={font=\ssxx}} \startaxis [xmin=-1.6, xmax=10, domain=-1.6:10, ymin=-1.1, ymax=1.1, width=\textwidth, height=0.3\textwidth, axis x line=middle, axis y line=middle, axis equal=true, xlabel=$x$, ylabel=$y$, samples=600, clip=true, xtick={0}, ytick={-1,0,1}, grid=major, extra x ticks

Re: [NTG-context] Pgfplots - passing point coordinates by Lua

2014-02-16 Thread DesdeChaves
))} \startTEXpage \starttikzpicture[scale=1] \tikzset{style={font=\ssxx}} \startaxis [xmin=-1.6, xmax=10, domain=-1.6:10, ymin=-1.1, ymax=1.1, width=\textwidth, height=0.3\textwidth, axis x line=middle, axis y line=middle, axis equal=true, xlabel=$x$, ylabel=$y$, samples=600, clip=true, xtick

[NTG-context] Strange output from linear_shade (METAPOST)

2014-02-14 Thread DesdeChaves
,black,white); endfor; clip currentpicture to (0,0)--(0,2cm)--(2cm,2cm)--(3cm,1cm)--(2cm,0)--cycle; draw (0,0)--(0,2cm)--(2cm,2cm)--(3cm,1cm)--(2cm,0)--cycle withcolor .625red; addto finalpicture also currentpicture shifted(avanco*3.5cm,0) ; currentpicture := nullpicture ; avanco := avanco+1

[NTG-context] internal mptopdf conversion fails on older mps file (using MkIV, beta 2013.12.26)

2014-01-02 Thread Sanjoy Mahajan
{rlineto}bd/c{curveto}bd/m{moveto}bd/p{closepath}bd/n{newpath}bd /C{setcmykcolor}bd/G{setgray}bd/R{setrgbcolor}bd/lj{setlinejoin}bd/ml{setmiterlimit}bd /lc{setlinecap}bd/S{stroke}bd/F{fill}bd/q{gsave}bd/Q{grestore}bd/s{scale}bd/t{concat}bd /sd{setdash}bd/rd{[] 0 setdash}bd/P{showpage}bd/B{q F Q}bd/W{clip

Re: [NTG-context] internal mptopdf conversion fails on older mps file (using MkIV, beta 2013.12.26)

2014-01-02 Thread Hans Hagen
setdash}bd/P{showpage}bd/B{q F Q}bd/W{clip}bd %%EndProlog %%Page: 1 1 0.7 G n 0 0 m 0 9.96262 l 9.96262 4.98131 l p F P %%EOF cut fig.1 here Running it through MkIV with the 2013.12.26 beta (or the stable context) produces an empty frame for the inclusion of fig.1

[NTG-context] [***SPAM***] Shifting table header when using overlay

2013-07-14 Thread Dmitriy Tokarev
this effect? Or maybe there is another way to achieve the desired border? Thanks. \startuseMPgraphic{MP:thickBtm} draw (0,2pt)--(OverlayWidth,2pt) withpen pensquare scaled 1pt withcolor red; clip currentpicture to OverlayBox; setbounds currentpicture to OverlayBox; \stopuseMPgraphic

Re: [NTG-context] Failing MPruns

2013-02-14 Thread Marco Patzer
On 2013–02–14 Keith J. Schultz wrote: with your example below I noticed that the red circle is not quite in the graphic. it seems to be clip on the right! It's fine on my machine, or maybe I just don't see it. Marco signature.asc Description: Digital signature

Re: [NTG-context] Failing MPruns

2013-02-14 Thread Keith J. Schultz
example below I noticed that the red circle is not quite in the graphic. it seems to be clip on the right! It's fine on my machine, or maybe I just don't see it. Marco ___ If your question is of interest to others

Re: [NTG-context] Failing MPruns

2013-02-13 Thread Keith J. Schultz
Hi Hans, All, with your example below I noticed that the red circle is not quite in the graphic. it seems to be clip on the right! Just mentioning this. regards Keith. Am 13.02.2013 um 17:54 schrieb Hans Hagen pra...@wxs.nl: On 2/13/2013 1:39 PM, Marco Patzer wrote: Hi

Re: [NTG-context] MetaPost Animations

2012-12-28 Thread Otared Kavian
animation: I could not get the same pictures as you show on your webpage. I get only one page out of 8, and the log file says several times: unknown path q ! Improper `clip'. to be read again Best regards: OK On 29 déc. 2012, at 03:55, Troy Henderson thend...@gmail.com wrote: Are the gears more

Re: [NTG-context] TABLE: header with a thick bottom line

2012-10-23 Thread Procházka Lukáš Ing . - Pontex s . r . o .
experiments, based on Wolfgang's code on wiki, I reached the following minimal working example: \startuseMPgraphic{MP:thickBtm} draw bottomboundary OverlayBox withpen pensquare scaled \frameddimension{bottomrulethickness}; clip currentpicture to OverlayBox; setbounds currentpicture

Re: [NTG-context] TABLE: header with a thick bottom line

2012-10-23 Thread Rogers, Michael K
kludgy. Perhaps there is a better way... Michael \startuseMPgraphic{MP:thickBtm} draw bottomboundary OverlayBox withpen pensquare scaled \frameddimension{bottomrulethickness}; clip currentpicture to OverlayBox; setbounds currentpicture to OverlayBox; \stopuseMPgraphic \defineoverlay

Re: [NTG-context] ntg-context Digest, Vol 100, Issue 63

2012-10-23 Thread Shane Peelar
of about 2mm. I discovered the boffset key, which can be used with the overlay, but it's kludgy. Perhaps there is a better way... Michael \startuseMPgraphic{MP:thickBtm} draw bottomboundary OverlayBox withpen pensquare scaled \frameddimension{bottomrulethickness}; clip currentpicture

Re: [NTG-context] Interfering frames in natural tables

2012-05-22 Thread Marco
withpen pensquare scaled \frameddimension{bottomrulethickness} ; clip currentpicture to OverlayBox leftenlarged (\frameddimension {leftrulethickness}/2) rightenlarged (\frameddimension {rightrulethickness}/2) topenlarged(\frameddimension {toprulethickness}/2

[NTG-context] MetaFun: MetaPost example works with `mpost` but not embedded in ConTeXt: `! Redundant equation.`

2011-12-11 Thread Paul Menzel
+dt; trajy:=trajy..(t,y); exitif ((ttstop) or (tb) or (yc) or (yd)); endfor; %Draw the paths x(t) and y(t) and clip them to bounding box draw trajx xscaled ux yscaled uy withcolor red; draw trajy xscaled ux yscaled uy withcolor red dashed evenly; clip currentpicture to (q xscaled ux

[NTG-context] Clip and framed not precise in MKIV

2011-09-21 Thread Otso Helenius
Hi, I've used ConTeXt to chop up a big map svg on separate A4 papers like this: \setuplayout[width=190mm,backspace=10mm,height=297mm,topspace=10mm, header=0mm] \setupclipping[nx=3,ny=3] \starttext \dorecurse{3}{\framed{\clip[x=\recurselevel,y=1]{\externalfigure[map.svg][width=570mm

Re: [NTG-context] Clip and framed not precise in MKIV

2011-09-21 Thread Peter Rolf
Am 21.09.2011 14:26, schrieb Otso Helenius: Hi, I've used ConTeXt to chop up a big map svg on separate A4 papers like this: \setuplayout[width=190mm,backspace=10mm,height=297mm,topspace=10mm, header=0mm] \setupclipping[nx=3,ny=3] \starttext \dorecurse{3}{\framed{\clip[x=\recurselevel

Re: [NTG-context] crop PDF pages

2011-09-20 Thread Henning Hraban Ramm
can use \clip; since you can use it for everything, it's a single command, not an option. See http://wiki.contextgarden.net/Graphical_text_manipulation#.5Cclip Greetlings from Lake Constance! Hraban --- http://www.fiee.net/texnique/ http://wiki.contextgarden.net https://www.cacert.org (I'm

Re: [NTG-context] crop PDF pages

2011-09-20 Thread luigi scarso
but the huge margins take too much space and as a result the texts are too small. I want to use commands like \insertpages to crop all the pages with different bounding box settings for odd/even pages. there's a scale option for \copypages but it's somewhat naive to use in such practical cases... \clip

Re: [NTG-context] Centering 'clipping' text logo

2011-08-17 Thread Peter Rolf
guess would be \midaligned{\vbox{% \clip \clip \clip }} untested.. ;-) -- Cecil Westerhof ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context

Re: [NTG-context] Centering 'clipping' text logo

2011-08-17 Thread Cecil Westerhof
to no avail. How can I get it centered? my first guess would be \midaligned{\vbox{% \clip \clip \clip }} I tried a lot, but just this one not. I got one long line with the three parts beside each-other, a little room between the parts, no effect, … untested.. ;-) It does exactly what I

Re: [NTG-context] Trying to get figure frame corners to clip figure

2011-07-07 Thread Kip Warner
On Thu, 2011-07-07 at 07:35 +0200, Wolfgang Schuster wrote: There is a example in the metafun manual: http://pragma-ade.com/show-man-7.htm Wolfgang Wolfgang, I appreciate the effort, but you've linked me to a 657 page manual which is totally useless to me. I don't have time to learn another

[NTG-context] Trying to get figure frame corners to clip figure

2011-07-06 Thread Kip Warner
Hey list, I'd like the rounded corners of my figure's frame to clip off the outside corners of the image so they aren't sticking out. This is what I'm making do with: \setupexternalfigures [frame=on, corner=25, framecolor=colour_frame_border, background=color, backgroundcolor

Re: [NTG-context] Trying to get figure frame corners to clip figure

2011-07-06 Thread Aditya Mahajan
On Wed, 6 Jul 2011, Kip Warner wrote: Hey list, I'd like the rounded corners of my figure's frame to clip off the outside corners of the image so they aren't sticking out. This is what I'm making do with: \setupexternalfigures [frame=on, corner=25, framecolor=colour_frame_border

Re: [NTG-context] Trying to get figure frame corners to clip figure

2011-07-06 Thread Kip Warner
On Wed, 2011-07-06 at 23:48 -0400, Aditya Mahajan wrote: You can use \clip[mp=...]{\framed[...]{...}} (I think that the metafun manual gives an example). Aditya Thanks Aditya, I'll look into it. I searched both the reference and tutorial pdf and there is no description of \clip, but I

Re: [NTG-context] Trying to get figure frame corners to clip figure

2011-07-06 Thread Kip Warner
On Wed, 2011-07-06 at 23:48 -0400, Aditya Mahajan wrote: You can use \clip[mp=...]{\framed[...]{...}} (I think that the metafun manual gives an example). Aditya Aditya, correct me if wrong, but it looks like \clip performs rectangular clipping only? As I mentioned earlier, I'd like

Re: [NTG-context] Trying to get figure frame corners to clip figure

2011-07-06 Thread Wolfgang Schuster
Am 07.07.2011 um 07:18 schrieb Kip Warner: On Wed, 2011-07-06 at 23:48 -0400, Aditya Mahajan wrote: You can use \clip[mp=...]{\framed[...]{...}} (I think that the metafun manual gives an example). Aditya Aditya, correct me if wrong, but it looks like \clip performs rectangular

[NTG-context] Using text as a clip path for Metafun free shape paragraphs

2011-05-22 Thread Otso Helenius
:= currentpicture; currentpicture := nullpicture; fill unitsquare xysized (100mm,100mm) withcolor blue; path mask; mask := unitsquare xysized (100mm,100mm) -- reverse unitsquare xysized (100mm,10mm) shifted (0mm,45mm) -- cycle; clip cur to mask; draw cur; \stopMPcode But I can't cut pictures

Re: [NTG-context] Using text as a clip path for Metafun free shape paragraphs

2011-05-22 Thread Hans Hagen
On 22-5-2011 5:09, Otso Helenius wrote: With this feature one could define for example a 2-page spread for a magazine (with free shape graphics and columns) in between two ordinarily defined pages and would not have to manually disrupt the body text flow through the document. It can

Re: [NTG-context] rules with different thickness

2011-04-20 Thread Reviczky, Adam
\frameddimension {rightrulethickness} ; draw topboundaryOverlayBox withpen pensquare scaled \frameddimension {toprulethickness} ; draw bottomboundary OverlayBox withpen pensquare scaled \frameddimension{bottomrulethickness} ; clip currentpicture to OverlayBox leftenlarged

Re: [NTG-context] rules with different thickness

2011-04-19 Thread Wolfgang Schuster
\frameddimension {toprulethickness} ; draw bottomboundary OverlayBox withpen pensquare scaled \frameddimension{bottomrulethickness} ; clip currentpicture to OverlayBox leftenlarged (\frameddimension {leftrulethickness}/2) rightenlarged (\frameddimension {rightrulethickness}/2

Re: [NTG-context] is this possbile ? \externalfigure[c:\test\test.pdf at page 5 (0, 0) (20, 20)]

2011-04-18 Thread Peter Münster
정진기 jinkijinki.j...@partner.samsung.com writes: What I like to do is “getting certain area of certain page of a PDF file” using context command without saving to a separate JPG file. \clip[...]{\externalfigure[filename.pdf][page=X]} See also: http://wiki.contextgarden.net/Reference/en

Re: [NTG-context] Hairline in header

2011-03-03 Thread Wolfgang Schuster
--(OverlayWidth,0) withcolor blue withpen pencircle scaled 4 shifted (0,4) ; clip currentpicture to OverlayBox ; setbounds currentpicture to OverlayBox ; \stopuseMPgraphic \defineoverlay[headerrules][\useMPgraphic{headerrules}] \setupbackgrounds[header][text][background=headerrules] \starttext \input

Re: [NTG-context] Hairline in header

2011-03-03 Thread Willi Egger
; draw origin--(OverlayWidth,0) withcolor blue withpen pencircle scaled 4 shifted (0,4) ; clip currentpicture to OverlayBox ; setbounds currentpicture to OverlayBox ; \stopuseMPgraphic \defineoverlay[headerrules][\useMPgraphic{headerrules}] \setupbackgrounds[header][text][background

Re: [NTG-context] metapost fill between outlines

2011-02-20 Thread Reviczky, Adam
You can fill out the bigger one, than clips the smaller one. Can you give me an example with the clip? I can't get it work in a way I want to have it. I've found another thread here: http://www.tug.org/pipermail/metapost/2006-September/000650.html But I fail to see the conclusion there too

[NTG-context] embedding swfs in pdfs

2011-02-02 Thread Ian Lawrence
(provided at fixed location) -load in a folder or directory full of assets (several subfolders are involved) -set up the launch settings for the swf So needs more than InDesign CS5 currently offers. Not just loading in a freestanding swf movie clip. THX Ian

Re: [NTG-context] Replacing a piece of a paper

2011-01-11 Thread Aditya Mahajan
On Tue, 11 Jan 2011, Procházka Lukáš Ing. - Pontex s. r. o. wrote: Or is there another (non-layering or layer-merging) way? You can also crop the pdf (\clip[mp=shape that you want to clip]{\externalfigure[...]}) and place that on paper using layers. That way, even if layers are toggled

Re: [NTG-context] Replacing a piece of a paper

2011-01-11 Thread Hans Hagen
On 11-1-2011 6:59, Aditya Mahajan wrote: On Tue, 11 Jan 2011, Procházka Lukáš Ing. - Pontex s. r. o. wrote: Or is there another (non-layering or layer-merging) way? You can also crop the pdf (\clip[mp=shape that you want to clip]{\externalfigure[...]}) and place that on paper using layers

Re: [NTG-context] Access figure data?

2010-10-14 Thread Peter Rolf
, because I need the pixel size of a graphic for some border checking ('clip' a frame out of a bitmap). Currently I use \getfiguredimensions from the tex side, as I haven't found a way in lua yet. Peter ___ If your question

Re: [NTG-context] Access figure data?

2010-10-14 Thread Hans Hagen
On 14-10-2010 10:10, Peter Rolf wrote: Nice to have. Is this also possible from the lua side? I ask, because I need the pixel size of a graphic for some border checking ('clip' a frame out of a bitmap). Currently I use \getfiguredimensions from the tex side, as I haven't found a way in lua yet

Re: [NTG-context] Access figure data?

2010-10-14 Thread Peter Rolf
Am 14.10.2010 22:22, schrieb Hans Hagen: On 14-10-2010 10:10, Peter Rolf wrote: Nice to have. Is this also possible from the lua side? I ask, because I need the pixel size of a graphic for some border checking ('clip' a frame out of a bitmap). Currently I use \getfiguredimensions from

[NTG-context] sunset showoff

2010-09-15 Thread Henning Hraban Ramm
:\recurselevel][c=0,m=\ctxlua{tex.print(\recurselevel/\Number)},y=1,k=0]} \dorecurse{\Number}{ \clip[ny=\Number,y=\recurselevel]{\color[Col:\recurselevel]\MyLogo} } \hbox{\dorecurse{\Number}{\clip[nx=\Number,x=\recurselevel]{\color[Col:\recurselevel]\MyLogo}}} \stoptext (With the help of Taco

Re: [NTG-context] sunset showoff

2010-09-15 Thread Aditya Mahajan
} \dorecurse{\Number}{\definecolor[Col:\recurselevel][c=0,m=\ctxlua{tex.print(\recurselevel/\Number)},y=1,k=0]} \dorecurse{\Number}{ \clip[ny=\Number,y=\recurselevel]{\color[Col:\recurselevel]\MyLogo} } \hbox{\dorecurse{\Number}{\clip[nx=\Number,x=\recurselevel]{\color[Col:\recurselevel]\MyLogo

Re: [NTG-context] Clipping of text (or something equivalent)

2010-06-07 Thread Erik Margraf
Thanks!! For the hints to existing examples as well as for the very instructive advice to clip to the enlarged unitsquare. 2010/6/7 Hongwen Qiu qiuhong...@gmail.com 于 2010年06月07日 22:47, Erik Margraf 写道: Hi all, I'd like to achieve in context something like I did in the attachment

Re: [NTG-context] macro beginner question

2010-06-05 Thread Taco Hoekwater
, perhaps like so: \def\OpticalTest[#1]#2{% \addff{\OOFeature}% \definedfont[#2 at \OOSize]% \setupinterlinespace \hbox to \textwidth{\clip[width=.39\textwidth, bottomoffset=\strutdepth]{% \Mycolor ..\hbox to .39

Re: [NTG-context] macro beginner question

2010-06-05 Thread Bernhard Rosensteiner
back, and add \Mycolor to the \OpticalTest macro, perhaps like so: \def\OpticalTest[#1]#2{% \addff{\OOFeature}% \definedfont[#2 at \OOSize]% \setupinterlinespace \hbox to \textwidth{\clip[width=.39\textwidth, bottomoffset=\strutdepth

[NTG-context] mp clippath broken (mkiv)

2010-05-07 Thread Peter Rolf
Hi, the latest version (06-05-2010) has problems with mp clippath. Example is attached. Best wishes, Peter ps: Believe it or not, but all leftovers of cuts are recycled/reused here for other graphics. I hate squandering ;) \startMPclip{mpcliptest} clip currentpicture to unitcircle scaled

Re: [NTG-context] a0 split into a4?

2010-04-21 Thread Peter Rolf
[document.pdf][n=4] \stoptext Wolfgang Thanks. But is it possible to scale it and put margins at each slicepage? not in a straight line. but you can use \slicepages to clip the image into the wanted sizes (papersize-offset) and then centre up the resulting pdf pages in a new document (which adds

[NTG-context] beta: framecolor bug (mkiv)

2010-03-08 Thread Peter Rolf
is grayscale % 'frame=on' : next frame is ok (black) \framed[foregroundcolor=red,frame=off]{frame should be black} % text is needed to trigger color % wrong framecolor (red instead of black) \framed[offset=overlay,rulethickness=1pt,framecolor=black]\bgroup \clip[width=5cm,height=5cm]% clip is needed

Re: [NTG-context] combiation trickery again now with attachement - sorry

2010-02-18 Thread Bernhard Rosensteiner
Am 16.02.2010 um 21:12 schrieb Peter Rolf: Am 16.02.2010 19:40, schrieb Bernhard Rosensteiner: Hi, in the attachment is an example file which describes best what i want do. The method with \offset and \clip to place the figures where i want is really brutal force i think. Especially

Re: [NTG-context] combiation trickery again now with attachement - sorry

2010-02-18 Thread Willi Egger
18, 2010, at 1:22 PM, Bernhard Rosensteiner wrote: Am 16.02.2010 um 21:12 schrieb Peter Rolf: Am 16.02.2010 19:40, schrieb Bernhard Rosensteiner: Hi, in the attachment is an example file which describes best what i want do. The method with \offset and \clip to place the figures where i

[NTG-context] combination trickery - help needed

2010-02-16 Thread Bernhard Rosensteiner
Hi, in the attachment is an example file which describes best what i want do. The method with \offset and \clip to place the figures where i want is really brutal force i think. Especially fiddling around with dimension to get the right fit“ is tedious. Is there a better solution to do

[NTG-context] combiation trickery again now with attachement - sorry

2010-02-16 Thread Bernhard Rosensteiner
Hi, in the attachment is an example file which describes best what i want do. The method with \offset and \clip to place the figures where i want is really brutal force i think. Especially fiddling around with dimension to get the right fit“ is tedious. Is there a better solution to do

Re: [NTG-context] combiation trickery again now with attachement - sorry

2010-02-16 Thread Peter Rolf
Am 16.02.2010 19:40, schrieb Bernhard Rosensteiner: Hi, in the attachment is an example file which describes best what i want do. The method with \offset and \clip to place the figures where i want is really brutal force i think. Especially fiddling around with dimension to get

Re: [NTG-context] Metapost and MPlib

2009-11-04 Thread Aditya Mahajan
) endfor; Cb@:=Cb@ shifted (z.origine*cm); $=Cb@; $ enddef; vardef cadre(expr q,r)= z.so=q; z.ne=r; path limite; limite:=z.so*cm--(x.ne*cm,y.so*cm)--z.ne*cm--(x.so*cm,y.ne*cm)--cycle; extra_endfig := clip currentpicture to limite; extra_endfig; enddef; vardef origine(expr p

Re: [NTG-context] How to unfill a picture?

2009-06-24 Thread Zhichu Chen
: Mode := 3 ; fi else : Mode := 2 ; fi else : Mode := 1 ; fi l = q[10+Mode] cutafter mypath ; MagicPoint = point length(l) of l ; p0 := p[Mode]--l--(q0 cutbefore MagicPoint)--(q0 cutafter MagicPoint)--(reverse l)--cycle ; clip currentpicture to p0 ; draw

Re: [NTG-context] How to unfill a picture?

2009-06-24 Thread Zhichu Chen
(Helper100) of Helper100 ; Helper0 := Helper[Mode] for i=1 upto 3 : -- Helper[Mode+i] endfor -- Helper100 -- (Helper0 cutbefore MagicPoint) -- (Helper0 cutafter MagicPoint) -- (reverse Helper100) -- cycle ; clip currentpicture to Helper0 ; draw

[NTG-context] label, caption and eps in figures?

2009-06-12 Thread Pau
Hello, I am struggling to get something equivalent to this in ConTeXt: - \begin{figure} \resizebox{\hsize}{!}{\includegraphics[scale=1,bb=0 0 0 0,clip] {MyFigure.eps}} \caption{My Caption \label{fig.mylabel} } \end{figure

Re: [NTG-context] label, caption and eps in figures?

2009-06-12 Thread Hans Hagen
Pau wrote: Hello, I am struggling to get something equivalent to this in ConTeXt: - \begin{figure} \resizebox{\hsize}{!}{\includegraphics[scale=1,bb=0 0 0 0,clip] {MyFigure.eps}} \caption{My Caption \label{fig.mylabel} } \end

[NTG-context] beta (22.05.2009, late night edition): spurious space when clipping

2009-05-22 Thread Peter Rolf
Hi, the attached example shows some horizontal shift of the clipped object. Mkii works as expected. Best wishes, Peter \setupcolors[state=start] \setuppagenumber[state=stop] \starttext \framed[offset=overlay,width=5cm,height=1cm] {\clip[width=5cm,height=1cm,voffset=0pt,hoffset=0pt

Re: [NTG-context] Clipping bug in MetaPost with MkIV

2008-10-30 Thread Hans Hagen
picture temp ; path mask ; draw (0,1cm)--(2cm,1cm) ; draw (1cm,0)--(1cm,2cm) ; temp := currentpicture ; currentpicture := nullpicture ; mask := unitsquare scaled 2cm -- reverse fullsquare scaled 1cm shifted (1cm,1cm) -- cycle ; clip temp to mask ; currentpicture := temp ; draw

Re: [NTG-context] Clipping bug in MetaPost with MkIV

2008-10-30 Thread luigi scarso
shifted (1cm,1cm) -- cycle ; clip temp to mask ; currentpicture := temp ; draw fullsquare scaled 5mm shifted (1cm,1cm) ; temp := currentpicture ; currentpicture := nullpicture ; externalfigure holz280.jpg scaled 2cm ; addto currentpicture also temp ; \stopMPcode \stoptext i

Re: [NTG-context] Clipping bug in MetaPost with MkIV

2008-10-30 Thread luigi scarso
are in the attachment. \starttext \startMPcode picture temp ; path mask ; draw (0,1cm)--(2cm,1cm) ; draw (1cm,0)--(1cm,2cm) ; temp := currentpicture ; currentpicture := nullpicture ; mask := unitsquare scaled 2cm -- reverse fullsquare scaled 1cm shifted (1cm,1cm) -- cycle ; clip temp

Re: [NTG-context] new beta

2008-10-22 Thread Wolfgang Schuster
{\hss\flushnextbox\hss}% - \setbox\scratchbox\hbox{\expanded{\clip[\c!width=#2,\c!height=\the\nextboxht]{\box\scratchbox}}}% + \setbox\nextbox\hbox{\expanded{\clip[\c!width=#2,\c!height=\the\nextboxht]{\flushnextbox}}}% \fi \ifdim\nextboxht#3\relax \setbox\nextbox

Re: [NTG-context] new beta

2008-10-22 Thread Hans Hagen
{\offinterlineskip - \setbox\scratchbox\hbox{\expanded{\clip[\c!width=#2,\c!height=\the\nextboxht]{\box\scratchbox}}}% interesting Hans - Hans Hagen | PRAGMA ADE

[NTG-context] TeX-MP interaction in mkii and mkiv

2008-10-01 Thread Aditya Mahajan
:= \sometxt[taspresent:sometxt:right]{\folio} ysized 6cm; clip Left to boundingbox Left xyscaled(0,3cm) ; if PageNumber 10: clip Right to boundingbox Right xyscaled(0,3cm) shifted (bbwidth(Right)/2,0) ; draw Left shifted (14.26cm,-.5cm) ; draw Right shifted (14.26cm,-.5cm) ; else : clip

Re: [NTG-context] LuaTeX problems

2008-06-26 Thread Diego Depaoli
postponed ) * and this is the piece code causing the issue begins here \setupexternalfigures[location={local,global,default}] \startpostponing[4] \offset [leftoffset=-\backspace, topoffset=-\dimexpr\topspace+\headerheight\relax] {\clip [width=\paperwidth] {\externalfigure[cow

Re: [NTG-context] Booklet hint

2008-06-23 Thread Wolfgang Schuster
}] \setuppapersize[A5][A4, landscape] \setuparranging[2UP] \startpostponing[4] \offset [leftoffset=-\backspace, topoffset=-\dimexpr\topspace+\headerheight\relax] {\clip [width=\paperwidth] {\externalfigure[cow][width=2\paperwidth,height=\paperheight]}} \stoppostponing \startpostponing[5

Re: [NTG-context] Booklet hint

2008-06-23 Thread Diego Depaoli
=-\backspace, topoffset=-\dimexpr\topspace+\headerheight\relax] {\clip [width=\paperwidth] {\externalfigure[cow][width=2\paperwidth,height=\paperheight]}} \stoppostponing \startpostponing[5] \noheaderandfooterlines \offset [leftoffset=-\backspace, topoffset=-\dimexpr\topspace

Re: [NTG-context] clipping bug [or the return of the long cat]

2008-06-11 Thread Wolfgang Schuster
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

Re: [NTG-context] clipping bug [or the return of the long cat]

2008-06-11 Thread Wolfgang Schuster
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

Re: [NTG-context] clipping bug [or the return of the long cat]

2008-06-11 Thread Hans Hagen
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

Re: [NTG-context] clipping bug [or the return of the long cat]

2008-06-11 Thread Peter Rolf
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

Re: [NTG-context] clipping bug [or the return of the long cat]

2008-06-10 Thread Peter Rolf
to the prior beta version and changed only the clip part. 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

Re: [NTG-context] clipping bug [or the return of the long cat]

2008-06-10 Thread Hans Hagen
. 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

Re: [NTG-context] clipping bug [or the return of the long cat]

2008-06-10 Thread Peter Rolf
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

Re: [NTG-context] clipping bug [or the return of the long cat]

2008-06-09 Thread Peter Rolf
* 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

Re: [NTG-context] clipping bug [or the return of the long cat]

2008-06-09 Thread Hans Hagen
\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

[NTG-context] clipping bug [or the return of the long cat]

2008-05-22 Thread Peter Rolf
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

[NTG-context] The cat was too long (mkiv)

2008-05-21 Thread Peter Rolf
hi, 'minimal' example for clipping bug in mkiv: % engine=luatex \starttext \setbox\scratchbox\hbox{The cat was too long to fit in this small sentence.} \framed[offset=overlay]{\clip[width=110pt,height=20pt]{\box\scratchbox}} \stoptext final text should be The cat was too long. mkii does

Re: [NTG-context] The cat was too long (mkiv)

2008-05-21 Thread Hans Hagen
Peter Rolf wrote: hi, 'minimal' example for clipping bug in mkiv: % engine=luatex \starttext \setbox\scratchbox\hbox{The cat was too long to fit in this small sentence.} \framed[offset=overlay]{\clip[width=110pt,height=20pt]{\box\scratchbox}} \stoptext final text should

Re: [NTG-context] The cat was too long (mkiv)

2008-05-21 Thread Peter Rolf
Hans Hagen schrieb: Peter Rolf wrote: hi, 'minimal' example for clipping bug in mkiv: % engine=luatex \starttext \setbox\scratchbox\hbox{The cat was too long to fit in this small sentence.} \framed[offset=overlay]{\clip[width=110pt,height=20pt]{\box\scratchbox}} \stoptext final text

Re: [NTG-context] New Member Introductory Rant

2008-03-30 Thread Corin Royal Drummond
I wrote to the list last night, I have continued learning ConTeXt at a frightening clip. Did my first drop caps, indentations, and messed around with setting width and height. I can't remember when my computer has brought me so much fun. I'm beginning to see that there is a fair amount

Re: [NTG-context] New Member Introductory Rant

2008-03-30 Thread Marcin Borkowski
and courtesy to my half-considered diatribe is most heartening. Amazingly, you managed to answer alot of questions I wasn't fully aware I was asking. Hear, hear! ;) Since I wrote to the list last night, I have continued learning ConTeXt at a frightening clip. Did my first drop caps

<    1   2   3   >