I have forgotten
my Password

Or login with:

  • Facebookhttp://facebook.com/
  • Googlehttps://www.google.com/accounts/o8/id
  • Yahoohttps://me.yahoo.com
Index » Products » LaTeX Equation Editor »

Some short equations are over-scaled, at least at non-default dpi

BCherniavsky\′s Photo
18 Mar 15, 7:28PM
(4 replies)
Some short equations are over-scaled, at least at non-default dpi
I started using \dpi{200} and some formulas are rendered at much bigger scale then the rest. Example:

http://latex.codecogs.com/png.latex?%5Cdpi%7B200%7D%20a

http://latex.codecogs.com/png.latex?%5Cdpi%7B200%7D%20aa

http://latex.codecogs.com/png.latex?%5Cdpi%7B200%7D%20f

vs

http://latex.codecogs.com/png.latex?%5Cdpi%7B200%7D%20b

http://latex.codecogs.com/png.latex?%5Cdpi%7B200%7D%20ab

http://latex.codecogs.com/png.latex?%5Cdpi%7B200%7D%20normal-letters

The is no clear pattern to what triggers it. It happens for short formulas, and is arbitrarily sensitive to input changes. E.g. wrapping the formula in {} seemed to help:

http://latex.codecogs.com/png.latex?%5Cdpi%7B200%7D%20{a}

until I stumbled on:

http://latex.codecogs.com/png.latex?%5Cdpi%7B200%7D%20{n}

which is over-scaled (while n without braces was normal size).

Similarly, using non-transparent background seemed to help (see examples at http://codepen.io/cben/full/ogQqLP/ ), and I thought it's matter of cropping done at image level. But then I found that

http://latex.codecogs.com/png.latex?%5Cdpi%7B200%7D%20%5Cbg_white%20C is overscaled.

Similarly, switching from png to gif made http://latex.codecogs.com/gif.latex?%5Cdpi%7B200%7D%20a normal but http://latex.codecogs.com/gif.latex?%5Cdpi%7B200%7D%20z and some other letters are *under*-sized while http://latex.codecogs.com/gif.latex?%5Cdpi%7B200%7D%20N is over-sized.

  • gif with \bg_white again shifted problems around but e.g. a is oversized.
  • gif with \inline again looked good but Q is oversized.
  • \dpi{150} seems to have less problems than 200 but e.g.
https://latex.codecogs.com/png.latex?%5Cdpi%7B150%7D%20y is oversized...

The only thing I didn't manage to break (so far?) is default dpi.

At a very wild guess, this feels like a cache problem somewhere.
adamp\′s Photo
19 Mar 15, 1:33AM
More conversation, with our debugging efforts, can be found starting here: https://github.com/adam-p/markdown-here/issues/144#issuecomment-82201390

(Posting this partly so that I get notifications of replies...)
BCherniavsky\′s Photo
26 Apr 15, 4:57PM
Any progress?

It also changes with time: most examples I gave above now render at normal size. But it's not all fixed, just changed e.g. http://latex.codecogs.com/png.latex?%5Cdpi%7B200%7D%20j is super-sized (cf. http://latex.codecogs.com/png.latex?%5Cdpi%7B200%7D%20jj which is normal).
CodeCogs\′s Photo
24 May 15, 10:21AM
Hi, Sorry for the long delay in replying. This has been an annoying problem which as you correctly assume is due to caching. In essence we have to convert a LaTeX formula to a short filename. We're employing a range of tricks here, but the error in this instance, we think, is due to a function that converted decimals to their hex equivalent, which when used in combination with several variables (i.e. font, size, dpi, color), led to an a number of permutations of the same unique filename that corresponded to different equations. In your example, this related purely to size.

The challenge of us, as you've illustrated, is that you only ever know if this is truly fixed after extensive testing. And for this we thank you for your detailed synopsis of problem.

Please let me know if the system is improved.

Will

p.s. We now the system is running usually slowly at the moment. This is mostly as a consequence of the new caching algorithm. But it may also be time to give the system a little more horse power.
BCherniavsky\′s Photo
24 May 15, 6:47PM
Thanks for following up.

Anecdotally it's now much better. I mostly care about png at 200dpi and after a 100+ attempts haven't hit any problems with it. But that's not really a big sample. I'm trying unrepresentatively short formulas (1-2 letters) because I've had luck finding problems with those, but also because they're fastest to try in the editor ;-)

But I have found one oversized gif: http://latex.codecogs.com/gif.latex?%5Cdpi%7B200%7D%20c

and one oversized and inverted png at 300dpi: https://latex.codecogs.com/png.latex?%5Cdpi%7B300%7D%20p

so it's not 100% fixed yet...
Currently you need to be logged in to leave a message.