Neal Becker wrote:

> Thanks.  I tried this: (pretty much copied from rasterimage):
> Template gracepdf
>         GuiName "gracepdf: $$AbsOrRelPathParent$$Basename"
>         HelpText
>                 A grace plot to pdf
>         HelpTextEnd
>         InputFormat grace

This needs to be agr (the format name as found in the preferences)

>         FileFilter "*.agr"
>         AutomaticProduction true
>         Transform Rotate
>         Transform Resize
>         Transform Clip
>         Transform Extra
>         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 pdftex UpdateResult "$$AbsPath$$Basename.pdf"

This should be

                UpdateFormat pdf
                UpdateResult "$$AbsPath$$Basename.pdf"

pdftex ias an xfig specific format.

>                 Requirement "graphicx"
>                 # Preamble WarnNotFound
>                 # Preamble InputOrWarn
>                 ReferencedFile latex "$$AbsPath$$Basename.pdf"

While you are at it add the line

                ReferencedFile pdflatex "$$AbsPath$$Basename.pdf"

I am about to post a patch for 1.4.x that will require it.

>         FormatEnd
> TemplateEnd
> 
> But view/pdflatex gives this error:
> \includegraphics
>                     
{0_home_nbecker_shannon2_mercurial_sync_phase_detector}
> 
> So 1) graphicx wasn't included even though I required it and

A known bug, already fixed in 1.5. You can work around it by specifying also
a LaTeX format with the "graphicx" requirement.

> 2) what's with the strange file name?

That is OK, LyX copies the file to the temp dir with this strange name (it
needs to be unique, and you should be able to tell where it came from).


Georg

Reply via email to