1

While using xelatex and scrbook along with tikz and externalize I get the output figures in wrong size, so not only the figure itself, but a whole DIN-A4-page with the figure at the top left. This obviously disrupts the main pdf. I checked all the details and the only thing that helps as I see it now is to change scrbook to book. Then figure-pdfs are produced as they should (only the figure and white space around) and all is good. Now, I want to use scrbook instead of book. Does anyone know whether this is indeed a problem with scrbook or maybe it's just rather a coincidence and the main error is somewhere else? Thanks, Dmitri.

Edit: A minimal example looks like this

\documentclass{scrbook}
\usepackage{fontspec} 
\usepackage{polyglossia}
\setmainlanguage{german}

\usepackage{tikz}
\usetikzlibrary{external}
\tikzset{
    external/system call={%
        xelatex \tikzexternalcheckshellescape
        -halt-on-error- -interaction=batchmode --shell-escape
        -jobname "\image" "\texsource"}}
\tikzexternalize

\begin{document}
    A simple image is\tikz\fill(0,0)circle(5pt);.
\end{document}

This produces a pdf with two pages and the dot on the second page without any text. Using book instead I get a pdf with one side and the dot in the same line as the text.

2
  • to debug tikz externalization isn't easy anyway. But it is quite impossible without a sensible test document (and log-files to check the file versions). Dec 16, 2020 at 13:02
  • Ok, I will upload a minimal example. I thought someone can answer it on a abstract level.
    – Dmitri
    Dec 16, 2020 at 13:20

1 Answer 1

2

Ok, problem solved. It turned out that my tikz version was too old. After installing a new one all is good and even the tikzset is not need anymore, this one:

\tikzset{
    external/system call={%
        xelatex \tikzexternalcheckshellescape
        -halt-on-error- -interaction=batchmode --shell-escape
        -jobname "\image" "\texsource"}}

can be deleted.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .