diff options
Diffstat (limited to 'Master/texmf-dist/doc/latex/svg-inkscape/InkscapePDFLaTeX.tex')
-rw-r--r-- | Master/texmf-dist/doc/latex/svg-inkscape/InkscapePDFLaTeX.tex | 31 |
1 files changed, 19 insertions, 12 deletions
diff --git a/Master/texmf-dist/doc/latex/svg-inkscape/InkscapePDFLaTeX.tex b/Master/texmf-dist/doc/latex/svg-inkscape/InkscapePDFLaTeX.tex index d49517d78fd..ccfe8cfdc45 100644 --- a/Master/texmf-dist/doc/latex/svg-inkscape/InkscapePDFLaTeX.tex +++ b/Master/texmf-dist/doc/latex/svg-inkscape/InkscapePDFLaTeX.tex @@ -1,6 +1,3 @@ -% Author: Johan B. C. Engelen, 2010 -% Version: 2010-06-10 - \documentclass[final,3p,twocolumn]{elsarticle} \usepackage{xcolor} @@ -39,7 +36,7 @@ \executeiffilenewer{#1.svg}{#1.pdf}% {inkscape -z -D --file=#1.svg % --export-pdf=#1.pdf --export-latex}% - \input{#1.tex}% + \input{#1.pdf_tex}% } \begin{document} \begin{frontmatter} @@ -64,7 +61,7 @@ Because typesetting of the text is done by \LaTeX, \LaTeX\ commands can be used %\end{keyword} \end{frontmatter} -%########################################################################### +%########################################################################## \begin{figure} \centering @@ -116,23 +113,32 @@ Note the added {\small\verb|--export-latex|} option. \section{Including the image in LaTeX} -The image should be included in the document by inputting the {\small\verb|.tex|} file created by Inkscape. It is possible to set the width of the image by defining {\small\verb|\svgwidth|}: +The image should be included in the document by inputting the {\small\verb|.pdf_tex|} file created by Inkscape. It is possible to set the width of the image by defining {\small\verb|\svgwidth|}: \begin{verbatim} \begin{figure} \centering \def\svgwidth{\columnwidth} - \input{image.tex} + \input{image.pdf_tex} \end{figure} \end{verbatim} -The {\small\verb|.tex|} file created by Inkscape contains a {\small\verb|picture|} environment, that includes the PDF exported by Inkscape and places text on top of it. The result is figure~\ref{fig:pdflatex}, note that the font exactly matches the document's font, and the link to the equation works. If no width is specified, the image will have its original width. The {\small\verb|\svgwidth|} is forgotten after including a figure, so one must redefine the width for each figure ({\small\verb|\svgwidth|} is set empty by {\small\verb|image.tex|}). +The {\small\verb|.pdf_tex|} file created by Inkscape contains a {\small\verb|picture|} environment, that includes the PDF exported by Inkscape and places text on top of it. The result is figure~\ref{fig:pdflatex}, note that the font exactly matches the document's font, and the link to the equation works. If no width is specified, the image will have its original width. The {\small\verb|\svgwidth|} is forgotten after including a figure, so one must redefine the width for each figure ({\small\verb|\svgwidth|} is set empty by {\small\verb|image.pdf_tex|}). -\subsection{When images are not in document root} +\subsection{When images are not in the document's directory} When images are not located in the document's directory, but in a sub-directory, one has to add that directory to the graphics search path (unfortunately). For example, if one's images are in sub-directory {\small\verb|images|}, add the following to the preamble: \begin{verbatim} \graphicspath{{images/}} \end{verbatim} +Alternatively, when the images are not in a sub-directory of the document, they can be accessed with the {\small\verb|import|} package, adding +\begin{verbatim} +\usepackage{import} +\end{verbatim} +to the preamble, and including the image with +\begin{verbatim} +\import{<path>/<to>/<file>}{<filename>.tex} +\end{verbatim} + \subsection{Automatic export} (`write18' must be enabled, see the {\small\verb|epstopdf|} package documentation. Add {\small\verb|-shell-escape|} to the command line when calling {\small\verb|pdflatex|}.) @@ -157,7 +163,7 @@ Add the following code to the preamble of your document: \executeiffilenewer{#1.svg}{#1.pdf}% {inkscape -z -D --file=#1.svg % --export-pdf=#1.pdf --export-latex}% - \input{#1.tex}% + \input{#1.pdf_tex}% } \end{verbatim} @@ -191,10 +197,11 @@ This is shown in figure~\ref{fig:otherfont}, where the same image file is includ \renewcommand{\rmdefault}{mdput}\rmfamily \section{Known bugs and limitations} -There are no bugs known to me. Do contact me if you find one! +Please report any bug you find on \url{https://bugs.launchpad.net/inkscape}. -There are some limitations. +There are some known limitations/bugs. \begin{itemize} + \item Exporting to EPS+\LaTeX{}, the bounding box is always set snugly around the drawing \emph{without} text. There is debate about whether this is a bug in Inkscape or not. This becomes a problem when text is desired `outside' the other parts of the drawing. A workaround is drawing a rectangle with zero stroke width as bounding box around the drawing. Alternatively, one can export to PS+\LaTeX{} instead and renaming the resulting {\small\verb|.ps|} file to {\small\verb|.eps|}. See \url{https://bugs.launchpad.net/inkscape/+bug/595821}. \item Flowed text is only exported for rectangular flow shapes. \item There are no other scaling options beside specifying the width. \end{itemize} |