A problem is that \textbeta
gets redefined, so the definition performed by textgreek
is lost. Moreover, the Latin Modern fonts don't support Greek.
Here is a hack, I guess there are better ways to do it.
\documentclass{article}
\usepackage[LGR]{fontenc}
\usepackage{chemmacros}
\protected\def\Chembeta{\text{\fontencoding{LGR}\fontfamily{cmr}\selectfont b}}
\usepackage{fontspec}
\usepackage{newunicodechar}
\newunicodechar{β}{\Chembeta}
\begin{document}
\iupac{\b-carotene} % works
\iupac{β-carotene} % works
β % works
\Chembeta % works
$\beta$ % works
\end{document}

A more complete setting, for the Latin Modern fonts only can be obtained generalizing and streamlining the above hack:
\documentclass{article}
\usepackage[LGR]{fontenc}
\usepackage{chemmacros}
\usepackage{newunicodechar}
\usepackage{fontspec}
\ExplSyntaxOn
\cs_set_protected:Npn \egchemmacros_lgr_greek:n #1
{
\mbox{\fontencoding{LGR}\fontfamily{cmr}\selectfont#1}
}
\cs_set_protected:Npn \Chemalpha{\egchemmacros_lgr_greek:n{a}}
\cs_set_protected:Npn \Chembeta{\egchemmacros_lgr_greek:n{b}}
\cs_set_protected:Npn \Chemgamma{\egchemmacros_lgr_greek:n{g}}
\cs_set_protected:Npn \Chemdelta{\egchemmacros_lgr_greek:n{d}}
\cs_set_protected:Npn \Chemepsilon{\egchemmacros_lgr_greek:n{e}}
\cs_set_protected:Npn \Chemeta{\egchemmacros_lgr_greek:n{h}}
\cs_set_protected:Npn \Chemkappa{\egchemmacros_lgr_greek:n{k}}
\cs_set_protected:Npn \Chemmu{\egchemmacros_lgr_greek:n{m}}
\cs_set_protected:Npn \Chemnu{\egchemmacros_lgr_greek:n{n}}
\cs_set_protected:Npn \Chempi{\egchemmacros_lgr_greek:n{p}}
\cs_set_protected:Npn \Chemrho{\egchemmacros_lgr_greek:n{r}}
\cs_set_protected:Npn \Chemsigma{\egchemmacros_lgr_greek:n{s}}
\cs_set_protected:Npn \Chemomega{\egchemmacros_lgr_greek:n{w}}
\cs_set_protected:Npn \ChemDelta{\egchemmacros_lgr_greek:n{D}}
\newunicodechar{α}{\bool_if:NTF \l_chemmacros_inside_iupac_bool {\Chemalpha}{α}}
\newunicodechar{β}{\bool_if:NTF \l_chemmacros_inside_iupac_bool {\Chembeta}{β}}
\newunicodechar{γ}{\bool_if:NTF \l_chemmacros_inside_iupac_bool {\Chemgamma}{γ}}
\newunicodechar{δ}{\bool_if:NTF \l_chemmacros_inside_iupac_bool {\Chemdelta}{δ}}
\newunicodechar{ε}{\bool_if:NTF \l_chemmacros_inside_iupac_bool {\Chemepsilon}{ε}}
\newunicodechar{η}{\bool_if:NTF \l_chemmacros_inside_iupac_bool {\Chemeta}{η}}
\newunicodechar{κ}{\bool_if:NTF \l_chemmacros_inside_iupac_bool {\Chemkappa}{κ}}
\newunicodechar{μ}{\bool_if:NTF \l_chemmacros_inside_iupac_bool {\Chemmu}{μ}}
\newunicodechar{ν}{\bool_if:NTF \l_chemmacros_inside_iupac_bool {\Chemnu}{ν}}
\newunicodechar{π}{\bool_if:NTF \l_chemmacros_inside_iupac_bool {\Chempi}{π}}
\newunicodechar{ρ}{\bool_if:NTF \l_chemmacros_inside_iupac_bool {\Chemrho}{ρ}}
\newunicodechar{σ}{\bool_if:NTF \l_chemmacros_inside_iupac_bool {\Chemsigma}{σ}}
\newunicodechar{ω}{\bool_if:NTF \l_chemmacros_inside_iupac_bool {\Chemomega}{ω}}
\newunicodechar{Δ}{\bool_if:NTF \l_chemmacros_inside_iupac_bool {\ChemDelta}{Δ}}
\ExplSyntaxOff
\begin{document}
\iupac{\b-carotene} % works
\iupac{β-carotene} % works
β % doesn't work - Latin Modern has no beta
\Chembeta % works
$\beta$ % works fine
\iupac{αβγδεηκμνπρσωΔ} % works
\iupac{\a\b\g\d\k\m\n\w}
\end{document}

\b
,\Chembeta
and$beta$
) except withβ
character (no error and no glyph!).\iupac{\b-carotene}
works for me. May be you should go for update?aux
file got in the way during testing, since I was playing with many configurations and fonts. I'm indeed looking for the upright beta. I'm updating the question to include the option[greek=textgreek]
in thechemmacros
package, which should display an upright beta.textgreek
in LuaLaTeX withfontspec
, as, for example,\textbeta
gets redefined.