2

Is there a way to make a float that only gets finalized once placement has been determined?

This is essentially an extension to this question of mine by applying it to floating environments.

In the above question, I've tried creating an environment which behaves differently depending on which column it's in. This works fine, but in floating environents, \ifoddpage or \if@firstcolumn seem to reference where the code is first called, not necessarily where the float ultimately ends up being, creating inconsistencies in the behaviour.

I'm not sure if what I'm trying to do is even possible without going into the kernel, given that most likely the floating content has to be typeset before it's placement can be determined, since the dimensions need to be known.

Clarification of my Use Case:

I have a float item, which exists in 2 variants (I'll call them left-handed and right-handed). In a two-column float* scenario, the left-handed variant should be used when the float ends up on even pages, the right-handed one on odd pages. Similarly, in a one-column float scenario, the left-handed variant should be used when the float ends up in the first column of a page, the right-handed one on the second column.

Suthek
  • 189
  • This is related to (but not quite a dup) of https://tex.stackexchange.com/questions/56017/formatting-floats-differently-based-on-placement/87861 – David Carlisle Jan 09 '20 at 13:45
  • Consider use one column document with margin figures instead of your actual approach. The tufte or caesar_book classes are designed for this purpose. Se also this question. – Fran Jan 10 '20 at 01:29
  • @Fran I'll have to look into that, but I'm not sure how that applies here. Margin figures, too, can appear on even or odd pages. And changing to one column (while not possible/preferred, because it's a core design choice) wouldn't change above issue. – Suthek Jan 10 '20 at 10:54
  • @Suthek No. As you can see in my last link, the margin figures are on the left on even page and on the right side in en odd page, that is, always in the outer margin. With an enough outer margin width, that layout will be look like a two column document with floats in the outer columns. – Fran Jan 10 '20 at 22:47
  • @Fran Are you perhaps commenting on the wrong question? Your comments sound more appropriate for this other question of mine. – Suthek Jan 11 '20 at 10:47
  • Not sure. As I see, you are making several question to obtain in some way (forcing float positions) some document layout . My comment is a suggestion to obtain an apparently similar layout in a different way, not to solve the issues of the way that you have chosen, so this place seem to me as good as the others. – Fran Jan 11 '20 at 17:54
  • @Fran While it is true that all my questions are connected, they're still independent issues. This question has nothing to do with forcing float positions; as a matter of fact the issue I'm trying to figure out here wouldn't be solved through the use of margin figures, since floats still wouldn't know where they are. – Suthek Jan 11 '20 at 19:23

0 Answers0