Graphics, Figures & Tables ⇒ Can't use graphics packages with [hebrew]{babel}
Can't use graphics packages with [hebrew]{babel}
Hi, I'm trying to add some figures to my text which is written in Hebrew. When I'm using one of the graphics packages, like [tikz] and [graphicx], to add figures, all the figures appear on the text just fine. But adding the [hebrew]{babel} package replaces all of the figures in the text with blank white space. Does anyone know how to fix this? Thanks in advance.
NEW: TikZ book now 40% off at Amazon.com for a short time.

- Johannes_B
- Site Moderator
- Posts: 4182
- Joined: Thu Nov 01, 2012 4:08 pm
Re: Can't use graphics packages with [hebrew]{babel}
Hi, can you add a minimal but compilable example for us to reproduce the issue? This might be something very trivial in your code.
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.
Can't use graphics packages with [hebrew]{babel}
Ok, with this code I get a square
With this code I get a blank page
Code: Select all
Code, edit and compile here:
\documentclass[12pt,a4paper]{article}\usepackage{tikz}\begin{document}\begin{tikzpicture}\draw (0,0) -- (4,0) -- (4,4) -- (0,4) -- (0,0);\end{tikzpicture}\end{document}
Code: Select all
Code, edit and compile here:
\documentclass[12pt,a4paper]{article}\usepackage[hebrew]{babel}\usepackage{tikz}\begin{document}\begin{tikzpicture}\draw (0,0) -- (4,0) -- (4,4) -- (0,4) -- (0,0);\end{tikzpicture}\end{document}
- Johannes_B
- Site Moderator
- Posts: 4182
- Joined: Thu Nov 01, 2012 4:08 pm
Can't use graphics packages with [hebrew]{babel}
This is a known problem. I found an answer by Stefan and it seems, you simply need to locally switch the language to english.
Code: Select all
Code, edit and compile here:
\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}
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.
- Stefan Kottwitz
- Site Admin
- Posts: 10345
- Joined: Mon Mar 10, 2008 9:44 pm
Can't use graphics packages with [hebrew]{babel}
So your test document would be, adding english support for TikZ pictures:
Stefan
Code: Select all
Code, edit and compile here:
\documentclass[12pt,a4paper]{article}\usepackage[english,hebrew]{babel}\usepackage{tikz}\begin{document}\begin{otherlanguage}{english}\begin{tikzpicture}\draw (0,0) -- (4,0) -- (4,4) -- (0,4) -- (0,0);\end{tikzpicture}\end{otherlanguage}\end{document}
LaTeX.org admin