Consider the following example:
Code: Select all
% Dokumentet skal kompileres via
%
% latex fordelinger.tex
% dvips -Ppdf -D1200 fordelinger.dvi
% ps2pdf fordelinger.ps
%
% og åbnes med Adobe Reader.
\documentclass[
a4paper,
10pt,
danish
]{article}
% Pakker.
\usepackage{babel}
\usepackage[
utf8
]{inputenc}
\usepackage[
hmargin=3cm,
vmargin=2.4cm
]{geometry}
\usepackage[
figureposition=bottom
]{caption}
\usepackage{pst-func}
\usepackage{animate}
\usepackage[
locale=DE
]{siunitx}
\usepackage{microtype}
\usepackage{hyperref}
% Makroer.
\DisableLigatures[f]{encoding=T1}
\setcounter{secnumdepth}{0}
\makeatletter
\providecommand*{\setfloatlocations}[2]{\@namedef{fps@#1}{#2}}
\makeatother
\setfloatlocations{figure}{htbp}
\addto\extrasdanish{%
\def\figureautorefname{\textsc{Figur}}
}
\DeclareCaptionLabelSeparator{tilpasning}{:\quad}
\captionsetup{
font=small,
labelfont=sc,
labelsep=tilpasning,
width=0.6\textwidth
}
\sisetup{round-mode=places,round-precision=1}
% Normalfordeling.
\newcommand*{\normalS}[1]{
\psset{xunit=1,yunit=4cm}
\begin{pspicture}(-5.5,-0.25)(6,1.35)
\psaxes[Dy=0.2,comma]{->}(0,0)(-5.3,0)(5.5,1.1)[$x$,0][$y$,90]
\pscustom[fillstyle=solid,fillcolor=blue!40,opacity=0.4,linecolor=red,linestyle=none]{%
\psline(0,0)(-5,0)
\psGauss[sigma=#1]{-5}{5}
\psline(5,0)(0,0)
}
\psGauss[sigma=#1,linecolor=red,linewidth=1pt]{-5}{5}
\rput(3,0.6){$\sigma = \num{#1}$}
\end{pspicture}
}
\newcommand*{\normalK}[1]{
\psset{xunit=1,yunit=4cm}
\begin{pspicture}(-5.5,-0.25)(6,1.35)
\psaxes[Dy=0.2,comma]{->}(0,0)(-5.3,0)(5.5,1.1)[$x$,0][$y$,90]
% \pscustom[fillstyle=solid,fillcolor=blue!40,opacity=0.4,linecolor=red,linestyle=none]{%
% \psline(0,0)(-5,0)
% \psGaussI[sigma=#1,Simpson=15]{-5}{5}
% \psline(5,0)(0,0)
% }
\psGaussI[sigma=#1,Simpson=15,linecolor=red,linewidth=1pt]{-5}{5}
\rput(-3,0.6){$\sigma = \num{#1}$}
\end{pspicture}
}
% Den studerenes t-fordeling.
\newcommand*{\studenttS}[1]{
\psset{xunit=1cm,yunit=10cm}
\begin{pspicture}(-5.5,-0.1)(6,0.5)
\psaxes[Dy=0.1,comma]{->}(0,0)(-5.3,0)(5.5,0.45)[$x$,0][$y$,90]
\pscustom[fillstyle=solid,fillcolor=blue!40,opacity=0.4,linecolor=red,linestyle=none]{%
\psline(0,0)(-5,0)
\psTDist[nue=#1]{-5}{5}
\psline(5,0)(0,0)
}
\psTDist[nue=#1,linecolor=red,linewidth=1pt]{-5}{5}
\rput(3,0.3){$\nu = \num{#1}$}
\end{pspicture}
}
\begin{document}
\begin{center}
\Huge{\textbf{Sandsynlighedsfordelinger}}
\end{center}
\vspace{10ex}
\noindent \textbf{Vigtigt:} \enskip Dokumentet skal åbnes med \textsf{Adobe Reader}, da dette program (så vidt jeg ved) er den eneste PDF-fremviser, der kan håndtere PostScript-animationer korrekt.
\section{Normalfordeling}
\begin{figure}
\centering
\begin{animateinline}[poster=first,controls,palindrome]{10}
\multiframe{52}{rA=0.4+0.1}{\normalS{\rA}}
\end{animateinline}
\caption{Sandsynlighedstæthed for $\mu = 0$.}
\end{figure}
\begin{figure}
\centering
\begin{animateinline}[poster=first,controls,palindrome]{10}
\multiframe{51}{rA=0.5+0.1}{\normalK{\rA}}
\end{animateinline}
\caption{Kumuleret sandsynlighed for $\mu = 0$.}
\end{figure}
\newpage
\section{Den studerenes \texorpdfstring{$t$}{t}-fordeling}
\begin{figure}
\centering
\begin{animateinline}[poster=first,controls,palindrome]{10}
\multiframe{51}{rA=0.0001+0.1}{\studenttS{\rA}}
\end{animateinline}
\caption{Sandsynlighedsfordeling.}
\end{figure}
\end{document}
Code: Select all
! TeX capacity exceeded, sorry [main memory size=3000000].
Thank you in advance!
P.S. I have had a look at this answer so it seems that pdfpages is our of the question. I cannot follow the other idea in the second section of the answer.