2017-03-26 13:32:01 +00:00
|
|
|
#
|
|
|
|
# Inkscape External Template
|
|
|
|
#
|
|
|
|
# This file is part of LyX, the document processor.
|
|
|
|
# Licence details can be found in the file COPYING.
|
|
|
|
#
|
2017-08-26 14:10:55 +00:00
|
|
|
# author Daniel Gloger
|
2017-05-27 13:01:24 +00:00
|
|
|
# author Martin Vermeer
|
|
|
|
#
|
|
|
|
# based on external templates by:
|
|
|
|
#
|
2017-03-26 13:32:01 +00:00
|
|
|
# author Asger Alstrup Nielsen
|
2017-05-27 13:01:24 +00:00
|
|
|
# author Angus Leeming
|
2017-03-26 13:32:01 +00:00
|
|
|
# author Johnathan Burchill
|
|
|
|
#
|
|
|
|
# Full author contact details are available in file CREDITS.
|
|
|
|
|
|
|
|
|
|
|
|
PreambleDef WarnNotFound
|
|
|
|
%% Print a warning encased in an fbox.
|
|
|
|
\def\lyxstripprefix#1>{}
|
|
|
|
\newcommand{\warnNotFound}[1]{%
|
|
|
|
\def\lyxtempfilename{#1}%
|
|
|
|
\fbox{Could not find
|
|
|
|
\ttfamily\expandafter\lyxstripprefix\meaning\lyxtempfilename!}%
|
|
|
|
\typeout{Could not find \lyxtempfilename!}%
|
|
|
|
}
|
|
|
|
PreambleDefEnd
|
|
|
|
|
|
|
|
|
|
|
|
PreambleDef InputOrWarn
|
|
|
|
%% Input the file if it exists, using \input, else print a warning
|
|
|
|
\newcommand{\inputOrWarn}[1]{%
|
|
|
|
\IfFileExists{#1}{\input{#1}}{\warnNotFound{#1}}}
|
|
|
|
PreambleDefEnd
|
|
|
|
|
|
|
|
|
|
|
|
Template Inkscape
|
|
|
|
GuiName "Inkscape figure"
|
|
|
|
HelpText
|
|
|
|
An Inkscape figure.
|
|
|
|
Note that using this template automatically uses the
|
|
|
|
document text in the image (like with the Xfig template).
|
|
|
|
HelpTextEnd
|
|
|
|
InputFormat svg
|
2017-05-21 21:57:53 +00:00
|
|
|
FileFilter "*.{svg}"
|
2017-03-26 13:32:01 +00:00
|
|
|
AutomaticProduction true
|
|
|
|
Transform Rotate
|
2017-11-04 09:36:36 +00:00
|
|
|
Transform Resize
|
2017-03-26 13:32:01 +00:00
|
|
|
Preview InstantPreview
|
|
|
|
Format PDFLaTeX
|
|
|
|
TransformCommand Rotate RotationLatexCommand
|
2017-11-04 09:36:36 +00:00
|
|
|
TransformCommand Resize ResizeLatexCommand
|
|
|
|
Product "$$RotateFront$$ResizeFront\\input{$$AbsOrRelPathMaster$$Basename.pdf_tex}$$ResizeBack$$RotateBack"
|
2017-03-26 13:32:01 +00:00
|
|
|
UpdateFormat pdftex
|
|
|
|
UpdateResult "$$AbsPath$$Basename.pdf_tex"
|
2017-05-21 21:57:53 +00:00
|
|
|
Requirement "xcolor"
|
2017-03-26 13:32:01 +00:00
|
|
|
Requirement "graphicx"
|
2017-05-21 21:57:53 +00:00
|
|
|
Requirement "mathtools"
|
2017-03-26 13:32:01 +00:00
|
|
|
# Preamble WarnNotFound
|
|
|
|
# Preamble InputOrWarn
|
|
|
|
ReferencedFile pdflatex "$$AbsOrRelPathMaster$$Basename.pdf_tex"
|
|
|
|
ReferencedFile pdflatex "$$AbsPath$$Basename.pdf"
|
|
|
|
FormatEnd
|
|
|
|
Format LaTeX
|
|
|
|
TransformCommand Rotate RotationLatexCommand
|
2017-11-04 09:36:36 +00:00
|
|
|
TransformCommand Resize ResizeLatexCommand
|
|
|
|
Product "$$RotateFront$$ResizeFront\\input{$$AbsOrRelPathMaster$$Basename.eps_tex}$$ResizeBack$$RotateBack"
|
2017-03-26 13:32:01 +00:00
|
|
|
UpdateFormat pstex
|
|
|
|
UpdateResult "$$AbsPath$$Basename.eps_tex"
|
2017-05-21 21:57:53 +00:00
|
|
|
Requirement "xcolor"
|
2017-03-26 13:32:01 +00:00
|
|
|
Requirement "graphicx"
|
2017-05-21 21:57:53 +00:00
|
|
|
Requirement "mathtools"
|
2017-03-26 13:32:01 +00:00
|
|
|
# Preamble WarnNotFound
|
|
|
|
# Preamble InputOrWarn
|
|
|
|
ReferencedFile latex "$$AbsOrRelPathMaster$$Basename.eps_tex"
|
|
|
|
ReferencedFile latex "$$AbsPath$$Basename.eps"
|
|
|
|
ReferencedFile dvi "$$AbsPath$$Basename.eps"
|
|
|
|
FormatEnd
|
2017-09-10 16:07:05 +00:00
|
|
|
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
|
2017-03-26 13:32:01 +00:00
|
|
|
TemplateEnd
|
|
|
|
|