Update generation

This commit is contained in:
2025-12-16 00:31:27 +01:00
parent 3b0f30d79b
commit 6608032f0c
13 changed files with 31 additions and 17 deletions

View File

@@ -110,8 +110,8 @@ def parse_md_to_html_blocks(md_content):
html_blocks.append(f'''<p class=MsoCaption style="text-align:center"><a name="{bookmark_id}"><b><span lang=ES style="font-size:12.0pt;line-height:150%">Figura </span></b></a><!--[if supportFields]><span style='mso-element:field-begin'></span> SEQ Figura \\* ARABIC <span style='mso-element:field-separator'></span><![endif]--><b><span lang=ES style="font-size:12.0pt;line-height:150%">{figure_counter}</span></b><!--[if supportFields]><span style='mso-element:field-end'></span><![endif]--><b><span lang=ES style="font-size:12.0pt;line-height:150%">.</span></b><span lang=ES style="font-size:12.0pt;line-height:150%"> </span><i><span lang=ES style="font-size:12.0pt;line-height:150%;font-weight:normal">{fig_title}</span></i></p>''')
if os.path.exists(fig_path):
# Use actual image with proper Word-compatible format (max 400px width, 500px height to fit page)
html_blocks.append(f'''<p class=MsoNormal style="text-align:center"><span lang=ES><img style="max-width:400px;max-height:500px;width:auto;height:auto" src="{fig_file}" alt="{fig_title}"/></span></p>''')
# Use actual image with proper Word-compatible format (max 350px width, 400px height to fit page with caption)
html_blocks.append(f'''<p class=MsoNormal style="text-align:center"><span lang=ES><img style="max-width:350px;max-height:400px;width:auto;height:auto" src="{fig_file}" alt="{fig_title}"/></span></p>''')
else:
# Fallback to placeholder
html_blocks.append(f'''<p class=MsoNormal style="text-align:center;border:1px dashed #999;padding:20px;margin:10px 40px;background:#f9f9f9"><span lang=ES style="color:#666">[Insertar diagrama Mermaid aquí]</span></p>''')