---
title: "Mermaid SVG format with LaTeX - No script tags (#13661)"
# Test strategy: Use format:latex with use-rsvg-convert:false to:
# - Test mermaid-format:svg (the actual bug scenario)
# - Generate .tex file without compiling PDF (avoids needing rsvg-convert/Inkscape in CI)
# - Verify warning message about clipping + external tooling
# - Verify LaTeX uses \includesvg (not \includegraphics)
# - Verify NO HTML <script> tags in LaTeX output (the original bug)
format:
  latex:
    mermaid-format: svg
    use-rsvg-convert: false
_quarto:
  tests:
    latex:
      printsMessage:
        level: INFO
        regex: 'multi-line text labels may experience clipping.*requires external tooling'
      ensureFileRegexMatches:
        - ["\\\\includesvg(\\[.*?\\])?\\{[^}]*mermaid-figure-[^}]*\\}"]
        - ["<script[^>]*>", "mermaid-postprocess-shim"]
---

## Test Diagram

Simple mermaid diagram to test SVG format with LaTeX output.

**What this tests:**
- Bug fix: HTML script tags should NOT appear in LaTeX output
- Warning: Should emit INFO about clipping AND requiring external tooling
- LaTeX structure: Should use `\includesvg` command for SVG files

```{mermaid}
graph TD
    A[Start] --> B{Decision}
    B -->|Yes| C[Good]
    B -->|No| D[Bad]
    C --> E[End]
    D --> E
```
