1

I have using LuaLaTeX Version 1.12.0 and i want all the display-math font should be in STIX fonts. How to achieve this.

I have need to achieve this when using lualatex-math font.

    \documentclass{article}
    \usepackage{amsmath,hyperref,fontspec,luacolor,lualatex-math}
    \setmainfont{Arial Unicode MS}
    \begin{document}
    \title{Article Title Here}
    \author{Author Here}
    \maketitle
\section{Introduction}

The investigations of cylindrically symmetric spacetimes can be traced back as far as to 1919 when Levi-Civita (LC) discovered a class of solutions of Einstein’s vacuum field equations, corresponding to static cylindrical spacetimes [\href{cqgab7bbabib1}{\textcolor{blue}{1}}].
\begin{align*}{\frac{G\mathrm{μ}}{{{c}^{{2}}}}}=\mathcal{O}{\left({{\frac{{{E}^{{2}}}}{{{M}_{pl}^{{2}}}}}}\right)},\tag{1.1}\end{align*}
where ${{{M}_{pl}}{\left({≡{\mathrm{ℏ}c/G}}\right)}}$ denotes the Planck mass.
\begin{thebibliography}{000}
\bibitem{cqgab7bbabib1}{Aasi Jet alLIGO Scientific and VIRGO Collaborations (2014) Constraints on cosmic strings from the LIGO-Virgo gravitational-wave detectors\textit{Phys. Rev. Lett.} \textcolor{blue}{\textbf{112}} } 

\bibitem{cqgab7bbabib2}{Abbott B Pet alLIGO and Virgo Collaborations (2016) Astrophysical implications of the binary black hole merger GW150914\textit{Astrophys. J. Lett.} \textcolor{blue}{\textbf{818}} } \end{thebibliography} \end{document}

How to achieve this?

Balaji
  • 2,282
  • 4
    lualatex-math is not for fonts (and in a current tex system you don't need it at all), you need the unicode-math package if you want to use an unicode math font. – Ulrike Fischer Oct 20 '20 at 13:15

1 Answers1

2

As @UlrikeFischer has pointed out in a comment, lualatex-math is not suitable for loading fonts. In fact, if your TeX distribution is reasonably up to date, there's no reason for loading lualatex-math at all.

You mention that you want to use Stix fonts for math. Stix is a clone of Times Roman, but it hasn't been updated for quite a while. Instead of Stix, I suggest you use XITS/XITS Math, Stix Two Text/Stix Two Math, or the newtxtext/newtxmath pair.

One of the following three sets of instructions should work for you:

\usepackage[no-math]{fontspec}
\usepackage{newtxtext,newtxmath}

or

\usepackage{unicode-math}
\setmainfont{XITS}
\setmathfont{XITS Math}

or

\usepackage{unicode-math}
\setmainfont{Stix Two Text}
\setmathfont{Stix Two Math}

Aside: I can't help but make some comments about your code: You seem to be unusually eager to use curly braces in math mode. That said, I cannot see a good reason for writing

${{{M}_{pl}}{\left({≡{\mathrm{ℏ}c/G}}\right)}}$

when

$M_{pl}$ ($≡ℏc/G$)

produces the same output and does so without any code clutter.

Similarly, do consider replacing

{\frac{G\mathrm{μ}}{{{c}^{{2}}}}}=\mathcal{O}{\left({{\frac{{{E}^{{2}}}}{{{M}_{pl}^{{2}}}}}}\right)}

with

\frac{G\symup{μ}}{c^2} = \mathcal{O}\left(\frac{E^2}{M_{pl}^2}\right)

Addendum to address the OP's follow-up posting: Since your document loads the hyperref package, I would replace

[\href{cqgab7bbabib1}{\textcolor{blue}{1}}]

with

\cite{cqgab7bbabib1} 

In addition, I'd replace

\begin{thebibliography}{000}
\bibitem{cqgab7bbabib1}{Aasi Jet alLIGO Scientific and VIRGO Collaborations (2014) Constraints on cosmic strings from the LIGO-Virgo gravitational-wave detectors\textit{Phys. Rev. Lett.} \textcolor{blue}{\textbf{112}} }

\bibitem{cqgab7bbabib2}{Abbott B Pet alLIGO and Virgo Collaborations (2016) Astrophysical implications of the binary black hole merger GW150914\textit{Astrophys. J. Lett.} \textcolor{blue}{\textbf{818}} } \end{thebibliography}

with

\begin{thebibliography}{9}

\bibitem{cqgab7bbabib1}%{ Aasi J et al, LIGO Scientific and VIRGO Collaborations (2014) Constraints on cosmic strings from the LIGO-Virgo gravitational-wave detectors. \textit{Phys. Rev. Lett.} %\textcolor{blue}{\textbf{112}}}

\bibitem{cqgab7bbabib2}%{ Abbott B P et al, LIGO and Virgo Collaborations (2016) Astrophysical implications of the binary black hole merger GW150914. \textit{Astrophys. J. Lett.}
%\textcolor{blue}{\textbf{818}}}

\end{thebibliography}

Observe, in particular, that I replaced Aasi Jet alLIGO with Aasi J et al, LIGO and Abbott B Pet alLIGO with Abbott B P et al, LIGO. These changes should make it a lot easier to actually comprehend what's written.


Summing up, here is how I would rewrite your example to make it more efficient.

enter image description here

\documentclass{article}
\usepackage{amsmath,luacolor}
\usepackage{hyperref}
\hypersetup{colorlinks,citecolor=blue}
\usepackage{unicode-math}
\setmainfont{Stix Two Text}
\setmathfont{Stix Two Math}

\begin{document} \title{Article Title Here} \author{Author Here} \maketitle

\section{Introduction}

The investigations of cylindrically symmetric spacetimes can be traced back as far as to 1919 when Levi-Civita (LC) discovered a class of solutions of Einstein's vacuum field equations, corresponding to static cylindrical spacetimes \cite{cqgab7bbabib1}. \begin{equation} \frac{G\symup{μ}}{c^2} = \mathcal{O}\biggl(\frac{E^2}{M_{pl}^2}\biggr),,\tag{1.1} \end{equation} where $M_{pl}$ ($≡ℏc/G$) denotes the Planck mass.

\begin{thebibliography}{9}

\bibitem{cqgab7bbabib1}%{ Aasi J et al, LIGO Scientific and VIRGO Collaborations (2014) Constraints on cosmic strings from the LIGO-Virgo gravitational-wave detectors. \textit{Phys. Rev. Lett.} %\textcolor{blue}{\textbf{112}}}

\bibitem{cqgab7bbabib2}%{ Abbott B P et al, LIGO and Virgo Collaborations (2016) Astrophysical implications of the binary black hole merger GW150914. \textit{Astrophys. J. Lett.}
%\textcolor{blue}{\textbf{818}}}

\end{thebibliography} \end{document}

Mico
  • 506,678
  • 1
    The PDFTeX example should load \usepackage{stix} or \usepackage{stix2} to get the STIX fonts 1.0 or 2.0. – Davislor Oct 20 '20 at 17:42
  • @Mico: I want to use [\href{cqgab7bbabib1}{\textcolor{blue}{1}}]. Because i don't want to use \cite command in LaTeX. How to hyperlink with Bib Cross-Ref to Bib ID? Please advise. – Balaji Oct 20 '20 at 17:52
  • @Balaji - How do you create the bibliography at present? Entirely by Hand? Or with the help of a software tool? – Mico Oct 20 '20 at 18:54
  • @Balaji - Please also elaborate on what's keeping you from using \cite. It looks like you wish to use numeric-style citation call-outs. If the hyperref package is loaded, citation call-outs will automatically be made into hypertargets to the corresponding entries in the bibliography. – Mico Oct 20 '20 at 20:57
  • @Mico: I have converting XML to LaTeX using Lua Script. I have not needed auto generation bibliography and want to maintain XML texts in LaTeX. So that Lua script is using. I have needed when clicking bibliography citation is need to go for bibliography ID. How to achieve this? – Balaji Oct 21 '20 at 05:40
  • @Balaji - I'm afraid I don't understand what "I have needed when clicking bibliography citation is need to go for bibliography ID" is supposed to entail. Please elaborate. You also said that you are converting an XML document to LaTeX -- is there some hyperlinking information associated with the individual formatted bibliographic entries? Is that what cqgab7bbabib1 in \href{cqgab7bbabib1}{\textcolor{blue}{1}} refers to? – Mico Oct 21 '20 at 05:42
  • 1
    @Mico: XML Code is [<xref ref-type="bibr" rid="cqgab7bbabib1">1</xref>] its converted to LaTeX is [\href{cqgab7bbabib1}{\textcolor{blue}{1}}]. When i have click [1] its need to go respective bibliography place \bibitem{cqgab7bbabib1}{Aasi Jet alLIGO Scientific and VIRGO Collaborations like LaTeX. I have updated my question also. – Balaji Oct 21 '20 at 08:59
  • @Balaji - Please see the addendum I posted a few minutes ago, – Mico Oct 21 '20 at 10:11
  • @Mico: I don't want to use \cite tag when converting XML to LaTeX. Because when using \cite tag in LaTeX text will auto-generate. I need to avoid this. So that i have used \href tag. But when clicking [\\href{cqgab7bbabib1}{\textcolor{blue}{1}}] it's not going relevant bibliography part. I want the \cite options in different LaTeX coding. – Balaji Oct 21 '20 at 10:33
  • My abject apologies, but I have no idea what "when using \cite tag in LaTeX text will auto-generate" might mean. Anyway, this site works best if each posting contains just one question; yours contains more than two. Since you disagree with the views I expressed in my answer, you may want to think about posting a new query, to focus on just the ctation call-out issue, explain your setup in greater detail, and explain why you wish to create citation call-outs without using \cite directives. (Maybe you will also explain why "Aasi Jet alLIGO..." is preferable to "Aasi J et al, LIGO...".) – Mico Oct 21 '20 at 10:46
  • 1
    @Mico: I have posted new questions https://tex.stackexchange.com/questions/567768/without-cite-command-reference-with-reference-id-hyperlink – Balaji Oct 21 '20 at 16:25