Why is the math output hard to read sometimes?

  • Context: Suggestion 
  • Thread starter Thread starter squidsoft
  • Start date Start date
Join the discussion
Registration is free. Ask a follow-up in this thread, or start your own.
128 replies · 19K views
Physics news on Phys.org
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.

[tex] <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 /> [/tex]

- Warren
 
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
 
Testing with ImageMagick...

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

Another test... [itex]\sqrt{2}[/itex]

- Warren
 
Last edited:
chroot said:
Testing with ImageMagick...

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

Another test... [itex]\sqrt{2}[/itex]

- Warren

Looks like professional textbook style, Warren. :smile:


Regards, Hans
 
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
 
chroot said:
Testing with ImageMagick...

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

Another test... [itex]\sqrt{2}[/itex]

- 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:
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.
 
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
 
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 [tex]\LaTeX[/tex] 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.
 
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!
 
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:
 
Testing 5...

[itex]e^{\ln x} = 7[/itex]

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

- Warren
 
Testing 6...

[itex]e^{\ln x} = 7[/itex]

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

- Warren
 
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:

[tex] \frac{1}{2}[/tex]

[tex] R^a{}_{bcd}[/tex]

[tex] \nabla \times C[/tex]

[tex] \mathbb{RC}[/tex]

[tex]\lambda_j = \vec{\lambda} \cdot \vec{e}_j[/tex]

[tex]\lambda_j = \mathbf{\lambda} \cdot \mathbf{e}_j[/tex]

[tex] v(t) = v_0 + \frac{1}{2} a t^2[/tex]

[tex] \gamma \equiv \frac{1}{\sqrt{1 - v^2/c^2}}[/tex]

[tex] \ddot{x} = \frac {d^2x} {dt^2}[/tex]

[tex] \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}[/tex]

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

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

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

[tex] e^x = \sum_{n=0}^\infty \frac{x^n}{n!} = \lim_{n\rightarrow\infty} (1+x/n)^n[/tex]

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

[tex] L = \int_a^b \left( g_{\it ij} \dot u^i \dot u^j \right)^{1/2} dt[/tex]

[tex] \iiint f(x,y,z)\,dx\,dy\,dz[/tex]

[tex] \lim_{\substack{x\rightarrow 0\\y\rightarrow 0}} f(x,y)[/tex]

[tex] \idotsint_\textrm{paths} \exp{(iS(x,\dot{x})/\hbar)}\, \mathcal{D}x[/tex]

[tex] A \alpha B \beta \Gamma \gamma \Delta \delta \dots \Phi \phi X \chi \Psi \psi \Omega \omega[/tex]

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

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

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

[tex] \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[/tex]

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

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

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

- Warren
 
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:
 
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.
 
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:
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 vertical 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 vertical screen, and 7% in width than the older.


"Excellent! Way better than we had.
 
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.

[tex]abcdefghijklmnopqrstuvwxyz[/tex]
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.