engrafo icon indicating copy to clipboard operation
engrafo copied to clipboard

Get smarter about sizing images

Open bfirsh opened this issue 6 years ago • 3 comments

This is really an upstream issue in LaTeXML, but I'm going to file it here for the time being while we put together a more coherent plan with more examples.

1811.11707 is a good example. There are some cases where there are 3 images side by side defined as 0.32\textwidth. They come out as absolute sizes on the image, but we could do some smarts to arrange them side by side to fit on the screen.

Then, there is another image on its own defined as 0.6\textwidth. This comes out again with some absolute sizes. But, we shouldn't make it the full width of the screen because it'll be too big. But, there are some images which should be big! We just don't know which they are.

These semantics should be brought up to the HTML somehow so we can style it. Perhaps the parent element could have style="width: 32%" or whatever, or perhaps it could be done with classes.

See also

  • https://github.com/arxiv-vanity/engrafo/issues/238
  • Probably depends on https://github.com/brucemiller/LaTeXML/issues/979

bfirsh avatar Nov 30 '18 15:11 bfirsh

Another example of something which should be fixed:

https://arxiv.org/pdf/1904.08653.pdf

Lots of images side by side. They should be on multiple rows, not all side-by-side.

bfirsh avatar Apr 23 '19 23:04 bfirsh

Images wrong size: https://www.arxiv-vanity.com/papers/1804.08450/

bfirsh avatar May 18 '19 16:05 bfirsh

I attempted doing this as a hack:

.ltx_figure .ltx_graphics {
  width: 100%;
  height: auto;
}

This makes 1907.10830 work much better, but unfortunately breaks things where there are a lot of images, such as 1904.08653.

With https://github.com/brucemiller/LaTeXML/issues/979, this will become much easier.

bfirsh avatar Aug 13 '19 12:08 bfirsh