LyXtikz blank in lyx

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

tikz blank in lyx

Post by md138 »

Hey,

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

with the code:

Code: Select all

\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:

Code: Select all

\usepackage{tikz}
Yet is still blank in preview.

Does anyone knows how to fix it?

I use lyx 2.3.1 Hebrew

Recommended reading 2024:

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

Learn LaTeX easily with newest books:

The LaTeX Beginner's Guide: 2nd edition and perfect for students writing a thesis

The LaTeX Cookbook: 2nd edition full of practical examples for mathematics, physics, chemistry, and more

LaTeX Graphics with TikZ: the first book about TikZ for perfect drawings in your LaTeX thesis

User avatar
Stefan Kottwitz
Site Admin
Posts: 10348
Joined: Mon Mar 10, 2008 9:44 pm

tikz blank in lyx

Post by Stefan Kottwitz »

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
LaTeX.org admin
md138
Posts: 4
Joined: Thu Oct 22, 2020 8:34 am

tikz blank in lyx

Post by md138 »

Hey,

Thank you very much for your answer!

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

I have a attached the .log file.

Meron
Attachments
_________-_____________.log
(33.87 KiB) Downloaded 232 times
md138
Posts: 4
Joined: Thu Oct 22, 2020 8:34 am

tikz blank in lyx

Post by md138 »

Hi,

Have you maybe found a solution please?

Meron
User avatar
Stefan Kottwitz
Site Admin
Posts: 10348
Joined: Mon Mar 10, 2008 9:44 pm

tikz blank in lyx

Post by Stefan Kottwitz »

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
LaTeX.org admin
md138
Posts: 4
Joined: Thu Oct 22, 2020 8:34 am

tikz blank in lyx

Post by md138 »

Hey,

Sorry for the late reply, what you said worked!

I have to note though that there was also a second problem, it is important that the language set for writing will be English, otherwise it will also appear blank (I mistakenly set it for Hebrew at some of the times).

Thank you so much, tikz is a great package in Latex and it was a shame for it not to work on lyx.

I really appreciate your time!

Best regards,

Meron
Post Reply