2

How can I produce an .odt file from a .tex source which includes \tikzpicture?

I tried mk4ht oolatex test.tex but I only be able to produce an empty .odt file from the following code:

\documentclass{article}
\def\pgfsysdriver{pgfsys-tex4ht.def}
\usepackage{tikz}
\begin{document}
  \begin{tikzpicture}
    \path (0,0) node[draw] (A) {A};
    \path (2,0) node[draw] (B) {B};
    \draw (A) -- (B) node[midway,above = 0 em] {via};
\end{tikzpicture}
\end{document}

I am open to other way to get my .odt file.

Sebastiano
  • 54,118
Sigmun
  • 1,121
  • I think openoffice doesn't support svg embedding. You can include diagrams as png figures. See http://tex.stackexchange.com/q/40135/2891 for examples where tikz externalization is used to compile diagrams to png and then including. This works for me with oolatex. – michal.h21 Oct 03 '13 at 15:10
  • 2
    @michal.h21 svg are well supported by OpenOffice (3.2 at least), so the problem comes from elsewhere. In an other hand, I tried your solution but I was unable to produce any png files. I get the following error ! Undefined control sequence. \Gin@ewidth ->\pgfexternalwidth – Sigmun Oct 04 '13 at 08:37
  • did you include the graphicx package in your document? – michal.h21 Oct 04 '13 at 09:17
  • @michal.h21 yes I add \usepackage{graphicx} and \usetikzlibrary{external} as you did in your example. – Sigmun Oct 04 '13 at 09:25

0 Answers0