TinyURL widget - shorten your URL's for free!

Enter a long URL to make tiny:

Friday, November 14, 2014

How to include SVG graphics in latex compiles

Don't use latex, use pdflatex with  --shell-escape option

pdflatex --shell-escape condition-test

Example:  condition-test.tex


\documentclass{article}
\usepackage[inkscape=/usr/bin/inkscape]{svg}
\usepackage{amsmath}
\usepackage{etoolbox}

\newbool{EPUB}
\booltrue{EPUB}

\begin{document}
This is a test of the conditional change to SVG graphics for cards.

\begin{figure}[test]
      \centering
    \ifbool{EPUB}{\includesvg{queen-diamond-red}
    }{
    \includesvg{king-skull-black}
    }%
  \caption{svg image switch}%
\end{figure}

\end{document}
The  queen-diamond-red  SVG image.
https://www.dropbox.com/s/aug0drcrl45xj5h/queen-diamond-red.svg?dl=0

The King skull alternative SVG image.

 https://www.dropbox.com/s/3sw7tdsojydu3at/king-skull-black.svg?dl=0

No comments:

Post a Comment