Experienced coder but newbie on latex, I can't wrap my head around the way font and font packages behaves !
I would be glad to have a working snippet, but if you have some generic advises about the philosophy of the system, I take.
I'm trying to use the cochineal font for all text, and the stix2 font for all math. My first attempt was :
\documentclass{article}
\usepackage{amsmath}
\usepackage{cochineal}
\setmathfont(STIX2Math.otf)
\usepackage[T1]{fontenc}
where I got:
! Undefined control sequence.
<recently read> \setmathfont
l.7 \setmathfont
(STIX2Math.otf)
which seems strange, since this control sequence is used by me on numerous other templates! So I tried some other random combinations, and also black magic, and rabbit paws, in vain.
How can I set a math font and a text font? How does fallback works? Where do the Latin and Greek letters come from in math, from the main font? And about unicode-math
should I still use \usepackage[T1]{fontenc}
with it? And what's the logic here?