From 0ab3b08394d370c34e4423bcbb68f42ca610fc4b Mon Sep 17 00:00:00 2001 From: Stephen Mildenhall Date: Thu, 13 Mar 2025 22:26:53 +0000 Subject: [PATCH] Adjusted toml file for img folder --- greater_tables/TODO.md | 4 +++- greater_tables/greater_tables.py | 13 ++++++++++--- pyproject.toml | 6 ++++++ 3 files changed, 19 insertions(+), 4 deletions(-) diff --git a/greater_tables/TODO.md b/greater_tables/TODO.md index 183fbb1..f0e5ca2 100644 --- a/greater_tables/TODO.md +++ b/greater_tables/TODO.md @@ -1,4 +1,6 @@ # TODO * Ratio cols with multi index columns -* % in tex output - never allow comments? \ No newline at end of file +* % in tex output - never allow comments? +* center / left / right table output -> CSS +* ?Option to hide index \ No newline at end of file diff --git a/greater_tables/greater_tables.py b/greater_tables/greater_tables.py index 49d7ca6..1e164e4 100644 --- a/greater_tables/greater_tables.py +++ b/greater_tables/greater_tables.py @@ -466,6 +466,8 @@ class GT(object): width: auto; border: none; overflow: auto; + margin-left: auto; + margin-right: auto; }} /* tag formats */ #{self.df_id} caption {{ @@ -842,6 +844,7 @@ class GT(object): # \\begin{{{figure}}}{latex} # \\centering # {extra_defs} + # centering handled by quarto header = """ \\begin{{tikzpicture}}[ auto, @@ -852,7 +855,7 @@ class GT(object): row sep={row_sep}em, column sep={column_sep}em, nodes in empty cells, - nodes={{rectangle, scale={scale}, text badly ragged}}, + nodes={{rectangle, scale={scale}, text badly ragged {debug}}}, """ # put draw=blue!10 or so in nodes to see the node @@ -867,7 +870,7 @@ class GT(object): # always a good idea to do this...need to deal with underscores, % # and it handles index types that are not strings df = GT.clean_index(df) - # make sure percents are escaped f + # make sure percents are escaped, but not if already escaped df = df.replace(r"(?