After the latest update to RStudio "Ghost Orchid" (Build 372) the RMarkdown below fails to compile to pdf on macOS Monterey. An identical file compiles fine on a different machine running previous versions of both RStudio and macOS ("Juliet Rose" (Version 1.4.1717), macOS Big Sur).
Any help to fix the problem is highly appreciated, thanks!
---
title: "minimalTest"
output: pdf_document
---
``` {r, include = F}
solution <- TRUE
```
\newif\ifsol
\sol`r ifelse(solution, 'true', 'false')`
# Simple example of non-compiling code
\ifsol
Text to conditionally skip
\fi