Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mermaid diagram title frontmatter support #4963

Closed
5 tasks done
devdiva opened this issue Mar 25, 2023 · 1 comment
Closed
5 tasks done

Mermaid diagram title frontmatter support #4963

devdiva opened this issue Mar 25, 2023 · 1 comment
Labels
support a request for support

Comments

@devdiva
Copy link

devdiva commented Mar 25, 2023

Bug description

Desired outcome is to add a title or Figure label and/or figure caption to a mermaid diagram in a qmd file.

Quarto documentation shows figure labeling for graphviz dot, but same syntax does not work with mermaid.
https://quarto.org/docs/authoring/diagrams.html#figures

The outcome of this mermaid issues has support for adding title support to yaml frontmatter. However this does not appear to work with qmd output in Rstudio (get a syntax error).
mermaid-js/mermaid#3706

Mac OS Ventura 13.2.1, M1 Pro chip
Rstudio Version 2023.030.0+386

quarto check
[✓] Checking Quarto installation......OK      Version: 1.2.335      Path: /Users/hk/Applications/RStudio.app/Contents/Resources/app/quarto/bin
[✓] Checking basic markdown render....OK
[✓] Checking Python 3 installation....OK      Version: 3.9.6      Path: /Applications/Xcode.app/Contents/Developer/usr/bin/python3      Jupyter: (None)      Jupyter is not available in this Python installation.      Install with python3 -m pip install jupyter
[✓] Checking R installation...........OK      Version: 4.2.1      Path: /Library/Frameworks/R.framework/Resources      LibPaths:        - /Library/Frameworks/R.framework/Versions/4.2-arm64/Resources/library      rmarkdown: 2.16
[✓] Checking Knitr engine render......OK

Attached qmd file (renamed .txt in order to upload through github)
MermaidTitle.qmd.txt

Checklist

  • Please include a minimal, fully reproducible example in a single .qmd file? Please provide the whole file rather than the snippet you believe is causing the issue.
  • Please format your issue so it is easier for us to read the bug report.
  • Please document the RStudio IDE version you're running (if applicable), by providing the value displayed in the "About RStudio" main menu dialog?
  • Please document the operating system you're running. If on Linux, please provide the specific distribution.
  • Please provide the output of quarto check so we know which version of quarto and its dependencies you're running.
@devdiva devdiva added the bug Something isn't working label Mar 25, 2023
@cscheid
Copy link
Collaborator

cscheid commented Mar 25, 2023

---
format:
  html:
    theme: journal
    mermaid:
      theme: forest
---

# Mermaid Test

```{mermaid}
---
title: FOO
---
flowchart TB
  x --> yyyy
```

We don't support that syntax in cells; that front matter doesn't refer to mermaid (I don't know how that is being supported in dot cases, but that's a coincidence). You need to use options delimited by %%|, since %% is the comment syntax in mermaid. We describe this in the documentation.

@cscheid cscheid closed this as completed Mar 25, 2023
@cscheid cscheid removed the bug Something isn't working label Mar 25, 2023
@mcanouil mcanouil added the support a request for support label Jun 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
support a request for support
Projects
None yet
Development

No branches or pull requests

3 participants