14

I've seen that usually, the d'Alembertian is written using the command \Box, however, this displays a square with all sides identical. I would like to write it in this other way:

enter image description here

in which, the right and below sides are bolder, so that resembles more to the Laplacian symbol.

1
  • Thanks for the welcome! \square is indeed a better option since the scaling is better to the \Box, however, it still presents no difference in the strokes. Nov 9, 2018 at 17:11

4 Answers 4

15

Build a square with thicker lines the same size of \square:

\documentclass{article}
\usepackage{amsmath,amssymb}

\makeatletter
\newcommand{\dalembertian}{\mathop{\mathpalette\dalembertian@\relax}}
\newcommand{\dalembertian@}[2]{%
  \begingroup
  \sbox\z@{$\m@th#1\square$}%
  \dimen0=\fontdimen8
    \ifx#1\displaystyle\textfont\else
    \ifx#1\textstyle\textfont\else
    \ifx#1\scriptstyle\scriptfont\else
    \scriptscriptfont\fi\fi\fi3
  \makebox[\wd\z@]{%
    \hbox to \ht\z@{%
      \vrule width \dimen0
      \kern-\dimen0
      \vbox to \ht\z@{
        \hrule height \dimen0 width \ht\z@
        \vss
        \hrule height 2\dimen0
      }%
      \kern-2.5\dimen0
      \vrule width 2.5\dimen0
    }%
  }%
  \endgroup
}
\makeatother

\begin{document}

$\dalembertian = \mathop{{}\Delta}-\partial_0^2$

$\scriptstyle\dalembertian = \mathop{{}\Delta}-\partial_0^2$

$\scriptscriptstyle\dalembertian = \mathop{{}\Delta}-\partial_0^2$

{\Large$\dalembertian = \mathop{{}\Delta}-\partial_0^2$}

\end{document}

enter image description here

1
  • Thanks, this is exactly what I was looking for. Nov 12, 2018 at 17:13
11

To increase the boarder on two sides, you could use the \ding{113} symbol from pifont

\documentclass{article}

\usepackage{pifont}
\usepackage{amsmath}

\begin{document}

$\text{\ding{113}}  \Delta$

\end{document}

enter image description here

2
8

Just uses \rules. Then, \scalerel to make it match the height of \Delta.

\documentclass{article}
\usepackage{stackengine,scalerel}
\newcommand\dAlaux{%
  \Shortstack{\rule{12pt}{.6pt}\\
    \rule{.6pt}{10pt}\kern10pt\rule{1.4pt}{10pt}\\
    \rule{12pt}{1.4pt}}%
}
\newcommand\dAl{%
  \setstackgap{S}{0pt}%
  \setstackEOL{\\}%
  \scalerel*{\kern1pt\dAlaux\kern1pt}{\Delta}%
}
\begin{document}
$\dAl = \Delta - \partial_0^2,\quad \phi\dAl\phi e^{\phi\dAl\phi}$
\end{document}

enter image description here

A slightly thicker version, by adjusting the \rule dimensions...

\documentclass{article}
\usepackage{stackengine,scalerel}
\newcommand\dAlaux{%
  \Shortstack{\rule{11pt}{.7pt}\\
    \rule{.7pt}{9pt}\kern9pt\rule{1.3pt}{9pt}\\
    \rule{11pt}{1.35pt}}%
}
\newcommand\dAl{%
  \setstackgap{S}{0pt}%
  \setstackEOL{\\}%
  \scalerel*{\kern1pt\dAlaux\kern1pt}{\Delta}%
}
\begin{document}
$\dAl = \Delta - \partial_0^2,\quad \phi\dAl\phi e^{\phi\dAl\phi}$
\end{document}

enter image description here

5

Here's a version using scalebox and overlapping three copies of \square so that the thickness can be tweaked. The thickness can be changed by increasing or reducing the second argument to \add@dalemb.

For instance, with 03 and 06:

enter image description here

and with 05 and 10:

enter image description here

Thicker than this, another \add@dalemb would be needed to avoid white spaces between the \squares.

\documentclass[a4paper,12pt]{article}

\usepackage{amssymb}
\usepackage{graphicx}

\makeatletter
\DeclareRobustCommand\dalemb{\mathpalette\inner@dalemb{}}
\def\inner@dalemb#1{%
  \add@dalemb#1{03}%
  \add@dalemb#1{06}%
  \square
}
\def\add@dalemb#1#2{%
  \sbox0{\scalebox{1.#2}{$#1\square$}}%
  \rlap{\lower0.#2\ht0\box0}%
}
\makeatother

\begin{document}

\[ \Delta\dalemb \]
\[ \partial^{\Delta\dalemb} \]
\[ \partial^{\partial^{\Delta\dalemb}} \]

\end{document}

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .