[Tex/LaTex] How to change the font of math operators, e.g. plus and minus

math-operatorsnewtxmathsymbols

I use the Linux Libertine font together with the newtxmath package to get matching math. I discovered though that math operators, e.g. minus and plus and others, are not taken from Linux Libertine. How could this be achieved, meaning that all relevant glyphs of Linux Libertine (e.g. minus and plus signs, plusminus, etc.) would be used in math?

I have a partly working example taken from How to redefine the “plus” symbol?, but I can't place the relevant code block multiple times with a different symbol each time, this would lead to errors (many Missing $ inserted $+ and finally TeX capacity exceeded, sorry [grouping levels=255] $+). The MWE has the second code block commented out so it compiles.

How to expand the given solution for more symbols or how to do this with a different approach, with pdftex?

\documentclass{standalone}

\usepackage{libertine}
\usepackage[libertine]{newtxmath}  
\usepackage{textcomp}

\begingroup
\catcode`-=\active
\gdef-{\mathbin{\text{\textminus}}}
\endgroup
\AtBeginDocument{\mathcode`-="8000 }

%\begingroup
%\catcode`+=\active
%\gdef+{\mathbin{\text{+}}}
%\endgroup
%\AtBeginDocument{\mathcode`+="8000 }

\begin{document}
$+-\pm$ +\textminus\textpm
\end{document}

symbols

Best Answer

I don't see why it should be needed to make the chars math active.

\documentclass{standalone}

\usepackage{libertine}
\usepackage[libertine]{newtxmath}

\usepackage{textcomp}
\DeclareSymbolFont{operatorsB}{TS1}{\rmdefaultB}{m}{n}
\DeclareMathSymbol{+}{\mathbin}{operators}{43}
\DeclareMathSymbol{-}{\mathbin}{operatorsB}{61}
\DeclareMathSymbol{\pm}{\mathbin}{operatorsB}{177}


\begin{document}

$+-\pm$ +\textminus\textpm
\end{document}

enter image description here