From b6f98e529fa49a569ebec4e2bf52d4bc0b22eae8 Mon Sep 17 00:00:00 2001 From: Arseny <20096ninja@gmail.com> Date: Wed, 15 Jul 2026 18:39:08 +0300 Subject: [PATCH] =?UTF-8?q?[FIX]=20=D1=81=D0=BE=D0=BA=D1=80=D0=B0=D1=89?= =?UTF-8?q?=D0=B5=D0=BD=D0=B8=D1=8F:=20=D0=B2=D1=82=D0=BE=D1=80=D0=B0?= =?UTF-8?q?=D1=8F=20=D0=BA=D0=BE=D0=BB=D0=BE=D0=BD=D0=BA=D0=B0=20=D1=81=20?= =?UTF-8?q?=D0=BF=D0=B5=D1=80=D0=B5=D0=BD=D0=BE=D1=81=D0=BE=D0=BC=20=D1=82?= =?UTF-8?q?=D0=B5=D0=BA=D1=81=D1=82=D0=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- md2gost/handlers/text.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/md2gost/handlers/text.py b/md2gost/handlers/text.py index 5abc3c1..def5ce0 100644 --- a/md2gost/handlers/text.py +++ b/md2gost/handlers/text.py @@ -35,11 +35,14 @@ def abbreviations(text: str) -> str: return text max_abbr = max(len(r[0]) for r in rows) + abbr_col = max_abbr + 2 tabular_rows = [] for abbr, desc in rows: pad = max_abbr - len(abbr) + 2 - tabular_rows.append(f"{abbr} {' ' * pad}& --- {desc} \\\\") + tabular_rows.append( + f"{abbr} {' ' * pad}& \\hangafter=1\\hangindent=2em ------ {desc} \\\\" + ) - col_spec = f"@{{\\hspace{{0pt}}}}p{{{max_abbr + 2}em}}@{{\\hspace{{0pt}}}}l" + col_spec = f"@{{\\hspace{{0pt}}}}p{{{abbr_col}em}}@{{\\hspace{{0pt}}}}p{{\\dimexpr\\linewidth-{abbr_col}em\\relax}}" body = "\n".join(tabular_rows) - return f"\\begin{{tabular}}{{{col_spec}}}\n{body}\n\\end{{tabular}}" + return f"\\noindent\\begin{{tabular}}{{{col_spec}}}\n{body}\n\\end{{tabular}}"