This answer explains how to use expl3 to store a seq variable to place content later in a document. I'd like to write a command that:

  • Writes the first argument to the main flow of the page.
  • Writes the second argument to the contents of a floating element at the bottom of the page. (A tcolorbox box in this case, though not necessarily.) This argument will in practice only ever be a single sentence, and the command should concatenate them into a paragraph.
  • Writes these only if there is room for both on the current page. If not, it should begin a new page with the first argument, and a new floating element at bottom, containing the second argument.

It may be that expl3 is unnecessary here, in which case I welcome other approaches.

  • On first thought I don't find that expl3 seq features are needed here. With bottom you mean the footer?
    – user31729
    Nov 4, 2015 at 17:14
  • All is easy, but not the keeping on the same page ...
    – user31729
    Nov 4, 2015 at 17:53
  • @ChristianHupfer Yes, that's right. I avoided "footer" because I was unsure whether the term applied only to elements repeated over pages (numbering and the like). Keeping does seem to be the trouble. My brief read of this answer suggests that TeX's greedy float placement may pose an obstacle. Nov 4, 2015 at 18:14
  • In my point of view, you don't need the floating at all. You want to have some text with #1 and the second argument should be shifted to the footer. This isn't floating! Perhaps savelowerto is the better way.
    – user31729
    Nov 4, 2015 at 23:03
  • @ChristianHupfer Yes, I think you're right that the floating is rather unrelated. \savelowerto seems like the right idea. I think I'll dig through the source to see how to accomplish the same thing in my own commands. Nov 5, 2015 at 1:24

1 Answer 1


No full solution so far, only a test.




\newtcolorbox[auto counter]{myfooterbox}[1][]{
  colback=yellow!50!white,float,floatplacement={b},title={footer box \thetcbcounter},coltext=black,#1}

  \vfill %\push the box to the bottom






You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .