15

I want to create a math symbol of the following form--

enter image description here

such that I would be able to change the value of i, i.e., it will be an external input to the function defined.

Any help is highly appreciated.

3

4 Answers 4

24

Here's one way that works across math scripts.

I have used \mathord to make it act as a variable (or constant) in terms of spacing. If it was an operator of some sort, the \mathord could be changed to \mathbin or \mathrel, as appropriate.

\documentclass{article}
\usepackage{amsmath,scalerel,stackengine}
\newcommand\mysym{\mathord{\ThisStyle{\ensurestackMath{%
  \stackinset{c}{-.25\LMpt}{c}{-1\LMpt}{\SavedStyle\cdot}{\SavedStyle\Delta}%
}}}}
\begin{document}
$\mysym_i = 0$

$\scriptstyle\mysym_j = 1$

$\scriptscriptstyle\mysym_k = 2$
\end{document}

enter image description here

If you preferred an actual triangle, rather than a Greek \Delta, then this:

\documentclass{article}
\usepackage{amsmath,scalerel,stackengine}
\newcommand\mysym{\mathord{\ThisStyle{\ensurestackMath{%
  \stackinset{c}{}{c}{}{\SavedStyle\cdot}{\SavedStyle\triangle}%
}}}}
\begin{document}
$\mysym_i = 0$

$\scriptstyle\mysym_j = 1$

$\scriptscriptstyle\mysym_k = 2$
\end{document}

enter image description here

11

The logix package (requires an unicode-aware engine like lualatex) has a similar symbol:

% !TeX TS-program = lualatex
\documentclass{article}

\usepackage{logix}

\begin{document}

\[
  \LogNonCont_i
\]

\[
  \DottedUpTriangle_i
\]

\end{document}

enter image description here

10

With the standard fonts:

\documentclass{article}
\usepackage{amsmath}

\makeatletter
\newcommand{\triangledot}{\mathord{\mathpalette\triangledot@\relax}}
\newcommand{\triangledot@}[2]{%
  \ooalign{$\m@th#1\triangle$\cr\hidewidth$\m@th#1\cdot$\hidewidth\cr}%
}
\makeatother

\begin{document}

$x+\triangledot_{i}+y$

$\scriptstyle x+\triangledot+y$

\end{document}

enter image description here

I tested it also with fourier, but with NewTX or kpfonts the result is not satisfying.

\documentclass{article}
\usepackage{newtx}
\usepackage{amsmath}

\makeatletter
\newcommand{\triangledot}{\mathord{\mathpalette\triangledot@\relax}}
\newcommand{\triangledot@}[2]{%
  \vphantom{\triangle}%
  \ooalign{%
    \hidewidth\raisebox{-0.2\height}[0pt][0pt]{$\m@th#1\cdot$}\hidewidth\cr
    $\m@th#1\triangle$\cr
  }%
}
\makeatother

\begin{document}

$x+\triangledot_{i}+y$

$\scriptstyle x+\triangledot+y$

\end{document}

enter image description here

The same code works for kpfonts:

enter image description here

If you use a different math font, experiment different amounts of raising(or lowering) on the basis of the second version.

0
10

In the set font stix there is a triangle with dot. You can import only the symbol \trianglecdot. The code is with the default font of Computer Modern=CM is:

\documentclass[a4paper,12pt]{article}
\DeclareFontEncoding{LS1}{}{}
\DeclareFontEncoding{LS2}{}{\noaccents@}
\DeclareFontSubstitution{LS1}{stix}{m}{n}
\DeclareFontSubstitution{LS2}{stix}{m}{n}
\DeclareSymbolFont{arrows3}       {LS2}{stixtt}   {m} {n}
\DeclareMathSymbol{\trianglecdot}{\mathord}{arrows3}{"8B}
\begin{document}

$\trianglecdot_i$ symbol is taken from the STIX font. The other font is the default CM.
\[\trianglecdot_i(x,y)=\sum m(i)_{\trianglecdot}(x^2+y^2)\]

\end{document}

enter image description here

You must log in to answer this question.

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