Is there any way to allocate a placeholder and set the content later in the document? First of all I realize that this would require more than one pass to render correctly, but I see the references system does something similar:
See figure X on page Y.
The X and Y values are determined at some point later in the document and the next rendering pass fills in the proper numbers. I've looked in to hijacking the reference system, but couldn't figure out how to get it to back-fill anything but figure or page numbers.
To complicate matters, I would like two additional features beyond a generic back-reference.
I would like to add more instances of the placeholder in multiple places as the document goes along and when a request to fill it comes it, have only the last delineated instance changed. All the previous place-holders should be basically locked down to whatever content they contained when a new placeholder slot is instantiated.
Less important than #1, but I would like to be able to "fill" the back-reference multiple times and have only the last assignment stick. Being able to append would be a sweet bonus.
Pseudo code would look something like this:
\section*{Section 1 \namePlaceHolder{}}
Lorum ipsum...
\setLastName{-- my stuff}
Lorum ipsum...
\section*{Section 2 \namePlaceHolder{}}
Lorum ipsum...
Lorum ipsum...
\section*{Section 3 \namePlaceHolder{}}
Lorum ipsum...
\setLastName{-- your stuff}
Lorum ipsum...
\setLasteName{-- reassigned placeholder text}
\section*{Section 4 \namePlaceHolder{}}
Lorum ipsum...
\setLastName{-- his stuff}
Lorum ipsum...
Would render something like this:
The 'why' of this is that my content has a lot of \input{}
s from other files and I want the content of these files to be able to go back and set some values that would have been in previously input text.
What mechanism can I pursue to make such a late substitution happen?