I have a qmd Quarto file with different output formats, html and pdf.
My goal is, to generate graphics in dependence of the output format.
How can I detect in an R cell, if the processing output format is html or pdf? A simple if statement would be sufficient.
---
title: My title
format:
html:
toc: true
toc-depth: 3
html-math-method: katex
pdf:
keep-tex: true
toc: true
number-sections: true
colorlinks: true
---