397 reputation
416
bio website nobelprize.org
location here
age 24
visits member for 3 years, 4 months
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}

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
Jun
10
awarded  Commentator
Jun
10
comment Why does soap make shaving with razor less painful?
+1 for answering, @Mitchell. :-)
Jun
6
comment Why does soap make shaving with razor less painful?
In my experience, the soap or shaving cream make the blade be able to cut the hair smoothly. But in my mental model, it becomes more difficult for the blade to cut the slippery hair.