LyXMath in Lyx View and PDF View

Information and discussion about LyX, a WYSIWYM editor, available for Linux, Windows and Mac OS X systems.
Post Reply
harper
Posts: 9
Joined: Thu Dec 01, 2011 5:15 pm

Math in Lyx View and PDF View

Post by harper »

Hi,

i have a problem when converting formulas to PDF.

In LyX, the math looks really good, but when i view the document as a PDF, it looks really crappy. I have included a screenshot of the math in LyX and in the PDF. Can i do something about this?

thx for any help!
Attachments
Viewed in LyX.
Viewed in LyX.
pic2.png (16.17 KiB) Viewed 5395 times
Viewed in PDF output.
Viewed in PDF output.
pic1.png (10.51 KiB) Viewed 5395 times

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

justdeath
Posts: 69
Joined: Mon Sep 05, 2011 10:27 am

Math in Lyx View and PDF View

Post by justdeath »

It really does look crappy.

First, are you using some decent PDF viewer? Like Adobe Reader, Foxit Reader, Sumatra PDF?

Second, I compiled with TeXLive and you can see the result. But MiKTeX should also have very good output.

I am almost certain it is from the PDF viewer not rendering the fonts correctly.

I did the first row with \bar, the second with \overline. There is a slight difference.
Clipboard05.jpg
Clipboard05.jpg (14.18 KiB) Viewed 5392 times
Nikolay
harper
Posts: 9
Joined: Thu Dec 01, 2011 5:15 pm

Math in Lyx View and PDF View

Post by harper »

I used the PDF XChange Viewer and the build-in thingy that comes with Linux Mint..

I tried Foxit now and it really does look better. But still, the minus from the "-1" looks like an extension to the "\bar".. Is there anything that can be done about this?

I added the code and a new picture, taken with foxit reader for reference..

Code: Select all

\begin{eqnarray}
\bar{s}_{ap}^{-1}\cdot\bar{a} & = & \bar{v}_{ap}\label{eq:}\\
\bar{s}_{gt}^{-1}\cdot\bar{a} & = & \bar{v}_{gt}\label{eq:-1}
\end{eqnarray}
PS: Thanks to the admin who took the time to clean up my messy post..
Attachments
pic3.JPG
pic3.JPG (17.01 KiB) Viewed 5385 times
Last edited by Stefan Kottwitz on Wed Mar 14, 2012 6:26 pm, edited 1 time in total.
User avatar
Stefan Kottwitz
Site Admin
Posts: 10329
Joined: Mon Mar 10, 2008 9:44 pm

Math in Lyx View and PDF View

Post by Stefan Kottwitz »

Btw. eqnarray is obsolet and not consistent regarding other math environments, so I would not use it. Have a look at the spacing around the equal sign and compare it to simple equation environments. Perhaps have a look at eqnarray vs. align for further information.

Stefan
LaTeX.org admin
harper
Posts: 9
Joined: Thu Dec 01, 2011 5:15 pm

Re: Math in Lyx View and PDF View

Post by harper »

Align does not seem to make a difference. It looks the same.

Anyway, i plan to hand my thesis in tomorrow, so this will be a detail that my professor has to live with^^
User avatar
Stefan Kottwitz
Site Admin
Posts: 10329
Joined: Mon Mar 10, 2008 9:44 pm

Math in Lyx View and PDF View

Post by Stefan Kottwitz »

No need to change, it was just a remark.

Here it can be compared: first equation, then align, then the different spacing with eqnarray:
equations.png
equations.png (3.37 KiB) Viewed 5375 times

Code: Select all

\documentclass{article}
\usepackage{amsmath}
\begin{document}
\begin{equation}
    \bar{s}_{ap}^{-1}\cdot\bar{a} = \bar{v}_{ap}
\end{equation}
\begin{align}
    \bar{s}_{ap}^{-1}\cdot\bar{a} &= \bar{v}_{ap}\\
    \bar{s}_{gt}^{-1}\cdot\bar{a} &= \bar{v}_{gt}
\end{align}
\begin{eqnarray}
    \bar{s}_{ap}^{-1}\cdot\bar{a} & = & \bar{v}_{ap}\\
    \bar{s}_{gt}^{-1}\cdot\bar{a} & = & \bar{v}_{gt}
\end{eqnarray}
\end{document}
Stefan
LaTeX.org admin
mech_e
Posts: 1
Joined: Mon May 14, 2012 1:18 pm

Math in Lyx View and PDF View

Post by mech_e »

you could superscript the minus sign as follows:

Code: Select all

\documentclass{article}
    \usepackage{amsmath}
    \begin{document}
    \begin{equation}
        \bar{s}_{ap}^{^-1}\cdot\bar{a} = \bar{v}_{ap}
    \end{equation}
    \begin{align}
        \bar{s}_{ap}^{-1}\cdot\bar{a} &= \bar{v}_{ap}\\
        \bar{s}_{gt}^{-1}\cdot\bar{a} &= \bar{v}_{gt}
    \end{align}
    \begin{eqnarray}
        \bar{s}_{ap}^{-1}\cdot\bar{a} & = & \bar{v}_{ap}\\
        \bar{s}_{gt}^{-1}\cdot\bar{a} & = & \bar{v}_{gt}
    \end{eqnarray}
    \end{document}
Last edited by Stefan Kottwitz on Mon May 14, 2012 5:50 pm, edited 1 time in total.
Post Reply