I'm trying to enter a long chain of inequalities in math display mode. If I enter the expressions as I want them to, LyX will continue displaying them off the screen – so that they don't show up when I compile the pdf (and I cannot see what I am typing). Is there a way I can enter a long chain of expressions in display mode so that LyX displays them nicely? My only option so far has been to exit display mode when I'm too far right of the screen, hit enter and go back into display mode to enter the next line. However, this doesn't look too great on the pdf, and I have no idea when is a good time to shift to the next line anyway. I'm assuming there is a proper way to do this.
[Tex/LaTex] Displaying a really long chain of inequalities
equationsformattingline-breakinglyx
Related Solutions
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.
You could load the url package -- I suggest you set the options spaces
, obeyspaces
, and hyphens
when loading the package -- and use that package's \path
macro to typeset the long path name.
\documentclass{article}
\usepackage[hyphens,obeyspaces,spaces]{url}
\begin{document}
\noindent
\path{/aaaa/bbbb/cccc/dddd/eeee/ffff/gggg/hhhh/iiii/jjjj/kkkk/llll/mmmm/aaaa/bbbb/cccc/dddd/eeee/ffff/gggg/hhhh/iiii/jjjj/kkkk/llll/mmmm/aaaa/bbbb/cccc/dddd/eeee/ffff/gggg/hhhh/iiii/jjjj/kkkk/llll/mmmm/aaaa/bbbb/cccc/dddd/eeee/ffff/gggg/hhhh/iiii/jjjj/kkkk/llll/mmmm/aaaa/bbbb/cccc/dddd/eeee/ffff/gggg/hhhh/iiii/jjjj/kkkk/llll/mmmm}
\end{document}
Best Answer
As people mentioned in the comments you should use
eqnarray
oralign
By default you can do it by pressing Ctrl-Enter in math mode, this will create aneqnarray
environment. By pressing Ctrl-Enter again, you can get additional lines. Spacing should be much better than acieved by separate displayed math environments.To use the AMS
align
environment, you should tick "Use AMS math package" (first untick "Use AMS math package automatically") in Document->Settings->Math Options. This is probably the best thing to do, asalign
is much better looking thaneqnarrary
.