Skip to content

Allow conditional or alternative images in markdown #1398

@gaborcsardi

Description

@gaborcsardi

WRE suggests SVG + PDF for nice images in HTML and PDF:

\if{html}{\figure{Rlogo.svg}{options: width=100 alt="R logo"}}
\if{latex}{\figure{Rlogo.pdf}{options: width=0.5in}}

https://cran.r-project.org/doc/manuals/R-exts.html#Figures

As a first step we could support conditional images. My use case is adding SVG images to the HTML manual, and I don't mind if they are omitted from the PDF manual.

Ideally we would also support images created by code blocks, in addition to the ones put in "manually" with the markdown image syntax.

Metadata

Metadata

Assignees

No one assigned

    Labels

    featurea feature request or enhancement

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions