2

I put the following into TexMaths in LibreOffice

\usepackage{tikz}
\begin{document}
\begin{tikzpicture}
\tikz \draw (0,0) circle (10pt);
\end{tikzpicture}
\end{document}

and was complained of

C:\..\latex\pgf\frontendlayer\tikz.sty
!Missing $inserted.
<inserted text>
          $
1.9

Before this, I have tested that the TexMaths is working fine on simple LaTex commands. Any idea? Thanks help.

Rising
  • 23

1 Answers1

2

As already suggested, you need to set the preamble right.

enter image description here

Go to "Preamble" and you'll see something like this:

enter image description here

Add \usepackage{tikz} and then you can just type \tikz\draw (0,0) circle (10pt); or

\begin{tikzpicture}
\draw (0,0) circle (10pt);
\end{tikzpicture}

In the main Texmaths window, not the Preamble window. the result is:

enter image description here

I am on Texmaths 0.39 and Libreoffice 4.2.2

d-cmst
  • 23,095
  • Thanks your illustration. I have tried and with the Preamble, seems it was rendering. It flashed for a second but nothing comes out, though no complain either. Found the code snippet and re-opened to edit for options, still the same nothing. TexMaths 0.39 and LibreOffice 4.2.2 on MS-Windows. Thanks your time. – Rising Apr 05 '14 at 01:11
  • so you don't see the circle as in my last screenshot? – d-cmst Apr 05 '14 at 05:51
  • That's right. It tries to render but end up nothing. – Rising Apr 05 '14 at 10:39
  • @Rising (un)fortunately I don't have a Windows machine to test if it works there. i tried any kind of complex TikZ code on my machine (Linux) and they all work. Let's wait until someone else tries. – d-cmst Apr 05 '14 at 17:13
  • I thought your instruction was correct and problem was only matter of rendering. My TexMaths was rendering on dvipng. I took that off and put in dvisvgm instead, and it works immediately. Thanks much. – Rising Apr 07 '14 at 08:25
  • @Rising If it works for you please accept this answer by clicking on the tickmark under the vote count of the answer. – d-cmst Apr 07 '14 at 10:45