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

2012-01-24 Thread Marco
On 2012-01-23 Kip Warner k...@thevertigo.com 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_pic.pdf'
 == Fatal error occurred, no output PDF file produced!

mtx-context | fatal error: return code: 70

It  assumes that  the  conversion was  successful and  the
converted file  is present,  that's at  least what  I read
from the error message. 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!

Marco


___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


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 mail preferred
http://www.thevertigo.com


signature.asc
Description: This is a digitally signed message part
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

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[graphics.*]
 
 you can see what happens

I tried the above command and it didn't appear to do anything. =(

-- 
Kip Warner -- Software Engineer
OpenPGP encrypted/signed mail preferred
http://www.thevertigo.com


signature.asc
Description: This is a digitally signed message part
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

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 resolved'
 
 (in fact there is then also a dependency on a viewer)

If Inkscape isn't installed and the user \externalfigure's an SVG, is an
error raised with ConTeXt?

-- 
Kip Warner -- Software Engineer
OpenPGP encrypted/signed mail preferred
http://www.thevertigo.com


signature.asc
Description: This is a digitally signed message part
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

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
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

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 strictly
 necessary to works well.
 2) Recommends - strong, but not absolute dependency.
 3) Suggests - used to declare that one package may be more useful with one
 or more others.
 
 So, I think Inkscape would fit well as 'context' Suggests.
 
 --
 Wagner Macedo

Copied the package maintainer.

-- 
Kip Warner -- Software Engineer
OpenPGP encrypted/signed mail preferred
http://www.thevertigo.com


signature.asc
Description: This is a digitally signed message part
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

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 works well.
2) Recommends - strong, but not absolute dependency.
3) Suggests - used to declare that one package may be more useful with one
or more others.

So, I think Inkscape would fit well as 'context' Suggests.


so in fact that would then be a list of programs that are optionally 
called from within context:


ghostscript   : for converting ps images to pdf
graphicmagick : for converting gif and tif
inkscape  : for converting svg(z)
zint  : for providing barcodes
curl  : for some remote content
pstoedit  : converts ps to mp outlines

maybe I forget a few.

(btw, does anyone know if installing x-less inkscape on linux is an 
option some day)


Hans

-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com
 | www.pragma-pod.nl
-
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


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

2012-01-21 Thread Marco
On 2012-01-21 Hans Hagen pra...@wxs.nl 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 installing these programs.
 
 maybe a wiki page is a good start for that

I added  the list you  provided in  the other post  to the
Dependency section on the installer page.

http://wiki.contextgarden.net/ConTeXt_Standalone#Dependencies

Marco


___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


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

2012-01-20 Thread luigi scarso
On Fri, Jan 20, 2012 at 2:30 AM, Kip Warner k...@thevertigo.com 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 incorrectly that PDF
 implemented everything SVG does.


You can also try the reverse way with ipe
http://ipe7.sourceforge.net/
and then convert the pdf in svg with inkscape or iperender

-- 
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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

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 functionality.


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 GraphicMagick or Zint.


Hans

-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com
 | www.pragma-pod.nl
-
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

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

2012-01-20 Thread Marco
On 2012-01-19 Kip Warner k...@thevertigo.com 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.

 \maximumpdfcompression

\normalprotected\def\maximumpdfcompression{%
\pdfobjcompresslevel\plusnine  \pdfcompresslevel\plusnine }

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

Marco


___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


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 a good compromise 
between speed and bytes (both in writing and reading)


Hans




-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com
 | www.pragma-pod.nl
-
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


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.thevertigo.com


signature.asc
Description: This is a digitally signed message part
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

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 GraphicMagick or Zint.

So what does ConTeXt do when it typesets an \externalfigure? Does it
always use inkscape, or only sometimes?

-- 
Kip Warner -- Software Engineer
OpenPGP encrypted/signed mail preferred
http://www.thevertigo.com


signature.asc
Description: This is a digitally signed message part
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

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

2012-01-20 Thread luigi scarso
On Sat, Jan 21, 2012 at 12:04 AM, Kip Warner k...@thevertigo.com 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.
Metapost can ouput svg files.
-- 
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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

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 pra...@wxs.nl 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).
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

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
dependency on GhostScript or GraphicMagick or Zint.


So what does ConTeXt do when it typesets an \externalfigure? Does it
always use inkscape, or only sometimes?


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[graphics.*]

you can see what happens



-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com
 | www.pragma-pod.nl
-
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


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

2012-01-20 Thread luigi scarso
On Sat, Jan 21, 2012 at 1:07 AM, Hans Hagen pra...@wxs.nl 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
 depedency on X (last time I tried). In a similar fashion there is no
 dependency on GhostScript or GraphicMagick or Zint.


 So what does ConTeXt do when it typesets an \externalfigure? Does it
 always use inkscape, or only sometimes?


 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

and swf, even if I have not full tested (basically you can test only with
acroreader 10)

-- 
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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

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 Hagenpra...@wxs.nl  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
depedency on X (last time I tried). In a similar fashion there is no
dependency on GhostScript or GraphicMagick or Zint.



So what does ConTeXt do when it typesets an \externalfigure? Does it
always use inkscape, or only sometimes?



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


and swf, even if I have not full tested (basically you can test only with
acroreader 10)


sure, a few of those 'supported media types' are also dealt with (in 
fact I think that one can embed svg in a pdf document given some plugin


Hans


-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com
 | www.pragma-pod.nl
-
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


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

2012-01-20 Thread Marco
On 2012-01-20 Kip Warner k...@thevertigo.com 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 to  PDF.  For EPS  images
ghostscript is used:

strace results:

execve(/usr/bin/gs, [gs, -q, -sDEVICE=pdfwrite,
-dNOPAUSE, -dNOCACHE, -dBATCH,
-dAutoRotatePages=/None, -dPDFSETTINGS=/prepress,
-dEPSCrop, -sOutputFile=m_k_i_v_graph.pdf,
graph.eps, -c, quit], [/* 55 vars */]) 

Marco


___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


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 k...@thevertigo.com 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 to  PDF.  For EPS  images
 ghostscript is used:
 
 strace results:
 
 execve(/usr/bin/gs, [gs, -q, -sDEVICE=pdfwrite,
   -dNOPAUSE, -dNOCACHE, -dBATCH,
   -dAutoRotatePages=/None, -dPDFSETTINGS=/prepress,
   -dEPSCrop, -sOutputFile=m_k_i_v_graph.pdf,
   graph.eps, -c, quit], [/* 55 vars */]) 

Right, but since the average end user probably won't know that, doesn't
that still suggest Inkscape be listed as a dependency?

-- 
Kip Warner -- Software Engineer
OpenPGP encrypted/signed mail preferred
http://www.thevertigo.com


signature.asc
Description: This is a digitally signed message part
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

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

2012-01-20 Thread Marco
On 2012-01-20 Kip Warner k...@thevertigo.com wrote:

 On Sat, 2012-01-21 at 01:22 +0100, Marco wrote:
  On 2012-01-20 Kip Warner k...@thevertigo.com 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 to  PDF.  For EPS  images
  ghostscript is used:
  
  strace results:
  
  execve(/usr/bin/gs, [gs, -q, -sDEVICE=pdfwrite,
  -dNOPAUSE, -dNOCACHE, -dBATCH,
  -dAutoRotatePages=/None, -dPDFSETTINGS=/prepress,
  -dEPSCrop, -sOutputFile=m_k_i_v_graph.pdf,
  graph.eps, -c, quit], [/* 55 vars */]) 
 
 Right, but since the average end user probably won't know that, doesn't
 that still suggest Inkscape be listed as a dependency?

As  I  mentioned before  99.9%  of  the system  work  fine
without additional  programs. You need inkscape  only when
you  want to  include  SVG images.  Having  inkscape as  a
dependency  means a  huge  bunch of  data  and disk  space
(inkscape incl. all dependencies like X,…).

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.

Marco


___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

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 k...@thevertigo.com wrote:
 
  On Sat, 2012-01-21 at 01:22 +0100, Marco wrote:
   On 2012-01-20 Kip Warner k...@thevertigo.com 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 to  PDF.  For EPS  images
   ghostscript is used:
   
   strace results:
   
   execve(/usr/bin/gs, [gs, -q, -sDEVICE=pdfwrite,
 -dNOPAUSE, -dNOCACHE, -dBATCH,
 -dAutoRotatePages=/None, -dPDFSETTINGS=/prepress,
 -dEPSCrop, -sOutputFile=m_k_i_v_graph.pdf,
 graph.eps, -c, quit], [/* 55 vars */]) 
  
  Right, but since the average end user probably won't know that, doesn't
  that still suggest Inkscape be listed as a dependency?
 
 No, not as dependency. As  I mentioned before 99.9% of the
 system  work fine  without additional  programs. You  need
 inkscape only when you want  to include SVG images. Having
 inkscape as  a dependency means  a huge bunch of  data and
 disk space (inkscape incl. all dependencies like X,¿).
 
 However, these external helpers (like ghostscript as well)
 should be  listed as  a recommendation  [not dependency]),
 that  way the  user is  notified that  he/she might  get a
 benefit installing these programs.
 
 Marco
 

Understood. I've copied the package maintainer for a popular ConTeXt
Ubuntu PPA.

-- 
Kip Warner -- Software Engineer
OpenPGP encrypted/signed mail preferred
http://www.thevertigo.com


signature.asc
Description: This is a digitally signed message part
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

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 Warnerk...@thevertigo.com  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 to  PDF.  For EPS  images
ghostscript is used:

strace results:

execve(/usr/bin/gs, [gs, -q, -sDEVICE=pdfwrite,
-dNOPAUSE, -dNOCACHE, -dBATCH,
-dAutoRotatePages=/None, -dPDFSETTINGS=/prepress,
-dEPSCrop, -sOutputFile=m_k_i_v_graph.pdf,
graph.eps, -c, quit], [/* 55 vars */])


Right, but since the average end user probably won't know that, doesn't
that still suggest Inkscape be listed as a dependency?


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 resolved'


(in fact there is then also a dependency on a viewer)

Hans



-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com
 | www.pragma-pod.nl
-
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


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 start for that

-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com
 | www.pragma-pod.nl
-
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


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

2012-01-20 Thread luigi scarso
On Sat, Jan 21, 2012 at 1:27 AM, Kip Warner k...@thevertigo.com 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 your tex file with
1) a png/jpeg image or a pdf file as externalfigure. Then my pdf and your
pdf must be the same, and on average the reader will show the same result.
Otherwise probably is a bug.
2) a swf. Then my pdf and your pdf must be the same, but probably the
reader will not show the same result -- basically only acroread is able to
show swf inside a pdf, and it depends to the OS and version
3) a svg image. PDF spec. doesn't support SVG, so we must also agree on the
same program to convert the svg into a bitmap or vector image, and this is
a problem: as you have seen, the conversion require a bit of experience.
After all, it's not strange if inkscape 0.40 and 0.48 display the same svg
in different way --- and the same for the pdfs.

Actually, only an expert user can use inkscape to automatically convert an
svg to pdf/png without (appreciable) errors, and this kind of user is also
able to install the correct version of inkscape (which is much easier to
install under windows then linux,btw). So, if you are creating a svg by
tourself, it's better to check that the pdf and png are the same if you
want to be sure that your image will be printed/display correctly --- there
aren't so many programs that completely support the svg standard.

ConTeXt then helps this kind of expert user because they are able a
priori  to understand if a svg image is problematic or not .


-- 
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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

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 absolute dependency.
3) Suggests - used to declare that one package may be more useful with one
or more others.

So, I think Inkscape would fit well as 'context' Suggests.

--
Wagner Macedo


On 20 January 2012 21:54, Hans Hagen pra...@wxs.nl 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 resolved'
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

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

2012-01-19 Thread luigi scarso
On Thu, Jan 19, 2012 at 1:25 AM, Kip Warner k...@thevertigo.com wrote:

 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 that are not so important,
 they would benefit from ConTeXt rasterizing them when they are imported.
 The reason for this is I find some vector images get enormously bloated
 when they are typeset. As an example, I have a Logo.svg of only 6.8 KB.
 The m_k_i_v_Logo.pdf intermediate ConTeXt generates is nearly a megabyte
 in size. Why? I have no idea, as they both appear to be the same image
 with the same gausian blur.

 Is there a flag I can pass certain instances of \externalfigure that
 tells the image processing backend that a simple rasterized version of
 the figure is fine? Or is there a better approach? I don't want to
 pre-convert all of these images to raster formats.


ConTeXt uses inkscape, iirc. So try to see what inkscape says about your
file.
If you are under linux, you can also use rsvg .

-- 
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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

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 that are not so important,
 they would benefit from ConTeXt rasterizing them when they are imported.
 The reason for this is I find some vector images get enormously bloated
 when they are typeset. As an example, I have a Logo.svg of only 6.8 KB.
 The m_k_i_v_Logo.pdf intermediate ConTeXt generates is nearly a megabyte
 in size. Why? I have no idea, as they both appear to be the same image
 with the same gausian blur.


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'll get a small, but unblured PDF graphic.

Best wishes,  Peter
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


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 job and converts shading into hundreds of thin
 strips of different colors.

I'm not sure what program is being used, as I just call context and
whatever its using to take the svg specified in the \externalfigure to
typeset is what it seems to be using.

-- 
Kip Warner -- Software Engineer
OpenPGP encrypted/signed mail preferred
http://www.thevertigo.com


signature.asc
Description: This is a digitally signed message part
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

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)

-- 
Kip Warner -- Software Engineer
OpenPGP encrypted/signed mail preferred
http://www.thevertigo.com


signature.asc
Description: This is a digitally signed message part
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

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'll get a small, but unblured PDF graphic.

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 transformed into intermediate
m_k_i_v_Logo.pdf. Something's up.

-- 
Kip Warner -- Software Engineer
OpenPGP encrypted/signed mail preferred
http://www.thevertigo.com


signature.asc
Description: This is a digitally signed message part
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

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 transformed into intermediate
 m_k_i_v_Logo.pdf. Something's up.

What happens if you convert it directly using inkscape --export-pdf?

Pont
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


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 k...@thevertigo.com 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 transformed into intermediate
 m_k_i_v_Logo.pdf. Something's up.

___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

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 (rasterize filter effects).
 Remove the hook and you'll get a small, but unblured PDF graphic.
 
 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 transformed into intermediate
 m_k_i_v_Logo.pdf. Something's up.

When you look into graph-inc.lua you can see that context use

   inkscape oldname --export-dpi=600 -A newname

to convert the svg to pdf.

Wolfgang
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


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

2012-01-19 Thread Marco
On 2012-01-19 Kip Warner k...@thevertigo.com 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  can  also   try
\maximumpdfcompression, which is apparently preferred
(see some recent thread on the list).

Marco


___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


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 signed message part
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

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.

-- 
Kip Warner -- Software Engineer
OpenPGP encrypted/signed mail preferred
http://www.thevertigo.com


signature.asc
Description: This is a digitally signed message part
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

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):

  ConTeXt : 978k
  inkscape -A : 75k
  inkscape --export-dpi=600 -A : 978k

So it seems that the dpi parameter passed by ConTeXt to Inkscape is
responsible for the huge size increase.

Pont
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


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 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.

Mojca
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


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 rasterizes it to
reproduce the blur in PDF, and explicitly setting the DPI to a high
value produces the huge file. Discussed at:

http://www.inkscapeforum.com/viewtopic.php?f=6t=9551
http://wiki.inkscape.org/wiki/index.php/Release_notes/0.47#PDF.2C_PostScript.2C_and_EPS_export

Pont
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


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

2012-01-19 Thread Marco
On 2012-01-19 Kip Warner k...@thevertigo.com 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 21 /dev/null | grep inkscape | grep execve

[…]
[pid 14816] execve(/usr/bin/inkscape, [inkscape, 
/home/marco/Temp/fig.svg, --export-dpi=600, -A, 
/home/marco/Temp/m_k_i_v_fi...],
[…]

 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 functionality.

 apt-cache show context* | grep -i inkscape
 (gives nothing)

Blame the distributor.

Marco


___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

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) I get
 an ugly file, very sharpened where has filters.

But why should there be any implicit DPI specified with a vector
graphic? Isn't the whole point of them to allow, theoretically, infinite
resolution?

-- 
Kip Warner -- Software Engineer
OpenPGP encrypted/signed mail preferred
http://www.thevertigo.com


signature.asc
Description: This is a digitally signed message part
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

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 mail preferred
http://www.thevertigo.com


signature.asc
Description: This is a digitally signed message part
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

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.com


signature.asc
Description: This is a digitally signed message part
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

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 this file (Pic.svg) without a great dpi (minimum 300) I get
 an ugly file, very sharpened where has filters.

 But why should there be any implicit DPI specified with a vector
 graphic? Isn't the whole point of them to allow, theoretically, infinite
 resolution?

Yes, but this is only true as long as your graphic can be represented
reliably in the target format. And yours cannot.

It is like asking for conversion of a vector image of a circle into a
target format that only supports straight lines (also vector format,
but without support for splines).

http://www.inkscapeforum.com/viewtopic.php?f=6t=9551

If this is your own graphic, you need to alter it in such a way that
it will be representable with what PDF is capable of doing. See the
chapter on smooth shading. You can do a lot with that, but it might
require a bit of extra effort (and then maybe hunting developers to
fix rendering bugs; Apple doesn't know how to render smooth shading
properly and even used to crash).

Mojca
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


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.9 MB to 9.5 MB. It's a small delta, but
still helpful.

On a related note, what is the difference between these three
statements?

\setupbackend[level=9]
\pdfcompresslevel9
\maximumpdfcompression

-- 
Kip Warner -- Software Engineer
OpenPGP encrypted/signed mail preferred
http://www.thevertigo.com


signature.asc
Description: This is a digitally signed message part
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

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 oldname --export-dpi=600 -A newname
 
 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 confused with? It seems like DPI is a concept
applicable only to rasterized graphics. Or is it that the PDF backend is
normally fine with vector graphics, it's just that this one in
particular contains a Gaussian blur that it has to rasterize because it
cannot dynamically reproduce?

-- 
Kip Warner -- Software Engineer
OpenPGP encrypted/signed mail preferred
http://www.thevertigo.com


signature.asc
Description: This is a digitally signed message part
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

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). But it is also true that I'm not 100
 % sure if PDF knows anything about the gaussian blur.

I think you've hit the nail on the head. I think the problem is the PDF
format chokes on the Gaussian blur and so it has to rasterize it.

-- 
Kip Warner -- Software Engineer
OpenPGP encrypted/signed mail preferred
http://www.thevertigo.com


signature.asc
Description: This is a digitally signed message part
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

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 Warner -- Software Engineer
OpenPGP encrypted/signed mail preferred
http://www.thevertigo.com


signature.asc
Description: This is a digitally signed message part
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

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

2012-01-18 Thread Mojca Miklavec
On Thu, Jan 19, 2012 at 01:25, Kip Warner k...@thevertigo.com wrote:

 In other situations, I find that for images that are not so important,
 they would benefit from ConTeXt rasterizing them when they are imported.
 The reason for this is I find some vector images get enormously bloated
 when they are typeset. As an example, I have a Logo.svg of only 6.8 KB.
 The m_k_i_v_Logo.pdf intermediate ConTeXt generates is nearly a megabyte
 in size. Why? I have no idea, as they both appear to be the same image
 with the same gausian blur.

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 job and converts shading into hundreds of thin
strips of different colors.

I would try to use a different tool for conversion into PDF (not into
raster image, but into vector image) before running ConTeXt. I don't
know which one, but you can try to experiment.

Mojca
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___