# Adding a TikZ figure to a document

I really hate to post "what's wrong with my code" questions, but I'm a bit clueless and couldn't find a good guide about it.

Anyway, I'm trying to add a figure which was created by TikZ to my document. I'm trying this code, which gives me a blank page:

\documentclass[english,hebrew,fleqn]{article}
\usepackage[T1]{fontenc}
\usepackage[latin9,utf8x]{inputenc}
\usepackage{tikz}
\usepackage{babel}
\begin{document}
טקסט לפני תמונה
\begin{tikzpicture}[scale=1]
\draw (0,0) -- (1,1);
\end{tikzpicture}
טקסט אחרי תמונה
\end{document}


(I put down some Hebrew because the document is in Hebrew; I don't know if it matters)

Anyhow, I want to be able to put figures "inline", like in the example above, and in a different file, that is making the figure in a different file and loading it to my document.

Thanks for all replies!

-

Here, Hebrew matters. If you would temporarily switch to English, the image would appear.

\documentclass[english,fleqn]{article}
\usepackage[T1]{fontenc}
\usepackage[latin9,utf8x]{inputenc}
\usepackage{tikz}
\usepackage[english,hebrew]{babel}
\begin{document}
טקסט לפני תמונה

\begin{otherlanguage}{english}
\begin{tikzpicture}[scale=1]
\draw (0,0) -- (1,1);
\end{tikzpicture}
\end{otherlanguage}

טקסט אחרי תמונה
\end{document}


-
Why is this? Does hebrew change catcodes needed by TikZ? –  Martin Scharrer Dec 17 '11 at 11:38
Ah, I don't know how I missed that... Thank you! I can now also use \input{myfigure.tikz}. Is it possible to somehow modify some parameters in the document (and not in the .tikz file) to affect the size of the figure? –  Shmuel Dec 17 '11 at 11:38
Maybe \begin{otherlanguage*}{english}...\end{otherlanguage*}? This would make the document cleaner, IMO. –  egreg Dec 17 '11 at 11:39
@egreg Good idea! However, it doesn't work with the starred version. I changed to otherlanguage as suggested. –  Stefan Kottwitz Dec 17 '11 at 11:43
@Shmuel For follow-up questions, which are different, please post a new question. It usually cannot be handled in comments, and it fits better to the Q&A site. –  Stefan Kottwitz Dec 17 '11 at 11:44