From 86230f4b55da1d5962631743f7ddb11fe97a7ef2 Mon Sep 17 00:00:00 2001 From: Florian Fischer Date: Mon, 13 Jul 2020 18:24:51 +0200 Subject: [mysql] escape tex special chars --- allocbench/benchmarks/mysql.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/allocbench/benchmarks/mysql.py b/allocbench/benchmarks/mysql.py index 3b51080..2587f17 100644 --- a/allocbench/benchmarks/mysql.py +++ b/allocbench/benchmarks/mysql.py @@ -303,11 +303,13 @@ class BenchmarkMYSQL(Benchmark): file=table_file) print("Fäden / Allokator ", end=" ", file=table_file) for head in headers: - print("& {}".format(head), end=" ", file=table_file) + print("& {}".format(plt.tex_escape(str(head))), + end=" ", + file=table_file) print("\\\\\n\\hline", file=table_file) for allocator in allocators: - print(allocator, end=" ", file=table_file) + print(plt.tex_escape(allocator), end=" ", file=table_file) for perm in self.iterate_args(args=args): mean = data[allocator][perm]["mean"] entry_string = "& \\textcolor{{{}}}{{{:.3f}}}" -- cgit v1.2.3