char colors
Some checks failed
build_docker / essential (pull_request) Successful in 0s
build_docker / build_easyocr (pull_request) Has been cancelled
build_docker / build_doctr_gpu (pull_request) Has been cancelled
build_docker / build_raytune (pull_request) Has been cancelled
build_docker / build_easyocr_gpu (pull_request) Has been cancelled
build_docker / build_doctr (pull_request) Has been cancelled
build_docker / build_cpu (pull_request) Has been cancelled
build_docker / build_gpu (pull_request) Has been cancelled

This commit is contained in:
2026-01-20 15:18:56 +01:00
parent 4088a1efd0
commit 4195c67b0c
20 changed files with 465 additions and 95 deletions

View File

@@ -74,6 +74,12 @@ Review and validate the documentation for this Master's Thesis project.
- Titles should describe the diagram content, not generic "Diagrama N"
- Verify theme is applied to all diagrams in `docs/*.md`
**Note on Bar Charts (`xychart-beta`):**
- Bar chart colors are **automatically converted to light blue** (`#0098CD`) during figure generation
- The `xyChart.plotColorPalette` config in YAML frontmatter does NOT work reliably with mmdc
- Instead, `generate_mermaid_figures.py` post-processes SVG to replace default colors (`#ECECFF`, `#FFF4DD`)
- No manual color configuration needed in xychart-beta blocks - they will be styled automatically
### Files to Review
- `docs/00_resumen.md` - Resumen/Abstract
- `docs/03_objetivos_metodologia.md` - Objectives

View File

@@ -21,6 +21,11 @@ source .venv/bin/activate && python3 generate_mermaid_figures.py
**Input:** Mermaid code blocks from `docs/*.md`
**Output:** `thesis_output/figures/figura_*.png` and `figures_manifest.json`
**Notes:**
- Bar charts (`xychart-beta`) are automatically post-processed to use light blue (`#0098CD`) bars
- The script generates SVG first, replaces default colors, then converts to PNG via `cairosvg`
- Other diagram types (flowchart, sequence, pie) use direct PNG generation via `mmdc`
### Step 2: Apply Content to UNIR Template
Run the content application script using the virtual environment:
@@ -53,12 +58,18 @@ After successful execution, provide:
If scripts fail, check that dependencies are installed:
```bash
# Python dependencies (in .venv)
source .venv/bin/activate && pip install beautifulsoup4
source .venv/bin/activate && pip install beautifulsoup4 cairosvg
# Mermaid CLI for figure generation
npm install @mermaid-js/mermaid-cli
```
### Notes
- **Bar chart colors**: The `generate_mermaid_figures.py` script automatically converts xychart-beta bar colors to UNIR light blue (`#0098CD`). This is done via SVG post-processing since Mermaid's xychart theming doesn't work reliably via config files.
- **Color replacement**: Both `fill` and `stroke` attributes are replaced for colors `#ECECFF` and `#FFF4DD` (default Mermaid bar colors).
- **Config file**: `mermaid.config.json` in root directory sets the base theme for all diagrams.
### Error Handling
- If `generate_mermaid_figures.py` fails: Check mmdc (mermaid-cli) is installed