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

I am working on a script and I would like to put some proofs in an extra section. But, for editing, I would like to place the proof right after the proposition. So, I would like some kind of command that sends the input in a predefined section (For example: appends the input to the end of the section)

I have in mind something like this:

This code


\section{other section}
Nothing here


1 section


2 other section

Nothing here


Like the title of this question says, I don't care if \sendtoOtherSection is a command or environment. It is not very important in which order the shifted text appears.

share|improve this question
Will the "other section" always be after the "section"? (Because well, moving some data forward is much easier than backward.) – yo' Mar 20 '12 at 22:04
Have a look at a-theorem-and-its-proof-in-different-places/45332#45332 and see it helps- on first glance, I think it's a duplicate, if not, please say so – cmhughes Mar 20 '12 at 22:16
@cmhughes Thank you. This was quite helpful. So my question is a duplicate but I think the given answer is new (Peter Grill). – bitt.j Mar 21 '12 at 18:10
up vote 4 down vote accepted

Since you want to just move the text forward, you could adapt the answer from How keep a running list of strings and then process them one at a time to keep building up these sections that need to appear later. Then when you want them to appear you just make a call to \OtherSection, and the code accumulated is typeset there:

enter image description here



\section{Section One}
Hello. Hello.
\sendtoOtherSection{Is there anybody out there?}

\section{Section Two}
Goodbye Cruel World.
\sendtoOtherSection{I'm leaving you today.}

\section{Other Section}
share|improve this answer

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.