5

I want to write a modern CV with some Hebrew letters. moderncv works fine alone:

\documentclass{moderncv}\firstname{}\familyname{}
\usepackage[utf8x]{inputenc}
\usepackage[english]{babel}
\begin{document}
English
\end{document}

Hebrew also works fine alone:

\documentclass{article}
\usepackage[utf8x]{inputenc}
\usepackage[hebrew,english]{babel}
\begin{document}
English
\R{עברית}
\end{document}

But, when I try to run them together:

\documentclass{moderncv}\firstname{}\familyname{}
\usepackage[utf8x]{inputenc}
\usepackage[hebrew,english]{babel}
\begin{document}
English
\R{עברית}
\end{document}

I get many error messages of the form:

"Undefined control sequence. }". File: rlbabel.def. Line: 188 

Is there a way to make them work simultaneously?

  • 2
    perhaps you should add that the error is about \thesection not being known, as well as \thesubsection etc. –  Aug 12 '16 at 14:42
  • @heather I installed TexLive on my system using this script: https://github.com/scottkosty/install-tl-ubuntu that automatically installes Hebrew support – Erel Segal-Halevi Aug 12 '16 at 14:43
  • @heather: The fact that share latex does not provide the fonts is not the error here –  Aug 12 '16 at 14:44
  • I've deleted my solution since I can't compile it beyond the point where the real Hebrew font is needed -- I don't have such fonts on my distribution. –  Aug 12 '16 at 15:10
  • 1
    Perhaps using polyglossia is the better way to go here? –  Aug 12 '16 at 15:12
  • You are using babel, but don't 'setlanguage', why ? – Elad Den Aug 13 '16 at 06:41
  • I started looking into this, and it turns out hebrew babel does not like moderncv, the right-left definitions require chapter, section and subsection counters, in addition to other definitions the moderncv does not supply.

    predefining these counters and these commands did not help, it still did not compile.

    – Elad Den Aug 14 '16 at 07:01

2 Answers2

2

Well, I do not know the hebrew language, but you can try the package cjhebrew to solve your problem. But I ask you to test it, because I can not say if the result is correct.

Please try the following MWE:

\documentclass{moderncv}\firstname{}\familyname{}
\usepackage[utf8x]{inputenc}
\usepackage[english]{babel}
\usepackage{cjhebrew} % <===========================================
\begin{document}
English
\begin{cjhebrew} % <================================================
b*:re’+siyt b*ArA’ ’E:lohiym ’et ha+s*Amayim w:’et hA’ArE.s; w:hA’ArE.s
hAy:tAh tohU wAbohU w:.ho+sEk: ‘al--p*:ney t:hOm
\end{cjhebrew}
\end{document}

with the resulting pdf on my system with current MiKTeX 2.9:

enter image description here

PS the hebrew text I took from this question.

Mensch
  • 65,388
2

I think that the solution here might be to use XeLaTeX (LuaLaTeX did not work for the following MWE) with polyglossia.

\documentclass[]{moderncv}
\firstname{}
\familyname{}

\usepackage{fontspec}
\usepackage[unicode]{hyperref}
\usepackage{bookmark}

\usepackage{polyglossia}
\setdefaultlanguage{english}
\setotherlanguage{hebrew}
\newfontfamily{\hebrewfont}{Linux Libertine O}[Scale=MatchUppercase]

\begin{document}
English
\texthebrew{עברית}
\end{document}
wilx
  • 2,339