\documentclass{beamer}
\usepackage{amsmath}
\usepackage{graphicx}
\usepackage{tgheros}
\renewcommand\familydefault{\sfdefault}
\usepackage{mathastext}
%
\makeatletter
\mathchardef\standardplus=\mathcode`+
\DeclareRobustCommand{\tauyecoplus}{%
\mathbin{\mathpalette\tauyeco@plus\relax}%
}
\newcommand{\tauyeco@plus}[2]{
\raisebox{-0.1\height}{\scalebox{1.4}{\hspace{-0.1mm}$\m@th#1\standardplus$}}%
}
\begingroup\lccode`~=`+ \lowercase{\endgroup\let~}\tauyecoplus
\AtBeginDocument{\mathcode`+="8000 }
\makeatother
%
\begin{document}
\begin{frame}
\[+\]
\end{frame}
\end{document}
答案1
我做了\usepackage{MnSymbol}
:
\documentclass{beamer}
\usepackage{tgheros}
\usepackage{mathastext}
\usepackage{MnSymbol}
%
\makeatletter
\mathchardef\standardplus=\mathcode`+
\DeclareRobustCommand{\tauyecoplus}{%
\mathbin{\mathpalette\tauyeco@plus\relax}%
}
\newcommand{\tauyeco@plus}[2]{
\raisebox{-0.05\height}{\scalebox{1.4}{\hspace{-0.1mm}$\m@th#1\standardplus$}}%
}
\begingroup\lccode`~=`+ \lowercase{\endgroup\let~}\tauyecoplus
\AtBeginDocument{\mathcode`+="8000 }
\makeatother
%
\begin{document}
$$+$$
\end{document}
答案2
我已将宏的比例和位置调整\+
到您重新定义的+
。当然,可以通过更改指定的尺寸进行调整,因为它是由两个“圆形规则”叠加而成的,如roundrule
仅在此处找到的包中所定义:有没有 `\mathrule` 这样的东西?(圆形端盖)。在 pdflatex 中按原样工作。在 lualatex 中需要调整尺寸。在 xelatex 中不起作用。
MWE 以所有数学样式显示结果。
\documentclass{beamer}
\usepackage{amsmath}
\usepackage{graphicx}
\usepackage{tgheros}
\renewcommand\familydefault{\sfdefault}
\usepackage{mathastext}
%
\makeatletter
\mathchardef\standardplus=\mathcode`+
\DeclareRobustCommand{\tauyecoplus}{%
\mathbin{\mathpalette\tauyeco@plus\relax}%
}
\newcommand{\tauyeco@plus}[2]{
\raisebox{-0.1\height}{\scalebox{1.4}{\hspace{-0.1mm}$\m@th#1\standardplus$}}%
}
\begingroup\lccode`~=`+ \lowercase{\endgroup\let~}\tauyecoplus
\AtBeginDocument{\mathcode`+="8000 }
\makeatother
%
\usepackage{roundrule,stackengine,scalerel}
\renewcommand\scriptstyleScaleFactor{.83}
\renewcommand\scriptscriptstyleScaleFactor{.66}
\newcommand\+{\mathbin{\kern1pt\ThisStyle{\ensurestackMath{%
\stackinset{c}{}{c}{}{\roundrule[2.7\LMpt]{.8\LMpt}{6.5\LMpt}}%
{\roundrule[2.7\LMpt]{6.5\LMpt}{.8\LMpt}}}}\kern1pt}}
\begin{document}
\begin{frame}
\[{+}{\+}\quad\scriptstyle +\+\quad\scriptscriptstyle+\+\]
\end{frame}
\end{document}
当然,这可以设为默认加号,使用\mathcode
与 OP 相同的方法:
\documentclass{beamer}
\usepackage{roundrule,stackengine,scalerel}
\renewcommand\scriptstyleScaleFactor{.83}
\renewcommand\scriptscriptstyleScaleFactor{.66}
\newcommand\myplus{\mathbin{\kern1pt\ThisStyle{\ensurestackMath{%
\stackinset{c}{}{c}{}{\roundrule[2.7\LMpt]{.8\LMpt}{6.5\LMpt}}%
{\roundrule[2.7\LMpt]{6.5\LMpt}{.8\LMpt}}}}\kern1pt}}
\usepackage{amsmath}
\usepackage{graphicx}
\usepackage{tgheros}
\renewcommand\familydefault{\sfdefault}
\usepackage{mathastext}
%
\makeatletter
\begingroup\lccode`~=`+ \lowercase{\endgroup\let~}\myplus
\AtBeginDocument{\mathcode`+="8000 }
\makeatother
%
\begin{document}
\begin{frame}
\[a+b\quad\scriptstyle a+b\quad\scriptscriptstyle a+b\]
\end{frame}
\end{document}