I have a quite big txt file, and the problem is, if I include it with listings, latex tries to put it on one page, but it is too big for one page. So a part is missing. I am wondering, if Latex could do a pagebreak automatically?
My txt file is:
*---------------------------------*
* GARCH Model Fit *
*---------------------------------*
Conditional Variance Dynamics
-----------------------------------
GARCH Model : sGARCH(1,1)
Mean Model : ARFIMA(9,0,9)
Distribution : norm
Optimal Parameters
------------------------------------
Estimate Std. Error t value Pr(>|t|)
ar1 0.000000 NA NA NA
ar2 0.000000 NA NA NA
ar3 0.000000 NA NA NA
ar4 0.000000 NA NA NA
ar5 0.000000 NA NA NA
ar6 0.000000 NA NA NA
ar7 0.000000 NA NA NA
ar8 0.382810 0.207125 1.8482 0.064573
ar9 -0.554678 0.215585 -2.5729 0.010085
ma1 0.000000 NA NA NA
ma2 0.000000 NA NA NA
ma3 0.000000 NA NA NA
ma4 0.000000 NA NA NA
ma5 0.000000 NA NA NA
ma6 0.000000 NA NA NA
ma7 0.000000 NA NA NA
ma8 -0.390819 0.204799 -1.9083 0.056352
ma9 0.551610 0.208866 2.6410 0.008267
omega 0.000004 0.000001 4.0863 0.000044
alpha1 0.078665 0.009643 8.1578 0.000000
beta1 0.907778 0.010924 83.1024 0.000000
LogLikelihood : 7007.315
Information Criteria
------------------------------------
Akaike -5.4203
Bayes -5.4044
Shibata -5.4203
Hannan-Quinn -5.4145
Q-Statistics on Standardized Residuals
------------------------------------
statistic p-value
Lag[1] 3.623 5.698e-02
Lag[p+q+1][19] 23.913 1.008e-06
Lag[p+q+5][23] 28.490 2.919e-05
d.o.f=18
H0 : No serial correlation
Q-Statistics on Standardized Squared Residuals
------------------------------------
statistic p-value
Lag[1] 3.598 5.786e-02
Lag[p+q+1][3] 29.381 5.947e-08
Lag[p+q+5][7] 39.060 2.309e-07
d.o.f=2
ARCH LM Tests
------------------------------------
Statistic DoF P-Value
ARCH Lag[2] 4.638 2 9.836e-02
ARCH Lag[5] 35.851 5 1.017e-06
ARCH Lag[10] 38.599 10 2.984e-05
Nyblom stability test
------------------------------------
Joint Statistic: 1.9746
Individual Statistics:
ar8 0.1611
ar9 0.1230
ma8 0.1581
ma9 0.1156
omega 0.8409
alpha1 0.3889
beta1 0.4009
Asymptotic Critical Values (10% 5% 1%)
Joint Statistic: 1.69 1.9 2.35
Individual Statistic: 0.35 0.47 0.75
Sign Bias Test
------------------------------------
t-value prob sig
Sign Bias 0.6522 0.5143
Negative Sign Bias 0.3228 0.7468
Positive Sign Bias 0.1376 0.8905
Joint Effect 1.4975 0.6828
Adjusted Pearson Goodness-of-Fit Test:
------------------------------------
group statistic p-value(g-1)
1 20 64.58 7.143e-07
2 30 108.88 3.537e-11
3 40 124.32 7.785e-11
4 50 131.00 2.105e-09
Elapsed time : 1.170002
My LaTex code is:
\documentclass[a4paper,
12pt,
bibliography=totoc,
index=totoc,
abstracton,
headsepline,
]{scrreprt}
\usepackage{listings} % for ROutput
\lstset{
basicstyle=\tiny,
backgroundcolor=\color{gray!10},
keywordstyle=\color{black!40!black}
}
\begin{document}
\subsection[R Output]{R Output}
\lstinputlisting[float=h,frame=tb,caption=Here is my caption,label=thelabel]{mytxt.txt}
\end{document}
This looks like the following:

You can see, that there is not enough space, so what should I do? I would like to increase the size from \tiny to something bigger, but then the problem gets even more worse?
float=hfor? Without it, the pagebreak works just fine :). Oh by the way, your MWE is missing the packagexcolor. – Ailurus May 18 '13 at 11:12SASnRdisplay, which just uses listings: code output for this Q looks 1,2 and 3. – texenthusiast May 18 '13 at 11:51