executablebooks / mystmd

Command line tools for working with MyST Markdown.
https://mystmd.org/guide
MIT License
172 stars 50 forks source link

replacing content for export #1353

Open brookisme opened 1 week ago

brookisme commented 1 week ago

I'd like to be able to replace content for exports. I am particularly interested in replacing interactive charts for export but I see no reason to restrict it to this use case.

The problem:

Currently placeholder: can be used to replace interactive content however one also needs to replace the caption - for the interactive chart one needs directions on how to use it, and for the static figure on needs to be able to describe the figure.

Proposal

Proposed Syntax:

:::{figure} #nb.county_map
:label: fig.county_map
:export: web

My interactive caption
:::

:::{figure} http://url.to/my_static/image
:label: fig.county_map
:export: pdf+tex

My Static caption
:::
agoose77 commented 1 week ago

Maybe a duplicate of #1280