447 reputation
617
bio website nobelprize.org
location here
age 24
visits member for 4 years, 1 month
seen Jul 15 '11 at 9:49
\documentclass{article}
\usepackage{listings,xcolor}
\usepackage[a4paper,margin=2cm]{geometry}
\lstset
{
    language={[LaTeX]TeX},
    frame=single,
    breaklines=true,
    basicstyle=\small\tt,
    keywordstyle=\color{blue}\sf,
    identifierstyle=\color{magenta},
    commentstyle=\color{cyan},
    backgroundcolor=\color{yellow!5}
}


\def\ImportAllSourceCodes
{%
    \immediate\write18{cmd /c dir /b *.tex > \jobname-temp.txt}%
    \newread\myfile
    \openin\myfile=\jobname-temp.txt
    \newcount\counter
    \counter=0
    \loop
        \unless\ifeof\myfile
        \read\myfile to\mydata
        \advance \counter by 1
    \repeat
    \closein\myfile
    \openin\myfile=\jobname-temp.txt
    \advance \counter by -1
    \loop
        \ifnum \counter > 0
        \read\myfile to\mydata
        \section\mydata
        \lstinputlisting{"\mydata"}\newpage
        \advance \counter by -1
    \repeat
    \closein\myfile
}


\usepackage{hyperref}

\begin{document}
\ImportAllSourceCodes
\end{document}

Aug
1
awarded  Notable Question
Jul
2
awarded  Curious
May
17
awarded  Yearling
Nov
17
awarded  Notable Question
Jul
21
awarded  Popular Question
Jun
14
awarded  Popular Question
May
16
awarded  Popular Question
Oct
15
awarded  Popular Question
Sep
3
awarded  Nice Question
Jul
28
awarded  Notable Question
Nov
27
awarded  Yearling
Nov
8
awarded  Good Question
Sep
4
awarded  Nice Question
Jul
12
accepted Why is electricity not transmitted wirelessly?
Jul
12
revised Why is electricity not transmitted wirelessly?
added 88 characters in body
Jul
12
asked Why is electricity not transmitted wirelessly?
Jul
10
awarded  Cleanup
Jul
10
revised Why does dust stick to rotating fan propeller?
rolled back to a previous revision
Jul
10
revised Why does dust stick to rotating fan propeller?
added 72 characters in body; edited tags
Jul
7
awarded  Autobiographer