If I include TikZ code in an R Markdown document that has a PDF output (like below), everything is fine.
If change the output format (say HTML or ioslides_presentation), the drawing does not appear.
Once of the beauty of R Markdown is "one input many possible outputs". Is there a way to fix that problem?
---
title: "Hello World"
author: "Me"
date: "February 24, 2020"
output:
pdf_document: default
header-includes:
- \usepackage{tikz}
- \usepackage{pgfplots}
- \usepackage{pgf,tikz,pgfplots}
- \pgfplotsset{compat=1.15}
- \usepackage{mathrsfs}
- \usetikzlibrary{arrows}
- \usetikzlibrary{patterns}
---
## TikZ picture
- Here is a TikZ picutre
\definecolor{zzffzz}{rgb}{0.6,1,0.6}
\definecolor{ffcctt}{rgb}{1,0.8,0.2}
\definecolor{yqyqdz}{rgb}{0.5019607843137255,0.5019607843137255,0.8509803921568627}
\begin{tikzpicture}[line cap=round,line join=round,>=triangle 45,x=1cm,y=1cm]
\clip(-4.505289256198347,-6.316528925619829) rectangle (21.02198347107439,13.083471074380155);
\draw [line width=2pt,pattern color=yqyqdz,fill=yqyqdz,fill opacity=0.25] (2,0) circle (3cm);
\draw [line width=2pt,pattern color=ffcctt,fill=ffcctt,fill opacity=0.25] (6,0) circle (3cm);
\draw [line width=2pt,pattern color=zzffzz,fill=zzffzz,fill opacity=0.25] (4,3.46415) circle (3cm);
\end{tikzpicture}