TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

As comment on Can the extended register pool be used for \newinsert?, there is a reference to Dealing with tons of floats. It is interesting but uses \unexpanded:


How can this be replaced by something like \expandafter, \noexpand, \toks@, which does not require the eTeX extension? (With eTeX probably \etex@unexpanded from the etexcmds package would be better than \unexpanded.)

share|improve this question
up vote 9 down vote accepted

Without the e-TeX extensions, you need to use a toks to have control of expansion inside an \edef. Usually, this is done using \toks@, and so to avoid any issues with other code a group is normally employed


(You may be able to use \xdef here, but without a careful check I am not sure of the scope of \@freelist.)

You could also achieve the same directly using just \expandafter:


which works by first expanding \ExtraFloatCommand, then expanding \@freelist, both inside the new definition of \@freelist.

share|improve this answer
Both approaches are in my opinion much less readable than with e-TeX! – Joseph Wright Jan 10 '12 at 17:50
Yes, if one has e-TeX, it surely is to be preferred! +1 for the answer. While accepting after a short time might not be good style in general, I think your answer just provides THE "translation" (both ways of it, indeed!), therefore I just accept it now. Thank you! – Stephen Jan 10 '12 at 19:05

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.