Hello there,
I am a Lyx User for quite a while now and I had recently some troubles
with the usage of PDF Files.
Still LyX is phantastic and keeps getting better. I was just
wondering, if I am doing something really
simple wrong and that for a long time.
First: I use 1.6.4.1 under MacOS 10.5.7, use TexLive2008 and have
recently updatet ghostscript to 8.70
and ImageMagik 6.5.6 to the most recent version using Port. At the
same time I deinstalled some old
TeTex and after that I had problems with pdfs. I always got the error
of problems with converting into
a viewable format. After a second installation of LyX it did not
accept PDF anymore. Even when I
compiled using PdfLateX LyX gave a message, that there is no Converter
for pdf -> png defined?
Okay, that was right, but why? So, I finally managed to input a
converter for
pdf (ps2pdf) -> png with convert $$i $$o
which worked and I also regained the preview in LyX. The only problem
is, that pdfs are also for the pdflatex
output converted to PNG, which reduces the quality and slows down the
compilation a lot. I looked everywhere
and in the documentation of LyX is reads, that PDF are native to
pdflatex, so why does LyX convert it?
I also did not find any option or something where LyX is told to do
such a conversion.
I finally circumvented this problem by adding a template to
external_templates in the resources directoy
which reads:
Template PDFImage
GuiName "PDF Images: $$AbsOrRelPathParent$$Basename"
HelpText
Includes an PDF as an PDF and not as an PNG using
includegraphics.
HelpTextEnd
InputFormat pdf
FileFilter "*.pdf"
Transform Rotate
Transform Resize
Transform Extra
Transform Clip
Preview Graphics
Format PDFLaTeX
TransformOption Rotate RotationLatexOption
TransformOption Resize ResizeLatexOption
TransformOption Clip ClipLatexOption
TransformOption Extra ExtraOption
Option Arg "[$$Extra,$$Rotate,$$Resize,$$Clip]"
Product "\\includegraphics$$Arg{$$AbsOrRelPathMaster$$Basename}"
UpdateFormat pdf
UpdateResult "$$AbsPath$$Basename.pdf"
Requirement "graphicx"
ReferencedFile pdflatex "$$AbsPath$$Basename.pdf"
FormatEnd
Format Ascii
Product "[PDFImage: $$FName]"
FormatEnd
Format DocBook
Product "[PDFImage: $$FName]"
FormatEnd
TemplateEnd
This works, has also a preview and all other options one would have
with regular graphics. So, why can't I
do that with just embedding graphics. Any help is really appreciated.
My guess is, that there is something
wrong in some configuration file for some reason. If not, that would
be my feature request. The only other
reason I could imagine is, that it is specific to the RevTex4
Template. Maybe pdf support is disabled, there?
All the best and I appreciate all help,
Jan