I would like to use a specific symbol, a triangle with a middle line, as a mathematical operator. Here is roughly how the symbol ought to look like:
[This was generated with tikz
by appropriating the answer by Heiko Oberdiek to the question Harry Potter symbols].
My intended usage has nothing to do with Harry Potter, instead I would like to use it as a unary mathematical operator that behaves well with subscripts, for instance.
Intended syntax
Ideally, I would define a command \triangleline
which gives the symbol along with some code that ensures it behaves well in common mathematical environments. After this, I would define \trilineop
\newcommand{\trilineop}[1]{\operatorname{\triangleline_\mathrm{e}}{\left(#1\right)}}
for use in my document.
But I am not sure how to go about this, whether this is a good plan, or what would be a better plan.
Maybe there's a neat way to build this symbol out of \triangle
somehow?
(Use of \Delta
in undesired because the triangle sides are asymmetric in many fonts).
Here is an example environment which might help as a starting point.
\documentclass{beamer}
\usepackage[english]{babel}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{mathtools}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{amsfonts}
\usepackage{tikz}
%Code here to define \triangleline
%%
%%
\newcommand{\trilineop}[1]{\operatorname{\triangleline_\mathrm{e}}{\left(#1\right)}}
\begin{document}
\begin{frame}{}
$$\trilineop{\boldsymbol{A}}$$
\end{frame}
\end{document}
Here is the tikz
code mentioned earlier used to generate the example image. (I used this as a black box).
\begin{tikzpicture}[baseline=0]
\def\a{1cm}
\pgfmathsetlengthmacro\radius{\a/2 * tan(30)}
\draw[thick]
(0, 0) -- (60:\a) -- (\a, 0) -- cycle
(\a/2, 0) -- (60:\a)
;
\end{tikzpicture}