LyXLyX - Fractions look bad

Information and discussion about LyX, a WYSIWYM editor, available for Linux, Windows and Mac OS X systems.
Post Reply
WK95
Posts: 3
Joined: Mon Nov 03, 2014 6:37 pm

LyX - Fractions look bad

Post by WK95 »

I'm using LyX to type out fractions but they look very messy. Is there a way to make the fractions look nicer?

For example, the denominators are touching the fraction line and that looks bad. Also, the spacing of each line seems a bit too close at times.

Image

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p

Stefan Kottwitz
Site Admin
Posts: 10335
Joined: Mon Mar 10, 2008 9:44 pm

LyX - Fractions look bad

Post by Stefan Kottwitz »

Welcome to the forum!

It seems that you wrote inline math, I mean math within text. Such formulas look better as displayed math, such as with equation environments. Then there's a better spacing around the fraction bar and also around the whole formula.

Furthermore, consider using upright font for elements which are not variables, such as operators and those word like indexes. Otherwise words look like consecutive variables, with bad spacing between letters. Here's some output, compare for example the letter pair "Ta" in italic math (without kerning) to its upright shape.
fractions.png
fractions.png (20.37 KiB) Viewed 4988 times
Btw. the LaTeX code for this is:

Code: Select all

$I_{Total} = \frac{V_{Total}}{R_{Total}}$

\bigskip
$I_{Total} = \dfrac{V_{Total}}{R_{Total}}$
\[
  I_{Total} = \frac{V_{Total}}{R_{Total}}
\]
\[
  I_\mathrm{Total} = \frac{V_\mathrm{Total}}{R_\mathrm{Total}}
\]
Stefan
LaTeX.org admin
WK95
Posts: 3
Joined: Mon Nov 03, 2014 6:37 pm

Re: LyX - Fractions look bad

Post by WK95 »

Thanks, \mathrm really improves the look.

I see that you use \[ and \] but is there something else I can do that is simplified or compact? I have to write a lot of my work for my solutions out and using those symbols between every line would be a bit clunky. Doable, yes, but clunky. However, they were certainly make good sense to use for a couple of formulas at a time.
User avatar
Stefan Kottwitz
Site Admin
Posts: 10335
Joined: Mon Mar 10, 2008 9:44 pm

LyX - Fractions look bad

Post by Stefan Kottwitz »

As you are using LyX, you don't need to type \[ ... \], click the LyX way, i.e. Insert→Math→Display formula (Shift+Ctrl+M) or the like.

Stefan
LaTeX.org admin
WK95
Posts: 3
Joined: Mon Nov 03, 2014 6:37 pm

Re: LyX - Fractions look bad

Post by WK95 »

Thanks a lot! That works just great.

Before, I was using TeX Code (Ctrl+L).
Post Reply