markdocx 7.0.0__tar.gz → 9.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-7.0.0 → markdocx-9.0.0}/PKG-INFO +1 -1
- {markdocx-7.0.0 → markdocx-9.0.0}/pyproject.toml +1 -1
- {markdocx-7.0.0 → markdocx-9.0.0}/src/markdocx/__init__.py +1 -1
- {markdocx-7.0.0 → markdocx-9.0.0}/src/markdocx/diagram_renderer.py +27 -27
- {markdocx-7.0.0 → markdocx-9.0.0}/.gitignore +0 -0
- {markdocx-7.0.0 → markdocx-9.0.0}/.python-version +0 -0
- {markdocx-7.0.0 → markdocx-9.0.0}/LICENSE +0 -0
- {markdocx-7.0.0 → markdocx-9.0.0}/README.md +0 -0
- {markdocx-7.0.0 → markdocx-9.0.0}/main.py +0 -0
- {markdocx-7.0.0 → markdocx-9.0.0}/requirements.txt +0 -0
- {markdocx-7.0.0 → markdocx-9.0.0}/rule/ai_gen_doc_rule.md +0 -0
- {markdocx-7.0.0 → markdocx-9.0.0}/rule/ai_gen_doc_rule_en.md +0 -0
- {markdocx-7.0.0 → markdocx-9.0.0}/src/markdocx/cli.py +0 -0
- {markdocx-7.0.0 → markdocx-9.0.0}/src/markdocx/code_renderer.py +0 -0
- {markdocx-7.0.0 → markdocx-9.0.0}/src/markdocx/core.py +0 -0
- {markdocx-7.0.0 → markdocx-9.0.0}/src/markdocx/docx_builder.py +0 -0
- {markdocx-7.0.0 → markdocx-9.0.0}/src/markdocx/math_renderer.py +0 -0
- {markdocx-7.0.0 → markdocx-9.0.0}/src/markdocx/md_parser.py +0 -0
- {markdocx-7.0.0 → markdocx-9.0.0}/src/markdocx/styles.py +0 -0
- {markdocx-7.0.0 → markdocx-9.0.0}/uv.lock +0 -0
|
@@ -214,12 +214,12 @@ def _render_matrix(code: str):
|
|
|
214
214
|
for i, row in enumerate(data):
|
|
215
215
|
for j, val in enumerate(row):
|
|
216
216
|
ax.text(j, i, str(val), ha="center", va="center",
|
|
217
|
-
fontsize=
|
|
217
|
+
fontsize=20, fontfamily="serif")
|
|
218
218
|
|
|
219
219
|
# Add matrix name
|
|
220
220
|
if name:
|
|
221
221
|
ax.text(bracket_x_left - 0.4, (rows - 1) / 2, f"{name} =",
|
|
222
|
-
ha="right", va="center", fontsize=
|
|
222
|
+
ha="right", va="center", fontsize=22, fontfamily="serif",
|
|
223
223
|
fontstyle="italic")
|
|
224
224
|
|
|
225
225
|
plt.tight_layout(pad=0.5)
|
|
@@ -356,10 +356,10 @@ def _render_chart(code: str):
|
|
|
356
356
|
wedges, texts, autotexts = ax.pie(
|
|
357
357
|
values, labels=labels, autopct="%1.1f%%",
|
|
358
358
|
colors=colors, startangle=90,
|
|
359
|
-
textprops={"fontsize":
|
|
359
|
+
textprops={"fontsize": 14}
|
|
360
360
|
)
|
|
361
361
|
for autotext in autotexts:
|
|
362
|
-
autotext.set_fontsize(
|
|
362
|
+
autotext.set_fontsize(13)
|
|
363
363
|
autotext.set_color("white")
|
|
364
364
|
autotext.set_fontweight("bold")
|
|
365
365
|
|
|
@@ -372,8 +372,8 @@ def _render_chart(code: str):
|
|
|
372
372
|
color=color, s=60, zorder=3)
|
|
373
373
|
if labels:
|
|
374
374
|
ax.set_xticks(range(len(labels)))
|
|
375
|
-
ax.set_xticklabels(labels, fontsize=
|
|
376
|
-
ax.legend(fontsize=
|
|
375
|
+
ax.set_xticklabels(labels, fontsize=13)
|
|
376
|
+
ax.legend(fontsize=13)
|
|
377
377
|
ax.grid(True, alpha=0.3)
|
|
378
378
|
|
|
379
379
|
elif chart_type == "line":
|
|
@@ -385,8 +385,8 @@ def _render_chart(code: str):
|
|
|
385
385
|
color=color, marker="o", linewidth=2, markersize=5)
|
|
386
386
|
if labels:
|
|
387
387
|
ax.set_xticks(range(len(labels)))
|
|
388
|
-
ax.set_xticklabels(labels, fontsize=
|
|
389
|
-
ax.legend(fontsize=
|
|
388
|
+
ax.set_xticklabels(labels, fontsize=13)
|
|
389
|
+
ax.legend(fontsize=13)
|
|
390
390
|
ax.grid(True, alpha=0.3)
|
|
391
391
|
|
|
392
392
|
else: # bar (default)
|
|
@@ -403,7 +403,7 @@ def _render_chart(code: str):
|
|
|
403
403
|
for bar_item in bars:
|
|
404
404
|
height = bar_item.get_height()
|
|
405
405
|
ax.text(bar_item.get_x() + bar_item.get_width() / 2., height,
|
|
406
|
-
f"{height:g}", ha="center", va="bottom", fontsize=
|
|
406
|
+
f"{height:g}", ha="center", va="bottom", fontsize=13)
|
|
407
407
|
else:
|
|
408
408
|
bar_width = 0.8 / n_datasets
|
|
409
409
|
for idx, ds in enumerate(datasets):
|
|
@@ -413,18 +413,18 @@ def _render_chart(code: str):
|
|
|
413
413
|
color = PALETTE[idx % len(PALETTE)]
|
|
414
414
|
ax.bar(x_positions, values, bar_width,
|
|
415
415
|
label=ds.get("label", f"Series {idx+1}"), color=color)
|
|
416
|
-
ax.legend(fontsize=
|
|
416
|
+
ax.legend(fontsize=13)
|
|
417
417
|
|
|
418
418
|
ax.set_xticks(range(len(labels)))
|
|
419
|
-
ax.set_xticklabels(labels, fontsize=
|
|
419
|
+
ax.set_xticklabels(labels, fontsize=13)
|
|
420
420
|
ax.grid(True, axis="y", alpha=0.3)
|
|
421
421
|
|
|
422
422
|
if title:
|
|
423
|
-
ax.set_title(title, fontsize=
|
|
423
|
+
ax.set_title(title, fontsize=18, fontweight="bold", pad=12)
|
|
424
424
|
if xlabel:
|
|
425
|
-
ax.set_xlabel(xlabel, fontsize=
|
|
425
|
+
ax.set_xlabel(xlabel, fontsize=15)
|
|
426
426
|
if ylabel:
|
|
427
|
-
ax.set_ylabel(ylabel, fontsize=
|
|
427
|
+
ax.set_ylabel(ylabel, fontsize=15)
|
|
428
428
|
|
|
429
429
|
plt.tight_layout()
|
|
430
430
|
img_bytes = _fig_to_bytes(fig)
|
|
@@ -575,10 +575,10 @@ def _render_graph(code: str):
|
|
|
575
575
|
# Draw nodes
|
|
576
576
|
node_colors = [PALETTE[i % len(PALETTE)] for i in range(len(G.nodes))]
|
|
577
577
|
nx.draw_networkx_nodes(G, pos, ax=ax, node_color=node_colors,
|
|
578
|
-
node_size=
|
|
578
|
+
node_size=1200, alpha=0.9)
|
|
579
579
|
|
|
580
580
|
# Draw labels
|
|
581
|
-
nx.draw_networkx_labels(G, pos, ax=ax, font_size=
|
|
581
|
+
nx.draw_networkx_labels(G, pos, ax=ax, font_size=15,
|
|
582
582
|
font_weight="bold", font_color="white")
|
|
583
583
|
|
|
584
584
|
# Draw edges
|
|
@@ -594,13 +594,13 @@ def _render_graph(code: str):
|
|
|
594
594
|
# Draw edge labels
|
|
595
595
|
if edge_labels:
|
|
596
596
|
nx.draw_networkx_edge_labels(G, pos, edge_labels, ax=ax,
|
|
597
|
-
font_size=
|
|
597
|
+
font_size=14, font_color="#CC0000",
|
|
598
598
|
bbox=dict(boxstyle="round,pad=0.2",
|
|
599
599
|
facecolor="white",
|
|
600
600
|
edgecolor="none", alpha=0.8))
|
|
601
601
|
|
|
602
602
|
if title:
|
|
603
|
-
ax.set_title(title, fontsize=
|
|
603
|
+
ax.set_title(title, fontsize=18, fontweight="bold", pad=12)
|
|
604
604
|
|
|
605
605
|
ax.axis("off")
|
|
606
606
|
plt.tight_layout()
|
|
@@ -758,10 +758,10 @@ def _render_workflow(code: str):
|
|
|
758
758
|
# Vertical: boxes can be wide
|
|
759
759
|
max_chars_per_line = 30
|
|
760
760
|
box_w = max(3.0, min(6.0, max_text_len * 0.18 + 1.0))
|
|
761
|
-
box_h =
|
|
762
|
-
fontsize_normal =
|
|
763
|
-
fontsize_decision =
|
|
764
|
-
spacing_y =
|
|
761
|
+
box_h = 1.1
|
|
762
|
+
fontsize_normal = 18
|
|
763
|
+
fontsize_decision = 16
|
|
764
|
+
spacing_y = 2.2 # center-to-center vertical distance
|
|
765
765
|
|
|
766
766
|
fig_w = max(6, box_w + 3.0)
|
|
767
767
|
fig_h = max(4, n * spacing_y + 2.0)
|
|
@@ -775,11 +775,11 @@ def _render_workflow(code: str):
|
|
|
775
775
|
|
|
776
776
|
max_chars_per_line = 16
|
|
777
777
|
box_w = max(3.2, min(5.0, max_text_len * 0.18 + 1.5))
|
|
778
|
-
box_h = 1.
|
|
779
|
-
fontsize_normal =
|
|
780
|
-
fontsize_decision =
|
|
778
|
+
box_h = 1.6
|
|
779
|
+
fontsize_normal = 24
|
|
780
|
+
fontsize_decision = 22
|
|
781
781
|
spacing_x = box_w + 1.5 # horizontal gap between boxes
|
|
782
|
-
spacing_y = 3.
|
|
782
|
+
spacing_y = 3.5 # vertical gap between rows
|
|
783
783
|
|
|
784
784
|
num_rows = (n + cols_per_row - 1) // cols_per_row
|
|
785
785
|
fig_w = max(10, cols_per_row * spacing_x + 2.5)
|
|
@@ -951,7 +951,7 @@ def _render_workflow(code: str):
|
|
|
951
951
|
zorder=2)
|
|
952
952
|
|
|
953
953
|
if title:
|
|
954
|
-
ax.set_title(title, fontsize=
|
|
954
|
+
ax.set_title(title, fontsize=28, fontweight="bold", pad=20)
|
|
955
955
|
|
|
956
956
|
plt.tight_layout()
|
|
957
957
|
img_bytes = _fig_to_bytes(fig)
|
|
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
|
|
File without changes
|
|
File without changes
|