1

Why this code doesn't work?

\documentclass{article}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[italian]{babel}
\usepackage[
  a4paper,
  margin=15mm,
  bindingoffset=2mm,
  heightrounded,
]{geometry}

\usepackage{amsmath}
\usepackage{microtype}
\usepackage{xcolor}
\usepackage{graphicx}
\usepackage{svg}

\begin{document}
\begin{flushleft}

\begin{center}
\begin{figure}[htbp]
\includesvg{example.svg}
\caption{Image created with Inkscape}\label{figura:2}
\vspace{7pt}
\end{figure}
\end{center}
\end{flushleft}
\end{document}

TexWorks 0.61 sends this error:

("C:\Users\Marco\AppData\Local\Programs\MiKTeX
2.9\tex\latex\microtype\mt-cmr.c
    fg")
    ! Undefined control sequence.
    \@includesvg ...extracttrue \fi \ifnum \pdfstrcmp 
                                                      {\pdffilemoddate {\SVG@in@...
    l.23 \includesvg{example.svg}

?

I'm compiling in XeLaTeX+MakeIndex+BibTeX

Torbjørn T.
  • 206,688
  • 1
    Hi, welcome. The reason for my edit is that the linebreaks in an error message have meaning, so preserving them are sometimes essential for properly understanding the error. For undefined control sequence errors, the last control sequence before the linebreak is the one that triggered the error. Just to doublecheck, is it correct that \pdfstrcmp is the last one before the linebreak? – Torbjørn T. Mar 17 '17 at 19:54
  • http://i.imgur.com/OoN6Nuq.png – Salvo Matteini Mar 17 '17 at 19:59
  • So, "yes", in other words. It works if you use pdflatex with --shell-escape enabled (see http://tex.stackexchange.com/questions/82699/how-to-enable-shell-escape-in-texworks), I think some primitives like \pdfstrcmp are not defined by XeLaTeX (they have different names), which is why it doesn't work, but someone else needs to confirm that. – Torbjørn T. Mar 17 '17 at 20:06
  • Basically same thing as http://tex.stackexchange.com/a/126706/586 Doesn't seem like there's any solutions for XeLaTeX, though I may be wrong. – Torbjørn T. Mar 17 '17 at 20:20

0 Answers0