Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

As with most things related to LaTeX, when Hebrew (and I assume other RTL languages too) tend to completely break everything.

\documentclass[10pt]{article}

%\usepackage[utf8x]{inputenc}
%\usepackage[english,hebrew]{babel}
\usepackage{tikz}
\usetikzlibrary{shadows}

\tikzstyle{testbox} = [rectangle, rounded corners, draw=black,
  fill=blue!20, inner sep=10pt, drop shadow={fill=black, opacity=.4}]
\tikzstyle{titlebox} =[fill=gray!20, text=black!80, draw=black]

\begin{document}
  \noindent\begin{tikzpicture}%
  \node [testbox] (box){%
    \begin{minipage}{.7\textwidth}%
      I am Lrrr, of the planet Omicron Persei Eight.%
    \end{minipage}%
  };
  \node [titlebox, right=5pt] at (box.north west) {\textbf{Lrrr}};%
  \end{tikzpicture}
\end{document}

This compiles just fine.

But if I remove the % from the inputenc and babel packages, nothing is drawn. Seeing how the entire code is just a TikZ picture, that seems to be a problem.

It seems that just removing the hebrew from the babel options makes everything work, so that must be the culprit.

Any idea how to fix this?

Added:

If I put the tikzpicture code inside an \L{} environment of babel (which treats the text as left-to-right), then everything works again. But the whole purpose is to have such scenario where the text is in Hebrew, so that defeats the purpose.


LOG File.

This is pdfTeX, Version 3.1415926-2.5-1.40.14 (TeX Live 2013/Arch Linux) (format=pdflatex 2014.3.13)  23 MAR 2014 06:34
entering extended mode
 restricted \write18 enabled.
 %&-line parsing enabled.
**123123123.tex
(./123123123.tex
LaTeX2e <2011/06/27>
Babel <3.9h> and hyphenation patterns for 78 languages loaded.
(/usr/share/texmf-dist/tex/latex/base/article.cls
Document Class: article 2007/10/19 v1.4h Standard LaTeX document class
(/usr/share/texmf-dist/tex/latex/base/size10.clo
File: size10.clo 2007/10/19 v1.4h Standard LaTeX file (size option)
)
\c@part=\count79
\c@section=\count80
\c@subsection=\count81
\c@subsubsection=\count82
\c@paragraph=\count83
\c@subparagraph=\count84
\c@figure=\count85
\c@table=\count86
\abovecaptionskip=\skip41
\belowcaptionskip=\skip42
\bibindent=\dimen102
)
(/usr/share/texmf-dist/tex/latex/pgf/frontendlayer/tikz.sty
(/usr/share/texmf-dist/tex/latex/pgf/basiclayer/pgf.sty
(/usr/share/texmf-dist/tex/latex/pgf/utilities/pgfrcs.sty
(/usr/share/texmf-dist/tex/generic/pgf/utilities/pgfutil-common.tex
\pgfutil@everybye=\toks14
\pgfutil@tempdima=\dimen103
\pgfutil@tempdimb=\dimen104

(/usr/share/texmf-dist/tex/generic/pgf/utilities/pgfutil-common-lists.tex))
(/usr/share/texmf-dist/tex/generic/pgf/utilities/pgfutil-latex.def
\pgfutil@abb=\box26

(/usr/share/texmf-dist/tex/latex/ms/everyshi.sty
Package: everyshi 2001/05/15 v3.00 EveryShipout Package (MS)
))
(/usr/share/texmf-dist/tex/generic/pgf/utilities/pgfrcs.code.tex
Package: pgfrcs 2013/12/20 v3.0.0 (rcs-revision 1.28)
))
Package: pgf 2013/12/18 v3.0.0 (rcs-revision 1.14)

(/usr/share/texmf-dist/tex/latex/pgf/basiclayer/pgfcore.sty
(/usr/share/texmf-dist/tex/latex/graphics/graphicx.sty
Package: graphicx 1999/02/16 v1.0f Enhanced LaTeX Graphics (DPC,SPQR)

(/usr/share/texmf-dist/tex/latex/graphics/keyval.sty
Package: keyval 1999/03/16 v1.13 key=value parser (DPC)
\KV@toks@=\toks15
)
(/usr/share/texmf-dist/tex/latex/graphics/graphics.sty
Package: graphics 2009/02/05 v1.0o Standard LaTeX Graphics (DPC,SPQR)

(/usr/share/texmf-dist/tex/latex/graphics/trig.sty
Package: trig 1999/03/16 v1.09 sin cos tan (DPC)
)
(/usr/share/texmf-dist/tex/latex/latexconfig/graphics.cfg
File: graphics.cfg 2010/04/23 v1.9 graphics configuration of TeX Live
)
Package graphics Info: Driver file: pdftex.def on input line 91.

(/usr/share/texmf-dist/tex/latex/pdftex-def/pdftex.def
File: pdftex.def 2011/05/27 v0.06d Graphics/color for pdfTeX

(/usr/share/texmf-dist/tex/generic/oberdiek/infwarerr.sty
Package: infwarerr 2010/04/08 v1.3 Providing info/warning/error messages (HO)
)
(/usr/share/texmf-dist/tex/generic/oberdiek/ltxcmds.sty
Package: ltxcmds 2011/11/09 v1.22 LaTeX kernel commands for general use (HO)
)
\Gread@gobject=\count87
))
\Gin@req@height=\dimen105
\Gin@req@width=\dimen106
)
(/usr/share/texmf-dist/tex/latex/pgf/systemlayer/pgfsys.sty
(/usr/share/texmf-dist/tex/generic/pgf/systemlayer/pgfsys.code.tex
Package: pgfsys 2013/11/30 v3.0.0 (rcs-revision 1.47)

(/usr/share/texmf-dist/tex/generic/pgf/utilities/pgfkeys.code.tex
\pgfkeys@pathtoks=\toks16
\pgfkeys@temptoks=\toks17

(/usr/share/texmf-dist/tex/generic/pgf/utilities/pgfkeysfiltered.code.tex
\pgfkeys@tmptoks=\toks18
))
\pgf@x=\dimen107
\pgf@y=\dimen108
\pgf@xa=\dimen109
\pgf@ya=\dimen110
\pgf@xb=\dimen111
\pgf@yb=\dimen112
\pgf@xc=\dimen113
\pgf@yc=\dimen114
\w@pgf@writea=\write3
\r@pgf@reada=\read1
\c@pgf@counta=\count88
\c@pgf@countb=\count89
\c@pgf@countc=\count90
\c@pgf@countd=\count91
\t@pgf@toka=\toks19
\t@pgf@tokb=\toks20
\t@pgf@tokc=\toks21

(/usr/share/texmf-dist/tex/generic/pgf/systemlayer/pgf.cfg
File: pgf.cfg 2008/05/14  (rcs-revision 1.7)
)
Driver file for pgf: pgfsys-pdftex.def

(/usr/share/texmf-dist/tex/generic/pgf/systemlayer/pgfsys-pdftex.def
File: pgfsys-pdftex.def 2013/07/18  (rcs-revision 1.33)

(/usr/share/texmf-dist/tex/generic/pgf/systemlayer/pgfsys-common-pdf.def
File: pgfsys-common-pdf.def 2013/10/10  (rcs-revision 1.13)
)))
(/usr/share/texmf-dist/tex/generic/pgf/systemlayer/pgfsyssoftpath.code.tex
File: pgfsyssoftpath.code.tex 2013/09/09  (rcs-revision 1.9)
\pgfsyssoftpath@smallbuffer@items=\count92
\pgfsyssoftpath@bigbuffer@items=\count93
)
(/usr/share/texmf-dist/tex/generic/pgf/systemlayer/pgfsysprotocol.code.tex
File: pgfsysprotocol.code.tex 2006/10/16  (rcs-revision 1.4)
))
(/usr/share/texmf-dist/tex/latex/xcolor/xcolor.sty
Package: xcolor 2007/01/21 v2.11 LaTeX color extensions (UK)

(/usr/share/texmf-dist/tex/latex/latexconfig/color.cfg
File: color.cfg 2007/01/18 v1.5 color configuration of teTeX/TeXLive
)
Package xcolor Info: Driver file: pdftex.def on input line 225.
Package xcolor Info: Model `cmy' substituted by `cmy0' on input line 1337.
Package xcolor Info: Model `hsb' substituted by `rgb' on input line 1341.
Package xcolor Info: Model `RGB' extended on input line 1353.
Package xcolor Info: Model `HTML' substituted by `rgb' on input line 1355.
Package xcolor Info: Model `Hsb' substituted by `hsb' on input line 1356.
Package xcolor Info: Model `tHsb' substituted by `hsb' on input line 1357.
Package xcolor Info: Model `HSB' substituted by `hsb' on input line 1358.
Package xcolor Info: Model `Gray' substituted by `gray' on input line 1359.
Package xcolor Info: Model `wave' substituted by `hsb' on input line 1360.
)
(/usr/share/texmf-dist/tex/generic/pgf/basiclayer/pgfcore.code.tex
Package: pgfcore 2010/04/11 v3.0.0 (rcs-revision 1.7)

(/usr/share/texmf-dist/tex/generic/pgf/math/pgfmath.code.tex
(/usr/share/texmf-dist/tex/generic/pgf/math/pgfmathcalc.code.tex
(/usr/share/texmf-dist/tex/generic/pgf/math/pgfmathutil.code.tex)
(/usr/share/texmf-dist/tex/generic/pgf/math/pgfmathparser.code.tex
\pgfmath@dimen=\dimen115
\pgfmath@count=\count94
\pgfmath@box=\box27
\pgfmath@toks=\toks22
\pgfmath@stack@operand=\toks23
\pgfmath@stack@operation=\toks24
)
(/usr/share/texmf-dist/tex/generic/pgf/math/pgfmathfunctions.code.tex
(/usr/share/texmf-dist/tex/generic/pgf/math/pgfmathfunctions.basic.code.tex)
(/usr/share/texmf-dist/tex/generic/pgf/math/pgfmathfunctions.trigonometric.code
.tex)
(/usr/share/texmf-dist/tex/generic/pgf/math/pgfmathfunctions.random.code.tex)
(/usr/share/texmf-dist/tex/generic/pgf/math/pgfmathfunctions.comparison.code.te
x) (/usr/share/texmf-dist/tex/generic/pgf/math/pgfmathfunctions.base.code.tex)
(/usr/share/texmf-dist/tex/generic/pgf/math/pgfmathfunctions.round.code.tex)
(/usr/share/texmf-dist/tex/generic/pgf/math/pgfmathfunctions.misc.code.tex)
(/usr/share/texmf-dist/tex/generic/pgf/math/pgfmathfunctions.integerarithmetics
.code.tex))) (/usr/share/texmf-dist/tex/generic/pgf/math/pgfmathfloat.code.tex
\c@pgfmathroundto@lastzeros=\count95
)) (/usr/share/texmf-dist/tex/generic/pgf/basiclayer/pgfcorepoints.code.tex
File: pgfcorepoints.code.tex 2013/10/07  (rcs-revision 1.27)
\pgf@picminx=\dimen116
\pgf@picmaxx=\dimen117
\pgf@picminy=\dimen118
\pgf@picmaxy=\dimen119
\pgf@pathminx=\dimen120
\pgf@pathmaxx=\dimen121
\pgf@pathminy=\dimen122
\pgf@pathmaxy=\dimen123
\pgf@xx=\dimen124
\pgf@xy=\dimen125
\pgf@yx=\dimen126
\pgf@yy=\dimen127
\pgf@zx=\dimen128
\pgf@zy=\dimen129
)
(/usr/share/texmf-dist/tex/generic/pgf/basiclayer/pgfcorepathconstruct.code.tex
File: pgfcorepathconstruct.code.tex 2013/10/07  (rcs-revision 1.29)
\pgf@path@lastx=\dimen130
\pgf@path@lasty=\dimen131
) (/usr/share/texmf-dist/tex/generic/pgf/basiclayer/pgfcorepathusage.code.tex
File: pgfcorepathusage.code.tex 2013/12/13  (rcs-revision 1.23)
\pgf@shorten@end@additional=\dimen132
\pgf@shorten@start@additional=\dimen133
)
(/usr/share/texmf-dist/tex/generic/pgf/basiclayer/pgfcorescopes.code.tex
File: pgfcorescopes.code.tex 2013/10/09  (rcs-revision 1.44)
\pgfpic=\box28
\pgf@hbox=\box29
\pgf@layerbox@main=\box30
\pgf@picture@serial@count=\count96
)
(/usr/share/texmf-dist/tex/generic/pgf/basiclayer/pgfcoregraphicstate.code.tex
File: pgfcoregraphicstate.code.tex 2013/09/19  (rcs-revision 1.11)
\pgflinewidth=\dimen134
)
(/usr/share/texmf-dist/tex/generic/pgf/basiclayer/pgfcoretransformations.code.t
ex
File: pgfcoretransformations.code.tex 2013/10/10  (rcs-revision 1.17)
\pgf@pt@x=\dimen135
\pgf@pt@y=\dimen136
\pgf@pt@temp=\dimen137
) (/usr/share/texmf-dist/tex/generic/pgf/basiclayer/pgfcorequick.code.tex
File: pgfcorequick.code.tex 2008/10/09  (rcs-revision 1.3)
)
(/usr/share/texmf-dist/tex/generic/pgf/basiclayer/pgfcoreobjects.code.tex
File: pgfcoreobjects.code.tex 2006/10/11  (rcs-revision 1.2)
)
(/usr/share/texmf-dist/tex/generic/pgf/basiclayer/pgfcorepathprocessing.code.te
x
File: pgfcorepathprocessing.code.tex 2013/09/09  (rcs-revision 1.9)
) (/usr/share/texmf-dist/tex/generic/pgf/basiclayer/pgfcorearrows.code.tex
File: pgfcorearrows.code.tex 2013/11/07  (rcs-revision 1.40)
\pgfarrowsep=\dimen138
)
(/usr/share/texmf-dist/tex/generic/pgf/basiclayer/pgfcoreshade.code.tex
File: pgfcoreshade.code.tex 2013/07/15  (rcs-revision 1.15)
\pgf@max=\dimen139
\pgf@sys@shading@range@num=\count97
)
(/usr/share/texmf-dist/tex/generic/pgf/basiclayer/pgfcoreimage.code.tex
File: pgfcoreimage.code.tex 2013/07/15  (rcs-revision 1.18)

(/usr/share/texmf-dist/tex/generic/pgf/basiclayer/pgfcoreexternal.code.tex
File: pgfcoreexternal.code.tex 2013/07/15  (rcs-revision 1.20)
\pgfexternal@startupbox=\box31
))
(/usr/share/texmf-dist/tex/generic/pgf/basiclayer/pgfcorelayers.code.tex
File: pgfcorelayers.code.tex 2013/07/18  (rcs-revision 1.7)
)
(/usr/share/texmf-dist/tex/generic/pgf/basiclayer/pgfcoretransparency.code.tex
File: pgfcoretransparency.code.tex 2013/09/30  (rcs-revision 1.5)
) (/usr/share/texmf-dist/tex/generic/pgf/basiclayer/pgfcorepatterns.code.tex
File: pgfcorepatterns.code.tex 2013/11/07  (rcs-revision 1.5)
)))
(/usr/share/texmf-dist/tex/generic/pgf/modules/pgfmoduleshapes.code.tex
File: pgfmoduleshapes.code.tex 2013/10/31  (rcs-revision 1.34)
\pgfnodeparttextbox=\box32
)
(/usr/share/texmf-dist/tex/generic/pgf/modules/pgfmoduleplot.code.tex
File: pgfmoduleplot.code.tex 2013/07/31  (rcs-revision 1.12)
)
(/usr/share/texmf-dist/tex/latex/pgf/compatibility/pgfcomp-version-0-65.sty
Package: pgfcomp-version-0-65 2007/07/03 v3.0.0 (rcs-revision 1.7)
\pgf@nodesepstart=\dimen140
\pgf@nodesepend=\dimen141
)
(/usr/share/texmf-dist/tex/latex/pgf/compatibility/pgfcomp-version-1-18.sty
Package: pgfcomp-version-1-18 2007/07/23 v3.0.0 (rcs-revision 1.1)
))
(/usr/share/texmf-dist/tex/latex/pgf/utilities/pgffor.sty
(/usr/share/texmf-dist/tex/latex/pgf/utilities/pgfkeys.sty
(/usr/share/texmf-dist/tex/generic/pgf/utilities/pgfkeys.code.tex))
(/usr/share/texmf-dist/tex/latex/pgf/math/pgfmath.sty
(/usr/share/texmf-dist/tex/generic/pgf/math/pgfmath.code.tex))
(/usr/share/texmf-dist/tex/generic/pgf/utilities/pgffor.code.tex
Package: pgffor 2013/12/13 v3.0.0 (rcs-revision 1.25)

(/usr/share/texmf-dist/tex/generic/pgf/math/pgfmath.code.tex)
\pgffor@iter=\dimen142
\pgffor@skip=\dimen143
\pgffor@stack=\toks25
\pgffor@toks=\toks26
))
(/usr/share/texmf-dist/tex/generic/pgf/frontendlayer/tikz/tikz.code.tex
Package: tikz 2013/12/13 v3.0.0 (rcs-revision 1.142)

(/usr/share/texmf-dist/tex/generic/pgf/libraries/pgflibraryplothandlers.code.te
x
File: pgflibraryplothandlers.code.tex 2013/08/31 v3.0.0 (rcs-revision 1.20)
\pgf@plot@mark@count=\count98
\pgfplotmarksize=\dimen144
)
\tikz@lastx=\dimen145
\tikz@lasty=\dimen146
\tikz@lastxsaved=\dimen147
\tikz@lastysaved=\dimen148
\tikzleveldistance=\dimen149
\tikzsiblingdistance=\dimen150
\tikz@figbox=\box33
\tikz@figbox@bg=\box34
\tikz@tempbox=\box35
\tikz@tempbox@bg=\box36
\tikztreelevel=\count99
\tikznumberofchildren=\count100
\tikznumberofcurrentchild=\count101
\tikz@fig@count=\count102
 (/usr/share/texmf-dist/tex/generic/pgf/modules/pgfmodulematrix.code.tex
File: pgfmodulematrix.code.tex 2013/09/17  (rcs-revision 1.8)
\pgfmatrixcurrentrow=\count103
\pgfmatrixcurrentcolumn=\count104
\pgf@matrix@numberofcolumns=\count105
)
\tikz@expandcount=\count106

(/usr/share/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibrary
topaths.code.tex
File: tikzlibrarytopaths.code.tex 2008/06/17 v3.0.0 (rcs-revision 1.2)
)))
(/usr/share/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibrary
shadows.code.tex
File: tikzlibraryshadows.code.tex 2008/01/13 v3.0.0 (rcs-revision 1.3)

(/usr/share/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibrary
fadings.code.tex
File: tikzlibraryfadings.code.tex 2009/11/15 v3.0.0 (rcs-revision 1.2)

(/usr/share/texmf-dist/tex/generic/pgf/libraries/pgflibraryfadings.code.tex
File: pgflibraryfadings.code.tex 2008/02/07 v3.0.0 (rcs-revision 1.3)
)))
(/usr/share/texmf-dist/tex/latex/base/inputenc.sty
Package: inputenc 2008/03/30 v1.1d Input encoding file
\inpenc@prehook=\toks27
\inpenc@posthook=\toks28

(/usr/share/texmf-dist/tex/latex/ucs/utf8x.def
File: utf8x.def 2004/10/17 UCS: Input encoding UTF-8
))
(/usr/share/texmf-dist/tex/latex/ucs/ucs.sty
Package: ucs 2013/05/11 v2.2 UCS: Unicode input support

(/usr/share/texmf-dist/tex/latex/ucs/data/uni-global.def
File: uni-global.def 2013/05/13 UCS: Unicode global data
)
\uc@secondtry=\count107
\uc@combtoks=\toks29
\uc@combtoksb=\toks30
\uc@temptokena=\toks31
)
(/usr/share/texmf-dist/tex/generic/babel/babel.sty
Package: babel 2013/12/03 3.9h The Babel package

(/usr/share/texmf-dist/tex/generic/babel-english/english.ldf
Language: english 2012/08/20 v3.3p English support from the babel system

(/usr/share/texmf-dist/tex/generic/babel/babel.def
File: babel.def 2013/12/03 3.9h Babel common definitions
\babel@savecnt=\count108
\U@D=\dimen151
)
\l@canadian = a dialect from \language\l@american 
\l@australian = a dialect from \language\l@british 
\l@newzealand = a dialect from \language\l@british 
)
(/usr/share/texmf-dist/tex/generic/babel-hebrew/rlbabel.def
File: rlbabel.def 2005/03/30 v2.3h Right-to-Left support from the babel system 
Hebrew language support from the babel system
)
(/usr/share/texmf-dist/tex/generic/0babel/hebrew.ldf
File: hebrew.ldf 2004/02/20 v2.3h Hebrew language definition from the babel sys
tem Hebrew language support from the babel system


Package babel Warning: No hyphenation patterns were preloaded for
(babel)                the language `Hebrew' into the format.
(babel)                Please, configure your TeX system to add them and
(babel)                rebuild the format. Now I will use the patterns
(babel)                preloaded for english instead on input line 57.

\l@hebrew = a dialect from \language0
)) (/usr/share/texmf-dist/tex/generic/babel-hebrew/he8enc.def
File: HE8enc.def 2005/05/20 v1.2c 8-bit Hebrew font encoding (test version: sti
ll liable to change)
) (./123123123.aux
LaTeX Font Info:    Try loading font information for HE8+cmr on input line 2.
(/usr/share/texmf-dist/tex/generic/babel-hebrew/he8cmr.fd
File: HE8cmr.fd 2005/05/20 v1.2c Hebrew default font (test version: still liabl
e to change)
))
\openout1 = `123123123.aux'.

LaTeX Font Info:    Checking defaults for OML/cmm/m/it on input line 13.
LaTeX Font Info:    ... okay on input line 13.
LaTeX Font Info:    Checking defaults for T1/cmr/m/n on input line 13.
LaTeX Font Info:    ... okay on input line 13.
LaTeX Font Info:    Checking defaults for OT1/cmr/m/n on input line 13.
LaTeX Font Info:    ... okay on input line 13.
LaTeX Font Info:    Checking defaults for OMS/cmsy/m/n on input line 13.
LaTeX Font Info:    ... okay on input line 13.
LaTeX Font Info:    Checking defaults for OMX/cmex/m/n on input line 13.
LaTeX Font Info:    ... okay on input line 13.
LaTeX Font Info:    Checking defaults for U/cmr/m/n on input line 13.
LaTeX Font Info:    ... okay on input line 13.
LaTeX Font Info:    Checking defaults for HE8/cmr/m/n on input line 13.
LaTeX Font Info:    ... okay on input line 13.

ABD: EveryShipout initializing macros
(/usr/share/texmf-dist/tex/context/base/supp-pdf.mkii
[Loading MPS to PDF converter (version 2006.09.02).]
\scratchcounter=\count109
\scratchdimen=\dimen152
\scratchbox=\box37
\nofMPsegments=\count110
\nofMParguments=\count111
\everyMPshowfont=\toks32
\MPscratchCnt=\count112
\MPscratchDim=\dimen153
\MPnumerator=\count113
\makeMPintoPDFobject=\count114
\everyMPtoPDFconversion=\toks33
) (/usr/share/texmf-dist/tex/generic/oberdiek/pdftexcmds.sty
Package: pdftexcmds 2011/11/29 v0.20 Utility functions of pdfTeX for LuaTeX (HO
)

(/usr/share/texmf-dist/tex/generic/oberdiek/ifluatex.sty
Package: ifluatex 2010/03/01 v1.3 Provides the ifluatex switch (HO)
Package ifluatex Info: LuaTeX not detected.
)
(/usr/share/texmf-dist/tex/generic/oberdiek/ifpdf.sty
Package: ifpdf 2011/01/30 v2.3 Provides the ifpdf switch (HO)
Package ifpdf Info: pdfTeX in PDF mode is detected.
)
Package pdftexcmds Info: LuaTeX not detected.
Package pdftexcmds Info: \pdf@primitive is available.
Package pdftexcmds Info: \pdf@ifprimitive is available.
Package pdftexcmds Info: \pdfdraftmode found.
)
(/usr/share/texmf-dist/tex/latex/oberdiek/epstopdf-base.sty
Package: epstopdf-base 2010/02/09 v2.5 Base part for package epstopdf

(/usr/share/texmf-dist/tex/latex/oberdiek/grfext.sty
Package: grfext 2010/08/19 v1.1 Manage graphics extensions (HO)

(/usr/share/texmf-dist/tex/generic/oberdiek/kvdefinekeys.sty
Package: kvdefinekeys 2011/04/07 v1.3 Define keys (HO)
))
(/usr/share/texmf-dist/tex/latex/oberdiek/kvoptions.sty
Package: kvoptions 2011/06/30 v3.11 Key value format for package options (HO)

(/usr/share/texmf-dist/tex/generic/oberdiek/kvsetkeys.sty
Package: kvsetkeys 2012/04/25 v1.16 Key value parser (HO)

(/usr/share/texmf-dist/tex/generic/oberdiek/etexcmds.sty
Package: etexcmds 2011/02/16 v1.5 Avoid name clashes with e-TeX commands (HO)
Package etexcmds Info: Could not find \expanded.
(etexcmds)             That can mean that you are not using pdfTeX 1.50 or
(etexcmds)             that some package has redefined \expanded.
(etexcmds)             In the latter case, load this package earlier.
)))
Package grfext Info: Graphics extension search list:
(grfext)             [.png,.pdf,.jpg,.mps,.jpeg,.jbig2,.jb2,.PNG,.PDF,.JPG,.JPE
G,.JBIG2,.JB2,.eps]
(grfext)             \AppendGraphicsExtensions on input line 452.

(/usr/share/texmf-dist/tex/latex/latexconfig/epstopdf-sys.cfg
File: epstopdf-sys.cfg 2010/07/13 v1.3 Configuration of (r)epstopdf for TeX Liv
e
))
(/usr/share/texmf-dist/tex/latex/ucs/ucsencs.def
File: ucsencs.def 2011/01/21 Fixes to fontencodings LGR, T3
)
LaTeX Font Info:    External font `cmex10' loaded for size
(Font)              <7> on input line 18.
LaTeX Font Info:    External font `cmex10' loaded for size
(Font)              <5> on input line 18.
 [1

{/var/lib/texmf/fonts/map/pdftex/updmap/pdftex.map}] (./123123123.aux) ) 
Here is how much of TeX's memory you used:
 12314 strings out of 493308
 244753 string characters out of 6143616
 290522 words of memory out of 5000000
 15529 multiletter control sequences out of 15000+600000
 7456 words of font info for 20 fonts, out of 8000000 for 9000
 957 hyphenation exceptions out of 8191
 55i,7n,78p,414b,685s stack positions out of 5000i,500n,10000p,200000b,80000s
{/usr/s
hare/texmf-dist/fonts/enc/dvips/culmus/he8.enc}</usr/share/texmf-dist/fonts/typ
e1/public/culmus/DavidCLM-Bold.pfa></usr/share/texmf-dist/fonts/type1/public/cu
lmus/DavidCLM-Medium.pfa>
Output written on 123123123.pdf (1 page, 22419 bytes).
PDF statistics:
 44 PDF objects out of 1000 (max. 8388607)
 22 compressed objects within 1 object stream
 0 named destinations out of 1000 (max. 500000)
 109 words of extra memory for PDF output out of 10000 (max. 10000000)
share|improve this question
    
I get a font error what does your log file say? –  percusse Mar 23 at 4:26
    
My log says nothing special. When I just enable the babel without the inputenc then it complains about something being undefined. –  Math PhD Student Mar 23 at 4:28
    
Actually, I tried that again, and now it's fine even if I don't load the inputenc. –  Math PhD Student Mar 23 at 4:29
    
You mean the problem is gone? –  percusse Mar 23 at 4:30
    
Not even remotely. It always complied just fine. Nothing shows up when the hebrew is loaded. –  Math PhD Student Mar 23 at 4:31

2 Answers 2

up vote 4 down vote accepted

I was looking for a solution because I knew one must exist. The original TikZ code was from some example for using ntheorem shady theorems environment, and I had a working example of that.

So obviously something in the ntheorem preamble was making the TikZ code work. But after a couple hours of sleep, my brain cracked up the mystery.

\documentclass[10pt]{article}

\usepackage{tikz}
\usetikzlibrary{shadows}

\tikzstyle{testbox} = [rectangle, rounded corners, draw=black,
  fill=blue!20, inner sep=10pt, drop shadow={fill=black, opacity=.4}]
\tikzstyle{titlebox} =[fill=gray!20, text=black!80, draw=black]

\usepackage[utf8x]{inputenc}
\usepackage[english,hebrew]{babel}

\begin{document}
\L{  \noindent\begin{tikzpicture}%
  \node [testbox] (box){%
    \begin{minipage}{.7\textwidth}%
      \raggedleft\R{אני לררר שליט הכוכב אומיקרון פריסיי שמונה!}%
    \end{minipage}%
  };
  \node [titlebox, right=-35pt] at (box.north east) {\R{\textbf{לררר}}};%
  \end{tikzpicture}}
\end{document}

I realized that setting everything into a babel \L{} group, and adding a modifying \R{} group for the text itself might work. And it does. Beautifully.

enter image description here

share|improve this answer

Not remotely an expert on RTL languages and LaTeX, and also not remotely and expert on Hebrew, but my "experience" (based entirely on one answer to questions on this site), suggests that compiling with lualatex and using the fontspec package may be helpful.

You will need to replace freesans with a different font name if you don't have it on your system.

Apologies for the (probably rubbish) Hebrew translation.

\documentclass[tikz,border=5]{standalone}
\usepackage{fontspec}
\newfontfamily\hebrewfont[Script=Hebrew]{freesans}
\usepackage{tikz}
\usetikzlibrary{shadows}

\tikzset{%
  testbox/.style={
    rectangle, 
    rounded corners, 
    draw=black,
    fill=blue!20, 
    inner sep=10pt, 
    drop shadow={fill=black, opacity=.4}
  },
  titlebox/.style={
    fill=gray!20, 
    text=black!80, 
    draw=black
  },
  hebrew text/.style={
    align=right,
    font=\hebrewfont,
    execute at begin node={\luatextextdir TRT}
  }
}

\begin{document}
\begin{tikzpicture}%
  \node [testbox, text width=3in] (box1)
  {%
      I am Lrrr, of the planet Omicron Persei Eight.%
  };
  \node [titlebox, right=5pt] at (box1.north west) {\textbf{Lrrr}};%

  \node [testbox, text width=3in, hebrew text] at (0,-2) (box2)
  {%
אני לררר, של כדור הארץ אומיקרון פרטאי שמונה
  };
  \node [titlebox, left=5pt, hebrew text] at (box2.north east) {\textbf{לררר}};
\end{tikzpicture}
\end{document}

enter image description here

share|improve this answer
    
Thank you for the comment and the effort, but the whole point of this was to remain inside the confines of LaTeX, so the answer is unhelpful in the grand schemes of events. –  Math PhD Student Mar 23 at 10:04

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.