From 4a40378f58160212c0c1c42552a1301e3a498037 Mon Sep 17 00:00:00 2001 From: Loek Le Blansch Date: Fri, 18 Oct 2024 11:30:41 +0200 Subject: update time2tex format --- scripts/time2tex.py | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) (limited to 'scripts/time2tex.py') diff --git a/scripts/time2tex.py b/scripts/time2tex.py index a5d6802..f3f8de9 100755 --- a/scripts/time2tex.py +++ b/scripts/time2tex.py @@ -11,7 +11,7 @@ def fmt_duration(sec): hour = mins // 60 if hour > 0: - out.append("%02dh" % (hour, )) + out.append("%dh" % (hour, )) mins = mins % 60 out.append("%02dm" % (mins, )) @@ -91,16 +91,13 @@ def fmt_weekly_overview(times): return tex.env('table', tex.join( tex.cmd('centering'), tex.cmd('fitimg', - tex.env('tabular', r'l' + r'r@{~}l' * len(members) + r'@{\qquad}r', tex.join( + tex.env('tabular', r'l' + r'r@{~}l' * len(members) + r'>{\quad}r', tex.join( tex.cmd('toprule'), - tex.tabrule(*[ - tex.cmd('textbf', cell) - for cell in [ - tex.esc("#"), - *tex.explist([ member, "" ] for member in members), - "Subtotal", - ] - ]), + tex.tabrule( + tex.cmd("textbf", tex.esc("#")), + *[tex.cmd("multicolumn", "2", "c", tex.cmd("textbf", member)) for member in members], + tex.cmd("textbf", "Subtotal"), + ), tex.cmd('midrule'), *[ tex.tabrule(*[ -- cgit v1.2.3