LyXTIKZ instant preview in Lyx does not work

Information and discussion about LyX, a WYSIWYM editor, available for Linux, Windows and Mac OS X systems.
Post Reply
Manfred
Posts: 2
Joined: Mon Jan 22, 2018 11:49 am

TIKZ instant preview in Lyx does not work

Post by Manfred »

Hello,

I have a simple TIKZ-Code in Lyx:

Code: Select all

\begin{tikzpicture}
    \draw[red] (0,0) -- (1,1);
    \draw[red] (1,0) -- (0,1);
   \draw[blue] (0,0) rectangle (1,1);
\end{tikzpicture}
The output in pdf works perfectly.
However, the instant preview in Lyx does not work. Choosing "Insert-Preview" creates only a new "box" around the source-Code.

(but the preview of a math formula works, see screenshot)
screenshot.jpg
screenshot.jpg (25.74 KiB) Viewed 5473 times
!

Any idea for a solution (I am working with LyX Version 2.1.5)?

Thank you!

Manfred

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p

scottkosty
Site Moderator
Posts: 542
Joined: Sat Sep 01, 2012 6:38 am

TIKZ instant preview in Lyx does not work

Post by scottkosty »

Works for me with LyX version 2.3.0dev and with 2.2.x, on Ubuntu. I think this was fixed after 2.1.x. You might consider upgrading LyX when 2.3.1 is released (in a few months). That would be a good time. Make sure you always backup your documents before you upgrade and edit with newer versions of LyX.
Manfred
Posts: 2
Joined: Mon Jan 22, 2018 11:49 am

TIKZ instant preview in Lyx does not work

Post by Manfred »

Thank you

update of Lyx AND MiKTeX solved the problem!
Post Reply