--- /dev/null
+//---------------------------- parameter_handler_4a.cc ---------------------------
+// $Id$
+// Version: $Name$
+//
+// Copyright (C) 2003, 2004, 2005, 2010 by the deal.II authors
+//
+// This file is subject to QPL and may not be distributed
+// without copyright and license information. Please refer
+// to the file deal.II/doc/license.html for the text and
+// further information on this license.
+//
+//---------------------------- parameter_handler_4a.cc ---------------------------
+
+
+// test the output generated by
+// ParameterHandler::print_parameters(LaTeX). like the _4 test but
+// with nested subsections
+
+#include "../tests.h"
+#include <base/logstream.h>
+#include <base/parameter_handler.h>
+#include <fstream>
+#include <iomanip>
+
+
+int main ()
+{
+ try
+ {
+ std::ofstream logfile("parameter_handler_4a/output");
+ deallog.attach(logfile);
+ deallog.depth_console(0);
+ deallog.threshold_double(1.e-10);
+
+ ParameterHandler prm;
+ prm.enter_subsection ("Testing");
+ {
+ prm.enter_subsection ("Testing 2");
+ {
+ prm.declare_entry ("string list 2",
+ "a",
+ Patterns::List(Patterns::Selection("a|b|c|d|e|f|g|h")),
+ "docs 1");
+ prm.declare_entry ("int 2",
+ "1",
+ Patterns::Integer());
+ prm.declare_entry ("double 2",
+ "3.1415926",
+ Patterns::Double(),
+ "docs 3");
+ }
+ prm.leave_subsection ();
+
+ prm.declare_entry ("string list",
+ "a",
+ Patterns::List(Patterns::Selection("a|b|c|d|e|f|g|h")),
+ "docs 1");
+ prm.declare_entry ("int",
+ "1",
+ Patterns::Integer());
+ prm.declare_entry ("double",
+ "3.1415926",
+ Patterns::Double(),
+ "docs 3");
+ }
+ prm.leave_subsection ();
+
+ // read and then write
+ // parameters. take same input file
+ // as for parameter_handler_3, but
+ // use different output format
+ prm.read_input("parameter_handler_3.prm");
+ prm.print_parameters (logfile, ParameterHandler::LaTeX);
+ }
+ catch (std::exception &exc)
+ {
+ deallog << std::endl << std::endl
+ << "----------------------------------------------------"
+ << std::endl;
+ deallog << "Exception on processing: " << std::endl
+ << exc.what() << std::endl
+ << "Aborting!" << std::endl
+ << "----------------------------------------------------"
+ << std::endl;
+
+ return 1;
+ }
+ catch (...)
+ {
+ deallog << std::endl << std::endl
+ << "----------------------------------------------------"
+ << std::endl;
+ deallog << "Unknown exception!" << std::endl
+ << "Aborting!" << std::endl
+ << "----------------------------------------------------"
+ << std::endl;
+ return 1;
+ };
+
+ return 0;
+}
--- /dev/null
+
+\subsubsection*{Listing of parameters}
+
+\begin{itemize}
+
+\item {\bf Subsection Testing}
+\begin{itemize}
+\item {\bf double:} 3.1415926 (docs 3, {\it default:} 3.1415926)
+\item {\bf int:} 1 ({\it default:} 3)
+\item {\bf string list:} a (docs 1, {\it default:} a, b, c)
+
+
+
+\item {\bf Subsection Testing 2}
+\begin{itemize}
+\item {\bf double 2:} 3.1415926 (docs 3, {\it default:} 3.1415926)
+\item {\bf int 2:} 1 ({\it default:} 1)
+\item {\bf string list 2:} a (docs 1, {\it default:} a)
+\end{itemize}
+\end{itemize}
+\end{itemize}