I have coded graphics in a LaTeX report using TikZ and have externalized them. When the generated PDF files for the graphics are included in the PDF of the report, the filename of each figure is included in each graphic. How can I ensure that the filename does not appear?

I am have included the TikZ externalize library using \usetikzlibrary{external} and am wrapping each TikZ picture using \beginpgfgraphicnamed{filename} and \endpgfgraphicnamed{filename}, where filename is the name of the graphic file created. For example:


   ... tikz code here

  \caption{Causal diagram example.}

1 Answer 1


The correct syntax is (from the pgf manual, §80.2 p. 651-652 for version 2.10)

    \fill (0,0) circle (1cm);

You should replace \endpgfgraphicnamed{causaldiagram} with \endpgfgraphicnamed.

The reason why the filename appears in your document is that the command \endpgfgraphicnamed does not accept arguments, so it is executed and then latex encounters {causaldiagram} which is a perfectly valid chunk of latex which gives the text "causaldiagram".

You must log in to answer this question.

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