@HeXintong Please find attached version with this and that patch incorporated. Can you check if it works for you?
I've been using this font for some time. It works well. For example last time I checked Euler font did not have some of the glyphs I need, and some fonts were harder on my eyes. Asana Math is Palantino-like font. In pdflatex mathpazo package provides Palantino-like font.
For this one need to edit TexMaths-0.46.oxt/TexMaths/TexMathsEquations.xba file and to move "\begin{document}" & chr(10) &_ line to the top: If sEqType = "inline" Then sLatexCode = "\begin{document}" & chr(10) &_ "\newsavebox{\eqbox}" & chr(10) &_ "\newlength{\width}" & chr(10) &_ "\newlength{\height}" & chr(10) &_ "\newlength{\depth}" & chr(10) & chr(10) &_ "\begin{lrbox}{\eqbox}"...
For this one need to edit TexMaths-0.46.oxt/TexMaths/TexMathsEquations.xba file and to move "\begin{document}" & chr(10) &_ line to the top: If sEqType = "inline" Then sLatexCode = "\begin{document}" & chr(10) &_ "\newsavebox{\eqbox}" & chr(10) &_ "\newlength{\width}" & chr(10) &_ "\newlength{\height}" & chr(10) &_ "\newlength{\depth}" & chr(10) & chr(10) &_ "\begin{lrbox}{\eqbox}"...
For this one need to edit TexMaths-0.46.oxt/TexMaths/TexMathsEquations.xba file and to move "\begin{document}" & chr(10) &_ line to the top: ~~~ If sEqType = "inline" Then sLatexCode = "\begin{document}" & chr(10) &_ "\newsavebox{\eqbox}" & chr(10) &_ "\newlength{\width}" & chr(10) &_ "\newlength{\height}" & chr(10) &_ "\newlength{\depth}" & chr(10) & chr(10) &_ "\begin{lrbox}{\eqbox}"...
Turns out one have to \begin{document} before the math environment is fully set-up: \documentclass[10pt]{article} \usepackage{amsmath} \usepackage{amssymb} \usepackage{mathtools} \usepackage{fontspec} \usepackage{unicode-math} \setmathfont{Asana Math} \usepackage[usenames]{color} \pagestyle{empty} \newsavebox{\eqbox} \begin{document} \begin{lrbox}{\eqbox} {$\sum x $} \end{lrbox} \newlength{\width} \newlength{\height} \newlength{\depth} \settowidth {\width} {\usebox{\eqbox}} \settoheight{\height}...
usebox somehow breaks Asana Math font