18

I am trying to type the shown symbol in LaTeX and I am hoping to find a command producing this symbol. This is just a very crude sketch. The three lines are supposed to be equal length with 120 degrees between them. It is quite large here, but I would like it to be of "normal character size", comparable to a + or so. Is there any direct way of obtaining this without including it as a graphic or perhaps drawing it in TikZ?

Crude sketch of symbol

Thomas Arildsen
  • 1,855
  • 1
  • 19
  • 27
  • 2
    did you check on http://detexify.kirelabs.org/classify.html ? – Dominic Michaelis Mar 20 '13 at 14:29
  • I tried some sketches, but DeTeXify didn't gave my a valuable answer. – willeM_ Van Onsem Mar 20 '13 at 14:31
  • 6
    i don't believe this symbol is in unicode. what is its meaning, and can you provide a reference to where it is used in a published article or book? (if good documentation is available, i can convey it to the unicode technical committee with a request that it be encoded.) – barbara beeton Mar 20 '13 at 14:41
  • @barbara In my context it does not have a special meaning and I do not know of any particular meaning of the symbol. I simply have a plot of some data where this symbol marks the data points. I would like to use the symbol in the caption text to refer to the plotted data. – Thomas Arildsen Mar 20 '13 at 17:03
  • 1
    @barbarabeeton Unicode has a symbol for a pile of poo. I'd be surprised if this wasn't there... – millimoose Mar 21 '13 at 00:23
  • @ThomasArildsen The closest in unicode would be U+2144. It does not have equal angles, but as there is no common meaning for your symbol, there will be no unicode for this in the near future, I fear. – LaRiFaRi Sep 16 '14 at 12:16

7 Answers7

23

Within the package \usepackage{MnSymbol} you can find

$A \downY B \upY C$

which renders like:

enter image description here

I took that from comprehensive symbols, page 23f.

Unfortunately (thanks for the hint @egreg) the use of MnSymbol does not only add additional commands but altering some as well. This might produce ugly side-effects. Good for us there is a step by step tutorial How can I use a symbol provided by a package without changing the entire mathematics font?

Following this is fairly easy (give Leo Liu as much credit as you can) and so you can circumvent the usage of the hole package as follows:

\documentclass{article}

\DeclareFontFamily{U}{MnSymbolC}{}
\DeclareFontShape{U}{MnSymbolC}{m}{n}{
    <-6>  MnSymbolC5
   <6-7>  MnSymbolC6
   <7-8>  MnSymbolC7
   <8-9>  MnSymbolC8
   <9-10> MnSymbolC9
  <10-12> MnSymbolC10
  <12->   MnSymbolC12}{}
\DeclareFontShape{U}{MnSymbolC}{b}{n}{
    <-6>  MnSymbolC-Bold5
   <6-7>  MnSymbolC-Bold6
   <7-8>  MnSymbolC-Bold7
   <8-9>  MnSymbolC-Bold8
   <9-10> MnSymbolC-Bold9
  <10-12> MnSymbolC-Bold10
  <12->   MnSymbolC-Bold12}{}

\DeclareSymbolFont{MnSyC}{U}{MnSymbolC}{m}{n}
\SetSymbolFont{MnSyC}{bold}{U}{MnSymbolC}{b}{n}
\DeclareMathSymbol{\upY}{\mathbin}{MnSyC}{41}
\DeclareMathSymbol{\downY}{\mathbin}{MnSyC}{43}

\begin{document}
\[A \downY B \upY C \]
\boldmath
\[ A \downY B \upY C\]
\end{document}

Which (thanks to egreg again) renders even in \bold

enter image description here

Dominikus K.
  • 897
  • 7
  • 18
15

You can use the picture environment:

\documentclass{article}
\usepackage{pict2e,picture}
\newcommand{\triplus}{\mathbin{
  \sbox0{$+$}
  \begin{picture}(\wd0,\ht0)
  \put(0,0){\line(1,.577){.5\wd0}}
  \put(.5\wd0,.289\wd0){\line(-1,.577){-.5\wd0}}
  \put(.5\wd0,.289\wd0){\line(0,1){\dimexpr\ht0-.289\wd0\relax}}
  \end{picture}
  }
}

\begin{document}
$a+b\triplus c$
\end{document}

enter image description here


Adding \roundcap, as suggested by Heiko Oberdiek, might be even better:

\documentclass{article}
\usepackage{pict2e,picture}
\newcommand{\triplus}{\mathbin{
  \sbox0{$+$}
  \begin{picture}(\wd0,\ht0)
  \roundcap
  \put(0,0){\line(1,.577){.5\wd0}}
  \put(.5\wd0,.289\wd0){\line(-1,.577){-.5\wd0}}
  \put(.5\wd0,.289\wd0){\line(0,1){\dimexpr\ht0-.289\wd0\relax}}
  \end{picture}
  }
}

\begin{document}
$a+b\triplus c$
\end{document}

enter image description here

egreg
  • 1,121,712
10

Here's my TikZ shot. The length of the line was chosen to be as close to the length of the line in a + symbol as I could get it (interestingly, the ends of the lines on the + are not perfect half circles). And the height was so that the intersection was the same as the centre of the cross of the +.

Edit Looking at egreg's answer, I see that I can compute the dimensions automatically.

\documentclass{article}
%\url{http://tex.stackexchange.com/q/103427/86}
\usepackage{tikz}

\newcommand\triad{%
  \mathbin{%
    \tikz[overlay,baseline=0 pt] {
    \pgfmathparse{(height("$+$") + depth("$+$") -
\the\pgflinewidth)/2}%
      \let\triht=\pgfmathresult
      \pgfmathparse{(height("$+$") - depth("$+$"))/2}%
      \let\tribs=\pgfmathresult
 \draw[yshift=\tribs pt,xshift=-6pt,red,line cap=round] (0,0) --
(0,\triht pt) (0,0) -- (-30:\triht pt) (0,0) -- (210:\triht pt);%
}
}%
}

\begin{document}

\[
  a + b a +\triad b
\]
\end{document}

Close up (overlaid on a +):

Close up of symbol

In "normal" use:

Symbol in normal use

Andrew Stacey
  • 153,724
  • 43
  • 389
  • 751
10

The following example constructs the symbol in the following way:

  • The top part with the round line end of the vertical bar is used as branch line.
  • The length of the branch is the same as in the plus symbol. But the length can be changed by redefining \UpDownYFactor to a value different than 1.
  • The intersection point is the same as in the plus symbol at the mathematical center axis.
  • The symbol adopts in size to the current math style.
  • The side bearings have the same width as in the plus symbol.
  • The names for the provided symbols are the same as in package MnSymbol: \upY and \downY.
  • The symbols act as binary operators. It can be changed by replacing \mathbin.

Example file:

\documentclass{article}
\usepackage{graphicx}
\usepackage{trimclip}

\makeatletter
\providecommand*{\upY}{%
  \mathbin{%
    \mathpalette\@updownY{0}%
  }%
}
\providecommand*{\downY}{%
  \mathbin{%
    \mathpalette\@updownY{1}%
  }%
}
\providecommand*{\UpDownYFactor}{1}
\newcommand*{\@updownY}[2]{%
  % #1: math style
  % #2: 0 = up, 1 = down
  \sbox0{$#1+\m@th$}%
  \dimen2=.5\dimexpr\wd0-\ht0-\dp0\relax
  % => \dimen2: side bearing
  \sbox2{$#1\vcenter{}$}%
  \dimen4=\dimexpr\ht0-\ht2\relax
  % => \dimen4: branch length
  \setbox0=\hbox to 0pt{%
    \hss
    \clipbox{%
      0pt %
      {\dimexpr\totalheight-\UpDownYFactor\dimen4\relax} %
      0pt %
      -\dimen2%
    }{$#1|$}%
    \hss
  }%
  \ht0=\dimexpr\ht0-\dimen2\relax
  \kern\dimen2 %
  \raise\ht2\hbox{%
    \ifnum#2=0 %
      {\rotatebox{120}{\copy0}}%
      \copy0 %
      {\rotatebox{-120}{\copy0}}%
    \else
      {\rotatebox{60}{\copy0}}%
      {\rotatebox{180}{\copy0}}%
      {\rotatebox{-60}{\copy0}}%
    \fi
  }%
  \kern\dimen2 %
}
\makeatother

\begin{document}
\[\begin{array}{c}
  a \upY b \downY c
  \\
  \scriptstyle
  a \upY b \downY c
  \\
  \scriptscriptstyle
  a \upY b \downY c
  \\
  \rlap{$\upY$}{\downY}
\end{array}\]
\end{document}  

Result

For analyzing the center:

\usepackage{pdfrender}
...
\[
  \rlap{%  
    \sbox0{$\vcenter{}$}%
    \sbox2{${\upY}{\downY}{\upY}$}%
    \raise\ht0\hbox{\vrule height.01pt depth.01pt width\wd2}%
  }%
  \pdfrender{TextRenderingMode=Stroke, LineWidth=.01pt}
  {\upY}\rlap{$\upY$}{\downY}{\downY}
\]

Result

Heiko Oberdiek
  • 271,626
  • The last one looks better, but still, as the first two (\textstyle and \scriptstyle), it seems that the center of \rotatebox is not perfect, so the three lines form a weird thing at the center where they are toghether. I don't know how to explain, just looking closely to the center of \upY and \downY shows what I mean. – Manuel Sep 14 '14 at 09:13
  • The center is mathematical correct, the same way as the symbols of MnSymbol. The middle intersection point is exactly located at the mathematical axis, the same height in both cases. If the symbols are put over each other, the result is a regular six-star, see updated answer. – Heiko Oberdiek Sep 14 '14 at 09:59
  • True, after compiling it myself it looks good. So it's your viewer :) I said that just looking to the first line of your image, it seems to have som sort of distorsion in the center. Nevermind. – Manuel Sep 14 '14 at 10:04
  • @Manuel I assume it's some kind of an optical illusion. – Heiko Oberdiek Sep 14 '14 at 10:46
  • This looks like a very nice solution. One thing, though: looking at your three-size example, the symbol seems to scale bit odd with the font. The up-/down-y seems to scale less down than the letters. Furthermore, the line thinkness does not seem to scale, so the symbol looks more "bold" for smaller font sizes. – Thomas Arildsen Sep 16 '14 at 09:31
  • 1
    @ThomasArildsen The missing scaling of the thickness is due to a bug, I had forgotten to add the math style for the vertical bar that is used for the branches of the symbols. Thanks for noticing, it is now fixed in the answer. The length of the branches scales is taken from the plus sign and scales the exact same way. The height of \upY is the same as the height of +. – Heiko Oberdiek Sep 16 '14 at 11:56
6

Second cut, trying to preserve the 120 degree angles, as well as getting proper alignment.

\documentclass{article}
\usepackage{scalerel}

\newcommand\triad{%
\let\savearraystretch\arraystretch
\renewcommand\arraystretch{0}
\begin{array}{c}
\rule{-.01ex}{.01ex}\rule{.05ex}{.8ex}\\
\stretchto{
    \scalerel*[\widthof{=}]{\wedge}
    {\rule{1ex}{3ex}}%
}{0.42ex}\\
\vphantom{\rule{1ex}{.01ex}}
\end{array}
\let\arraystretch\savearraystretch
}

\begin{document}

$x^2 \triad \begin{array}{c}a\\b\\c\end{array}$

\end{document}

enter image description here

David Carlisle
  • 757,742
6

You could also play around with the Mercedes star mark in TikZ:

\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{plotmarks}

\newcommand{\unkwn}{\tikz[scale=2] \draw plot [mark=Mercedes star] coordinates {(0,0)};}

\begin{document}

$a \unkwn b$

\end{document}

enter image description here

jja
  • 1,813
4

symbol \Yup

Since you want a normal character, an alternative would be to use the similar symbol \Yup of the package stmaryrd. The angles are about 135°, 135°, 90°. The picture shows $a \Yup b$.

e-birk
  • 4,373