113 reputation
115
bio website nobelprize.org
location here
age 24
visits member for 3 years, 7 months
seen Jul 10 '11 at 6:17
\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}

This user has not answered any questions
TeX - LaTeX 12,483 rep 872172
Stack Overflow 1,751 rep 22157
English Language & Usage 743 rep 2920
Super User 492 rep 1412
Physics 407 rep 517

3 Votes Cast

all time   by type  
3 up 0 question
0 down 3 answer