I am learning how to load fonts manually using TeXLive 2023 on Linux.
After much struggle I finally got this MWE working. This loads some random fonts I found under /usr/local/texlive/2023/texmf-dist/fonts just to learn how to load them. I am using the commands \setmainfont and \setmathfont.
\documentclass[12pt]{book}
\usepackage{amsmath}
\usepackage{fontspec,unicode-math}
\setmainfont[
Path = /usr/local/texlive/2023/texmf-dist/fonts/opentype/public/qualitype/,
Extension = .otf,
Ligatures = TeX
]{QTSchoolCentury}
\setmathfont[
Path = /usr/local/texlive/2023/texmf-dist/fonts/opentype/public/asana-math/,
Extension = .otf,
Ligatures = TeX
]{Asana-Math}
%\usepackage{breqn}
\begin{document}
test
[
\sin x = \int_{0}^{\infty} \cos x
]
\end{document}
I compile the above using lualatex and it gives no error.
>lualatex A.tex
This is LuaHBTeX, Version 1.16.0 (TeX Live 2023)
restricted system commands enabled.
(./A.tex
.....
It compiles and gives
Now I uncommented \usepackage{breqn} and now same lualatex command gives
/usr/local/texlive/2023/texmf-dist/tex/context/base/mkii/supp-pdf.mkii
[Loading MPS to PDF converter (version 2006.09.02).]
) (/usr/local/texlive/2023/texmf-dist/tex/latex/epstopdf-pkg/epstopdf-base.sty
(/usr/local/texlive/2023/texmf-dist/tex/latex/latexconfig/epstopdf-sys.cfg))
! Undefined control sequence.
<recently read> \
l.25 [
?
What am I doing wrong? Again, the above is just me learning how to load fonts to see how it is done. Why adding breqn gives an error? I have not even used the package yet.
Is there a workaround?
I am using this answer How to properly install and use a new font with LuaLaTeX? as reference.
TL 2023 on Linux

Path =/usr/local/texlive/2023/texmf-dist/fonts/opentype/public/qualitypeas it's the default path on texlive 2023so not needed in that system and it;s wrong everywhere else. – David Carlisle Dec 20 '23 at 00:35\setmathfontshould only be used with an OpenType Math font, bit you have used it with a text font. Do not ignorePackage unicode-math Warning: The first font loaded by unicode-math must be an (unicode-math) OpenType Math font (with script=math).nothing can work correctly with such a setting, with or without breqn. – David Carlisle Dec 20 '23 at 00:37