libertine-newtxmath 一些符号

libertine-newtxmath 一些符号

我正在使用libertinenewtxmath实际上它非常好,但有些符号对我来说似乎不太好,如图所示。 在此处输入图片描述

我可以使用如下所示的这些符号的不同字体而不改变其他字体吗?(这些来自mathpazo。)

在此处输入图片描述

\documentclass{article}
\usepackage[english]{babel}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage[lining]{libertine}
\usepackage[libertine,cmintegrals]{newtxmath}
\usepackage{ucs}
\usepackage{amsfonts,amsmath,amssymb}
\usepackage{graphicx}
%------------TIKZ-PGF----------------
\usepackage{tikz,pgf,pgfplots}
\pgfplotsset{compat=1.10}
\usepgfplotslibrary{fillbetween}
\usetikzlibrary{shapes.multipart}
\usetikzlibrary{patterns}
%---------------------------------

\begin{document}

\[
f\left(  \mathbf{x}|\theta\right)  =\underset{h\left(  \mathbf{x}\right)
}{\underbrace{1}}\cdot\underset{g_{1}\left(  T\left(  \mathbf{X}_{1}\right)
|\mu\right)  }{\underbrace{\left(  2\pi\sigma^{2}\right)  ^{-n/2}\exp\left[
-\frac{n\left(  \overline{x}-\mu\right)  ^{2}}{2\sigma^{2}}\right]  }%
}\underset{g_{2}\left(  T\left(  \mathbf{X}_{2}\right)  |\sigma\right)
}{\underbrace{\exp\left[  \frac{-1}{2\sigma^{2}}\sum\left(  x_{i}-\overline
{x}\right)  ^{2}\right]  }}%
\]
\[\sqrt{\exp\left[  \frac{-1}{2\sigma^{2}}\sum\left(  x_{i}-\overline
{x}\right)  ^{2}\right]}\]

$\forall\exists= \pm+-$
\end{document}

答案1

在序言末尾添加以下内容即可解决问题:

\DeclareSymbolFont{mysymbols}     {OMS}{cmsy}{m}{n}
\SetSymbolFont{mysymbols}  {bold}{OMS}{cmsy}{b}{n}
\DeclareSymbolFont{myoperators}   {OT1}{cmr} {m}{n}
\SetSymbolFont{myoperators}{bold}{OT1}{cmr} {bx}{n}
\DeclareMathSymbol{\forall}{\mathord}{mysymbols}{"38}
\DeclareMathSymbol{\exists}{\mathord}{mysymbols}{"39}
\DeclareMathSymbol{\pm}{\mathbin}{mysymbols}{"06}
\DeclareMathSymbol{+}{\mathbin}{myoperators}{"2B}
\DeclareMathSymbol{-}{\mathbin}{mysymbols}{"00}
\DeclareMathSymbol{=}{\mathrel}{myoperators}{"3D}

以下是完整的 MWE:

\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage[lining]{libertine}
\usepackage[libertine,cmintegrals]{newtxmath}
% \usepackage{ucs}% not compatible with utf8 inputenc - see output!
\usepackage{amsfonts,amsmath,amssymb}
\DeclareSymbolFont{mysymbols}     {OMS}{cmsy}{m}{n}
\SetSymbolFont{mysymbols}  {bold}{OMS}{cmsy}{b}{n}
\DeclareSymbolFont{myoperators}   {OT1}{cmr} {m}{n}
\SetSymbolFont{myoperators}{bold}{OT1}{cmr} {bx}{n}
\DeclareMathSymbol{\forall}{\mathord}{mysymbols}{"38}
\DeclareMathSymbol{\exists}{\mathord}{mysymbols}{"39}
\DeclareMathSymbol{\pm}{\mathbin}{mysymbols}{"06}
\DeclareMathSymbol{+}{\mathbin}{myoperators}{"2B}
\DeclareMathSymbol{-}{\mathbin}{mysymbols}{"00}
\DeclareMathSymbol{=}{\mathrel}{myoperators}{"3D}

\begin{document}

\[
f\left(  \mathbf{x}|\theta\right)  =\underset{h\left(  \mathbf{x}\right)
}{\underbrace{1}}\cdot\underset{g_{1}\left(  T\left(  \mathbf{X}_{1}\right)
|\mu\right)  }{\underbrace{\left(  2\pi\sigma^{2}\right)  ^{-n/2}\exp\left[
-\frac{n\left(  \overline{x}-\mu\right)  ^{2}}{2\sigma^{2}}\right]  }%
}\underset{g_{2}\left(  T\left(  \mathbf{X}_{2}\right)  |\sigma\right)
}{\underbrace{\exp\left[  \frac{-1}{2\sigma^{2}}\sum\left(  x_{i}-\overline
{x}\right)  ^{2}\right]  }}%
\]
\[\sqrt{\exp\left[  \frac{-1}{2\sigma^{2}}\sum\left(  x_{i}-\overline
{x}\right)  ^{2}\right]}\]

$\forall \exists \pm = + -$
\end{document}

ucs请注意,与结合[utf8]{inputenc}会在输出中产生警告。我在ucs这里已注释掉,但请参阅编译输出以了解其他选项。

结果:

调整数学

相关内容