0

I am trying to write a code in Overleaf and for some reason it gives me an error, and does not give me a proper output.

\documentclass{article}
\usepackage{xcolor}
\usepackage{pgfplots}
\usepackage{tikz}
\usepackage{amssymb}
\usepackage[utf8]{inputenc}
\usepackage{amsmath}
\usepackage{mathtools}
\usepackage{mathrsfs}
\usepackage[top=2cm,bottom=2cm,left=2.5cm,right=2cm]{geometry}
\usetikzlibrary{patterns,arrows.meta}
\usetikzlibrary{calc}
\usetikzlibrary{shadows}
\usetikzlibrary{external}
\newcommand{\innerproduct}[2]{\langle #1, #2 \rangle}
\usepackage{titlesec}
\usepackage[hebrew,english]{babel}

\begin{document}

\selectlanguage{hebrew}
שלום לכם ילדים וילדות
\selectlanguage{english}
I am Yuval Hamevulbal

\end{document}

The output is:

I am Yuval Hamevulbal

The wanted output is:

שלום לכם ילדים וילדות
I am Yuval Hamevulbal
16
  • 2
    Are you sure that this is a minimal example? Commented Jan 2 at 9:28
  • What do you mean by minimal example Commented Jan 2 at 9:29
  • You need to use a font which has these letters, e.g. overleaf.com/read/dvsvgtwzxztw#604d97 Commented Jan 2 at 9:30
  • How do I do that? Last semester I've done the exact thing I am doing now, but not it's not compiling me the code Commented Jan 2 at 9:30
  • 1
    well I just tried on overleaf and it used hebrew.ldf 2003/11/01 v2.3h, while a current texlive uses hebrew.ldf 2023/08/22 v2.4a. Lualatex is another engine which is unicode aware, you can choose it in the overleaf menu instead of pdflatex. Commented Jan 2 at 9:41

0

You must log in to answer this question.

Browse other questions tagged .