0

I need to draw a diamond with a plus sign in the center and then be able to add limits to it, as shown in the figure.

fig1

I need to create one diamond big and bold and another one small and not bold, such that it would follow the same structure of \bigotimes and \otimes:

fig2

I'm using the tikz package to create it. However, the indexes are not placed correctly:

fig3

I saw other similar questions, but it doesn't work properly in my case. Does anyone have a suggestion?

1 Answer 1

5

This can be achieved with a picture. The \sum symbol actually occupies 90% of its vertical size as stored in the bounding box.

\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}

The parameter \fontdimen8 in the font of family 3 stores the default rule thickness for the current style (fraction line, overline, underline).

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.