]> git.lyx.org Git - lyx.git/blobdiff - lib/xtemplates/inkscape.xtemplate
Fix cantarell reversion
[lyx.git] / lib / xtemplates / inkscape.xtemplate
index 840d1268827afb4e7fa0e3c930583c9f26843d52..ff0b6b5ae747adcd47370baaa67a50d68c3481d0 100644 (file)
@@ -4,6 +4,11 @@
 # This file is part of LyX, the document processor.
 # Licence details can be found in the file COPYING.
 #
 # This file is part of LyX, the document processor.
 # Licence details can be found in the file COPYING.
 #
+# author Daniel Gloger
+# author Martin Vermeer
+#
+# based on external templates by:
+#
 # author Asger Alstrup Nielsen
 # author Angus Leeming
 # author Johnathan Burchill
 # author Asger Alstrup Nielsen
 # author Angus Leeming
 # author Johnathan Burchill
@@ -34,26 +39,24 @@ Template Inkscape
        GuiName "Inkscape figure"
        HelpText
                An Inkscape figure.
        GuiName "Inkscape figure"
        HelpText
                An Inkscape figure.
-               This template should work flawlessly with Inkscape 0.48. 
-               For Inkscape 0.91, there is a (reported) bug in the 
-               LaTeX + PDF output which makes a workaround necessary, 
-               see Embedded Objects manual.
                Note that using this template automatically uses the 
                document text in the image (like with the Xfig template).
        HelpTextEnd
        InputFormat svg
                Note that using this template automatically uses the 
                document text in the image (like with the Xfig template).
        HelpTextEnd
        InputFormat svg
-       FileFilter "*.svg"
+       FileFilter "*.{svg}"
        AutomaticProduction true
        Transform Rotate
        AutomaticProduction true
        Transform Rotate
+       Transform Resize
        Preview InstantPreview
        Format PDFLaTeX
                TransformCommand Rotate RotationLatexCommand
        Preview InstantPreview
        Format PDFLaTeX
                TransformCommand Rotate RotationLatexCommand
-               # Resize is not desirable here, as fonts are sized to surrounding LaTeX font
-               Product "$$RotateFront\\input{$$AbsOrRelPathMaster$$Basename.pdf_tex}$$RotateBack"
+               TransformCommand Resize ResizeLatexCommand
+               Product "$$RotateFront$$ResizeFront\\input{$$AbsOrRelPathMaster$$Basename.pdf_tex}$$ResizeBack$$RotateBack"
                UpdateFormat pdftex
                UpdateResult "$$AbsPath$$Basename.pdf_tex"
                UpdateFormat pdftex
                UpdateResult "$$AbsPath$$Basename.pdf_tex"
-               Requirement "color"
+               Requirement "xcolor"
                Requirement "graphicx"
                Requirement "graphicx"
+               Requirement "mathtools"
                # Preamble WarnNotFound
                # Preamble InputOrWarn
                ReferencedFile pdflatex "$$AbsOrRelPathMaster$$Basename.pdf_tex"
                # Preamble WarnNotFound
                # Preamble InputOrWarn
                ReferencedFile pdflatex "$$AbsOrRelPathMaster$$Basename.pdf_tex"
@@ -61,16 +64,34 @@ Template Inkscape
        FormatEnd
        Format LaTeX
                TransformCommand Rotate RotationLatexCommand
        FormatEnd
        Format LaTeX
                TransformCommand Rotate RotationLatexCommand
-               Product "$$RotateFront\\input{$$AbsOrRelPathMaster$$Basename.eps_tex}$$RotateBack"
+               TransformCommand Resize ResizeLatexCommand
+               Product "$$RotateFront$$ResizeFront\\input{$$AbsOrRelPathMaster$$Basename.eps_tex}$$ResizeBack$$RotateBack"
                UpdateFormat pstex
                UpdateResult "$$AbsPath$$Basename.eps_tex"
                UpdateFormat pstex
                UpdateResult "$$AbsPath$$Basename.eps_tex"
-               Requirement "color"
+               Requirement "xcolor"
                Requirement "graphicx"
                Requirement "graphicx"
+               Requirement "mathtools"
                # Preamble WarnNotFound
                # Preamble InputOrWarn
                ReferencedFile latex "$$AbsOrRelPathMaster$$Basename.eps_tex"
                ReferencedFile latex "$$AbsPath$$Basename.eps"
                ReferencedFile dvi   "$$AbsPath$$Basename.eps"
        FormatEnd
                # Preamble WarnNotFound
                # Preamble InputOrWarn
                ReferencedFile latex "$$AbsOrRelPathMaster$$Basename.eps_tex"
                ReferencedFile latex "$$AbsPath$$Basename.eps"
                ReferencedFile dvi   "$$AbsPath$$Basename.eps"
        FormatEnd
+       Format Ascii
+               Product "[InkscapeGraphics: $$FName]"
+       FormatEnd
+       Format DocBook
+               Product "<graphic fileref=\"$$AbsOrRelPathMaster$$Basename.eps\"></graphic>"
+               UpdateFormat eps
+               UpdateResult "$$AbsPath$$Basename.eps"
+               ReferencedFile docbook     "$$AbsPath$$Basename.eps"
+               ReferencedFile docbook-xml "$$AbsPath$$Basename.eps"
+       FormatEnd
+       Format XHTML
+               Product "<img src=\"$$AbsOrRelPathMaster$$Basename.svg\" />"
+               UpdateFormat svg
+               UpdateResult "$$AbsPath$$Basename.svg"
+               ReferencedFile xhtml "$$AbsPath$$Basename.svg"
+       FormatEnd
 TemplateEnd
 
 TemplateEnd