|
5 | 5 |
|
6 | 6 | """Define classes for LaTeX serialization.""" |
7 | 7 |
|
8 | | -from pathlib import Path |
9 | 8 | import re |
| 9 | +from pathlib import Path |
10 | 10 | from typing import Any, Optional, Union |
11 | 11 |
|
12 | | -from pydantic import AnyUrl, BaseModel, Field |
| 12 | +from pydantic import AnyUrl, BaseModel |
13 | 13 | from typing_extensions import override |
14 | 14 |
|
15 | 15 | from docling_core.transforms.serializer.base import ( |
@@ -656,7 +656,7 @@ def serialize_doc( |
656 | 656 | # Build optional preamble |
657 | 657 | preamble_lines: list[str] = [] |
658 | 658 | if params.document_class: |
659 | | - preamble_lines.append(params.document_class+"\n") |
| 659 | + preamble_lines.append(params.document_class + "\n") |
660 | 660 | for pkg in params.packages: |
661 | 661 | line = pkg.strip() |
662 | 662 | if not line: |
@@ -698,7 +698,7 @@ def requires_page_break(self) -> bool: |
698 | 698 | return self.params.page_break_command is not None |
699 | 699 |
|
700 | 700 | def _post_process_title(self, body_text: str) -> tuple[Optional[str], str, bool]: |
701 | | - """Detect and relocate LaTeX \title{...} commands. |
| 701 | + r"""Detect and relocate LaTeX \title{...} commands. |
702 | 702 |
|
703 | 703 | - Extracts the first \title{...} command found in the body. |
704 | 704 | - Removes all \title{...} occurrences from the body. |
|
0 commit comments