From 10ace61abc92d4c6dab830d8d80e5c8151f4d97e Mon Sep 17 00:00:00 2001 From: Nicolas Kruse Date: Sun, 1 Jun 2025 22:41:02 +0200 Subject: [PATCH] Added missing minus for valid number chars for collum auto format detection in latex.py --- src/pyladoc/latex.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pyladoc/latex.py b/src/pyladoc/latex.py index ca217e4..bdb4c14 100644 --- a/src/pyladoc/latex.py +++ b/src/pyladoc/latex.py @@ -131,7 +131,7 @@ def render_pandas_styler_table(df_style: Styler, caption: str = '', label: str = yield '\\centering\n' # Guess column type - numeric = re.compile(r'^[<>]?\s*(?:\d+,?)+(?:\.\d+)?(?:\s\D.*)?$') + numeric = re.compile('^[<>-\u2212]?\\s*(?:\\d+,?)+(?:\\.\\d+)?(?:\\s\\D.*)?$') formats = ['S' if all( (numeric.match(line[ci]['display_value'].strip()) for line in table['body']) ) else 'l' for ci in range(len(table['body'][0])) if table['body'][0][ci]['is_visible']]