[NTG-context] Re: hard clipping in ConTeXt?

2023-11-11 Thread Hans Hagen via ntg-context
On 11/10/2023 6:17 PM, Pablo Rodriguez via ntg-context wrote: Dear list, I have the following sample: \setuplayout[page] \starttext \clip[hoffset=5mm, voffset=5mm, width=15mm, height=15mm] {\externalfigure[xml-mkiv.pdf]} \stopnotmode \stoptext Using PDF.js (from

[NTG-context] hard clipping in ConTeXt?

2023-11-10 Thread Pablo Rodriguez via ntg-context
Dear list, I have the following sample: \setuplayout[page] \starttext \clip[hoffset=5mm, voffset=5mm, width=15mm, height=15mm] {\externalfigure[xml-mkiv.pdf]} \stopnotmode \stoptext Using PDF.js (from current Firefox), xpdf, Evince, mupdf-gl, the viewer is able to find

Re: [NTG-context] Feynman Diagrams

2023-04-12 Thread Aditya Mahajan via ntg-context
icture; enddef; tile_from_string (gray10, " ... /"& " .*. /"& " ... "); tile_from_string (gray25, " .. /"& " *. "); tile_from_string (gray50, " .* /"& " *. "); tile_from_string (gray75,

Re: [NTG-context] including documents with mediaclips in other documents

2023-02-15 Thread Hans Hagen via ntg-context
On 2/15/2023 5:35 PM, Pablo Rodriguez via ntg-context wrote: On 2/14/23 22:43, Hans Hagen via ntg-context wrote: On 2/14/2023 7:41 PM, Pablo Rodriguez via ntg-context wrote: [...] Given this sample, is there any way to include the page (or the whole document) with the media clip and all its

Re: [NTG-context] including documents with mediaclips in other documents

2023-02-15 Thread Pablo Rodriguez via ntg-context
On 2/14/23 22:43, Hans Hagen via ntg-context wrote: > On 2/14/2023 7:41 PM, Pablo Rodriguez via ntg-context wrote: >> [...] >> Given this sample, is there any way to include the page (or the whole >> document) with the media clip and all its functionalty? > currently

Re: [NTG-context] including documents with mediaclips in other documents

2023-02-14 Thread Hans Hagen via ntg-context
][audio.mp3] [embed=yes, auto] \placerenderingwindow[myrenderingwindow][key-name] \page \null\page \stoptext I want to include the second page in another document. \externalfigure[document.pdf][page=2, interaction=all] would be the right command, but it looses the media clip. A complete

[NTG-context] including documents with mediaclips in other documents

2023-02-14 Thread Pablo Rodriguez via ntg-context
][key-name] \page \null\page \stoptext I want to include the second page in another document. \externalfigure[document.pdf][page=2, interaction=all] would be the right command, but it looses the media clip. A complete sample would be: \setupinteraction[state=start] \starttext

Re: [NTG-context] question about multimedia renderings

2023-01-16 Thread Pablo Rodriguez via ntg-context
MediaScreenParams"), +BE = pdfdictionary { +O = tonumber(option[v_opacity]) or 1.0, +}, +} local clip = pdfdictionary { Type = pdfconstant("MediaClip"), S= pdfconstant("MCD&qu

Re: [NTG-context] question about multimedia renderings

2023-01-15 Thread Michal Vlasák via ntg-context
ename ~= "" then local isurl= find(filename,"://",1,true) local mimetype = specification.mimetype or specification.mime -- local start = pdfdictionary { -- Type = pdfconstant("MediaOffset"), -- S = pdfconst

Re: [NTG-context] About macro numberstriped ()

2022-10-02 Thread Fabrice Couvreur via ntg-context
&& > for i = d step d until diag: > (-diag, i) -- (diag, i) && > (-diag,-i) -- (diag,-i) && > endfor nocycle > withpen currentpen ; > ) ; > thestripe := thestripe shifted center boundingbox p ; > thestripe := thestripe rotatedaround(center boundingbox p, a)

Re: [NTG-context] About macro numberstriped ()

2022-10-02 Thread Mikael Sundqvist via ntg-context
box p)) ) ; thestripe := image ( draw (-diag,0) -- (diag, 0) && for i = d step d until diag: (-diag, i) -- (diag, i) && (-diag,-i) -- (diag,-i) && endfor nocycle withpen currentpen ; ) ; thestripe := thestripe shifted center boundingbox p ; thestripe := thestripe rotatedaround(c

Re: [NTG-context] Clipping multiple PDFs

2022-08-22 Thread Jethro Djan via ntg-context
fying the individual files themselves. >> [...] >> The problem is the original page numbers show and I’d prefer that it >> did not. So I thought maybe I could clip all the page numbers from >> every page (since they are all in the same position across all the >> pages

Re: [NTG-context] Clipping multiple PDFs

2022-08-22 Thread Jethro Djan via ntg-context
odriguez via ntg-context > wrote: > > On 8/18/22 02:13, jethro Reuel via ntg-context wrote: >> Hello, >> >> I am trying to put multiple PDF’s that were typeset differently into >> one document without modifying the individual files themselves. >> [...] >>

Re: [NTG-context] Clipping multiple PDFs

2022-08-22 Thread Jethro Djan via ntg-context
xt < ntg-context@ntg.nl> wrote: On 8/18/22 02:13, jethro Reuel via ntg-context wrote: Hello, I am trying to put multiple PDF’s that were typeset differently into one document without modifying the individual files themselves. [...] The problem is the original page numbers show and I’d prefer

Re: [NTG-context] Clipping multiple PDFs

2022-08-21 Thread Pablo Rodriguez via ntg-context
it > did not. So I thought maybe I could clip all the page numbers from > every page (since they are all in the same position across all the > pages) but I don’t know how to do this with the \clip command. Any > ideas? I already tried using \input but it gives some weird output in > so

[NTG-context] Clipping multiple PDFs

2022-08-17 Thread jethro Reuel via ntg-context
show and I’d prefer that it did not. So I thought maybe I could clip all the page numbers from every page (since they are all in the same position across all the pages) but I don’t know how to do this with the \clip command. Any ideas? I already tried using \input but it gives some weird output

Re: [NTG-context] image with rounded corners

2022-08-12 Thread Henning Hraban Ramm via ntg-context
Am 12.08.22 um 13:10 schrieb Wolfgang Schuster via ntg-context: Henning Hraban Ramm via ntg-context schrieb am 12.08.2022 um 10:57: Hi, can ConTeXt make rounded image corners? \setupexternalfigures[location=default] \starttext \startMPclip{rounded corner} clip currentpicture

Re: [NTG-context] image with rounded corners

2022-08-12 Thread Wolfgang Schuster via ntg-context
][{%   \externalfigure[mill][width=\overlaywidth] }] \framed[background=Mill,width=3cm,height=4cm, corner=round,radius=1cm, backgroundcorner=round,backgroundradius=1cm, offset=overlay]{} \setupexternalfigures[location=default] \starttext \startMPclip{rounded corner} clip currentpicture

Re: [NTG-context] help with facing page image

2022-03-10 Thread jbf via ntg-context
[pageinjection:chapter:image] \clip [width=\framedwidth,height=\framedheight] {\centerbox{% \externalfigure [\dummyparameter{name}] [%factor=, width=\structureuservariable{width}, height=\structureuservariable{height

Re: [NTG-context] help with facing page image

2022-03-09 Thread śrīrāma via ntg-context
images of cows, 'spider', 'hacker' and 'mill' and have them renamed as {chap-cover-1, ... chap-cover-6} for a total of 6 chapter images. %%% start example \definepageinjectionalternative [chapter:image] [renderingsetup=pageinjection:chapter:image] \startsetups [pageinjection:chapter:imag

Re: [NTG-context] help with facing page image

2022-03-09 Thread jbf via ntg-context
s userdata argument of \startchapter but in the commented \setuphead setting you can see how this can be automated. begin example % \definepageinjectionalternative %   [chapter:image] %   [renderingsetup=pageinjection:chapter:image] % % \startsetups [pageinjection:chapter:image] %   \clip % 

Re: [NTG-context] help with facing page image

2022-03-07 Thread Wolfgang Schuster via ntg-context
a argument of \startchapter but in the commented \setuphead setting you can see how this can be automated. begin example % \definepageinjectionalternative %   [chapter:image] %   [renderingsetup=pageinjection:chapter:image] % % \startsetups [pageinjection:chapter:image] %   \clip % 

Re: [NTG-context] tikzplot displacement result [solved]

2021-12-14 Thread Jan-Erik Hägglöf via ntg-context
true, > xmin=-3.2488079448294145, > xmax=34.87398305791419, > ymin=-7.496155590728956, > ymax=11.53265632858922, > xtick={-3.0,-2.0,...,34.0}, > ytick={-7.0,-6.0,...,11.0},] > %\clip(-3.2488079448294145,-7.496155590728956) rectangle > (34.87398305791419,11.53265632858922);

Re: [NTG-context] tikzplot displacement result

2021-12-12 Thread Gavin via ntg-context
2.0,...,34.0}, ytick={-7.0,-6.0,...,11.0},] %\clip(-3.2488079448294145,-7.496155590728956) rectangle (34.87398305791419,11.53265632858922); \addplot[line width=2.pt,color=ffvvqq,smooth,samples=100,domain=-3.2488079448294145:34.87398305791419]{x+3} node[below right, pos= 0.1]{$h$}; \stopa

[NTG-context] tikzplot displacement result

2021-12-12 Thread Jan-Erik Hägglöf via ntg-context
min=-3.2488079448294145, xmax=34.87398305791419, ymin=-7.496155590728956, ymax=11.53265632858922, xtick={-3.0,-2.0,...,34.0}, ytick={-7.0,-6.0,...,11.0},] \clip(-3.2488079448294145,-7.496155590728956) rectangle (34.87398305791419,11.53265632858922); \draw[line width=2.pt,color=ffvvqq,smooth,samples=

Re: [NTG-context] A book with sections

2021-10-24 Thread Duncan Hothersall via ntg-context
cify a different display style using setups. The definition for > \Part is below, \Chapter is very similar so I haven't included it. > > %% Double rule above part title > \startsetups PartSetup > \setupheader[state=empty] > \par > \startMPcode >draw (0,2mm)--(TextWidth

Re: [NTG-context] A book with sections

2021-10-23 Thread Bruce Horrocks via ntg-context
Double rule above part title \startsetups PartSetup \setupheader[state=empty] \par \startMPcode draw (0,2mm)--(TextWidth,2mm) withpen pensquare scaled 1.5mm ; draw (0,0)--(TextWidth,0) withpen pensquare scaled 1.0mm ; clip currentpicture to unitsquare yscaled 1cm xscaled TextWidth \stop

Re: [NTG-context] Strange new behaviour of the mailing list

2021-08-21 Thread Bruce Horrocks via ntg-context
gt;> completely useless when you want to visually scan down the list for a >>> particular person. >> >> It doesn’t make sense to argue about this, but it’s apparently a setting (or >> unchangeable behavior) of your Email app. >> >> My Apple Mail 12.4 on

Re: [NTG-context] JavaScript in multimedia PDF

2021-08-11 Thread Michal Vlasák via ntg-context
ocal rendition = pdfdictionary { Type = pdfconstant("Rendition"), S= pdfconstant("MR"), -N= label, +N= pdfunicode(label), C= pdfreference(pdfflushobject(clip)), }

Re: [NTG-context] JavaScript in multimedia PDF

2021-08-09 Thread Pablo Rodriguez via ntg-context
ard specifies that the name (/N) of Rendition PDF > object should be Unicode, but that doesn't seem to make it work either, > as does deleting the name of the media clip (which was the same). > > (But I now get "Invalid arguments" error for the "app.media.openPlayer" > ca

Re: [NTG-context] JavaScript in multimedia PDF

2021-08-08 Thread Michal Vlasák via ntg-context
ject, the rendition query returns null. The PDF 1.7 standard specifies that the name (/N) of Rendition PDF object should be Unicode, but that doesn't seem to make it work either, as does deleting the name of the media clip (which was the same). (But I now get "Invalid arguments" error fo

Re: [NTG-context] Strange new behaviour of the mailing list

2021-08-01 Thread Bruce Horrocks via ntg-context
ently a setting (or > unchangeable behavior) of your Email app. > > My Apple Mail 12.4 on Mojave shows the same message like attached (dark mode). I'm on Big Sur and I don't get the "name via ntg-context"

Re: [NTG-context] multimedia PDF in ConTeXt

2021-07-30 Thread Michal Vlasák via ntg-context
e, -- yes or no -compress = false, +file = filename, +mimetype = mimetype, -- yes or no +compress = false, +forcereference = true, } end local clip = pdfdictionary {

[NTG-context] Multimedia, PDF and ConTeXt

2021-07-26 Thread Michal Vlasák via ntg-context
Player) +} local descriptor = pdfdictionary { Type = pdfconstant("Filespec"), F= filename, } if isurl then descriptor.FS = pdfconstant("URL") +descriptor = pdfreference(pdfflushobject(descriptor))

Re: [NTG-context] Delivering the value of a variable in MetaFun to ConTeXt

2021-06-24 Thread Jeong Dal
; draw G -- z[i+1] dashed evenly; draw z[0] for k=0 upto i: --z[k] endfor dashed evenly; clip currentpicture to q; enddef; def linesUD(expr i) = draw p; draw z0 for k=0 upto i+1: --z[k] endfor dashed evenly; % AM: removed. Set in in the main code %

Re: [NTG-context] Delivering the value of a variable in MetaFun to ConTeXt

2021-06-23 Thread Aditya Mahajan
M-N))*u] = whatever[C,D]; >fi; >H >enddef; > >def grayUD(expr i) = > draw G -- if ypart(B)=ypart(G): B -- C else: C -- B fi --z[i]; > filldraw z[i]+2*(G-z[i])*u -- z[i] -- z[i+1] -- z[i+1]+(G-z[i])*u -- > cycle withcolor .75white; >

Re: [NTG-context] simplifying repeated macro calls in metafun

2021-06-23 Thread Jeong Dal
aw G -- if ypart(B)=ypart(G): B -- C else: C -- B fi --z[i]; filldraw z[i]+2*(G-z[i])*u -- z[i] -- z[i+1] -- z[i+1]+(G-z[i])*u -- cycle withcolor .75white; draw G -- z[i+1] dashed evenly; draw z[0] for k=0 upto i: --z[k] endfor dashed evenly; clip currentpicture to

[NTG-context] simplifying repeated macro calls in metafun

2021-06-20 Thread Jeong Dal
) = draw G -- if ypart(B)=ypart(G): B -- C else: C -- B fi --z[i]; filldraw z[i]+2*(G-z[i])*u -- z[i] -- z[i+1] -- z[i+1]+(G-z[i])*u -- cycle withcolor .75white; draw G -- z[i+1] dashed evenly; draw z[0] for k=0 upto i: --z[k] endfor dashed evenly; clip currentpicture to q

Re: [NTG-context] custom zig zag sidebars

2021-04-29 Thread Otared Kavian
h q ; q := pattern xscaled patternlength yscaled patternheight >> rotated (angle(stp)) ; >>p := a ; >>forever : >>draw >>q shifted p >>withpen pencircle scaled linewidth >&g

Re: [NTG-context] custom zig zag sidebars

2021-04-29 Thread mf
for ;    endgroup ;    clip currentpicture to    (xpart llcorner currentpicture, ypart b) --    (xpart lrcorner currentpicture, ypart b) --    (xpart urcorner currentpicture, ypart a) --    (xpart ulcorner currentpicture, ypart a) -- cycle ;    ) ; enddef ; Thank

Re: [NTG-context] custom zig zag sidebars

2021-04-28 Thread Hans Hagen
q shifted p withpen pencircle scaled linewidth withcolor linecolor ; p := p + stp ; exitif arclength( a -- p ) > arclength( a -- b ) ; endfor ; endgroup ; clip currentpict

Re: [NTG-context] lmt_outline

2021-03-11 Thread Mohammad Hossein Bateni
, > > fillcolor = "white", > > kind = "reverse", > > align = "r2l", > > ] scaled 3mm; > > \stopMPcode > > \stoptext > > > > 1. This works well on a plain background. I can specify the background > > color in fillcol

Re: [NTG-context] lmt_outline

2021-03-10 Thread Aditya Mahajan
uot;, > kind = "reverse", > align = "r2l", > ] scaled 3mm; > \stopMPcode > \stoptext > > 1. This works well on a plain background. I can specify the background > color in fillcolor and get the outline effect. When the background is an > ima

[NTG-context] lmt_outline

2021-03-10 Thread Mohammad Hossein Bateni
nd. I can specify the background color in fillcolor and get the outline effect. When the background is an image, this does not work too well. Can we use some clip trickery to allow for "transparent" fill? Ideally I want to set the fillcolor to a special value that would lead to o

Re: [NTG-context] Shaded large letters in LMTX

2021-03-02 Thread Keith McKay
i;     endfor ;     eofill bb withcolor "darkgreen" ; % you need to specify your background     clip currentpicture to bb ; \stopMPpage I think I should add that to the metafun manual. Hans -  

Re: [NTG-context] Shaded large letters in LMTX

2021-03-02 Thread Hans Hagen
p := bb enlarged 2cm ; fill pp withshademethod "linear" withshadedirection down withshadecolors (red, blue) ; for i within tt : nofill pathpart i; endfor ; eofill bb withcolor "darkgreen" ; % you need to specify your background clip cur

[NTG-context] new font trickery

2021-01-24 Thread Hans Hagen
}% \hbox{\char103}% \hbox{\char104}% \stopTEXpage \startsetups box:demo:whatever \startMPcode picture p ; p := image (draw figure "hacker.jpg" ysized 10pt); fill boundingbox p enlarged .5pt randomized 2pt withcolor "darkgray" ; clip p to boundin

Re: [NTG-context] \clip isn’t clipping any more

2021-01-20 Thread Hans Hagen
On 1/20/2021 11:24 AM, Henning Hraban Ramm wrote: In the following example, the image is calculated after the clipped width, but the full image is shown: \setupexternalfigures[location=default] \showframe \starttext \strut \hfill\clip[width=20mm]{\externalfigure[cow][height=30mm]} \stoptext

[NTG-context] \clip isn’t clipping any more

2021-01-20 Thread Henning Hraban Ramm
In the following example, the image is calculated after the clipped width, but the full image is shown: \setupexternalfigures[location=default] \showframe \starttext \strut \hfill\clip[width=20mm]{\externalfigure[cow][height=30mm]} \stoptext This happens in current LMTX (2020-01-18

Re: [NTG-context] lmtx

2021-01-19 Thread Jan U. Hasecke
Hi, I am afraid that clip stops working in current version: 2021.01.18 18:19 \setupexternalfigure[location=default] \showframe \starttext \clip[height=50mm,voffset=10mm] {\externalfigure[cow.pdf][width=\textwidth]} \stoptext juh -- Autoren-Homepage: . http

Re: [NTG-context] lmtx

2021-01-19 Thread Hans Hagen
On 1/19/2021 8:12 PM, Jan U. Hasecke wrote: Hi, I am afraid that clip stops working in current version: 2021.01.18 18:19 \setupexternalfigure[location=default] \showframe \starttext \clip[height=50mm,voffset=10mm] {\externalfigure[cow.pdf][width=\textwidth]} \stoptext hm, i access

Re: [NTG-context] image align in \clip

2020-12-09 Thread Pablo Rodriguez
On 12/9/20 9:38 AM, Jan U. Hasecke wrote: > Dear all, > > I use \clip to simplify working with images. Hi Jan-Ulrich, this command is really useful. > In my real document the clipped image is shifted to the right as if > indented by 1em or so. I have read that Hans solved

Re: [NTG-context] image align in \clip

2020-12-09 Thread Jan U. Hasecke
Am 09.12.20 um 11:26 schrieb Hans Hagen: > what if you put \removeunwantedspaces in front of the clip The space vanishes when I put it right before \externalfigure. Thanks a lot, Hans! (Still, I would like to know how the space came up in the first place.)

[NTG-context] image align in \clip

2020-12-09 Thread Jan U. Hasecke
Dear all, I use \clip to simplify working with images. I have a problem that I am unable to reproduce in a MWE. \setupexternalfigure[location=default] \showframe \starttext \externalfigure[cow.pdf][width=\textwidth] \clip[height=50mm] {\externalfigure[cow.pdf][width=\textwidth

Re: [NTG-context] image align in \clip

2020-12-09 Thread Hans Hagen
On 12/9/2020 12:08 PM, Jan U. Hasecke wrote: Am 09.12.20 um 11:26 schrieb Hans Hagen: what if you put \removeunwantedspaces in front of the clip The space vanishes when I put it right before \externalfigure. Thanks a lot, Hans! (Still, I would like to know how the space came up in the first

Re: [NTG-context] image align in \clip

2020-12-09 Thread Hans Hagen
On 12/9/2020 9:38 AM, Jan U. Hasecke wrote: Dear all, I use \clip to simplify working with images. I have a problem that I am unable to reproduce in a MWE. \setupexternalfigure[location=default] \showframe \starttext \externalfigure[cow.pdf][width=\textwidth] \clip[height=50mm

Re: [NTG-context] Resetting image width

2020-07-06 Thread Henning Hraban Ramm
o argument is also valid. > > \externalfigure[dummy][width=,height=.5\textheight] I thought so and was sure I tried it and got an error, but I recognized I tried "width=," with \clip, and that can’t work, of course. Sorry for the noise. Hraban __

Re: [NTG-context] image across 2 page spread

2020-04-30 Thread Henning Hraban Ramm
on) across a two-page > spread, such that there is no gap. You need to use \clip and calculate the sections. Thangalin already gave you an example. Here’s a convoluted one that I use: % full double page image % usage: % \startpostponing[pagenumber] % \doublepagefig[reference][left/right/width/he

Re: [NTG-context] image across 2 page spread

2020-04-29 Thread Thangalin
Would something like this work? \setupbackgrounds[page][ background={BookIllustrationLayer}, ] \definelayer[BookIllustrationLayer][ width=\paperwidth, height=.5\paperheight, y=.5\paperheight, position=no, repeat=no, ] \setlayer[BookIllustrationLayer]{% \clip[x=\doifelseoddpage

[NTG-context] [question] \clipping some data from a pdf

2020-01-28 Thread Floris van Manen
Does anyone know? Using the latest LMTX, i try to clip some portion of an external pdf page, then resize that portion on top a new page. i use the \clip command. \starttext \scale[width=100mm, hwight=100mm]{\clip[width=150mm, height=120mm, hoffset=30mm, voffset=40mm]{\externalfigure[drawing.pdf

Re: [NTG-context] problems with images, layers and crop marks

2019-07-08 Thread Henning Hraban Ramm
Zitat von Hans Hagen : On 7/8/2019 12:26 PM, Henning Hraban Ramm wrote: I found the culprit, it’s \clip : \setuppapersize[A6][C6] \setuplayout[ location=middle, marking=on, ] \starttext \clip[     hoffset=\textwidth,     voffset=5mm,     width=\pagewidth

Re: [NTG-context] problems with images, layers and crop marks

2019-07-08 Thread Hans Hagen
On 7/8/2019 12:26 PM, Henning Hraban Ramm wrote: I found the culprit, it’s \clip : \setuppapersize[A6][C6] \setuplayout[ location=middle, marking=on, ] \starttext \clip[     hoffset=\textwidth,     voffset=5mm,     width=\pagewidth,     height=\pageheight

Re: [NTG-context] problems with images, layers and crop marks

2019-07-08 Thread Henning Hraban Ramm
I found the culprit, it’s \clip : \setuppapersize[A6][C6] \setuplayout[ location=middle, marking=on, ] \starttext \clip[ hoffset=\textwidth, voffset=5mm, width=\pagewidth, height=\pageheight

Re: [NTG-context] (forw) Re: Strange behavior concerning pdf-output of externalfigures

2019-05-21 Thread Alan Braslau
On Fri, 17 May 2019 09:43:29 +0200 Rudolf Bahr wrote: > And then the same .png-image > to which I added a red frame by GIMP2.10. This one shows artefacts in > ConTeXt! I *always* use MetaPost to add features (and to clip) images. These features (arrows, labels, etc.) are then

Re: [NTG-context] adjusting tikz pictures

2019-04-24 Thread Aditya Mahajan
.91, xtick={-12,-11,...,12}, ytick={-13,-12,...,8},] \clip(-12.68,-13.47) rectangle (12.68,8.91); \fill[line width=2pt,color=zzttqq,fill=zzttqq,fill opacity=0.1000149011612] (-7.7,2.75) -- (0.88,2.57) -- (-3.04,-3.37) -- cycle; \draw [line width=2pt,color=zzttqq] (-7.7,2.75)-- (0.88,2.57); \draw [l

[NTG-context] adjusting tikz pictures

2019-04-24 Thread Gour
max=12.678, ymin=-13.472, ymax=8.91, xtick={-12,-11,...,12}, ytick={-13,-12,...,8},] \clip(-12.68,-13.47) rectangle (12.68,8.91); \fill[line width=2pt,color=zzttqq,fill=zzttqq,fill opacity=0.1000149011612] (-7.7,2.75) -- (0.88,2.57) -- (-3.04,-3.37) -- cycle; \draw [line width=2pt,co

Re: [NTG-context] filling overlap ?

2018-10-07 Thread Floris van Manen
shifted (0mm, -4mm); fill p withcolor red ; clip currentpicture to q ; clip currentpicture to r ; draw p ; draw q ; draw r ; > On 7 Oct 2018, at 13:19, Mikael P. Sundqvist wrote: > > On Sun, Oct 7, 2018 at 1:10 PM Floris van Manen wrote: >> >> Could someone poin

Re: [NTG-context] Which color model shall I use

2018-10-01 Thread Jan U. Hasecke
.st1{fill:#FF;} .st2{fill:#DD4901;} .st3{fill:#327AB8;} .st4{fill:none;} .st5{clip-path:url(#SVGID_2_);} .st6{clip-path:url(#SVGID_4_);} .st7{clip-path:url(#SVGID_6_);} .st8{clip-path:url(#SVGID_8_);} When I pick the screen colors wit

[NTG-context] about \useexternalsoundtrack

2018-07-02 Thread Pablo Rodriguez
Dear list, I’m interesting in embedding media clip objects (sounds) in PDF documents and using them with JavaScript (something I’d have to learn later). I found the \useexternalsoundtrack command, but I don’t get it working (https://mailman.ntg.nl/pipermail/ntg-context/2006/016503.html). I

Re: [NTG-context] image file resolver in Lua?

2018-02-05 Thread Rudolf Bahr
postponing is important, otherwise the page numbering gets wrong > > > \def\pagefig{\dosingleempty\doPagefig} > > > \def\doPagefig[#1]#2#3{ > > > % calculate image size > > > \startfullpagemakeup > > >\externalfigure[#3][width=1mm] % dummy to set ima

[NTG-context] Scale figure to fill a box

2018-02-04 Thread Wolfgang Schuster
the image extends outside of the borders of the frame. A option to clip parts – which can be disabled – of the image which are outside of the frame would be a nice extension to this command (e.g. in case you want a image in a table cell). \setupexternalfigure[location=default] \defineframed

Re: [NTG-context] image file resolver in Lua?

2018-02-04 Thread Hans Hagen
t;, \Resolution)}} \def\mystartY{\ctxlua{ctxStartY("#3", \Resolution)}} % image \setlayerframed[bglayer][% frame=off, offset=overlay, x=21mm, y=\mystartY, height=\myClipHeight, width=\textwidth, align=flushleft, ]{% \clip[ width=\te

Re: [NTG-context] image file resolver in Lua?

2018-02-02 Thread Rudolf Bahr
ight{\ctxlua{ctxClipHeight("#3", \Resolution)}} > \def\mystartY{\ctxlua{ctxStartY("#3", \Resolution)}} > % image > \setlayerframed[bglayer][% > frame=off, > offset=overlay, > x=21mm, > y=\mystartY, > height=\myClipHeight, > wid

Re: [NTG-context] image file resolver in Lua?

2018-02-02 Thread Henning Hraban Ramm
pHeight{\ctxlua{ctxClipHeight("#3", \Resolution)}} \def\mystartY{\ctxlua{ctxStartY("#3", \Resolution)}} % image \setlayerframed[bglayer][% frame=off, offset=overlay, x=21mm, y=\mystartY, height=\myClipHeight, width=\textwidth, align=flushleft, ]{%

Re: [NTG-context] automatically splitting big images (calculation problem)

2017-09-10 Thread Henning Hraban Ramm
ure[#1][#2]{ >> \ifsecondargument >> \dorecurse{#1}{% >> \tooltip{\clip[ >> height=\textheight, >> voffset=\dimexpr((\recurselevel - 1)\textheight),]{% > > voffset=\numexpr(\recurselevel -1)\textheight]{% Aha, numexpr. Danke! Am 2017-09-10 um 10:09

Re: [NTG-context] automatically splitting big images (calculation problem)

2017-09-10 Thread Herbert Voss
Am 10.09.2017 um 09:13 schrieb Henning Hraban Ramm: My current code actually looks like % split in #1 page size parts \def\clipfigure{\dodoubleempty\doClipFigure} \def\doClipFigure[#1][#2]{ \ifsecondargument \dorecurse{#1}{% \tooltip{\clip[ height=\textheight, voffset=\dimexpr

Re: [NTG-context] automatically splitting big images (calculation problem)

2017-09-10 Thread Herbert Voss
Am 10.09.2017 um 09:13 schrieb Henning Hraban Ramm: \def\ausschnitt{\dodoubleempty\doAusschnitt} \def\doAusschnitt#1#2{\clip[height=\textheight,voffset=#1]{\externalfigure[#2][width=\textwidth]}\par} This also doesn’t work; there I’m trying to set the y coordinate for the start like

Re: [NTG-context] automatically splitting big images (calculation problem)

2017-09-10 Thread Henning Hraban Ramm
def\doClipFigure[#1][#2]{ >> \dorecurse{#1}{% >> \clip[ >>height=\textheight, >>voffset=\dimexpr((\recurselevel -1) * \textheight) >> ]{\externalfigure[#2][width=\textwidth]}\par >> } >> } >> >> \clipfigure[3][verylongimage] >>

Re: [NTG-context] automatically splitting big images (calculation problem)

2017-09-09 Thread Aditya Mahajan
On Sat, 9 Sep 2017, Henning Hraban Ramm wrote: Ahoi, I got some long images that I’d like to split over several pages. \def\clipfigure{\dodoubleempty\doClipFigure} \def\doClipFigure[#1][#2]{ \dorecurse{#1}{% \clip[ height=\textheight, voffset=\dimexpr((\recurselevel -1

[NTG-context] automatically splitting big images (calculation problem)

2017-09-09 Thread Henning Hraban Ramm
Ahoi, I got some long images that I’d like to split over several pages. \def\clipfigure{\dodoubleempty\doClipFigure} \def\doClipFigure[#1][#2]{ \dorecurse{#1}{% \clip[ height=\textheight, voffset=\dimexpr((\recurselevel -1) * \textheight) ]{\externalfigure[#2][width=\textwidth

Re: [NTG-context] \setupfooter[color=red]: red color spills with float over next page

2016-12-19 Thread Hans Hagen
On 12/18/2016 11:00 PM, Benjamin Buchmuller wrote: Hi Hans, I finally managed to make a MWE. The issue is related to me using \clip{…} onto external figures I would like to crop in conjunction with a colored footer set-up: \starttext \setupfooter[color=red] \setupfootertexts

Re: [NTG-context] \setupfooter[color=red]: red color spills with float over next page

2016-12-18 Thread Pablo Rodriguez
On 12/18/2016 11:00 PM, Benjamin Buchmuller wrote: > Hi Hans, > > I finally managed to make a MWE. The issue is related to me using > \clip{…} onto external figures I would like to crop in conjunction with > a colored footer set-up: Hallo Benjamin, my question may be stupid, b

[NTG-context] \setupfooter[color=red]: red color spills with float over next page

2016-12-18 Thread Benjamin Buchmuller
Hi Hans, I finally managed to make a MWE. The issue is related to me using \clip{…} onto external figures I would like to crop in conjunction with a colored footer set-up: \starttext \setupfooter[color=red] \setupfootertexts [] [] [any

Re: [NTG-context] Thick border of one side of TR/TD

2016-05-22 Thread Lukáš Procházka
Hello, thanks for the answers. So my solution now is: \startuseMPgraphic{MP:ThickBtm} draw bottomboundary OverlayBox withpen pensquare scaled 1mm withcolor black; clip currentpicture to OverlayBox; \stopuseMPgraphic \installbottomframerenderer{Thick}{\useMPgraphic{MP:ThickBtm

Re: [NTG-context] two issues with interactive hyperlinks (please comment)

2016-02-25 Thread Hans Hagen
for note reference (or index reference) are fine. I’m only guessing, but I think this is the way to do it. the bad is that viewers clip lines so additional shift action is needed With named destinations, zoom is set to null (please, don’t change that ever) and you get where you need to. unless one

Re: [NTG-context] Frame and rulethickness

2015-03-28 Thread Wolfgang Schuster
\MPcolor{green} ; draw rightboundary OverlayBox withpen pencircle scaled 3pt withcolor \MPcolor{green} ; draw bottomboundary OverlayBox withpen pencircle scaled 1pt withcolor \MPcolor{green} ; clip currentpicture to OverlayBox leftenlarged 1pt rightenlarged 1.5pt

Re: [NTG-context] Problem in using vlingrid() and hlingrid() macros (Metafun)

2015-03-15 Thread Fabrice
; label.bot(btex $x$ etex,(2.97u,-0.1v)) ; label.rt(btex $y$ etex,(0.01u,3.9v)) ; label.llft(0,(0,0)) ; label.urt(A,(0,v)) ; dotlabel(,(u,-4v)) ; label.rt(C,(1.02u,-4v)) ; dotlabel.lrt(B,(2u,3v)) ; label.bot(1,(u,0)) ; label.lft(1,(0,v)) ; clip

[NTG-context] Problem in using vlingrid() and hlingrid() macros (Metafun)

2015-03-14 Thread Fabrice Couvreur
)) ; label.rt(btex $y$ etex,(0.01u,3.9v)) ; label.llft(0,(0,0)) ; dotlabel.urt(A,(0,v)) ; dotlabel(,(u,-4v)) ; label.rt(C,(1.02u,-4v)) ; dotlabel.lrt(B,(2u,3v)) ; label.bot(1,(u,0)) ; label.lft(1,(0,v)) ; clip currentpicture to p ; \stopMPcode \stoptext

Re: [NTG-context] Hatch an area with Metapost (Metafun)

2015-02-09 Thread John Kitzmiller
scaled 2pt withcolor blue; endfor; clip currentpicture to q; draw p ; draw q ; label.llft(B, llcorner p) ; label.lrt (C, lrcorner p) ; label.ulft(A, ulcorner p) ; label.urt (D, urcorner p) ; label.lft (M, z1) ; \stopMPpage …just in case it helps to clarify

Re: [NTG-context] Define a new type section with metafun

2014-12-28 Thread Fabrice
{funny} numeric h ; h := OverlayHeight ; pathp ; p := unitsquare xscaled \overlaywidth yscaled \overlayheight superellipsed 0.9 ; pickup pencircle scaled \overlaylinewidth ; fill p withcolor \MPcolor{\overlaycolor} ; draw (20,-1)--(20,h+1) withcolor red ; clip

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

2014-11-02 Thread Hans Hagen
On 10/31/2014 1:33 PM, Tobias Columbus wrote: 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

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

2014-11-02 Thread Tobias Columbus
; clip c to bbox c scaled 0.5 ; try this to see what happens: % clip c to bbox c scaled 0.5 ; draw bbox c scaled 0.5 ; and then this to solve it: clip c to bbox (c scaled 0.5) ; I tried your suggestions and attached both the example and output. Drawing and clipping solves

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

2014-10-31 Thread Tobias Columbus
-- vardef mycircle = save c ; picture c ; c := nullpicture ; addto c contour fullcircle scaled 2mm ; c enddef ; def a expr p = path _p_ ; _p_ := p ; a_impl enddef ; def a_impl text t = begingroup save c ; picture c ; c := mycircle ; clip c to bbox c scaled 0.5

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

2014-10-31 Thread Hans Hagen
= begingroup save c ; picture c ; c := mycircle ; clip c to bbox c scaled 0.5 ; addto currentpicture also c t ; addto currentpicture doublepath _p_ t ; endgroup enddef ; def b expr p = path _p_ ; _p_ := p ; b_impl enddef ; def b_impl text t = begingroup save

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

2014-10-31 Thread Tobias Columbus
= save c ; picture c ; c := nullpicture ; addto c contour fullcircle scaled 2mm ; c enddef ; def a expr p = path _p_ ; _p_ := p ; a_impl enddef ; def a_impl text t = begingroup save c ; picture c ; c := mycircle ; clip c to bbox c scaled 0.5 ; addto

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

2014-10-31 Thread Hans Hagen
:= mycircle ; clip c to bbox c scaled 0.5 ; addto currentpicture also c t ; addto currentpicture doublepath _p_ t ; endgroup enddef ; def b expr p = path _p_ ; _p_ := p ; b_impl enddef ; def b_impl text t = begingroup save c; picture c ; c := mycircle ; addto

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

2014-10-31 Thread Hans Hagen
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 bbox c scaled 0.5 ; and then this to solve it: clip c to bbox (c

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

  1   2   3   >