Suggestion Why is the math output hard to read sometimes?

  1. May 16, 2009 #1
    May I suggest improving the format of the math output in the forum.

    Consider the following code:

    [tex]
    \mathop\textnormal{Res}\limits_{z=-n}\left\{\frac{\pi}{x^s\sin(\pi s)}\right\}=(-x)^n,\quad n=0,-1,-2,\cdots
    [/tex]

    The equal sign is not well displayed under the Res symbol and the "s" in sine is broken up. I've noticed other problems like this in general. I think PF would look more polished if the math output was nicer looking.
     
  2. jcsd
  3. May 17, 2009 #2
    If I recall correctly, it used to be better. I'm not sure when or why the change occurred.
     
  4. Jun 1, 2009 #3

    DrGreg

    User Avatar
    Science Advisor
    Gold Member

    I suspect the problem might be that the LaTeX renderer (which generates the equation images) may work on the assumption that the equations will be displayed on a white background. On a grey background, some of the pixels are too faint. Is it possible to tweak the LaTeX renderer to take account of the grey background?
     
  5. Jun 2, 2009 #4

    chroot

    User Avatar
    Staff Emeritus
    Science Advisor
    Gold Member

    Hey all,

    A year ago or so, something changed in the fonts included in the normal LaTeX distributions that come with most Linux distributions. Along with it were a number of other changes that broke PF's latex system. I rewrote some of it, but never really figured out the problem with the fonts.

    I will look into it more. I don't actually think it has anything to do with anti-aliasing. The images are currently anti-aliased to white, and then white is dropped out as transparent. If the strokes look correct when anti-aliased to white, it seems that changing the surrounding white pixels to transparent would not affect them. It's worth a shot, though.

    - Warren
     
  6. Jun 2, 2009 #5

    DrGreg

    User Avatar
    Science Advisor
    Gold Member

    For what it's worth, I took the PNG image in post #1, on its default white background, and decreased the brightness until its background matched this thread's grey background. I think the result (attached) is therefore what you'd get if anti-aliased to grey. Slightly more legible, I think, but still not great, and I guess that's down to a poor choice of font. Or something.
     

    Attached Files:

  7. Jun 4, 2009 #6

    Moonbear

    User Avatar
    Staff Emeritus
    Science Advisor
    Gold Member

    Can the font be made bold, either in a default setting or when typed by the user (I never use LaTex, so don't know the ins and outs of this)? It just looks like the font is a bit thin and loses something, so if there's a way to make it bold, that might be enough to improve readability.
     
  8. Jun 4, 2009 #7

    DrGreg

    User Avatar
    Science Advisor
    Gold Member

    That wouldn't be a solution as such, because some equations use both bold and plain font, e.g.

    [tex]\mathbf{z} = a\mathbf{x} + b\mathbf{y}[/tex]​

    although personally I prefer

    [tex]\textbf{z} = a\textbf{x} + b\textbf{y}[/tex]​

    However, if you have a greater choice of font weights than just "plain" and "bold", then some slightly heavier fonts might help.
     
  9. Jun 4, 2009 #8

    chroot

    User Avatar
    Staff Emeritus
    Science Advisor
    Gold Member

    Okay, guys... I changed some of the antialiasing behavior in Ghostscript (I turned it down!), and I think the output looks a little better now. If you could, post some troublesome LaTeX here and see if it renders better now.

    - Warren
     
  10. Jun 4, 2009 #9

    chroot

    User Avatar
    Staff Emeritus
    Science Advisor
    Gold Member

    [tex]

    \mathop\textnormal{Res}\limits_{z=-n}\left\{\frac{\pi}{x^s\sin(\pi s)}\right\}=(-x)^n,\quad n=0,-1,-2,\cdots

    [/tex]
     
  11. Jun 4, 2009 #10

    CRGreathouse

    User Avatar
    Science Advisor
    Homework Helper

    [tex]\sum_{n=a}^bf(n)[/tex] has a very strong summation symbol.
     

    Attached Files:

  12. Jun 4, 2009 #11

    chroot

    User Avatar
    Staff Emeritus
    Science Advisor
    Gold Member

    This is how it looked with the old antialiasing options:

    [tex]
    \sum_{n=a}^bf(n)
    [/tex]

    - Warren
     
  13. Jun 4, 2009 #12

    chroot

    User Avatar
    Staff Emeritus
    Science Advisor
    Gold Member

    And now the new:

    [tex]
    \sum_{n=a}^bf(n)
    [/tex]

    It's really strange that antialiasing options could even cause this in the first place.....

    - Warren
     
  14. Jun 4, 2009 #13

    chroot

    User Avatar
    Staff Emeritus
    Science Advisor
    Gold Member

    And with no anti-aliasing at all:

    [tex]
    \sum_{n=a}^bf(n)
    [/tex]

    - Warren
     
  15. Jun 4, 2009 #14

    chroot

    User Avatar
    Staff Emeritus
    Science Advisor
    Gold Member

    Fooling around some more:

    [tex]
    \sum_{n=a}^bf(n)
    [/tex]
     
  16. Jun 4, 2009 #15

    chroot

    User Avatar
    Staff Emeritus
    Science Advisor
    Gold Member

    Hmmm...

    [tex]
    \sum_{n=a}^bf(n)
    [/tex]
     
  17. Jun 4, 2009 #16

    chroot

    User Avatar
    Staff Emeritus
    Science Advisor
    Gold Member

    Try try again:

    [tex]
    \sum_{n=a}^bf(n)
    [/tex]
     
  18. Jun 4, 2009 #17

    chroot

    User Avatar
    Staff Emeritus
    Science Advisor
    Gold Member

    [tex]

    \mathop\textnormal{Res}\limits_{z=-n}\left\{\frac{\pi}{x^s\sin(\pi s)}\right\}=(-x)^n,\quad n=0,-1,-2,\cdots

    [/tex]
     
  19. Jun 4, 2009 #18

    chroot

    User Avatar
    Staff Emeritus
    Science Advisor
    Gold Member

    I'm not really sure I've found a solution. I'll have to keep hunting.

    [tex]

    \mathop\textnormal{Res}\limits_{z=-n}\left\{\frac{\pi}{x^s\sin(\pi s)}\right\}=(-x)^n,\quad n=0,-1,-2,\cdots

    [/tex]

    - Warren
     
  20. Jun 4, 2009 #19

    Moonbear

    User Avatar
    Staff Emeritus
    Science Advisor
    Gold Member

    Some of those versions looked better...not perfect, but certainly better.
     
  21. Jun 6, 2009 #20

    Fredrik

    User Avatar
    Staff Emeritus
    Science Advisor
    Gold Member

    [tex]\begin{pmatrix}1 & 0 & 0\\ 0 & \frac{u_x}{u} & \frac{u_y}{u}\\ 0 & -\frac{u_y}{u} & \frac{u_x}{u} \end{pmatrix}[/tex]

    Hm, both the parentheses and the zeroes look better than they did here. They used to look like the pixel size was bigger in the LaTeX font. I'm not a big fan of the new [tex]\sum[/tex] though, and x and y are still just barely legible. Have you tried a slightly bigger font size?

    It would also be nice if the \dot code would make a slightly bigger dot: [tex]\dot{\vec r}[/tex] (but I realize of course that you can't do anything that changes only that symbol).
     
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook

Have something to add?
Similar Discussions: Why is the math output hard to read sometimes?
  1. Hard to read code (Replies: 12)

Loading...