Suggestion Why is the math output hard to read sometimes?

  • Thread starter Thread starter squidsoft
  • Start date Start date
Click For Summary
The discussion focuses on the readability issues of math output in the forum, particularly regarding the display of LaTeX-rendered equations. Users have noted that the equal sign alignment and font clarity are problematic, especially on a grey background. Changes in LaTeX distributions have been identified as a potential cause of these issues, prompting suggestions for adjustments to the LaTeX renderer. Warren, a participant, has experimented with anti-aliasing settings and is considering switching to ImageMagick for better output quality. Overall, there is a consensus that improving the math output's appearance would enhance the forum's professionalism and user experience.
  • #31
And the current PF...
<br /> \sum_{n=1}^{\infty}\frac{\chi(n) }{n^{s}}=\prod_{p\in\mathbb{P}}\left(\frac{1}{1-\frac{\chi(p)}{p^{s}}}\right)<br />
 
Physics news on Phys.org
  • #33
The back end tools are all pretty much the same. Just takes some tweaking on chroots behalf.
 
  • #34
Thanks for the links, guys. The LatexRender program seems to be doing exactly the same sort of stuff that I'm doing, so I'm going to look through it to find the subtle differences.

<br /> <br /> \sum_{n=1}^{\infty}\frac{\chi(n) }{n^{s}}=\prod_{p\in\mathbb{P}}\left(\frac{1}{1-\frac{\chi(p)}{p^{s}}}\right)<br /> <br />

- Warren
 
  • #35
Actually, it looks like LatexRender is using ImageMagick for its conversions from PostScript to png images, whereas I chose to use pstoimg many years ago. ImageMagick is a bit more resource-intensive, but I don't think it's a big concern.

I'm going to try switching to ImageMagick and see what happens... cross your fingers and toes.

- Warren
 
  • #36
Testing with ImageMagick...

<br /> \sum_{n=1}^{\infty}\frac{\chi(n) }{n^{s}}=\prod_{p\in\mathbb{P}}\left(\frac{1}{1-\frac{\chi(p)}{p^{s}}}\right)<br />

Another test... \sqrt{2}

- Warren
 
Last edited:
  • #37
Alright folks, tell me what you think of the output now.

- Warren
 
  • #38
chroot said:
Testing with ImageMagick...

<br /> \sum_{n=1}^{\infty}\frac{\chi(n) }{n^{s}}=\prod_{p\in\mathbb{P}}\left(\frac{1}{1-\frac{\chi(p)}{p^{s}}}\right)<br />

Another test... \sqrt{2}

- Warren

Looks like professional textbook style, Warren. :smile:


Regards, Hans
 
  • #39
Inline TeX needs to look good too... \sqrt{2} should not be confused with s=j\omega or E=mc^2

- Warren
 
  • #40
Yeah, as I suspected, the tools are no longer respecting my baselines... argh. Not a huge problem, though. I might be able to change the way they're aligned in the HTML.

- Warren
 
  • #41
chroot said:
Testing with ImageMagick...

<br /> \sum_{n=1}^{\infty}\frac{\chi(n) }{n^{s}}=\prod_{p\in\mathbb{P}}\left(\frac{1}{1-\frac{\chi(p)}{p^{s}}}\right)<br />

Another test... \sqrt{2}

- Warren

That looks really nice.

I think ImageMagick also uses Ghostscript.
(I really like ImageMagick. If it's too resource-intensive, you might try GraphicsMagick http://www.graphicsmagick.org/ . For many operations, instead of "convert ... " you use "gm convert ..." . Here are some benchmarks: http://www.graphicsmagick.org/benchmarks.html .
 
Last edited by a moderator:
  • #42
Are you using the 16-bit ImageMagick?
The 8-bit version would be more than sufficient... and may more easily yield smaller image files.

GIMP complained about one of the images having a layer positioned outside of the visible image. You might have to use a +repage command (http://www.imagemagick.org/Usage/basics/#page) to correct that.

The new images do look very nice.
 
  • #43
If resources are an issue then you might want to look at jsMath because it allows you to download fonts so that the web server doesn't need to process the LaTeX
 
  • #44
qntty said:
If resources are an issue then you might want to look at jsMath because it allows you to download fonts so that the web server doesn't need to process the LaTeX

You do have to have enable javascript.
Without it, nothing seems to be rendered... although the latex source is embedded (but not displayed) in the html page.

Disable javascript. Then visit
http://www.math.union.edu/~dpvc/jsMath/examples/ .

Rendered \LaTeX looks so much nicer.

I believe the LaTeX is rendered once into an image during authoring.
Then, they are just plain image files served up by the webserver.

The resource-intensiveness probably refers to (say)
the number of CPU cycles and amount of allocated memory during authoring,
placing limits on the number of renderings that can be handled simultaneously.
 
  • #45
It's very light. I can hardly see this: e^{\ln x} = 7.
 
  • #46
It is maybe a tad too light yes, but I came to this section to feedback you on the new tex rendering, it's beautiful!
 
  • #47
Hmm. I'll try antialiasing it to gray.

- Warren
 
  • #48
oooh, that's much better …

\frac{dr}{d\tau}\ =\ \pm\sqrt{E^2\ -\ \left(1 - \frac{2M}{r}\right)\left(m^2\ +\ \frac{L^2}{r^2}\right)}

and larger too! :smile:

Great work, Warren! :biggrin:
 
  • #49
Ooh, that last one I can even read easily while sitting here with the small laptop outside with the sun behind me (tends to make things hard to read on the screen as I have added glare)...so good job! :approve:
 
  • #50
<br /> e^{\ln x} = 7 <br />
Maybe a gamma correction would help...

insert in the ImageMagick line
-gamma 0.5
and I think you still need to insert
+repage
after a crop or a trim.
 
  • #51
Testing 5...

e^{\ln x} = 7

\sum_{n=1}^{\infty}\frac{\chi(n) }{n^{s}}=\prod_{p\in\mathbb{P}}\left(\frac{1}{1-\frac{\chi(p)}{p^{s}}}\right)

- Warren
 
  • #52
Testing 6...

e^{\ln x} = 7

\sum_{n=1}^{\infty}\frac{\chi(n) }{n^{s}}=\prod_{p\in\mathbb{P}}\left(\frac{1}{1-\frac{\chi(p)}{p^{s}}}\right)

- Warren
 
  • #53
Thanks for the suggestion, robphy! I went with a gamma of 0.6, which looks nice on my monitor. Let me know what you think. (I added the +repage, too.)

- Warren
 
  • #54
Just for giggles, check out the LaTeX output as it was introduced almost six years ago. (Wow...)

Open it in a new tab or window, and compare to the output today:

<br /> \frac{1}{2}<br />

<br /> R^a{}_{bcd}<br />

<br /> \nabla \times C<br />

<br /> \mathbb{RC}<br />

\lambda_j = \vec{\lambda} \cdot \vec{e}_j

\lambda_j = \mathbf{\lambda} \cdot \mathbf{e}_j

<br /> v(t) = v_0 + \frac{1}{2} a t^2<br />

<br /> \gamma \equiv \frac{1}{\sqrt{1 - v^2/c^2}}<br />

<br /> \ddot{x} = \frac {d^2x} {dt^2}<br />

<br /> \overline{x} <br /> \hat{x}<br /> \check{x} <br /> \tilde{x} <br /> \acute{x} <br /> \grave{x} <br /> \dot{x} <br /> \ddot{x} <br /> \breve{x} <br /> \bar{x} <br /> \vec{x}<br /> \underline{x}<br />

<br /> \begin{align*}<br /> ab\\<br /> a b\\<br /> a\! b\\<br /> a\, b\\<br /> a\: b\\<br /> a\; b\\<br /> \end{align*}<br />

<br /> \begin{multline*}<br /> a + b + c + d + e + f\\<br /> +g+h+i+j+k+l+m+n<br /> \end{multline*}<br />

<br /> \begin{gather*}<br /> a_1 = b_1 + c_1\\<br /> a_2 = b_2 + c_2 - d_2 + e_2<br /> \end{gather*}<br />

<br /> e^x = \sum_{n=0}^\infty \frac{x^n}{n!} = \lim_{n\rightarrow\infty} (1+x/n)^n<br />

<br /> \int_{0}^{1} x dx = \left[ \frac{1}{2}x^2 \right]_{0}^{1} = \frac{1}{2}<br />

<br /> L = \int_a^b \left( g_{\it ij} \dot u^i \dot u^j \right)^{1/2} dt<br />

<br /> \iiint f(x,y,z)\,dx\,dy\,dz<br />

<br /> \lim_{\substack{x\rightarrow 0\\y\rightarrow 0}} f(x,y)<br />

<br /> \idotsint_\textrm{paths} \exp{(iS(x,\dot{x})/\hbar)}\, \mathcal{D}x<br />

<br /> A \alpha B \beta \Gamma \gamma \Delta \delta \dots \Phi \phi X \chi \Psi \psi \Omega \omega<br />

<br /> \Gamma^l_{ki} = \frac{1}{2} g^{lj} (\partial_k g_{ij} + \partial_i g_{jk} - \partial_j g_{ki})<br />

<br /> \sigma_{3} = \left(<br /> \begin{array}{cc}<br /> 1 &amp; 0\\<br /> 0 &amp; -1<br /> \end{array}<br /> \right)<br />

<br /> \begin{align*}<br /> u &amp;= \ln x \quad &amp; dv &amp;= x\,dx \\<br /> du &amp;= \mbox{$\frac{1}{x}\,dx$} &amp; v &amp;= \mbox{$\frac{1}{2} x^2$}<br /> \end{align*}<br />

<br /> \newcommand{\pd}[3]{ \frac{ \partial^{#3}{#1} }{ \partial {#2}^{#3} } }<br /> <br /> i \hbar \pd{\Psi}{t}{} =<br /> - \frac{\hbar^2}{2 m} \ \pd{\Psi}{x}{2} + V \Psi<br />

<br /> \newcommand{\mean}[1]{{&lt;\!\!{#1}\!\!&gt;}}<br /> \newcommand{\braket}[2]{{&lt;\!\!{#1|#2}\!\!&gt;}}<br /> \newcommand{\braketop}[3]{{&lt;\!\!{#1|\hat{#2}|#3}\!\!&gt;}}<br /> <br /> \braket{\phi}{\psi} \equiv \int \phi^*(x) \psi(x)\,dx<br />

<br /> \begin{array}{l | c|c|c|c |} \ &amp;\overline{A}\,\overline{B}&amp;A\,\overline{B}&amp;\overline{A}\, B&amp;A\, B\\<br /> \hline<br /> \overline{C}&amp;0&amp;1&amp;0&amp;0\\<br /> \hline C&amp;1&amp;0&amp;1&amp;1\\<br /> \hline<br /> \end{array}<br />

<br /> \begin{equation*}<br /> \begin{split}<br /> \tau &amp;= \tau_1+\tau_2 = \sqrt{{\Delta t_1}^2-{\Delta x_1}^2}+<br /> \sqrt{{\Delta t_2}^2-{\Delta x_2}^2} \\<br /> &amp;= \sqrt{(5-0)^2-(4-0)^2}+\sqrt{(10-5)^2-(0-4)^2}\\<br /> &amp;= 3+3 = 6<br /> \end{split}<br /> \end{equation*}<br />

- Warren
 
  • #55
It's pretty good -- acceptable, certainly -- but the old output still looked a bit better. *sigh*

Do you guys like the slightly larger size now?

- Warren
 
  • #56
I don't really see any obvious difference between the old output and the new, other than size, which I think is an improvement (or is that a sign I'm starting to get old, that I need larger fonts?). I think what you included in that last post is perfectly clear; no difficulty reading it, even though I'm probably more than twice the age of our average user by now. :rolleyes:
 
  • #57
Well the old LaTeX has more anti-aliasing than the current. I think that the old stuff looks too blurry because of that, on the other hand the current LaTeX has a few more jagged edges.
 
  • #58
chroot said:
It's pretty good -- acceptable, certainly -- but the old output still looked a bit better. *sigh*

I was looking at this link, there are loads of options to control the
postscript to image conversion, Very nice program indeed!

http://www.imagemagick.org/Usage/text/#postscript

chroot said:
Do you guys like the slightly larger size now?

- Warren

That's fine, display resolution has increased quite a lot also in the last six years :smile:Regards, Hans
 
Last edited:
  • #59
chroot said:
Just for giggles, check out the LaTeX output as it was introduced almost six years ago. (Wow...)

- Warren

I opened it up and used the toolbar verticle tile to compare, side by side.

What you have is crisper than the older, and still in good proportion with good stroke widths.

It uses only about 5% more in verticle screen, and 7% in width than the older.


"Excellent! Way better than we had.
 
  • #60
As others have mentioned...
It looks nice and crisp [on an LCD]. The size is nice. It does look GREAT! Thanks!


The older one was a little blurrier... which didn't look as good on the screen.
However, it seems older one printed out better on my laser printer.

abcdefghijklmnopqrstuvwxyz
evw and z didn't print out well for me. (Maybe it's just me.)

Would a lower gamma (say 0.4) be a compromise?
Maybe some antialiasing would help.
 

Similar threads

  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 6 ·
Replies
6
Views
7K
  • · Replies 26 ·
Replies
26
Views
841
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 42 ·
2
Replies
42
Views
11K
  • · Replies 86 ·
3
Replies
86
Views
14K
  • · Replies 100 ·
4
Replies
100
Views
12K
  • · Replies 102 ·
4
Replies
102
Views
11K
  • · Replies 64 ·
3
Replies
64
Views
16K
  • · Replies 25 ·
Replies
25
Views
5K