come impostare mathfont usando lualatex-math - lualatex

Oct 20 2020

Ho usato LuaLaTeX Version 1.12.0e voglio che tutti i display-mathcaratteri siano in STIXcaratteri. Come ottenerlo.

Ho bisogno di raggiungere questo obiettivo quando uso il lualatex-mathcarattere.

    \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}

Come ottenerlo?

Risposte

2 Mico Oct 20 2020 at 16:25

Come ha sottolineato @UlrikeFischer in un commento, lualatex-mathnon è adatto per caricare i caratteri. Infatti, se la tua distribuzione TeX è ragionevolmente aggiornata, non c'è alcun motivo per caricarla lualatex-math.

Hai detto che vuoi usare i caratteri Stix per la matematica. Stix è un clone di Times Roman, ma non è stato aggiornato da molto tempo. Invece di Stix, ti suggerisco di usare XITS/XITS Math, Stix Two Text/Stix Two Matho la newtxtext/newtxmathcoppia.

Uno dei seguenti tre set di istruzioni dovrebbe funzionare per te:

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

o

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

o

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

A parte : non posso fare a meno di fare alcuni commenti sul tuo codice: sembri essere insolitamente desideroso di usare le parentesi graffe in modalità matematica. Detto questo, non vedo una buona ragione per scrivere

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

quando

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

produce lo stesso output e lo fa senza alcun ingombro di codice.

Allo stesso modo, prendi in considerazione la sostituzione

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

con

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

Addendum per affrontare il post di follow-up dell'OP: poiché il tuo documento carica il hyperrefpacchetto, lo sostituirei

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

con

\cite{cqgab7bbabib1} 

Inoltre, sostituirei

\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}

con

\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}

Si noti, in particolare, che ho sostituito Aasi Jet alLIGOcon Aasi J et al, LIGOe Abbott B Pet alLIGOcon Abbott B P et al, LIGO. Queste modifiche dovrebbero rendere molto più semplice la comprensione effettiva di ciò che è scritto.


Riassumendo, ecco come riscriverei il tuo esempio per renderlo più efficiente.

\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}