markdocx 4.0.0__tar.gz → 5.0.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: markdocx
3
- Version: 4.0.0
3
+ Version: 5.0.0
4
4
  Summary: Convert AI-generated Markdown textbooks to polished DOCX with native math equations and syntax-highlighted code
5
5
  License-Expression: MIT
6
6
  License-File: LICENSE
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "markdocx"
3
- version = "4.0.0"
3
+ version = "5.0.0"
4
4
  description = "Convert AI-generated Markdown textbooks to polished DOCX with native math equations and syntax-highlighted code"
5
5
  readme = "README.md"
6
6
  license = "MIT"
@@ -665,6 +665,12 @@ caption: Hình 8: Quy trình ETL
665
665
  - Khuyến nghị dùng `[Bắt đầu]` và `[Kết thúc]` cho bước đầu và cuối
666
666
  - Giữ quy trình tối đa **8 bước** để dễ đọc
667
667
  - Dùng `title:` và `caption:` để đặt nhãn
668
+ - **Mỗi bước viết ngắn gọn, tối đa 10-12 ký tự** (ví dụ: `Thu nhận ảnh`, `Xử lý ảnh`)
669
+ - Nếu tên bước dài hơn 10 ký tự, hệ thống sẽ tự động xuống dòng
670
+ - **Bố cục ngang (`horizontal`):** viết tên bước **thật ngắn** (2-3 từ), không dùng câu dài
671
+ - ✅ Đúng: `(Thu nhận ảnh)`, `(Trích xuất)`, `(Phân loại)`
672
+ - ❌ Sai: `(Thu nhận và tiền xử lý ảnh đầu vào)`, `(Trích xuất đặc trưng từ dữ liệu)`
673
+ - **Bố cục dọc (`vertical`):** có thể viết dài hơn (tối đa 25-30 ký tự)
668
674
 
669
675
  ---
670
676
 
@@ -702,6 +702,12 @@ caption: Figure 8: ETL pipeline
702
702
  - `[Start]` and `[End]` are recommended for the first and last steps
703
703
  - Keep workflows to **8 steps or fewer** for readability
704
704
  - Use `title:` and `caption:` for labeling
705
+ - **Keep each step label short — max 10-12 characters** (e.g., `Read Data`, `Transform`)
706
+ - Text longer than 10 characters will automatically wrap to 2 lines
707
+ - **Horizontal layout (`horizontal`):** use **very short** step labels (2-3 words max)
708
+ - ✅ Correct: `(Read Data)`, `(Transform)`, `(Classify)`
709
+ - ❌ Wrong: `(Read and preprocess input images)`, `(Extract features from data)`
710
+ - **Vertical layout (`vertical`):** may use longer labels (up to 25-30 characters)
705
711
 
706
712
  ---
707
713
 
@@ -7,5 +7,5 @@ with native math equations and syntax-highlighted code.
7
7
 
8
8
  from markdocx.core import convert_file, convert_directory
9
9
 
10
- __version__ = "4.0.0"
10
+ __version__ = "5.0.0"
11
11
  __all__ = ["convert_file", "convert_directory"]
@@ -766,16 +766,16 @@ def _render_workflow(code: str):
766
766
  fig_w = max(6, box_w + 3.0)
767
767
  fig_h = max(4, n * spacing_y + 2.0)
768
768
  else:
769
- # Horizontal: limited width per box, allow wrapping
770
- max_chars_per_line = 14
771
- box_w = max(2.2, min(3.5, max_text_len * 0.15 + 0.8))
772
- box_h = 1.0
773
- fontsize_normal = 11
774
- fontsize_decision = 10
775
- spacing_x = box_w + 1.0 # center-to-center horizontal distance
776
-
777
- fig_w = max(6, n * spacing_x + 2.0)
778
- fig_h = max(3.5, 4.0)
769
+ # Horizontal: wider boxes, bigger font, wrap early for readability
770
+ max_chars_per_line = 10
771
+ box_w = max(2.8, min(4.0, max_text_len * 0.18 + 1.2))
772
+ box_h = 1.2
773
+ fontsize_normal = 13
774
+ fontsize_decision = 12
775
+ spacing_x = box_w + 1.2 # center-to-center horizontal distance
776
+
777
+ fig_w = max(8, n * spacing_x + 2.5)
778
+ fig_h = max(4.0, 5.0)
779
779
 
780
780
  fig, ax = plt.subplots(figsize=(fig_w, fig_h))
781
781
  # Do NOT use set_aspect("equal") — it distorts boxes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes