Re: [NTG-context] Figure Help

2011-11-10 Thread Kip Warner
Hey Hans. I think I figured out why it wasn't displaying properly. I was
putting the figure alias where \externalfigure was expecting the path to
the figure.

-- 
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] Figure Help

2011-11-10 Thread Hans Hagen

On 9-11-2011 22:49, Christian wrote:

May be I missed one or the other mail on this topic.
There is indeed support for svg-inclusion in MKIV. In order to be
possibly of help I would like you to send a minimal example.


Note: When I include the extension in the filename (testimage.svg) I
get "!LuaTeX error: cannot find image file 'm_k_i_v_testimage.pdf'"
probably due to some failed conversion stuff.


Is write18 enables? Do you have inkscape binary in your PATH?


Well, no and no. And the way I see it, proper svg support should not need a 
prior conversion to pdf done by an entirely different program.
If I wanted that, I can as well save it as pdf or convert it myself.

I knew about the detour via inkscape, but I hoped for native support.

So I guess svg is not supported then?


no, and it would be a typical example of adding something to the engine 
that's bigger than the engine itself which is definitely not on our 
agenda (the leaner the meaner)


also, converting svg runtime and doing that each run is pretty 
inefficient; the mkiv runtime conversion only converts (using inkscape) 
when the file has changed and including a pdf file is pretty fast


(the same is true for png files: the pfd format supports png compression 
which is not the same as embedding png so for some variants it's better 
to convert beforehand so that inclusion is faster)


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] Figure Help

2011-11-09 Thread Aditya Mahajan

I knew about the detour via inkscape, but I hoped for native support.

So I guess svg is not supported then?


The current implmentation (at least when I looked at it 3 months back) 
called inkscape to convert svg to pdf. IIRC, it is possible to configure 
which program is used to do the conversion, but there is no native 
support. The main reason is that there is no native support in pdftex or 
luatex binaries.


Support for svg can be added in two ways, either linking an svg library 
with the luatex binary or writing an svg to pdf converted in lua.

___
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] Figure Help

2011-11-09 Thread Christian
> >> May be I missed one or the other mail on this topic.
> >> There is indeed support for svg-inclusion in MKIV. In order to be
> >> possibly of help I would like you to send a minimal example.
> >
> > Note: When I include the extension in the filename (testimage.svg) I
> > get "!LuaTeX error: cannot find image file 'm_k_i_v_testimage.pdf'"
> > probably due to some failed conversion stuff.
> 
> Is write18 enables? Do you have inkscape binary in your PATH?

Well, no and no. And the way I see it, proper svg support should not need a 
prior conversion to pdf done by an entirely different program.
If I wanted that, I can as well save it as pdf or convert it myself. 

I knew about the detour via inkscape, but I hoped for native support.

So I guess svg is not supported then?

___
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] Figure Help

2011-11-09 Thread Aditya Mahajan

On Wed, 9 Nov 2011, Christian wrote:


May be I missed one or the other mail on this topic.
There is indeed support for svg-inclusion in MKIV. In order to be possibly of
help I would like you to send a minimal example.


Note: When I include the extension in the filename (testimage.svg) I get 
"!LuaTeX error: cannot find image file 'm_k_i_v_testimage.pdf'" probably 
due to some failed conversion stuff.


Is write18 enables? Do you have inkscape binary in your PATH?

Aditya
___
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] Figure Help

2011-11-09 Thread Christian
> May be I missed one or the other mail on this topic.
> There is indeed support for svg-inclusion in MKIV. In order to be possibly of
> help I would like you to send a minimal example.

Since I'm also interested in this and fail to get it working, please allow me 
to provide such an example. The svg-file is taken of the german 
Wikipedia-article of the svg file format. It includes fonts, I'm not sure if 
this causes trouble.

Note: When I include the extension in the filename (testimage.svg) I get 
"!LuaTeX error: cannot find image file 'm_k_i_v_testimage.pdf'" probably due to 
some failed conversion stuff. If I omit the .svg, I get a dummy frame in the 
pdf output.


minimal-svg.tex
Description: Binary data
<>___
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] Figure Help

2011-11-08 Thread Willi Egger
Hi,

May be I missed one or the other mail on this topic.
There is indeed support for svg-inclusion in MKIV. In order to be possibly of 
help I would like you to send a minimal example.

Willi
On 8 Nov 2011, at 04:26, Kip Warner wrote:

> On Fri, 2011-11-04 at 10:32 +0100, Hans Hagen wrote:
>> 
>> \externalfigure[Images/Figure.svg][width=2.5cm] 
> 
> Thanks Hans, but all I see is a grey box with the following in it where
> I expected to see the image:
> 
> name: dummy
> file:
> figure:Figure
> state: unknown
> 
> I've checked the path and it looks correct.
> 
> -- 
> Kip Warner -- Software Engineer
> OpenPGP encrypted/signed mail preferred
> http://www.thevertigo.com
> ___
> 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
> ___

___
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] Figure Help

2011-11-07 Thread Pontus Lurcock
On Mon 07 Nov 2011, Kip Warner wrote:

> > \externalfigure[Images/Figure.svg][width=2.5cm] 
> 
> Thanks Hans, but all I see is a grey box with the following in it where
> I expected to see the image:
> 
> name: dummy
> file:
> figure:Figure
> state: unknown
> 
> I've checked the path and it looks correct.

See if it works with a PDF file. SVG support is not 100% -- on MkII it
can only be done using Inkscape for preprocessing, and on MkIV support
is ‘via preprocessing and limited’ according to
http://wiki.contextgarden.net/File_Formats .

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] Figure Help

2011-11-07 Thread Kip Warner
On Fri, 2011-11-04 at 10:32 +0100, Hans Hagen wrote:
> 
> \externalfigure[Images/Figure.svg][width=2.5cm] 

Thanks Hans, but all I see is a grey box with the following in it where
I expected to see the image:

name: dummy
file:
figure:Figure
state: unknown

I've checked the path and it looks correct.

-- 
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] Figure Help

2011-11-04 Thread Hans Hagen

On 4-11-2011 03:58, Kip Warner wrote:

Hey list,

Two questions. Is it possible to define / declare a figure with one
command instead of having to do something like...

\useexternalfigure[SomeFigure][Images/Figure.svg]
\externalfigure[SomeFigure][width=2.5cm]



\externalfigure[Images/Figure.svg][width=2.5cm]


-
  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] Figure Help

2011-11-03 Thread Pontus Lurcock
On Thu 03 Nov 2011, Kip Warner wrote:

> Two questions. Is it possible to define / declare a figure with one
> command instead of having to do something like...
> 
> \useexternalfigure[SomeFigure][Images/Figure.svg]
> \externalfigure[SomeFigure][width=2.5cm]

Sure, \externalfigure[Images/Figure.svg] should do it.

> Also, how do I shift the figure right a few centimetres in from the
> left side?

I guess the most direct way would be

\hskip 3cm \externalfigure[Images/Figure.svg]

but other solutions may be more appropriate depending on your overall
requirements.

HTH,

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
___