Conditional placement of content of a float



Greetings,

I would like to position content within a float, depending on whether the page number is odd or even

\begin{float}[htb]
\ifodd\value{page}
<odd_content>
\else
<even_content>
\fi
\end{float}

When the content "floats" to the next page from where it is in the source, the value of page is incorrect. Material that would appear at the bottom of page 6, appears on page 7, but \the\value{page}=6.

I've messed around with using \protect to delay the expansion of the conditional, and various other things, but nothing works. Does anyone have a solution?

Regards,

dps
.



Relevant Pages

  • Re: Conditional placement of content of a float
    ... I would like to position content within a float, depending on whether the page number is odd or even ...
    (comp.text.tex)
  • Re: Conditional placement of content of a float
    ... I would like to position content within a float, depending on whether the ... You can do it in a delayed fashion, assuming that the odd page ... It's easy to pack the thing into a macro. ...
    (comp.text.tex)
  • Re: Conditional placement of content of a float
    ... I would like to position content within a float, depending on whether the ... You can do it in a delayed fashion, assuming that the odd page ... I'll try your suggestion and report back. ...
    (comp.text.tex)
  • Re: "0 in [True,False]" returns True
    ... a float is always a float. ... > depending on type but on value. ... Your examples are still both very different from the NaN ... A NaN is a floating point operation that supports all ...
    (comp.lang.python)
  • Re: Strange ifodd and pageref behaviour
    ... odd or even. ... alternate compiles. ... you've an absolute guarantee that the caption reference of a float is ...
    (comp.text.tex)