Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for floating figures #458

Open
eudoxos opened this issue Apr 5, 2017 · 3 comments
Open

Support for floating figures #458

eudoxos opened this issue Apr 5, 2017 · 3 comments
Labels
enhancement Software improvement or feature request

Comments

@eudoxos
Copy link

eudoxos commented Apr 5, 2017

The documentation should mention if there is built-in support for floating figures, or how to make those happen. In increasing order of complexity, these are

  • page-size single-figure without caption (appear after the page where they are mentioned in the input file);
  • page-size single-figure with caption (and cross-references);
  • page with smaller collected figures (page of floats, \FloatBarrier from placeins package in LaTeX);
  • page where figure(s) and text share space, with automatic placement;
  • text wrapping around figure (wrapfigure package in LaTeX).
@alerque
Copy link
Member

alerque commented Apr 5, 2017

The documentation doesn't currently list things which are not supported out of the box. It might be useful to compile a chart of equivalent packages at some point and that could include ones for which there are not equivalents, but that would require somebody doing it.

Figure of the type you describe are not yet supported. That doesn't mean they can't be done but they have to be handled with your own code at the moment. I just did a book project that had full page illustrations that, awkwardly, needed to be placed on the page previous to where they were mentioned. I got it to work by keeping a copy of the typesetter state, then dropping it when encountering an illustration, drawing the illustration page, then replaying the dropped typesetter state, but it was a dreadful hack.

I would be willing to help tinker on a package for this, but it will take some experimenting. It would also be useful to start with just a couple of the most useful figure forms. For example what would you expect options for an inline layout to be and how would that vary from what a table of figures would need? Would having a wrapfigure step separate from a figure step even be meaningful or should it just be rolled up into one package? What types of figure content are you working with most (PDF, SVG, raster, other)?

@alerque alerque added the enhancement Software improvement or feature request label Apr 5, 2017
@eudoxos
Copy link
Author

eudoxos commented Apr 8, 2017

I created wiki page https://github.com/simoncozens/sile/wiki/Equivalent-packages collecting issues of this kind, suggesting also LaTeX package which might be useful inspiration or as an idea what might be useful to implement. I am not able to put some effort into experimenting with floats, you're welcome to keep the issue for the record, though. Thanks for an insightful reply.

@Omikhleia
Copy link
Member

Found interesting this TUGboat article which describes how LaTeX does floating figures in layman terms (without the obscure code, that is): https://www.latex-project.org/publications/2014-FMi-TUB-tb111mitt-float-placement.pdf - the "20 parameters" or so are not all described, but the basic logic seems understandable (and yet pretty complex and full of traps, e.g. footnotes).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Software improvement or feature request
Projects
Development

No branches or pull requests

3 participants