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"(?