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.
- {markdocx-4.0.0 → markdocx-5.0.0}/PKG-INFO +1 -1
- {markdocx-4.0.0 → markdocx-5.0.0}/pyproject.toml +1 -1
- {markdocx-4.0.0 → markdocx-5.0.0}/rule/ai_gen_doc_rule.md +6 -0
- {markdocx-4.0.0 → markdocx-5.0.0}/rule/ai_gen_doc_rule_en.md +6 -0
- {markdocx-4.0.0 → markdocx-5.0.0}/src/markdocx/__init__.py +1 -1
- {markdocx-4.0.0 → markdocx-5.0.0}/src/markdocx/diagram_renderer.py +10 -10
- {markdocx-4.0.0 → markdocx-5.0.0}/.gitignore +0 -0
- {markdocx-4.0.0 → markdocx-5.0.0}/.python-version +0 -0
- {markdocx-4.0.0 → markdocx-5.0.0}/LICENSE +0 -0
- {markdocx-4.0.0 → markdocx-5.0.0}/README.md +0 -0
- {markdocx-4.0.0 → markdocx-5.0.0}/main.py +0 -0
- {markdocx-4.0.0 → markdocx-5.0.0}/requirements.txt +0 -0
- {markdocx-4.0.0 → markdocx-5.0.0}/src/markdocx/cli.py +0 -0
- {markdocx-4.0.0 → markdocx-5.0.0}/src/markdocx/code_renderer.py +0 -0
- {markdocx-4.0.0 → markdocx-5.0.0}/src/markdocx/core.py +0 -0
- {markdocx-4.0.0 → markdocx-5.0.0}/src/markdocx/docx_builder.py +0 -0
- {markdocx-4.0.0 → markdocx-5.0.0}/src/markdocx/math_renderer.py +0 -0
- {markdocx-4.0.0 → markdocx-5.0.0}/src/markdocx/md_parser.py +0 -0
- {markdocx-4.0.0 → markdocx-5.0.0}/src/markdocx/styles.py +0 -0
- {markdocx-4.0.0 → markdocx-5.0.0}/uv.lock +0 -0
|
@@ -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
|
|
|
@@ -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:
|
|
770
|
-
max_chars_per_line =
|
|
771
|
-
box_w = max(2.
|
|
772
|
-
box_h = 1.
|
|
773
|
-
fontsize_normal =
|
|
774
|
-
fontsize_decision =
|
|
775
|
-
spacing_x = box_w + 1.
|
|
776
|
-
|
|
777
|
-
fig_w = max(
|
|
778
|
-
fig_h = max(
|
|
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
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|