I am using TexLive 2016 with LuaTeX on Linux, but I believe that my question is generally applicable to LaTeX on any platform. I cannot switch to XeTeX. Before coming here, I found Is there a way to detect from inside a package that MiKTeX is used? but it did not reassure me.
Using fontspec and unicode-math I have \setmathfont{Asana Math}. This works. No problem there. My question:
My TeX system was installed with only the packages I needed at the time. So I use tlmgr to get others. It turns out that the correct package is neither asana nor asana-math nor Asana-math. It is only Asana-Math, with capital A and M. Take it or leave it.
According to CTAN, in MiKTeX the package name is asana-math. Lowercase a and m. Does this mean that if I transport my documents to a MiKTeX system, they will be unable to find what I need? Or, is MiKTeX case-insensitive when it comes to detecting package names and automatically getting them?
If there is a case-sensitivity problem between the distributions, then is there a reliable way to know which one is in use, from within the TeX document? So, a shell command won't work. Looking at the full banner might not work, since that seems to change from time to time.
Ideally a solution would look something like this pseudo-code:
\IfPackageExists{Asana-Math} % not necessarily installed
\usepackage{Asana-Math} % if not installed, get it or error message
\else
\IfPackageExists{asana-math} % not necessarily installed
\usepackage{asana-math} % if not installed, get it or error message
\else
% some suitable error message
\fi\fi
\usepackage{asana-math}at all with any case you just use unicode-math and refer to the font by name. – David Carlisle Nov 19 '16 at 21:47\setmathfont{Asana Math}in your question??? – David Carlisle Nov 19 '16 at 21:53\usepackage{…}). – Bernard Nov 19 '16 at 22:11