\VerbatimInput
calls a test.dat
file, and produces the following output, where the long lines are not entirely seen:
A solution for this is use \BVerbatimInput
together with \begin{adjustbox}
. This solves the long lines. However, the information of test.dat
shown is cut at the end of the first page:
Is there a way to make the rest of the content of test.dat
to be shown in the following pages ?
The code that produces these two examples:
\documentclass[12pt]{article}
\usepackage[left=2.5cm,top=2.5cm,right=2.5cm,bottom=2.5cm]{geometry}
\usepackage[utf8]{inputenc}
\usepackage{adjustbox}
\usepackage{fancyvrb}
\usepackage{color,soul}
\usepackage[dvipsnames]{xcolor}
\begin{document}
\section{VerbatimInput}
\RecustomVerbatimCommand{\VerbatimInput}{VerbatimInput}%
{fontsize=\footnotesize,
%
frame=lines,
framesep=2em,
rulecolor=\color{Gray},
%
label=\fbox{\color{Black}test.dat},
labelposition=topline,
}
\VerbatimInput{./test.dat}
\clearpage
\section{BVerbatimInput and adjustbox}
\begin{adjustbox}{max width=\linewidth}
\RecustomVerbatimCommand{\BVerbatimInput}{BVerbatimInput}%
{fontsize=\footnotesize,
%
frame=lines,
framesep=2em,
rulecolor=\color{Gray},
%
label=\fbox{\color{Black}test.dat},
labelposition=topline,
}
\BVerbatimInput{./test.dat}
\end{adjustbox}
\end{document}
The test.dat
file:
#####l.253:
AL BL LC AA BB CC E
2.75319 2.75319 2.75319 60.67009 65.70804 68.04220
14.756876 # -> reorientation volumregfddfg l.253:
AL BL LC AA BB CC E
2.75319 2.75319 2.75319 60.67009 65.70804 68.04220
14.756876 # -> reorientation volumregfddfg l.253:
AL BL LC AA BB CC E
2.75319 2.75319 2.75319 60.67009 65.70804 68.04220
14.756876 # -> reorientation volumregfddfg l.253:
AL BL LC AA BB CC E
2.75319 2.75319 2.75319 60.67009 65.70804 68.04220
14.756876 # -> reorientation volumregfddfg l.253:
AL BL LC AA BB CC E
2.75319 2.75319 2.75319 60.67009 65.70804 68.04220
14.756876 # -> reorientation volumregfddfg
#l.253:
AL BL LC AA BB CC E
2.75319 2.75319 2.75319 60.67009 65.70804 68.04220 14.756876 # -> reorientation volumregfddfg
#l.253:
AL BL LC AA BB CC E
2.75319 2.75319 2.75319 60.67009 65.70804 68.04220 14.756876 # -> reorientation volumregfddfg
####l.253:
AL BL LC AA BB CC E
2.75319 2.75319 2.75319 60.67009 65.70804 68.04220 14.756876 # -> reorientation volumregfddfg l.253:
AL BL LC AA BB CC E
2.75319 2.75319 2.75319 60.67009 65.70804 68.04220 14.756876 # -> reorientation volumregfddfg l.253:
AL BL LC AA BB CC E
2.75319 2.75319 2.75319 60.67009 65.70804 68.04220 14.756876 # -> reorientation volumregfddfg l.253:
AL BL LC AA BB CC E
2.75319 2.75319 2.75319 60.67009 65.70804 68.04220 14.756876 # -> reorientation volumregfddfg
#l.253:
AL BL LC AA BB CC E
2.75319 2.75319 2.75319 60.67009 65.70804 68.04220 14.756876 # -> reorientation volumregfddfg
#l.253:
AL BL LC AA BB CC E
2.75319 2.75319 2.75319 60.67009 65.70804 68.04220 14.756876 # -> reorientation volumregfddfg
#####l.253:
AL BL LC AA BB CC E
2.75319 2.75319 2.75319 60.67009 65.70804 68.04220 14.756876 # -> reorientation volumregfddfg l.253:
AL BL LC AA BB CC E
2.75319 2.75319 2.75319 60.67009 65.70804 68.04220 14.756876 # -> reorientation volumregfddfg l.253:
AL BL LC AA BB CC E
2.75319 2.75319 2.75319 60.67009 65.70804 68.04220 14.756876 # -> reorientation volumregfddfg l.253:
AL BL LC AA BB CC E
2.75319 2.75319 2.75319 60.67009 65.70804 68.04220 14.756876 # -> reorientation volumregfddfg l.253:
AL BL LC AA BB CC E
2.75319 2.75319 2.75319 60.67009 65.70804 68.04220 14.756876 # -> reorientation volumregfddfg
####l.253:
AL BL LC AA BB CC E
2.75319 2.75319 2.75319 60.67009 65.70804 68.04220 14.756876 # -> reorientation volumregfddfg l.253:
AL BL LC AA BB CC E
2.75319 2.75319 2.75319 60.67009 65.70804 68.04220 14.756876 # -> reorientation volumregfddfg l.253:
AL BL LC AA BB CC E
2.75319 2.75319 2.75319 60.67009 65.70804 68.04220 14.756876 # -> reorientation volumregfddfg l.253:
AL BL LC AA BB CC E
2.75319 2.75319 2.75319 60.67009 65.70804 68.04220 14.756876 # -> reorientation volumregfddfg
####l.253:
AL BL LC AA BB CC E
2.75319 2.75319 2.75319 60.67009 65.70804 68.04220 14.756876 # -> reorientation volumregfddfg l.253:
AL BL LC AA BB CC E
2.75319 2.75319 2.75319 60.67009 65.70804 68.04220 14.756876 # -> reorientation volumregfddfg l.253:
AL BL LC AA BB CC E
2.75319 2.75319 2.75319 60.67009 65.70804 68.04220 14.756876 # -> reorientation volumregfddfg l.253:
AL BL LC AA BB CC E
2.75319 2.75319 2.75319 60.67009 65.70804 68.04220 14.756876 # -> reorientation volumregfddfg
#l.253:
AL BL LC AA BB CC E
2.75319 2.75319 2.75319 60.67009 65.70804 68.04220 14.756876 # -> reorientation volumregfddfg
verbatimbox
package, you could use\verbfilenobox[\footnotesize]{test.dat}
. This will not line break, but will shrink the size of the verbatim font and will page break.