[NTG-context] externalfigure regression?

2023-12-03 Thread Thangalin
Hi, >From the wiki : "When the file extension is .auto or method=auto is used, ConTeXt reads the first few bytes of the file to determine the filetype. Such an auto-discovery is useful for remote images that do not have a file extension." cu

[NTG-context] externalfigure crashed

2023-11-22 Thread Hans van der Meer via ntg-context
When \externalfigure could not find the file it used to graciously place a rectangle kindly telling the user that the file has not been found.But now, however, it seems the default in this case is a crash. Very annoying in comparison with the earlier behaviour.I might make a mistake, but the MWE is

Re: [NTG-context] \externalfigure problem with displaying external images via https://live.contextgarden.net

2022-12-05 Thread Henning Hraban Ramm via ntg-context
Am 05.12.22 um 09:05 schrieb Aditya Mahajan via ntg-context: On Mon, 5 Dec 2022, Jaroslav Hajtmar via ntg-context wrote: Does anyone know what the problem might be? Why online ConTeXt is not read my PDF file and on other side read another PDF file? What does onlineConText not like? I need to g

Re: [NTG-context] \externalfigure problem with displaying external images via https://live.contextgarden.net

2022-12-05 Thread Aditya Mahajan via ntg-context
On Mon, 5 Dec 2022, Jaroslav Hajtmar via ntg-context wrote: > Does anyone know what the problem might be? Why online ConTeXt is not read my > PDF file and on other side read another PDF file? What does onlineConText not > like? > I need to get my application for printing archive certificates work

[NTG-context] \externalfigure problem with displaying external images via https://live.contextgarden.net

2022-12-04 Thread Jaroslav Hajtmar via ntg-context
Hello. A few years ago I created a PHP application for printing filled forms with PDF background. PHP application is generating ConTeXt source code, that is subsequently translated using the online application https://live.contextgarden.net. I have now discovered that the application is not fun

Re: [NTG-context] \externalfigure for only one page of a multiple page pdf

2021-04-18 Thread a . rosenstock
Thank you, Hraban!   A.     Gesendet: Donnerstag, 15. April 2021 um 19:01 Uhr Von: "Henning Hraban Ramm" An: "mailing list for ConTeXt users" Betreff: Re: [NTG-context] \externalfigure for only one page of a multiple page pdf > Am 15.04.2021 um 18:55 schrieb a.rosens

Re: [NTG-context] \externalfigure for only one page of a multiple page pdf

2021-04-15 Thread Henning Hraban Ramm
> Am 15.04.2021 um 18:55 schrieb a.rosenst...@web.de: > > Hi all, > > how is it possible to include only one page of a multiple page pdf in my > document? I found nothing in the manuals ... Dou you mean via \externalfigure? It has a documented "page" parameter: https://wiki.contextgarden.net/

[NTG-context] \externalfigure for only one page of a multiple page pdf

2021-04-15 Thread a . rosenstock
Hi all,   how is it possible to include only one page of a multiple page pdf in my document? I found nothing in the manuals ...   Thank you in advance,   Alexander     ___ If your question is of interest to othe

Re: [NTG-context] externalfigure broken with 20190222 beta

2019-02-23 Thread Hans Hagen
On 2/24/2019 12:25 AM, mf wrote: BTW \startsidebar ... \stopsidebar stopped working too. i'll upload a fix later today Hans - Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 G

Re: [NTG-context] externalfigure broken with 20190222 beta

2019-02-23 Thread mf
BTW \startsidebar ... \stopsidebar stopped working too. Massimiliano Il 23/02/19 21:58, Hans Hagen ha scritto: On 2/23/2019 5:10 PM, Rik Kabel wrote: With the following example, I get: ...eXt/tex/texmf-context/tex/context/base/mkiv/grph-inc.lua:238: attempt to call upvalue 'imgwrap' (a nil v

Re: [NTG-context] externalfigure broken with 20190222 beta

2019-02-23 Thread Hans Hagen
On 2/23/2019 5:10 PM, Rik Kabel wrote: With the following example, I get: ...eXt/tex/texmf-context/tex/context/base/mkiv/grph-inc.lua:238: attempt to call upvalue 'imgwrap' (a nil value) with the current (20190222) beta. \setupexternalfigures[location=default] \starttext \exte

Re: [NTG-context] externalfigure broken with 20190222 beta

2019-02-23 Thread Rudolf Bahr
On Sat, Feb 23, 2019 at 11:10:42AM -0500, Rik Kabel wrote: > With the following example, I get: > >...eXt/tex/texmf-context/tex/context/base/mkiv/grph-inc.lua:238: attempt > to call upvalue 'imgwrap' (a nil value) > > with the current (20190222) beta. > >\setupexternalfigures[location=d

[NTG-context] externalfigure broken with 20190222 beta

2019-02-23 Thread Rik Kabel
With the following example, I get: ...eXt/tex/texmf-context/tex/context/base/mkiv/grph-inc.lua:238: attempt to call upvalue 'imgwrap' (a nil value) with the current (20190222) beta. \setupexternalfigures[location=default] \starttext \externalfigure[cow.pdf] \stoptext Down for j

Re: [NTG-context] \externalfigure locator

2017-03-22 Thread Hans Hagen
l figure_file = path .. '/' .. file local doc = lpdf.epdf.load(figure_file) -- assume pdf (just an example) if doc then …. end done There are perhaps helper functions as well. Joseph De : Procházka Lukáš Ing. Envoyé le :lundi 20 mars 2017 09:27 À : ConTeXt Objet :[NTG

Re: [NTG-context] \externalfigure locator

2017-03-22 Thread Procházka Lukáš Ing .
ll. Joseph De : Procházka Lukáš Ing. Envoyé le :lundi 20 mars 2017 09:27 À : ConTeXt Objet :[NTG-context] \externalfigure locator Hello, is there a Lua version of external figure locator used by \externalfigure? Suppose having: \setupexternalfigures[location={default,local,global}

Re: [NTG-context] \externalfigure locator

2017-03-21 Thread Procházka Lukáš Ing .
20 mars 2017 09:27 À : ConTeXt Objet :[NTG-context] \externalfigure locator Hello, is there a Lua version of external figure locator used by \externalfigure? Suppose having: \setupexternalfigures[location={default,local,global},directory={../../Pics}] \externalfigure[mill]%

[NTG-context] \externalfigure locator

2017-03-20 Thread Procházka Lukáš Ing .
Hello, is there a Lua version of external figure locator used by \externalfigure? Suppose having: \setupexternalfigures[location={default,local,global},directory={../../Pics}] \externalfigure[mill]% Finds e.g. in d:\Ctx-Beta\tex\texmf-context\tex\context\sample\common\mill

Re: [NTG-context] \externalfigure question

2017-02-17 Thread Hans Hagen
On 2/17/2017 7:06 PM, Alan Braslau wrote: On Fri, 17 Feb 2017 18:42:25 +0100 Hans Hagen wrote: sx= sy= iir small scales are also seen as fractions Like for the chemistry module, this can be confusing. Also, sx=,sy= muck with the aspect ratio, don't they? As we know, there is also an inco

Re: [NTG-context] \externalfigure question

2017-02-17 Thread j. van den hoff
On Fri, 17 Feb 2017 19:06:30 +0100, Alan Braslau wrote: or identifying libraries used which assume different default dpi. Can this be normalized in the case of file formats (such as pdf) that do not explicitly set the dpi? if possible I would say this could help "pedestrians" like myself so

Re: [NTG-context] \externalfigure question

2017-02-17 Thread Alan Braslau
On Fri, 17 Feb 2017 18:42:25 +0100 Hans Hagen wrote: > sx= > sy= > > iir small scales are also seen as fractions Like for the chemistry module, this can be confusing. Also, sx=,sy= muck with the aspect ratio, don't they? As we know, there is also an inconsistency in the handling of figure sc

Re: [NTG-context] \externalfigure question

2017-02-17 Thread Hans Hagen
On 2/17/2017 6:05 PM, j. van den hoff wrote: On Fri, 17 Feb 2017 17:51:11 +0100, Alan Braslau wrote: On Fri, 17 Feb 2017 17:04:27 +0100 "j. van den hoff" wrote: On Fri, 17 Feb 2017 15:43:29 +0100, Hans Hagen wrote: > * if `scale=' is not the way to achieve invariant and unambiguous > siz

Re: [NTG-context] \externalfigure question

2017-02-17 Thread Hans Hagen
On 2/17/2017 5:51 PM, Alan Braslau wrote: On Fri, 17 Feb 2017 17:04:27 +0100 "j. van den hoff" wrote: On Fri, 17 Feb 2017 15:43:29 +0100, Hans Hagen wrote: * if `scale=' is not the way to achieve invariant and unambiguous size of images embedded in the document, what is? `width=XXX cm'? i.

Re: [NTG-context] \externalfigure question

2017-02-17 Thread j. van den hoff
On Fri, 17 Feb 2017 17:51:11 +0100, Alan Braslau wrote: On Fri, 17 Feb 2017 17:04:27 +0100 "j. van den hoff" wrote: On Fri, 17 Feb 2017 15:43:29 +0100, Hans Hagen wrote: > * if `scale=' is not the way to achieve invariant and unambiguous > size of images embedded in the document, what i

Re: [NTG-context] \externalfigure question

2017-02-17 Thread Alan Braslau
On Fri, 17 Feb 2017 17:04:27 +0100 "j. van den hoff" wrote: > On Fri, 17 Feb 2017 15:43:29 +0100, Hans Hagen wrote: > > > * if `scale=' is not the way to achieve invariant and unambiguous > > size of images embedded in the document, what is? `width=XXX cm'? > > i.e.: how is this supposed to be

Re: [NTG-context] \externalfigure question

2017-02-17 Thread j. van den hoff
On Fri, 17 Feb 2017 15:43:29 +0100, Hans Hagen wrote: * if `scale=' is not the way to achieve invariant and unambiguous size of images embedded in the document, what is? `width=XXX cm'? i.e.: how is this supposed to be done correctly(TM)? just use width=4cm and so understood, will do (thank

Re: [NTG-context] \externalfigure question

2017-02-17 Thread Hans Hagen
On 2/17/2017 3:20 PM, j. van den hoff wrote: I am unsure about the "canonical" way to scale images to the desired size. my current understanding is, that `scale=' should do what I want in a way portable across `context' incarnations. so currently I use commands like \externalfigure[image.png][sc

Re: [NTG-context] \externalfigure question

2017-02-17 Thread Henning Hraban Ramm
Am 2017-02-17 um 15:20 schrieb j. van den hoff : > I am unsure about the "canonical" way to scale images to the desired size. my > current understanding is, that `scale=' should do what I want in a way > portable across `context' incarnations. so currently I use commands like > > \externalfigur

[NTG-context] \externalfigure question

2017-02-17 Thread j. van den hoff
I am unsure about the "canonical" way to scale images to the desired size. my current understanding is, that `scale=' should do what I want in a way portable across `context' incarnations. so currently I use commands like \externalfigure[image.png][scale=750] to adjust the image size to my t

Re: [NTG-context] \externalfigure produces blank page

2016-02-04 Thread Procházka Lukáš Ing .
Hello, nice to hear that. So - when I renew Ctx tonight, will it work well tomorrow? Lukas On Thu, 04 Feb 2016 12:54:24 +0100, luigi scarso wrote: On Thu, Feb 4, 2016 at 12:44 PM, Procházka Lukáš Ing. wrote: Hello, let's have a simple code: \starttext \startTEXpage \externa

Re: [NTG-context] \externalfigure produces blank page

2016-02-04 Thread luigi scarso
On Thu, Feb 4, 2016 at 12:44 PM, Procházka Lukáš Ing. wrote: > Hello, > > let's have a simple code: > > > \starttext > \startTEXpage > \externalfigure[Tv32.pdf]%[scale=500] > \stopTEXpage > \stoptext > > > It yields a blank (or empty) page (its size A1 is OK); > and the size of

[NTG-context] \externalfigure produces blank page

2016-02-04 Thread Procházka Lukáš Ing .
Hello, let's have a simple code: \starttext \startTEXpage \externalfigure[Tv32.pdf]%[scale=500] \stopTEXpage \stoptext It yields a blank (or empty) page (its size A1 is OK); and the size of the resulting .pdf is very close to that of the inserted image. The inserted Tv32.pdf

Re: [NTG-context] \externalfigure doesn't find mps file in subdirectory

2013-08-06 Thread Sanjoy Mahajan
Hans, Sietse, Thank you very much: method=mps works, as does Hans's lua code. Best, -Sanjoy ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / htt

Re: [NTG-context] \externalfigure doesn't find mps file in subdirectory

2013-08-06 Thread Sietse Brouwer
> you can test with this (line 767 in grph-inc): > > askedformat = format -- new per 2013-08-05 > elseif trace_figures then > report_inclusion("unknown format %a",askedformat) > end That fixes the problem, hooray! \o/ Cheers, Sietse

Re: [NTG-context] \externalfigure doesn't find mps file in subdirectory

2013-08-06 Thread Alan BRASLAU
On Mon, 5 Aug 2013 23:18:41 +0200 Sietse Brouwer wrote: > For MetaPost, write `method=mps`; I don’t know why > the MetaPost code is not `mp`. (Perhaps that could be made a synonym?) I suppose because `mp' is MetaPost code and `mps' is MetaPost produced PostScript. Alan _

Re: [NTG-context] \externalfigure doesn't find mps file in subdirectory

2013-08-05 Thread Hans Hagen
On 8/5/2013 11:18 PM, Sietse Brouwer wrote: Hi Sanjoy, Sorry for the late reply; I had to dig around in grph-inc.lua, and I'm a bit rusty at source-diving. Yep, that’s a problem all right. A bug, even: when you put `simple.1` in the same directory as the `.tex` file, it is correctly identified

Re: [NTG-context] \externalfigure doesn't find mps file in subdirectory

2013-08-05 Thread Sietse Brouwer
Hi Sanjoy, Sorry for the late reply; I had to dig around in grph-inc.lua, and I'm a bit rusty at source-diving. Yep, that’s a problem all right. A bug, even: when you put `simple.1` in the same directory as the `.tex` file, it is correctly identified as MetaPost; when you put the exact same file

Re: [NTG-context] \externalfigure doesn't find mps file in subdirectory

2013-08-05 Thread Sanjoy Mahajan
Sanjoy Mahajan writes: > \externalfigure won't find a metapost eps file in a subdirectory, if the > mps has the numerical (.1) extension. Here's the debugging info after enabling the graphics.locating tracker (which I learned about at the very useful page

[NTG-context] \externalfigure doesn't find mps file in subdirectory

2013-08-04 Thread Sanjoy Mahajan
\externalfigure won't find a metapost eps file in a subdirectory, if the mps has the numerical (.1) extension. Here's a minimal example (test.tex): \setupexternalfigures[directory={fig}] \starttext \externalfigure[simple.1] \stoptext where fig/simple.1 is from a simple .mp file that fills a 1-cm

Re: [NTG-context] \externalfigure and large-paged pdfs

2012-11-08 Thread Hans Hagen
On 11/8/2012 4:32 PM, Taco Hoekwater wrote: On 11/08/2012 03:51 PM, Martin Schröder wrote: 2012/11/8 Taco Hoekwater : Actually, this is a bug report. If you try to include a pdf with a large page size: large being > (\maxdimen / 2.8) ? Yes. Best Martin PS: What would break if we exte

Re: [NTG-context] \externalfigure and large-paged pdfs

2012-11-08 Thread Taco Hoekwater
On 11/08/2012 03:51 PM, Martin Schröder wrote: 2012/11/8 Taco Hoekwater : Actually, this is a bug report. If you try to include a pdf with a large page size: large being > (\maxdimen / 2.8) ? Yes. Best Martin PS: What would break if we extended dimens to 64/63 bit in LuaTeX? Some po

Re: [NTG-context] \externalfigure and large-paged pdfs

2012-11-08 Thread Hans Hagen
On 11/8/2012 4:09 PM, Hans Hagen wrote: \setupexternalfigures[align=none] \setuppapersize[A0] \starttext \externalfigure[cow.pdf][width=\maxdimen] \stoptext works ok here (which surprises me) (but as martin says: going 64 bit would be nice) Hans -

Re: [NTG-context] \externalfigure and large-paged pdfs

2012-11-08 Thread Hans Hagen
On 11/8/2012 3:18 PM, Taco Hoekwater wrote: Hi, Actually, this is a bug report. If you try to include a pdf with a large page size: \starttext \externalfigure[plankaart] \stoptext chances are that you get an error message like this: ! Dimension too large. \hsize \setraggedness ...y

Re: [NTG-context] \externalfigure and large-paged pdfs

2012-11-08 Thread Martin Schröder
2012/11/8 Taco Hoekwater : > Actually, this is a bug report. If you try to include a pdf with a large > page size: large being > (\maxdimen / 2.8) ? Best Martin PS: What would break if we extended dimens to 64/63 bit in LuaTeX? _

[NTG-context] \externalfigure and large-paged pdfs

2012-11-08 Thread Taco Hoekwater
Hi, Actually, this is a bug report. If you try to include a pdf with a large page size: \starttext \externalfigure[plankaart] \stoptext chances are that you get an error message like this: ! Dimension too large. \hsize \setraggedness ...yphenpenalty \dimexpr 2.8\hsize

Re: [NTG-context] \externalfigure and factor=max

2012-06-12 Thread Marco
Sorry for the previous mail, here again with content: On 2012-06-07 "Rogers, Michael K" wrote: Hi Michael, thanks for your investigations. > Whether that's a bug or intended is a question for others. If not, then > "max" is for this problem: > > Q. How to scale an image so that the largest

Re: [NTG-context] \externalfigure and factor=max

2012-06-12 Thread Marco
On 2012-06-07 "Rogers, Michael K" wrote: > I played with your example a little and rooted around in grph-trf.mkiv. It > seems "max" selects how to scale based on which dimension in the original > figure is greater. Oddly, the dimensions of the MP figure are 142.26682pt by > 142.2377pt. So I

Re: [NTG-context] \externalfigure shows text alongside the picture

2012-06-08 Thread Alfredo Catalina
Great! Thanks Wolfgang! On 8 Jun 2012 17:16, "Wolfgang Schuster" wrote: > > > Am 08.06.2012 um 17:10 schrieb Alfredo Catalina: > > > I am using \externalfigure to show a picture at the desired scale. Instead of providing a number for the width parameter I have made a definition with \def. When I

Re: [NTG-context] \externalfigure shows text alongside the picture

2012-06-08 Thread Wolfgang Schuster
Am 08.06.2012 um 17:10 schrieb Alfredo Catalina: > I am using \externalfigure to show a picture at the desired scale. Instead of > providing a number for the width parameter I have made a definition with > \def. When I run in mkiv this I get the text "4t" alongside the picture. > > \def\Desig

[NTG-context] \externalfigure shows text alongside the picture

2012-06-08 Thread Alfredo Catalina
I am using \externalfigure to show a picture at the desired scale. Instead of providing a number for the width parameter I have made a definition with \def. When I run in mkiv this I get the text "4t" alongside the picture. \def\DesignSize#1{3.5cm/4*#1}% \starttext \externalfigure[hacker.jpg][widt

Re: [NTG-context] \externalfigure and factor=max

2012-06-07 Thread Rogers, Michael K
On Jun 6, 2012, at 2:45 PM, Marco wrote: > Hi, > > according to the wiki the \externalfigure key “factor” has the > options: > > max: aspect ratio is kept, the image is scaled to > the bigger (oversized) variant > > fit: aspect ratio is kept, the image is scaled to > the smaller (fitted) va

[NTG-context] \externalfigure and factor=max

2012-06-06 Thread Marco
Hi, according to the wiki the \externalfigure key “factor” has the options: max: aspect ratio is kept, the image is scaled to the bigger (oversized) variant fit: aspect ratio is kept, the image is scaled to the smaller (fitted) variant In the following example I expect the third image

Re: [NTG-context] \externalfigure and file size

2012-01-24 Thread Kip Warner
On Sat, 2012-01-21 at 01:07 +0100, Hans Hagen wrote: > no, png, jpg and pdf are supported directly (as is mp) but fo rother > formats it will either try to find a replacement (there is a whole chain > of lookups) or it will try to run one of the configured converters ... with > > \enabletrackers

Re: [NTG-context] \externalfigure and file size

2012-01-24 Thread Kip Warner
On Tue, 2012-01-24 at 12:14 +0100, Marco wrote: > A more user friendly error message > would be: > > !LuaTeX error: cannot find inkscape to convert image file 'pic.svg' > ==> Fatal error occurred, no output PDF file produced! Agreed. -- Kip Warner -- Software Engineer OpenPGP encrypted/signed

Re: [NTG-context] \externalfigure and file size

2012-01-24 Thread Marco
On 2012-01-23 Kip Warner wrote: > IfInkscape isn'tinstalledand theuser > \externalfigure's an SVG, is an error raised with > ConTeXt? Yes and no. An error is raised, but no hint that inkscape is missing. ConTeXt says: !LuaTeX error: cannot find image file 'm_k_i_v_pi

Re: [NTG-context] \externalfigure and file size

2012-01-23 Thread Kip Warner
On Sat, 2012-01-21 at 00:31 -0300, Wagner Macedo wrote: > On Debian Packages, at least, we can declare, basically, 3 levels of > dependencies, according to > http://www.debian.org/doc/debian-policy/ch-relationships.html#s-binarydeps > > 1) Depends - absolute dependency. Or else, packages that is s

Re: [NTG-context] \externalfigure and file size

2012-01-23 Thread Kip Warner
On Sat, 2012-01-21 at 01:55 +0100, Hans Hagen wrote: > maybe a wiki page is a good start for that Strongly agree. -- Kip Warner -- Software Engineer OpenPGP encrypted/signed mail preferred http://www.thevertigo.com signature.asc Description: This is a digitally signed message part

Re: [NTG-context] \externalfigure and file size

2012-01-23 Thread Kip Warner
On Sat, 2012-01-21 at 01:54 +0100, Hans Hagen wrote: > no, because not all users use svg (just an not all users use fonts > defined in type-* files) and also because inkscape is close to > impossible to install without x present which would render context > 'unuseable due to a depency not being

Re: [NTG-context] \externalfigure and file size

2012-01-21 Thread Marco
On 2012-01-21 Hans Hagen wrote: > On 21-1-2012 01:40, Marco wrote: > > > However, these external helpers (like ghostscript as well) > > should be listed as a recommendation or suggestion [not as > > dependency]). In that case the user is notified that > > he/she might get a benefit install

Re: [NTG-context] \externalfigure and file size

2012-01-21 Thread Hans Hagen
On 21-1-2012 04:31, Wagner Macedo wrote: On Debian Packages, at least, we can declare, basically, 3 levels of dependencies, according to http://www.debian.org/doc/debian-policy/ch-relationships.html#s-binarydeps 1) Depends - absolute dependency. Or else, packages that is strictly necessary to wo

Re: [NTG-context] \externalfigure and file size

2012-01-20 Thread Wagner Macedo
On Debian Packages, at least, we can declare, basically, 3 levels of dependencies, according to http://www.debian.org/doc/debian-policy/ch-relationships.html#s-binarydeps 1) Depends - absolute dependency. Or else, packages that is strictly necessary to works well. 2) Recommends - strong, but not a

Re: [NTG-context] \externalfigure and file size

2012-01-20 Thread luigi scarso
On Sat, Jan 21, 2012 at 1:27 AM, Kip Warner wrote: > > Right, but since the average end user probably won't know that, doesn't > that still suggest Inkscape be listed as a dependency? > > hm, no. Suppose this situation: me and you agree on a context beta version and a pdf reader and you send me y

Re: [NTG-context] \externalfigure and file size

2012-01-20 Thread Hans Hagen
On 21-1-2012 01:40, Marco wrote: However, these external helpers (like ghostscript as well) should be listed as a recommendation or suggestion [not as dependency]). In that case the user is notified that he/she might get a benefit installing these programs. maybe a wiki page is a good st

Re: [NTG-context] \externalfigure and file size

2012-01-20 Thread Hans Hagen
On 21-1-2012 01:27, Kip Warner wrote: On Sat, 2012-01-21 at 01:22 +0100, Marco wrote: On 2012-01-20 Kip Warner wrote: So what does ConTeXt do when it typesets an \externalfigure? Does it always use inkscape, or only sometimes? If the image type is supported by the TeX engine (jpeg, png,

Re: [NTG-context] \externalfigure and file size

2012-01-20 Thread Kip Warner
On Sat, 2012-01-21 at 01:42 +0100, Marco wrote: > On 2012-01-20 Kip Warner wrote: > > > On Sat, 2012-01-21 at 01:22 +0100, Marco wrote: > > > On 2012-01-20 Kip Warner wrote: > > > > > > > So what does ConTeXt do when it typesets an \externalfigure? > > > > Does it always use inkscape, or only s

Re: [NTG-context] \externalfigure and file size

2012-01-20 Thread Marco
On 2012-01-20 Kip Warner wrote: > On Sat, 2012-01-21 at 01:22 +0100, Marco wrote: > > On 2012-01-20 Kip Warner wrote: > > > > > So what does ConTeXt do when it typesets an \externalfigure? > > > Does it always use inkscape, or only sometimes? > > > > If the image type is supported by the TeX

Re: [NTG-context] \externalfigure and file size

2012-01-20 Thread Kip Warner
On Sat, 2012-01-21 at 01:22 +0100, Marco wrote: > On 2012-01-20 Kip Warner wrote: > > > So what does ConTeXt do when it typesets an \externalfigure? > > Does it always use inkscape, or only sometimes? > > If the image type is supported by the TeX engine (jpeg, > png, pdf, mps) it is directly

Re: [NTG-context] \externalfigure and file size

2012-01-20 Thread Marco
On 2012-01-20 Kip Warner wrote: > So what does ConTeXt do when it typesets an \externalfigure? > Does it always use inkscape, or only sometimes? If the image type is supported by the TeX engine (jpeg, png, pdf, mps) it is directly included. SVG files inkscape is called to convert the SVG

Re: [NTG-context] \externalfigure and file size

2012-01-20 Thread Hans Hagen
On 21-1-2012 01:12, luigi scarso wrote: On Sat, Jan 21, 2012 at 1:07 AM, Hans Hagen wrote: On 21-1-2012 00:05, Kip Warner wrote: On Fri, 2012-01-20 at 10:08 +0100, Hans Hagen wrote: There is no such depedency .. actually, i found it rather impossible to get an inkscape running on a headles

Re: [NTG-context] \externalfigure and file size

2012-01-20 Thread luigi scarso
On Sat, Jan 21, 2012 at 1:07 AM, Hans Hagen wrote: > On 21-1-2012 00:05, Kip Warner wrote: > >> On Fri, 2012-01-20 at 10:08 +0100, Hans Hagen wrote: >> >>> There is no such depedency .. actually, i found it rather impossible to >>> get an inkscape running on a headless linux box as there is some

Re: [NTG-context] \externalfigure and file size

2012-01-20 Thread Hans Hagen
On 21-1-2012 00:05, Kip Warner wrote: On Fri, 2012-01-20 at 10:08 +0100, Hans Hagen wrote: There is no such depedency .. actually, i found it rather impossible to get an inkscape running on a headless linux box as there is some depedency on X (last time I tried). In a similar fashion there is no

Re: [NTG-context] \externalfigure and file size

2012-01-20 Thread Wagner Macedo
I just tested now. With Inkscape 0.48.2 r9819, I could do the conversion job on pure console. But, on the other hand, as nothing is perfect, to install Inkscape, it's needed many X dependencies. On 20 January 2012 06:08, Hans Hagen wrote: > There is no such depedency .. actually, i found it rat

Re: [NTG-context] \externalfigure and file size

2012-01-20 Thread luigi scarso
On Sat, Jan 21, 2012 at 12:04 AM, Kip Warner wrote: > On Fri, 2012-01-20 at 09:55 +0100, luigi scarso wrote: > > You can also try the reverse way with ipe > > http://ipe7.sourceforge.net/ > > and then convert the pdf in svg with inkscape or iperender > > Thanks Luigi. > Uh uh .. I forget Metapost

Re: [NTG-context] \externalfigure and file size

2012-01-20 Thread Kip Warner
On Fri, 2012-01-20 at 10:08 +0100, Hans Hagen wrote: > There is no such depedency .. actually, i found it rather impossible to > get an inkscape running on a headless linux box as there is some > depedency on X (last time I tried). In a similar fashion there is no > dependency on GhostScript or

Re: [NTG-context] \externalfigure and file size

2012-01-20 Thread Kip Warner
On Fri, 2012-01-20 at 09:55 +0100, luigi scarso wrote: > You can also try the reverse way with ipe > http://ipe7.sourceforge.net/ > and then convert the pdf in svg with inkscape or iperender Thanks Luigi. -- Kip Warner -- Software Engineer OpenPGP encrypted/signed mail preferred http://www.theve

Re: [NTG-context] \externalfigure and file size

2012-01-20 Thread Hans Hagen
On 20-1-2012 11:18, Marco wrote: Sets the text and object compression to the maximum value (which is 9). The command is considered to be a higher level command, see http://archive.contextgarden.net/message/20111229.184755.b0199f53.en.html keep in mind that on the average the defaults are

Re: [NTG-context] \externalfigure and file size

2012-01-20 Thread Marco
On 2012-01-19 Kip Warner wrote: > On a related note, what is the difference between these > three statements? > > \setupbackend[level=9] I have no idea, I never used it. > \pdfcompresslevel9 AFAIK it compresses the text objects. 9 is maximum compression. It's a low level command. > \

Re: [NTG-context] \externalfigure and file size

2012-01-20 Thread Hans Hagen
On 20-1-2012 01:51, Marco wrote: ConTeXt doesn't seem to list inkscape as a dependency on my distro: Inkscape should not be a dependency of ConTeXt. 99.9% work very well without inkscape. But it could be mentioned as a “Recommendation”, as a hint that its installation would increase the fun

Re: [NTG-context] \externalfigure and file size

2012-01-20 Thread luigi scarso
On Fri, Jan 20, 2012 at 2:30 AM, Kip Warner wrote: > On Fri, 2012-01-20 at 02:03 +0100, Mojca Miklavec wrote: > > Yes, but this is only true as long as your graphic can be represented > > reliably in the target format. And yours cannot. > > Hey Mojca. Yes, that makes sense now. I had assumed inco

Re: [NTG-context] \externalfigure and file size

2012-01-19 Thread Kip Warner
On Fri, 2012-01-20 at 02:03 +0100, Mojca Miklavec wrote: > Yes, but this is only true as long as your graphic can be represented > reliably in the target format. And yours cannot. Hey Mojca. Yes, that makes sense now. I had assumed incorrectly that PDF implemented everything SVG does. -- Kip War

Re: [NTG-context] \externalfigure and file size

2012-01-19 Thread Kip Warner
On Fri, 2012-01-20 at 01:45 +0100, Mojca Miklavec wrote: > Does it come out the way you expect it to? If yes, use that. Visually, yes, it's fine. In terms of size, no its not the way I expect. > None of my tools are able to export this into an usable PDF (I didn't > try to install Inkscape though

Re: [NTG-context] \externalfigure and file size

2012-01-19 Thread Kip Warner
On Fri, 2012-01-20 at 01:14 +0100, Wolfgang Schuster wrote: > When you look into graph-inc.lua you can see that context use > >inkscape --export-dpi=600 -A > > to convert the svg to pdf. Hey Wolfgang. Why does a vector image need to be rasterized in a PDF, I guess is what I'm still confuse

Re: [NTG-context] \externalfigure and file size

2012-01-19 Thread Kip Warner
On Fri, 2012-01-20 at 01:21 +0100, Marco wrote: > I had similar issues some weeks ago. A workaround > was to use \pdfcompresslevel9 You can also try > \maximumpdfcompression, which is apparently preferred > (see some recent thread on the list). > > Marco Thanks Marco. It went from 9

Re: [NTG-context] \externalfigure and file size

2012-01-19 Thread Mojca Miklavec
On Fri, Jan 20, 2012 at 01:51, Kip Warner wrote: > On Thu, 2012-01-19 at 21:49 -0300, Wagner Macedo wrote: >> Well, as I can see, the "problem" is inkscape switch --export-dpi which in >> grph-inc.lua has the value 600. I get same file size using inkscape -A >> --export-dpi=600. >> >> But exporting

Re: [NTG-context] \externalfigure and file size

2012-01-19 Thread Kip Warner
On Fri, 2012-01-20 at 01:51 +0100, Marco wrote: > Blame the distributor. I just forwarded your observation to the package maintainer. Should be straightforward to solve with a line in debian/control. -- Kip Warner -- Software Engineer OpenPGP encrypted/signed mail preferred http://www.thevertigo

Re: [NTG-context] \externalfigure and file size

2012-01-19 Thread Kip Warner
On Thu, 2012-01-19 at 21:59 -0300, Wagner Macedo wrote: > Because filters. > > According to > http://wiki.inkscape.org/wiki/index.php/Release_notes/0.47#PDF.2C_PostScript.2C_and_EPS_export, > sent by Pontus Lurcock. Thanks Wagner. -- Kip Warner -- Software Engineer OpenPGP encrypted/signed mai

Re: [NTG-context] \externalfigure and file size

2012-01-19 Thread Kip Warner
On Thu, 2012-01-19 at 21:49 -0300, Wagner Macedo wrote: > Well, as I can see, the "problem" is inkscape switch --export-dpi which in > grph-inc.lua has the value 600. I get same file size using inkscape -A > --export-dpi=600. > > But exporting this file (Pic.svg) without a great dpi (minimum 300)

Re: [NTG-context] \externalfigure and file size

2012-01-19 Thread Marco
On 2012-01-19 Kip Warner wrote: > On Thu, 2012-01-19 at 09:23 +0100, luigi scarso wrote: > > ConTeXt uses inkscape, iirc. So try to see what inkscape says about your > > file. > > Are you sure about that? Yes: strace -f context t 2>&1 >/dev/null | grep inkscape | grep execve […] [pid 14816] e

Re: [NTG-context] \externalfigure and file size

2012-01-19 Thread Pontus Lurcock
On Fri 20 Jan 2012, Mojca Miklavec wrote: > None of my tools are able to export this into an usable PDF (I didn't > try to install Inkscape though). But it is also true that I'm not 100 > % sure if PDF knows anything about the "gaussian blur". I think this is the root of the problem: inkscape ras

Re: [NTG-context] \externalfigure and file size

2012-01-19 Thread Mojca Miklavec
On Fri, Jan 20, 2012 at 01:23, Kip Warner wrote: > On Fri, 2012-01-20 at 13:07 +1300, Pontus Lurcock wrote: >> What happens if you convert it directly using inkscape --export-pdf? > > Still only 78 KB. Does it come out the way you expect it to? If yes, use that. None of my tools are able to expor

Re: [NTG-context] \externalfigure and file size

2012-01-19 Thread Pontus Lurcock
On Thu 19 Jan 2012, Kip Warner wrote: > On Thu, 2012-01-19 at 21:13 -0300, Wagner Macedo wrote: > > It would be good if you attach the svg file. > > > > Could you do this? > > Hey Wagner. No problem. > > http://www.thevertigo.com/temp/Pic.svg My PDF file sizes (using 2011.10.01 10:48): ConT

Re: [NTG-context] \externalfigure and file size

2012-01-19 Thread Kip Warner
On Thu, 2012-01-19 at 21:13 -0300, Wagner Macedo wrote: > It would be good if you attach the svg file. > > Could you do this? Hey Wagner. No problem. http://www.thevertigo.com/temp/Pic.svg Try typesetting it with an \externalfigure and check the file size of the intermediate that's generated.

Re: [NTG-context] \externalfigure and file size

2012-01-19 Thread Kip Warner
On Fri, 2012-01-20 at 13:07 +1300, Pontus Lurcock wrote: > What happens if you convert it directly using inkscape --export-pdf? Still only 78 KB. -- Kip Warner -- Software Engineer OpenPGP encrypted/signed mail preferred http://www.thevertigo.com signature.asc Description: This is a digitally

Re: [NTG-context] \externalfigure and file size

2012-01-19 Thread Marco
On 2012-01-19 Kip Warner wrote: > Whatever ConTeXt is doing with it, that 7KB SVG gets bloated to nearly a > meg at 976KB. This happens as Logo.svg is transformed into intermediate > m_k_i_v_Logo.pdf. I had similar issues some weeks ago. A workaround was to use \pdfcompresslevel9 You

Re: [NTG-context] \externalfigure and file size

2012-01-19 Thread Wolfgang Schuster
Am 20.01.2012 um 01:01 schrieb Kip Warner: > On Thu, 2012-01-19 at 11:58 +0100, Peter Rolf wrote: >> Probably because the exported PDF contains a raster image (at least the >> blured part). If you use Inkscape to save your SVG logo as PDF, you will >> see a dialog box with an option for this (ras

Re: [NTG-context] \externalfigure and file size

2012-01-19 Thread Wagner Macedo
It would be good if you attach the svg file. Could you do this? -- Wagner Macedo On 19 January 2012 21:01, Kip Warner wrote: > Hey Peter. The original SVG is about 7KB. With rasterize off and > exported to PDF, its under 2KB. With rasterize on, its still only 78KB. > Whatever ConTeXt is doing

Re: [NTG-context] \externalfigure and file size

2012-01-19 Thread Pontus Lurcock
On Thu 19 Jan 2012, Kip Warner wrote: > Hey Peter. The original SVG is about 7KB. With rasterize off and > exported to PDF, its under 2KB. With rasterize on, its still only 78KB. > Whatever ConTeXt is doing with it, that 7KB SVG gets bloated to nearly a > meg at 976KB. This happens as Logo.svg is

Re: [NTG-context] \externalfigure and file size

2012-01-19 Thread Kip Warner
On Thu, 2012-01-19 at 11:58 +0100, Peter Rolf wrote: > Probably because the exported PDF contains a raster image (at least the > blured part). If you use Inkscape to save your SVG logo as PDF, you will > see a dialog box with an option for this (rasterize filter effects). > Remove the hook and you'

Re: [NTG-context] \externalfigure and file size

2012-01-19 Thread Kip Warner
On Thu, 2012-01-19 at 09:23 +0100, luigi scarso wrote: > ConTeXt uses inkscape, iirc. So try to see what inkscape says about your > file. Are you sure about that? ConTeXt doesn't seem to list inkscape as a dependency on my distro: apt-cache show context* | grep -i inkscape (gives nothing) -- Ki

Re: [NTG-context] \externalfigure and file size

2012-01-19 Thread Kip Warner
On Thu, 2012-01-19 at 08:56 +0100, Mojca Miklavec wrote: > If original svg image is 7 KB, the PDF should not be any bigger apart > from the header and maybe embded fonts. However if you are using some > smooth shading, it might be that the program which does the conversion > is performing a poor jo

Re: [NTG-context] \externalfigure and file size

2012-01-19 Thread Peter Rolf
Am 19.01.2012 01:25, schrieb Kip Warner: > Hey list, > > I have a number of \externalfigure commands to typeset some svg images. > This is often handy to have them vectorized because it allows for the > user to zoom in on diagrams of great detail. > > In other situations, I find that for images

  1   2   >