Re: LyX and Inkscape

2011-09-23 Thread Martin Hoßbach

On 23.09.2011 02:18, Neal Becker wrote:

Why wouldn't you just save as svg?


If we just talk about an illustration, I would save it as pdf and then 
include the pdf. However, if the illustration contains anything in text, 
then if I saved it as a pdf I would have the text in the font that 
inkscape used. I believe that this looks ugly: Anything in the finished 
document should be in the same font.


So if I use this pdf+latex format, the text will be rendered by LaTeX, 
at the positions specified by inkscape, but using the documents font. 
Also, you can then use LaTeX-Commands in your illustration, for example 
the math mode...


If anyone is interested: something similar can be done with gnuplot, 
using the epslatex-terminal (then you just need to convert the eps-file 
to pdf), and also with dia.


Martin


Re: LyX and Inkscape

2011-09-23 Thread Martin Hoßbach

On 23.09.2011 10:20, PhilipPirrip wrote:

Martin, can you please tell me what exactly one should do in LyX with
those two files, a .pdf and a .tex?


The files are used almost like a normal image. Instead of inserting 
the image (usually inside a float), you insert a child document, select 
the .tex-file, and switch to input instead of include. And then you 
do what I was told before, so that LyX knows where the pdf-file can be 
found... (-- TEXINPUTS)


Martin


--
Dipl.Inform. Martin Hoßbach
Research Assistant 'Cognitive Computing  Medical Imaging'

Fraunhofer-Institut für Graphische Datenverarbeitung IGD
Fraunhoferstr. 5  |  64283 Darmstadt  |  Germany
Tel +49 6151 155-585  |  Fax +49 6151 155-480
martin.hossb...@igd.fraunhofer.de  |  www.igd.fraunhofer.de


Re: LyX and Inkscape

2011-09-23 Thread Martin Hoßbach

On 23.09.2011 02:18, Neal Becker wrote:

Why wouldn't you just save as svg?


If we just talk about an illustration, I would save it as pdf and then 
include the pdf. However, if the illustration contains anything in text, 
then if I saved it as a pdf I would have the text in the font that 
inkscape used. I believe that this looks ugly: Anything in the finished 
document should be in the same font.


So if I use this pdf+latex format, the text will be rendered by LaTeX, 
at the positions specified by inkscape, but using the documents font. 
Also, you can then use LaTeX-Commands in your illustration, for example 
the math mode...


If anyone is interested: something similar can be done with gnuplot, 
using the epslatex-terminal (then you just need to convert the eps-file 
to pdf), and also with dia.


Martin


Re: LyX and Inkscape

2011-09-23 Thread Martin Hoßbach

On 23.09.2011 10:20, PhilipPirrip wrote:

Martin, can you please tell me what exactly one should do in LyX with
those two files, a .pdf and a .tex?


The files are used almost like a normal image. Instead of inserting 
the image (usually inside a float), you insert a child document, select 
the .tex-file, and switch to input instead of include. And then you 
do what I was told before, so that LyX knows where the pdf-file can be 
found... (-- TEXINPUTS)


Martin


--
Dipl.Inform. Martin Hoßbach
Research Assistant 'Cognitive Computing  Medical Imaging'

Fraunhofer-Institut für Graphische Datenverarbeitung IGD
Fraunhoferstr. 5  |  64283 Darmstadt  |  Germany
Tel +49 6151 155-585  |  Fax +49 6151 155-480
martin.hossb...@igd.fraunhofer.de  |  www.igd.fraunhofer.de


Re: LyX and Inkscape

2011-09-23 Thread Martin Hoßbach

On 23.09.2011 02:18, Neal Becker wrote:

Why wouldn't you just save as svg?


If we just talk about an illustration, I would save it as pdf and then 
include the pdf. However, if the illustration contains anything in text, 
then if I saved it as a pdf I would have the text in the font that 
inkscape used. I believe that this looks ugly: Anything in the finished 
document should be in the same font.


So if I use this pdf+latex format, the text will be rendered by LaTeX, 
at the positions specified by inkscape, but using the documents font. 
Also, you can then use LaTeX-Commands in your illustration, for example 
the math mode...


If anyone is interested: something similar can be done with gnuplot, 
using the epslatex-terminal (then you just need to convert the eps-file 
to pdf), and also with dia.


Martin


Re: LyX and Inkscape

2011-09-23 Thread Martin Hoßbach

On 23.09.2011 10:20, PhilipPirrip wrote:

Martin, can you please tell me what exactly one should do in LyX with
those two files, a .pdf and a .tex?


The files are used almost like a "normal image". Instead of inserting 
the image (usually inside a float), you insert a child document, select 
the .tex-file, and switch to "input" instead of "include". And then you 
do what I was told before, so that LyX knows where the pdf-file can be 
found... (--> TEXINPUTS)


Martin


--
Dipl.Inform. Martin Hoßbach
Research Assistant 'Cognitive Computing & Medical Imaging'

Fraunhofer-Institut für Graphische Datenverarbeitung IGD
Fraunhoferstr. 5  |  64283 Darmstadt  |  Germany
Tel +49 6151 155-585  |  Fax +49 6151 155-480
martin.hossb...@igd.fraunhofer.de  |  www.igd.fraunhofer.de


LyX and Inkscape

2011-09-22 Thread Martin Hoßbach

Hello

does anyone of you use Inkscape and the pdf-latex-format to create 
images for your documents?


BTW: Same problem with gnuplot and the eps-latex-terminal... I 
definitely want to use this format, because then I will have all text in 
drawings and diagrams in the font used by the main document.


Inkscape creates two files: a pdf-file containing the drawing, and a 
tex-file which adds all text to the drawing and also loads the pdf-file. 
LyX seems to ignore the pdf file, since it is not referenced anywhere in 
the LyX-File. As a result, I get an error: foo.pdf cannot be found.


Trying to use \graphicspath to tell latex where to look for the pdf 
doesn't help: I would have to add an absolute path to the pdf, which is 
pointless if you work on two machines, one linux, one windows... Using a 
relative path doesn't work, because LyX ignores the pdf-file and simply 
doesn't copy it to the temp-folder.


Is there any way to tell LyX that the pdf-file exists and needs to be 
copied to the temp-folder, so latex can find it?


Did I miss anything?

Thanks
Martin


Re: LyX and Inkscape

2011-09-22 Thread Martin Hoßbach
I will have to try this later today at home, since here at work I only 
have a windows pc, and the windows version of 2.0.1 seems not to be 
available yet...


Thanks anyway.

Martin


On 22.09.2011 15:06, Mukhtar Ullah wrote:

Is there any way to tell LyX that the pdf-file exists and needs to be
copied to the temp-folder, so latex can find it?


Martin,
I had a similar problem and have to thank the latest version LyX 2.0.1 for
solving the issue. This problem occurs when your figure (both .pdf_tex and .pdf)
in a directory (most commonly a subdirectory). To cut it short, let us assume
that the two files are in a subdirectory ./figures (I would recommend to always
use one such name for the directory for the reason to follow). Go to
Tools-Preferences-Paths-TEXTINPUTS prefix: by default the current document
directory is included (the dot .). Add the subdirectory path by appending
;./figures (the semicolon ; is to separate the two paths). I believe this should
solve such issues in he future except in the case that your subdirectoery has a
different name (e.g. ./img) in which case also append ;./img.

Regards,

Mukhtar







--
Dipl.Inform. Martin Hoßbach
Research Assistant 'Cognitive Computing  Medical Imaging'

Fraunhofer-Institut für Graphische Datenverarbeitung IGD
Fraunhoferstr. 5  |  64283 Darmstadt  |  Germany
Tel +49 6151 155-585  |  Fax +49 6151 155-480
martin.hossb...@igd.fraunhofer.de  |  www.igd.fraunhofer.de


LyX and Inkscape

2011-09-22 Thread Martin Hoßbach

Hello

does anyone of you use Inkscape and the pdf-latex-format to create 
images for your documents?


BTW: Same problem with gnuplot and the eps-latex-terminal... I 
definitely want to use this format, because then I will have all text in 
drawings and diagrams in the font used by the main document.


Inkscape creates two files: a pdf-file containing the drawing, and a 
tex-file which adds all text to the drawing and also loads the pdf-file. 
LyX seems to ignore the pdf file, since it is not referenced anywhere in 
the LyX-File. As a result, I get an error: foo.pdf cannot be found.


Trying to use \graphicspath to tell latex where to look for the pdf 
doesn't help: I would have to add an absolute path to the pdf, which is 
pointless if you work on two machines, one linux, one windows... Using a 
relative path doesn't work, because LyX ignores the pdf-file and simply 
doesn't copy it to the temp-folder.


Is there any way to tell LyX that the pdf-file exists and needs to be 
copied to the temp-folder, so latex can find it?


Did I miss anything?

Thanks
Martin


Re: LyX and Inkscape

2011-09-22 Thread Martin Hoßbach
I will have to try this later today at home, since here at work I only 
have a windows pc, and the windows version of 2.0.1 seems not to be 
available yet...


Thanks anyway.

Martin


On 22.09.2011 15:06, Mukhtar Ullah wrote:

Is there any way to tell LyX that the pdf-file exists and needs to be
copied to the temp-folder, so latex can find it?


Martin,
I had a similar problem and have to thank the latest version LyX 2.0.1 for
solving the issue. This problem occurs when your figure (both .pdf_tex and .pdf)
in a directory (most commonly a subdirectory). To cut it short, let us assume
that the two files are in a subdirectory ./figures (I would recommend to always
use one such name for the directory for the reason to follow). Go to
Tools-Preferences-Paths-TEXTINPUTS prefix: by default the current document
directory is included (the dot .). Add the subdirectory path by appending
;./figures (the semicolon ; is to separate the two paths). I believe this should
solve such issues in he future except in the case that your subdirectoery has a
different name (e.g. ./img) in which case also append ;./img.

Regards,

Mukhtar







--
Dipl.Inform. Martin Hoßbach
Research Assistant 'Cognitive Computing  Medical Imaging'

Fraunhofer-Institut für Graphische Datenverarbeitung IGD
Fraunhoferstr. 5  |  64283 Darmstadt  |  Germany
Tel +49 6151 155-585  |  Fax +49 6151 155-480
martin.hossb...@igd.fraunhofer.de  |  www.igd.fraunhofer.de


LyX and Inkscape

2011-09-22 Thread Martin Hoßbach

Hello

does anyone of you use Inkscape and the pdf-latex-format to create 
images for your documents?


BTW: Same problem with gnuplot and the eps-latex-terminal... I 
definitely want to use this format, because then I will have all text in 
drawings and diagrams in the font used by the main document.


Inkscape creates two files: a pdf-file containing the drawing, and a 
tex-file which adds all text to the drawing and also loads the pdf-file. 
LyX seems to ignore the pdf file, since it is not referenced anywhere in 
the LyX-File. As a result, I get an error: "foo.pdf cannot be found".


Trying to use \graphicspath to tell latex where to look for the pdf 
doesn't help: I would have to add an absolute path to the pdf, which is 
pointless if you work on two machines, one linux, one windows... Using a 
relative path doesn't work, because LyX ignores the pdf-file and simply 
doesn't copy it to the temp-folder.


Is there any way to tell LyX that the pdf-file exists and needs to be 
copied to the temp-folder, so latex can find it?


Did I miss anything?

Thanks
Martin


Re: LyX and Inkscape

2011-09-22 Thread Martin Hoßbach
I will have to try this later today at home, since here at work I only 
have a windows pc, and the windows version of 2.0.1 seems not to be 
available yet...


Thanks anyway.

Martin


On 22.09.2011 15:06, Mukhtar Ullah wrote:

Is there any way to tell LyX that the pdf-file exists and needs to be
copied to the temp-folder, so latex can find it?


Martin,
I had a similar problem and have to thank the latest version LyX 2.0.1 for
solving the issue. This problem occurs when your figure (both .pdf_tex and .pdf)
in a directory (most commonly a subdirectory). To cut it short, let us assume
that the two files are in a subdirectory ./figures (I would recommend to always
use one such name for the directory for the reason to follow). Go to
Tools->Preferences->Paths->TEXTINPUTS prefix: by default the current document
directory is included (the dot .). Add the subdirectory path by appending
;./figures (the semicolon ; is to separate the two paths). I believe this should
solve such issues in he future except in the case that your subdirectoery has a
different name (e.g. ./img) in which case also append ;./img.

Regards,

Mukhtar







--
Dipl.Inform. Martin Hoßbach
Research Assistant 'Cognitive Computing & Medical Imaging'

Fraunhofer-Institut für Graphische Datenverarbeitung IGD
Fraunhoferstr. 5  |  64283 Darmstadt  |  Germany
Tel +49 6151 155-585  |  Fax +49 6151 155-480
martin.hossb...@igd.fraunhofer.de  |  www.igd.fraunhofer.de