[Tex/LaTex] Embedding text file in latex document

text;verbatim

How do you remove the extra comments from a text file which has been embedded in a latex document?

\documentclass[12pt,bibtotoc,liststotoc,BCOR5mm,DIV12]{book}



\usepackage{listings, color}    
\usepackage{textcomp}
\usepackage{fancyvrb}
\usepackage{verbatim}
\usepackage[table,dvipsnames]{xcolor}




    %redefine \VerbatimInput
\RecustomVerbatimCommand{\VerbatimInput}{VerbatimInput}%
{fontsize=\footnotesize,
 %
 frame=lines,  % top and bottom rule only
 framesep=2em, % separation between frame and text
 rulecolor=\color{Blue},
 %
 label=\fbox{\color{Blue}1985.txt},
 labelposition=topline,
 %
 commandchars=\|\(\), % escape character and argument delimiters for
                      % commands within the verbatim
 commentchar=*        % comment character
}
\begin{document}

\VerbatimInput{\input{text/1985.txt}}

\end{document}

enter image description here

Best Answer

You want

\VerbatimInput{text/1985.txt} 

not

\VerbatimInput{\input{text/1985.txt}} 

to avoid inputting the file .tex