- Add\Rework UI - Add Split Table and Listing - Add Support Customazeble schems
This commit is contained in:
@@ -16,7 +16,7 @@ from ..util import create_element
|
||||
# Map category → Word style name
|
||||
CAPTION_STYLES = {
|
||||
"Рисунок": "Caption Figure",
|
||||
"Таблица": "Caption Table",
|
||||
"Таблица": "Название таблицы",
|
||||
"Листинг": "Caption Listing",
|
||||
}
|
||||
|
||||
@@ -26,6 +26,7 @@ class CaptionInfo:
|
||||
unique_name: str | None
|
||||
text: str | None
|
||||
with_listing: bool = False
|
||||
landscape: bool = False
|
||||
|
||||
|
||||
class Caption(Renderable):
|
||||
@@ -40,7 +41,10 @@ class Caption(Renderable):
|
||||
try:
|
||||
self._docx_paragraph.style = style_name
|
||||
except KeyError:
|
||||
self._docx_paragraph.style = "Caption"
|
||||
try:
|
||||
self._docx_paragraph.style = "Caption Table" if category == "Таблица" else "Caption"
|
||||
except KeyError:
|
||||
self._docx_paragraph.style = "Caption"
|
||||
|
||||
# Format: «Рисунок 1.1 — Название» (or « - » if --emdash-to-hyphen)
|
||||
from ..profiles import dash_separator
|
||||
|
||||
Reference in New Issue
Block a user