# [Tex/LaTex] Some problems using LyX RTL with equations

#enumerateequationshebrewlyxright-to-left

I'm really new to the whole LyX(2.0.5.1) thing I'm usually using LibreOffice Writer and it's Latex like "formulas".

But I've heard so many good things about LyX, so I've decided to give it a try but I'm having some difficulties particularly when using Hebrew. Yes I've completed the tutorial, searched the Use guide, the internet and just tried to tinker with it but to no avail.
I'm trying write homework answers(view image) that usually have the following format:

 1.
a. (although it would be nice know how to replace this numbering with Hebrew letters).


The main problems are:

1. When generating a PDF it uses a very small portion of the page when in "Enumerate" area.
2. Equations that are too "long" for that tiny area are divided incorrectly as the Hebrew text is not "equal" to anything.
3. When I'm trying to use "Display Mode" the equation it simply cuts the equation.

I've added something that's supposed to be a MWE, I apologize if it's long but as I said I've been trying to use LyX only for a few days so I wouldn't really know which Latex parts are more important then the others.

% Preview source code

%% LyX 2.0.5.1 created this file.  For more info, see http://www.lyx.org/.
%% Do not edit unless you really know what you are doing.
\documentclass[english,hebrew]{article}
\usepackage[T1]{fontenc}
\usepackage[latin9,cp1255]{inputenc}
\usepackage{amsmath}
\usepackage{esint}

\makeatletter
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Textclass specific LaTeX commands.
\usepackage{theorem}
\theorembodyfont{\upshape}
\newtheorem{theorem}{\R{משפט}}[section]
\AtBeginDocument{\make@lr\thetheorem}
\usepackage{enumitem}       % customizable list environments
\newlength{\lyxlabelwidth}      % auxiliary length

\makeatother

\usepackage{babel}
\begin{document}

\title{ליקס}

\author{וקיפדיה}
\maketitle
\begin{enumerate}
\item רעיון הבסיסי של א שאין צורך לטפל בעיצוב. ישנה רשימה של עיצובים קיימים
וניתן לבחור מתוכה את אופי הטקסט (כותרת ראשית, כותרת משנית, הערת שוליים
וכו'). כך, התוצאה הסופית אמורה להיות עקבית ובעלת מראה מקצועי. בנוסף,
מא יבה נוחה של משוואות מתמטיות ולכן נפוץ בקרב קהילת האקדמאים העוסקים
במדעים מדויקים.
\item משתמש ב־ כמנגנון עיבוד הטקסט. \L{$\int\limits _{a}^{k}\int\limits _{0}^{\pi}2\pi\frac{\rho_{0}}{4\pi}\sin(\pi\frac{r-a}{b-a})\sin(\theta)d\theta dr=\int\limits _{a}^{k}\int\limits _{0}^{\pi}\frac{\rho_{0}}{2}\sin(\pi\frac{r-a}{b-a})\sin(\theta)d\theta dr=\rho_{0}\int\limits _{a}^{k}\sin(\pi\frac{r-a}{b-a})dr=\rho_{0}\left[-\cos\left(\pi\frac{r-a}{b-a}\right)\frac{b-a}{\pi}\right]_{a}^{k}$}היא
תוכנה ותיקה בעלת יכולות נרחבות, שבעזרתה ניתן להפיק מ־ יכול לייצא גם
\L{$\int\limits _{a}^{k}\int\limits _{0}^{\pi}2\pi\frac{\rho_{0}}{4\pi}\sin(\pi\frac{r-a}{b-a})\sin(\theta)d\theta dr=\int\limits _{a}^{k}\int\limits _{0}^{\pi}\frac{\rho_{0}}{2}\sin(\pi\frac{r-a}{b-a})\sin(\theta)d\theta dr=\rho_{0}\int\limits _{a}^{k}\sin(\pi\frac{r-a}{b-a})dr=\rho_{0}\left[-\cos\left(\pi\frac{r-a}{b-a}\right)\frac{b-a}{\pi}\right]_{a}^{k}$}
\item דורש מהמשתמש לימוד ארוך יחסית למעבד תמלילים דוגמת וורד אך מפיק בדרך
כלל תוצאות איכותיות יותר, ומאפשר עבודה מהירה יותר למשתמש המיומן.\L{
\begin{align*}
\int\limits _{a}^{k}\int\limits _{0}^{\pi}2\pi\frac{\rho_{0}}{4\pi}\sin(\pi\frac{r-a}{b-a})\sin(\theta)d\theta dr=\int\limits _{a}^{k}\int\limits _{0}^{\pi}\frac{\rho_{0}}{2}\sin(\pi\frac{r-a}{b-a})\sin(\theta)d\theta dr=\rho_{0}\int\limits _{a}^{k}\sin(\pi\frac{r-a}{b-a})dr=\rho_{0}\left[-\cos\left(\pi\frac{r-a}{b-a}\right)\frac{b-a}{\pi}\right]_{a}^{k} & s
\end{align*}
}\L{
$\int\limits _{a}^{k}\int\limits _{0}^{\pi}2\pi\frac{\rho_{0}}{4\pi}\sin(\pi\frac{r-a}{b-a})\sin(\theta)d\theta dr=\int\limits _{a}^{k}\int\limits _{0}^{\pi}\frac{\rho_{0}}{2}\sin(\pi\frac{r-a}{b-a})\sin(\theta)d\theta dr=\rho_{0}\int\limits _{a}^{k}\sin(\pi\frac{r-a}{b-a})dr=\rho_{0}\left[-\cos\left(\pi\frac{r-a}{b-a}\right)\frac{b-a}{\pi}\right]_{a}^{k}$
}\end{enumerate}

\end{document}


Elaborating my comment to an answer...

Question 1: "Enumerate" uses small portion of the page.

Answer: If you use enumerations in LyX / LaTeX, I guess, it does not matter whether you use a right-to-left or a left-to-right language, the indentation will always be the same amount (of course, on the right side if using right-to-left). LaTeX (which is generated by LyX) uses typesetting rules that are quite professional. You will also see that an average line (at least in English) has about 65 characters and thus, a quite big margin might be left. This limit on the length of a line is used for better readability. Here is an example.

The example was simply created by using a new LyX document with

\usepackage[english]{babel}
\usepackage{blindtext}


put into "Document > Settings... > LaTeX Preamble" and

\blindtext \blindlistlist[2]{enumerate}[2] \blindtext


put as TeX code/ERT (<Crtl>-L) in the main document. (Note that the LaTeX package blindtext is used.)

Question 1a: How to replace this numbering with Hebrew letters.

Answer: As a quick workaround you can use the description environment instead. Then you should be able to put any label you want. (Furthermore, nesting of enumerations, itemizations, descriptions is possible in LyX.)

Otherwise see Robust method to apply Hebrew numeral in an enumeration list? (Possibly you need ask a separate question how to integrate that in LyX...)

Question 2: Long equations are divided incorrectly...

Answer: LaTeX break equations not at arbitrary points but usually after relation symbols. If you do not like the break up then - as a workaround - you can split the inline math environment into two or more.

You might also search on this site for questions tagged with math-mode and line-breaking.

Question 3: The equation is cut in "Display Mode".

Answer: A common way to deal with long formulas and many equations is to use "Insert > Math > AMS align Environment". Then you can add rows and break up the equations over several lines. It looks like in the following picture.