I'd like to place some of my floats (specifically code listings) in my documents in a section at the end, without disturbing the numbering. Currently, I have them numbered within sections, so in section 1 all listings are called Program 1.1, Program 1.2 etc.
Is there a way to create a section at the end (like an appendix) where all the program floats go, without changing their numbering? Ideally, I'd like to have
Section 1
Some text in Section 1, and a reference to Program 1.1 and 1.2.Section 2
Apparently Program 2.1 was the only code shown in this section....
Appendix A
Program 1.1:for i = 1:n doStuff(); endProgram 1.2:
% This program doesn't do anythingEtc...
Update:
Before anyone shoots me for not showing exactly how the programs are defined, here's how it works:
% In the preamble
\usepackage{listings}
\usepackage{float}
\newfloat{program}{tbphH}{lop}
\floatname{program}{Program}
\newcommand{\codefrom}[2][Matlab]
{
\begin{program}[hbt]
\lstinputlisting[language=#1]{#2}
\caption{#2}
\label{#2}
\end{program}
}
% In the document
\codefrom{alocalfile.m}
floats
package, but my question is not so much related to what kind of float it is than how to move them around.