From 2e3d7c8c6c3bb3d1de96d1eaf3d4d9a3b6a7e7cf Mon Sep 17 00:00:00 2001 From: Reza Rastak Date: Sat, 28 Mar 2020 22:13:50 -0700 Subject: [PATCH] Minor documentation changes for TableHandler --- include/deal.II/base/table_handler.h | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/include/deal.II/base/table_handler.h b/include/deal.II/base/table_handler.h index 63a3f5b014..aef7443dc1 100644 --- a/include/deal.II/base/table_handler.h +++ b/include/deal.II/base/table_handler.h @@ -182,8 +182,8 @@ namespace internal *

Example

* * This is a simple example demonstrating the usage of this class. The first - * column includes the numbers i=1..n, the second $1^2$...$n^2$, the - * third $sqrt(1)...sqrt(n)$, where the second and third columns are merged + * column includes the numbers $i=1 \dots n$, the second $1^2 \dots n^2$, the + * third $\sqrt{1}\dots\sqrt{n}$, where the second and third columns are merged * into one supercolumn with the superkey squares and roots. * Additionally the first column is aligned to the right (the default was * centered) and the precision of the square roots are set to be 6 @@ -191,22 +191,21 @@ namespace internal * * @code * TableHandler table; - * - * for (unsigned int i=1; i<=n; ++i) + * for (unsigned int i = 1; i <= n; ++i) * { * table.add_value("numbers", i); - * table.add_value("squares", i*i); - * table.add_value("square roots", std::sqrt(1.*i)); + * table.add_value("squares", i * i); + * table.add_value("square roots", std::sqrt(i)); * } - * // merge the second and third column + * // merge the second and third column * table.add_column_to_supercolumn("squares", "squares and roots"); * table.add_column_to_supercolumn("square roots", "squares and roots"); * - * // additional settings + * // additional settings * table.set_tex_format("numbers", "r"); * table.set_precision("square roots", 6); * - * // output + * // output * std::ofstream out_file("number_table.tex"); * table.write_tex(out_file); * out_file.close(); -- 2.39.5