f <- tempfile()
writeLines(paste0("\\newcommand{\\logo}{\\if{html}{\\figure{Rlogo.svg}{options: width=100}",
"\\if{latex}{\\figure{Rlogo.pdf}{options: width=0.5in}}}"),
f)
m <- loadRdMacros(f)
ls(m)
ls(parent.env(m))
ls(parent.env(parent.env(m)))
Run the code above in your browser using DataLab