Re: [NTG-context] Metafun scaling problem
On 10/2/2018 1:05 PM, Lutz Haseloff wrote: xsized was the solution. I wonder why xscaled worked for me for years. because we used a 1bp image at that time (was needed in two-pass approach) ... we don't have that limitation now (and 1bp is pretty inaccurate anyway) Hans - Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.nl | 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://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] Metafun scaling problem
xsized was the solution. I wonder why xscaled worked for me for years. Thanks for the fast help. Lutz Am 2. Oktober 2018 11:10:04 MESZ schrieb Hans Hagen : >On 10/2/2018 7:03 AM, Lutz Haseloff wrote: >> Hi Hans, hi all, >> >> I think, that recent context has a problem with scaling included pdf >files. >> My minimal file: >> >> \startMPpage >> draw externalfigure "cow.pdf" ; >> \stopMPpage >> >> The resulting pdf is, as the original, 97x70.6 mm, all ok. >> >> If I try to scale to the original size, i get arithmetic overflow >error. >> >> \startMPpage >> draw externalfigure "cow.pdf" xscaled 97mm yscaled 70.6mm ; >> \stopMPpage >don't use xscaled, use xsized > >if you have > >path p ; p := fullcircls scaled 1cm ; > >and then do > >draw p xscaled 97pt ; > >you multiply with a number and only get 97pt width when your p has 1 bp > >width > >externalfigure has the original dimensions (so no width 1 bp here) > >Hans > >- > Hans Hagen | PRAGMA ADE > Ridderstraat 27 | 8061 GH Hasselt | The Netherlands >tel: 038 477 53 69 | www.pragma-ade.nl | 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://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] Metafun scaling problem
On Tue, Oct 2, 2018 at 7:03 AM Lutz Haseloff wrote: > Hi Hans, hi all, > > I think, that recent context has a problem with scaling included pdf files. > > > Metapost traditional scaled math has a limited range, you can use doublefun or decimalfun (not more binaryfun) \starttext \startTEXpage \startMPcode{doublefun} draw externalfigure "cow.pdf" xscaled 97mm yscaled 70.6mm ; \stopMPcode \stopTEXpage \stoptext Page size: 13999.8 x 7410.6 pts -- luigi ___ 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://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] Metafun scaling problem
On 10/2/2018 7:03 AM, Lutz Haseloff wrote: Hi Hans, hi all, I think, that recent context has a problem with scaling included pdf files. My minimal file: \startMPpage draw externalfigure "cow.pdf" ; \stopMPpage The resulting pdf is, as the original, 97x70.6 mm, all ok. If I try to scale to the original size, i get arithmetic overflow error. \startMPpage draw externalfigure "cow.pdf" xscaled 97mm yscaled 70.6mm ; \stopMPpage don't use xscaled, use xsized if you have path p ; p := fullcircls scaled 1cm ; and then do draw p xscaled 97pt ; you multiply with a number and only get 97pt width when your p has 1 bp width externalfigure has the original dimensions (so no width 1 bp here) Hans - Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.nl | 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://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] Metafun scaling problem
On Tue, Oct 2, 2018 at 8:19 AM Lutz Haseloff wrote: > On Windows, I got it working again with current Context (20180404) and > current luatex from win32tex > (1.07 development ID 6686) > > On linux-armhf I did a fresh "./first-setup.sh --engine=luatex" and got: > > mtx-context | ConTeXt Process Management 1.02 > mtx-context | > mtx-context | main context file: > /usr/local/context/tex/texmf-context/tex/context/base/mkiv/context.mkiv > mtx-context | current version: 2018.09.30 19:32 > > and: > > This is LuaTeX, Version 1.09.0 (TeX Live 2019/dev) > > The LuaTeX team is Hans Hagen, Hartmut Henkel, Taco Hoekwater, Luigi > Scarso. > > LuaTeX merges and builds upon (parts of) the code from these projects: > > tex : Donald Knuth > etex : Peter Breitenlohner, Phil Taylor and friends > omega : John Plaice and Yannis Haralambous > aleph : Giuseppe Bilotta > pdftex : Han The Thanh and friends > kpathsea : Karl Berry, Olaf Weber and others > lua : Roberto Ierusalimschy, Waldemar Celes and Luiz Henrique de Figueiredo > metapost : John Hobby, Taco Hoekwater, Luigi Scarso, Hans Hagen and friends > pplib : Paweł Jackowski > fontforge : George Williams (partial) > luajit : Mike Pall (used in LuajitTeX) > > Compiled with libpng 1.6.35; using 1.6.35 > Compiled with lua version 5.3.5 > Compiled with mplib version 2.00 > Compiled with zlib 1.2.11; using 1.2.11 > > Development id: 6930 > > No experimental, i think. > right, it's trunk. -- luigi ___ 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://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] Metafun scaling problem
On Windows, I got it working again with current Context (20180404) and current luatex from win32tex (1.07 development ID 6686) On linux-armhf I did a fresh "./first-setup.sh --engine=luatex" and got: mtx-context | ConTeXt Process Management 1.02 mtx-context | mtx-context | main context file: /usr/local/context/tex/texmf-context/tex/context/base/mkiv/context.mkiv mtx-context | current version: 2018.09.30 19:32 and: This is LuaTeX, Version 1.09.0 (TeX Live 2019/dev) The LuaTeX team is Hans Hagen, Hartmut Henkel, Taco Hoekwater, Luigi Scarso. LuaTeX merges and builds upon (parts of) the code from these projects: tex : Donald Knuth etex : Peter Breitenlohner, Phil Taylor and friends omega : John Plaice and Yannis Haralambous aleph : Giuseppe Bilotta pdftex: Han The Thanh and friends kpathsea : Karl Berry, Olaf Weber and others lua : Roberto Ierusalimschy, Waldemar Celes and Luiz Henrique de Figueiredo metapost : John Hobby, Taco Hoekwater, Luigi Scarso, Hans Hagen and friends pplib : Paweł Jackowski fontforge : George Williams (partial) luajit: Mike Pall (used in LuajitTeX) Compiled with libpng 1.6.35; using 1.6.35 Compiled with lua version 5.3.5 Compiled with mplib version 2.00 Compiled with zlib 1.2.11; using 1.2.11 Development id: 6930 No experimental, i think. Am 2. Oktober 2018 07:12:02 MESZ schrieb luigi scarso : >On Tue, Oct 2, 2018 at 7:03 AM Lutz Haseloff > >wrote: > >> Hi Hans, hi all, >> >> I think, that recent context has a problem with scaling included pdf >files. >> My minimal file: >> >> \startMPpage >> draw externalfigure "cow.pdf" ; >> \stopMPpage >> >> The resulting pdf is, as the original, 97x70.6 mm, all ok. >> >> If I try to scale to the original size, i get arithmetic overflow >error. >> >> \startMPpage >> draw externalfigure "cow.pdf" xscaled 97mm yscaled 70.6mm ; >> \stopMPpage >> >> >> Whe i scale it down, the pdf gets really big. >> >> \startMPpage >> draw externalfigure "cow.pdf" xscaled 27.5mm yscaled 20mm ; >> \stopMPpage >> >> results in a pdf with width of 4.938,8 mm and height of 2.612,3 mm. >> >> I tested with recent context and luatex under windows 64 and >linux-armhf. >> >> which context and luatex version ? Are you using experimental ? >-- >luigi ___ 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://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] Metafun scaling problem
On Tue, Oct 2, 2018 at 7:03 AM Lutz Haseloff wrote: > Hi Hans, hi all, > > I think, that recent context has a problem with scaling included pdf files. > My minimal file: > > \startMPpage > draw externalfigure "cow.pdf" ; > \stopMPpage > > The resulting pdf is, as the original, 97x70.6 mm, all ok. > > If I try to scale to the original size, i get arithmetic overflow error. > > \startMPpage > draw externalfigure "cow.pdf" xscaled 97mm yscaled 70.6mm ; > \stopMPpage > > > Whe i scale it down, the pdf gets really big. > > \startMPpage > draw externalfigure "cow.pdf" xscaled 27.5mm yscaled 20mm ; > \stopMPpage > > results in a pdf with width of 4.938,8 mm and height of 2.612,3 mm. > > I tested with recent context and luatex under windows 64 and linux-armhf. > > which context and luatex version ? Are you using experimental ? -- luigi ___ 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://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
[NTG-context] Metafun scaling problem
Hi Hans, hi all, I think, that recent context has a problem with scaling included pdf files. My minimal file: \startMPpage draw externalfigure "cow.pdf" ; \stopMPpage The resulting pdf is, as the original, 97x70.6 mm, all ok. If I try to scale to the original size, i get arithmetic overflow error. \startMPpage draw externalfigure "cow.pdf" xscaled 97mm yscaled 70.6mm ; \stopMPpage Whe i scale it down, the pdf gets really big. \startMPpage draw externalfigure "cow.pdf" xscaled 27.5mm yscaled 20mm ; \stopMPpage results in a pdf with width of 4.938,8 mm and height of 2.612,3 mm. I tested with recent context and luatex under windows 64 and linux-armhf. Greetings Lutz___ 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://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___