]> git.lyx.org Git - features.git/commitdiff
* src/insets/InsetExternal.cpp (validate):
authorJürgen Spitzmüller <spitz@lyx.org>
Sun, 13 Apr 2008 12:50:35 +0000 (12:50 +0000)
committerJürgen Spitzmüller <spitz@lyx.org>
Sun, 13 Apr 2008 12:50:35 +0000 (12:50 +0000)
- bug fix: if no specific PDFLaTeX out format is defined, we have to use
  the LaTeX requirement tag in pdflatex output

* lib/external_templates:
- remove unneeded PDFLaTeX format specification.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@24255 a592a061-630c-0410-9148-cb99ea01b6c8

lib/external_templates
src/insets/InsetExternal.cpp

index 7ad79e237fecc18bfcfca6d99317599649741be1..edcac389aac501b687a844e55f46777e06bec3f1 100644 (file)
@@ -250,7 +250,7 @@ Template PDFPages
                Includes PDF documents, using the 'pdfpages' package.
                
                To include multiple pages, use the "pages"-option,
-               which must be inserted to "Options" (Format "PDFLaTeX").
+               which must be inserted to "Options".
                Examples:
                    * pages={x-y} (for a range of pages)
                    * pages={x,y,z} (for specific pages)
@@ -275,17 +275,6 @@ Template PDFPages
                Requirement "pdfpages"
                ReferencedFile pdflatex "$$AbsPath$$Basename.pdf"
        FormatEnd
-       Format PDFLaTeX
-               TransformOption Rotate RotationLatexOption
-               TransformOption Resize ResizeLatexOption
-               TransformOption Extra  ExtraOption
-               Option Arg "[$$Extra,$$Rotate,$$Resize]"
-               Product "\\includepdf$$Arg{$$AbsOrRelPathMaster$$Basename}"
-               UpdateFormat pdf
-               UpdateResult "$$AbsPath$$Basename.pdf"
-               Requirement "pdfpages"
-               ReferencedFile pdflatex "$$AbsPath$$Basename.pdf"
-       FormatEnd
        Format Ascii
                Product "[PDFPages: $$FName]"
        FormatEnd
index ea2c0c41767df2ee1d309efba77a8230b750be1e..6de1fec99f531a559e732fece702982522c9bd84 100644 (file)
@@ -838,8 +838,17 @@ void InsetExternal::validate(LaTeXFeatures & features) const
        }
        external::Template::Formats::const_iterator cit =
                et.formats.find(format);
-       if (cit == et.formats.end())
-               return;
+
+       if (cit == et.formats.end()) {
+               // If the template has not specified a PDFLaTeX output,
+               // we try the LaTeX format.
+               if (format == "PDFLaTeX") {
+                       cit = et.formats.find("LaTeX");
+                       if (cit == et.formats.end())
+                               return;
+               } else
+                       return;
+       }
 
        // FIXME: We don't need that always
        features.require("lyxdot");