答案1
这可以通过 来实现picture
。\sum
符号实际上占据了边界框中存储的垂直尺寸的 90%。
\documentclass{article}
\usepackage{amsmath}
\usepackage{pict2e}
\makeatletter
\DeclareRobustCommand{\dplus}{\DOTSB\mathop{\dplus@}\slimits@}
\newcommand{\dplus@}{\vphantom{\sum}\mathpalette\dplus@@\relax}
\newcommand{\dplus@@}[2]{%
\begingroup
\sbox\z@{$#1\sum$}%
\unitlength=\dimexpr\ht\z@+\dp\z@\relax
\linethickness{%
\ifx#1\displaystyle 1.8\fontdimen8\textfont3 \else
\ifx#1\textstyle 1.2\fontdimen8\textfont3 \else
\ifx#1\scriptstyle 1.2\fontdimen8\scriptfont3 \else
1.3\fontdimen8\scriptscriptfont3 \fi\fi\fi}
\vcenter{\hbox{%
\begin{picture}(1,1)
\polygon(0.05,0.5)(0.5,0.05)(0.95,0.5)(0.5,0.95)
\Line(0.5,0.05)(0.5,0.95)
\Line(0.05,0.5)(0.95,0.5)
\end{picture}%
}}%
\endgroup
}
\makeatother
\begin{document}
\[
\dplus_{n=1}^N \sum_{n=1}^N
\]
\begin{center}% for text style
$\dplus_{n=1}^N \sum_{n=1}^N$ \\
$\scriptstyle \dplus_{n=1}^N \sum_{n=1}^N$ \\
$\scriptscriptstyle \dplus_{n=1}^N \sum_{n=1}^N$
\end{center}
\end{document}
\fontdimen8
3 族字体中的参数存储了当前样式(分数线、上划线、下划线)的默认规则粗细。