7

When I'm combined at the same line Hebrew and English, the line below is "breaking" for two lines....
e.g.
enter image description here

MWE:

\documentclass[a4paper,english,hebrew,numbers=noenddot]{scrartcl}
\usepackage{fontspec}
\PassOptionsToPackage{normalem}{ulem}
\usepackage{ulem}


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% User specified LaTeX commands.
\newfontfamily\hebrewfont[Script=Hebrew]{David CLM}
\newfontfamily\hebrewfonttt[Script=Hebrew]{Miriam Mono CLM}
\newfontfamily\hebrewfontsf[Script=Hebrew]{Bellefair}

\usepackage{polyglossia}
\setdefaultlanguage{hebrew}
\setotherlanguage{english}
\begin{document}
\uline{אאא}\textenglish[variant=american]{\uline{aaa bbb}}
\end{document}

Do you how can I fix it?

Thank you!!

  • 1
    Most typographers would answer the question with "Don't use underline". :) – David Richerby May 7 at 10:57
10

Put the \textenglish{aaa} block inside the same \uline:

\documentclass[a4paper,numbers=noenddot]{scrartcl}
\usepackage{fontspec}
\PassOptionsToPackage{normalem}{ulem}
\usepackage{ulem}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% User specified LaTeX commands.
\defaultfontfeatures{Scale=MatchUppercase, Ligatures=TeX}
\newfontfamily\hebrewfont[Script=Hebrew]{David CLM Medium}
\newfontfamily\hebrewfonttt[Script=Hebrew]{Miriam Mono CLM Book}
\newfontfamily\hebrewfontsf[Script=Hebrew]{Miriam CLM Book}

\usepackage{polyglossia}
\setdefaultlanguage{hebrew}
\setotherlanguage[variant=american]{english}

\begin{document}
\uline{אאא \textenglish{aaa}}
\end{document}

Font Sample

I made a handful of other trivial changes, such as removing unsupported Koma options and moving the language variant to the preamble instead of every time you change language. And one noticeable one, which was to scale all the fonts to the same height.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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