## LaTeX forum ⇒ LyX ⇒ tikz blank in lyx

Information and discussion about LyX, a WYSIWYM editor, available for Linux, Windows and Mac OS X systems.
md138
Posts: 3
Joined: Thu Oct 22, 2020 8:34 am

### tikz blank in lyx

Hey,

I am new to lyx having a problem using tikzpicture in lyx.

with the code:
\begin{tikzpicture}\draw[red] (0,0) -- (0,1);\draw[green] (0,1) -- (1,1);\draw[red] (1,1) -- (1,0);\draw[blue] (1,0) -- (0,0);\end{tikzpicture}

I include in the preamble:
\usepackage{tikz}

Yet is still blank in preview.

Does anyone knows how to fix it?

I use lyx 2.3.1 Hebrew

Stefan Kottwitz
Posts: 9609
Joined: Mon Mar 10, 2008 9:44 pm
Welcome to the forum!

The code is ok.

Can you show us the .log file? You can post it as attachment here. The Attachments link is below the text edit field, when writing a post.

Or is it ok in the produced PDF, just not visible in the preview?

Stefan

md138
Posts: 3
Joined: Thu Oct 22, 2020 8:34 am
Hey,

It doesn't appear in both preview and the pdf (it does run successfully).

I have a attached the .log file.

Meron
Attachments
_________-_____________.log

md138
Posts: 3
Joined: Thu Oct 22, 2020 8:34 am
Hi,

Have you maybe found a solution please?

Meron

Stefan Kottwitz
Posts: 9609
Joined: Mon Mar 10, 2008 9:44 pm
Hi Meron,

you compiled to DVI, so LaTeX in classic mode, probably because of the eps images. Does it work if you compile with pdfLaTeX straight to PDF? That may be a LyX setting.

Stefan