unicode-math \setmathfont not working

Hello I'm trying to make a booklet using Bookdown
I want to choose greek symbols from multiple font sets, so unicode-math package was used.
But \setmathfont command is not working
I checked the Tex file produced during knitting, couldn't find any limitations blocking unicode-math functions.
Usually in unicode-math package \setmathfont command canbe used for many times with different ranges and options. So I can pick \lambda from XITS Math font, other greeks from TeX Gyre Schola Math, and rest of all from Latin Modern Math (which is main math font) when building with XeTeX

But same TeX code is not working with RMarkdown
I want to know why

title: "Mathematics in Physics"
author: "Haewon Lee"
date: "`r Sys.Date()`"
output: 
  bookdown::pdf_document2:
    latex_engine: xelatex
  keep_tex: true
mainfont: Latin Modern Math
sansfont: LiberationSans
monofont: LiberationMono
mathfont: Latin Modern Math
documentclass: oblivoir
classoption:
  - chapter
fontsize: 11pt
papersize: a4
header_includes:
  - \usepackage{unicode-math}
---
\setmathfont{TeX Gyre Schola Math}[Scale=MatchLowercase, range=\mathit/{greek,Greek}]
\setmathfont{TeX Gyre Schola Math}[Scale=MatchLowercase, range={"1D6E2-"1D6FA}]
\setmathfont{XITS Math}[range={\mitlambda}]
\setmathfont{XITS Math}[range=\mathscr/{latin,Latin}]
\setmathfont{XITS Math}[range=\mathbb/{latin,Latin}]

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.

What exactly is the error you get ?

On my side, it is not working because I don't have the correct font I believe