Skip to main content
Changed the `\checkbold` command.
Source Link
user194703
user194703
\documentclass{article}
\usepackage{tikz}
\usepackage{amsmath}
\makeatletter\makeatletter% 
\DeclareRobustCommand{\checkbold}[1]{% https://tex.stackexchange.com/a/24635/121799
 \def#1{0}%
 \edef\@tempa{\math@version\f@series}\edef\@tempb{bold\bfseries@rm}%
 \ifx\@tempa\@tempb%
  \def#1{1}%
 \else\fi%
 \edef\@tempb{\bfseries@sf}%
 \ifx\@tempa\@tempb%
  \def#1{01}%
 \fi}
\makeatother 
\newcommand{\wedgearrow}{\checkbold\tmp%
\ensuremath{\mathrel{%
\mathchoice{%
\tikz[baseline=-0.1ex]{\draw[line width={(1+0.33*\tmp)*0.06em},->](0,0) -- (60:0.6em) -- ++ (-60:0.6em);}
}{%
\tikz[baseline=-0.1ex]{\draw[line width={(1+0.33*\tmp)*0.06em},->](0,0) -- (60:0.6em) -- ++ (-60:0.6em);}
}{%
\tikz[baseline=-0.075ex]{\draw[line width={(1+0.33*\tmp)*0.045em},->](0,0) -- (60:0.45em) -- ++(-60:0.45em);}
}{%
\tikz[baseline=-0.06ex]{\draw[line width={(1+0.33*\tmp)*0.035em},->](0,0) -- (60:0.35em) -- ++ (-60:0.35em);}
}}}}
\begin{document}
$A\wedgearrow B_{C\wedgearrow D}$ {\Large $A\wedgearrow B_{C\wedgearrow D}$}

\boldmath$A\wedgearrow B_{C\wedgearrow D}$ {\Large $A\wedgearrow B_{C\wedgearrow D}$}
\unboldmath
\end{document}
\documentclass{article}
\usepackage{tikz}
\usepackage{amsmath}
\makeatletter
\DeclareRobustCommand{\checkbold}[1]{% https://tex.stackexchange.com/a/24635/121799
 \edef\@tempa{\math@version}\edef\@tempb{bold}%
 \ifx\@tempa\@tempb%
  \def#1{1}%
 \else
  \def#1{0}%
 \fi}
\makeatother 
\newcommand{\wedgearrow}{\checkbold\tmp%
\ensuremath{\mathrel{%
\mathchoice{%
\tikz[baseline=-0.1ex]{\draw[line width={(1+0.33*\tmp)*0.06em},->](0,0) -- (60:0.6em) -- ++ (-60:0.6em);}
}{%
\tikz[baseline=-0.1ex]{\draw[line width={(1+0.33*\tmp)*0.06em},->](0,0) -- (60:0.6em) -- ++ (-60:0.6em);}
}{%
\tikz[baseline=-0.075ex]{\draw[line width={(1+0.33*\tmp)*0.045em},->](0,0) -- (60:0.45em) -- ++(-60:0.45em);}
}{%
\tikz[baseline=-0.06ex]{\draw[line width={(1+0.33*\tmp)*0.035em},->](0,0) -- (60:0.35em) -- ++ (-60:0.35em);}
}}}}
\begin{document}
$A\wedgearrow B_{C\wedgearrow D}$ {\Large $A\wedgearrow B_{C\wedgearrow D}$}

\boldmath$A\wedgearrow B_{C\wedgearrow D}$ {\Large $A\wedgearrow B_{C\wedgearrow D}$}
\unboldmath
\end{document}
\documentclass{article}
\usepackage{tikz}
\usepackage{amsmath}
\makeatletter% 
\DeclareRobustCommand{\checkbold}[1]{% https://tex.stackexchange.com/a/24635/121799
 \def#1{0}%
 \edef\@tempa{\f@series}\edef\@tempb{\bfseries@rm}%
 \ifx\@tempa\@tempb%
  \def#1{1}%
 \fi%
 \edef\@tempb{\bfseries@sf}%
 \ifx\@tempa\@tempb%
  \def#1{1}%
 \fi}
\makeatother 
\newcommand{\wedgearrow}{\checkbold\tmp%
\ensuremath{\mathrel{%
\mathchoice{%
\tikz[baseline=-0.1ex]{\draw[line width={(1+0.33*\tmp)*0.06em},->](0,0) -- (60:0.6em) -- ++ (-60:0.6em);}
}{%
\tikz[baseline=-0.1ex]{\draw[line width={(1+0.33*\tmp)*0.06em},->](0,0) -- (60:0.6em) -- ++ (-60:0.6em);}
}{%
\tikz[baseline=-0.075ex]{\draw[line width={(1+0.33*\tmp)*0.045em},->](0,0) -- (60:0.45em) -- ++(-60:0.45em);}
}{%
\tikz[baseline=-0.06ex]{\draw[line width={(1+0.33*\tmp)*0.035em},->](0,0) -- (60:0.35em) -- ++ (-60:0.35em);}
}}}}
\begin{document}
$A\wedgearrow B_{C\wedgearrow D}$ {\Large $A\wedgearrow B_{C\wedgearrow D}$}

\boldmath$A\wedgearrow B_{C\wedgearrow D}$ {\Large $A\wedgearrow B_{C\wedgearrow D}$}
\unboldmath
\end{document}
added 1325 characters in body
Source Link
user121799
user121799

You can combine this with all that has been said in Sandy G's nice answer about \mathchoice. The thing I like about TikZ, though, is that it is IMHO particularly intuitive to design the symbol since it offers polar and Cartesian coordinates, and works with all common compilers (latex, pdflatex, xelatex and lualatex, and even tex, though the syntax is slightly different). A potential drawback ofA potential drawback of the simple example above is that it does not detect the font weight and so on. One can make the simple example above is that it does not detectthingy a bit more versatile by checking the font weight and so on.using \mathchoice as follows (taken from here):

\documentclass{article}
\usepackage{tikz}
\usepackage{amsmath}
\makeatletter
\DeclareRobustCommand{\checkbold}[1]{% https://tex.stackexchange.com/a/24635/121799
 \edef\@tempa{\math@version}\edef\@tempb{bold}%
 \ifx\@tempa\@tempb%
  \def#1{1}%
 \else
  \def#1{0}%
 \fi}
\makeatother 
\newcommand{\wedgearrow}{\checkbold\tmp%
\ensuremath{\mathrel{%
\mathchoice{%
\tikz[baseline=-0.1ex]{\draw[line width={(1+0.33*\tmp)*0.06em},->](0,0) -- (60:0.6em) -- ++ (-60:0.6em);}
}{%
\tikz[baseline=-0.1ex]{\draw[line width={(1+0.33*\tmp)*0.06em},->](0,0) -- (60:0.6em) -- ++ (-60:0.6em);}
}{%
\tikz[baseline=-0.075ex]{\draw[line width={(1+0.33*\tmp)*0.045em},->](0,0) -- (60:0.45em) -- ++(-60:0.45em);}
}{%
\tikz[baseline=-0.06ex]{\draw[line width={(1+0.33*\tmp)*0.035em},->](0,0) -- (60:0.35em) -- ++ (-60:0.35em);}
}}}}
\begin{document}
$A\wedgearrow B_{C\wedgearrow D}$ {\Large $A\wedgearrow B_{C\wedgearrow D}$}

\boldmath$A\wedgearrow B_{C\wedgearrow D}$ {\Large $A\wedgearrow B_{C\wedgearrow D}$}
\unboldmath
\end{document}

enter image description here

(Note that I do not know ifclaim that this has been discussed somewhere, nor do I know if there is 100% fool proof but I made a foolproof way of finding out the current font weight and so on. On the other hand, in many situations one may not need these featuresfew checks it seems to work fine.)

You can combine this with all that has been said in Sandy G's nice answer about \mathchoice. The thing I like about TikZ, though, is that it is IMHO particularly intuitive to design the symbol since it offers polar and Cartesian coordinates, and works with all common compilers (latex, pdflatex, xelatex and lualatex, and even tex, though the syntax is slightly different). A potential drawback of the simple example above is that it does not detect the font weight and so on. I do not know if this has been discussed somewhere, nor do I know if there is a foolproof way of finding out the current font weight and so on. On the other hand, in many situations one may not need these features.

You can combine this with all that has been said in Sandy G's nice answer about \mathchoice. The thing I like about TikZ, though, is that it is IMHO particularly intuitive to design the symbol since it offers polar and Cartesian coordinates, and works with all common compilers (latex, pdflatex, xelatex and lualatex, and even tex, though the syntax is slightly different). A potential drawback of the simple example above is that it does not detect the font weight and so on. One can make the thingy a bit more versatile by checking the font weight and using \mathchoice as follows (taken from here):

\documentclass{article}
\usepackage{tikz}
\usepackage{amsmath}
\makeatletter
\DeclareRobustCommand{\checkbold}[1]{% https://tex.stackexchange.com/a/24635/121799
 \edef\@tempa{\math@version}\edef\@tempb{bold}%
 \ifx\@tempa\@tempb%
  \def#1{1}%
 \else
  \def#1{0}%
 \fi}
\makeatother 
\newcommand{\wedgearrow}{\checkbold\tmp%
\ensuremath{\mathrel{%
\mathchoice{%
\tikz[baseline=-0.1ex]{\draw[line width={(1+0.33*\tmp)*0.06em},->](0,0) -- (60:0.6em) -- ++ (-60:0.6em);}
}{%
\tikz[baseline=-0.1ex]{\draw[line width={(1+0.33*\tmp)*0.06em},->](0,0) -- (60:0.6em) -- ++ (-60:0.6em);}
}{%
\tikz[baseline=-0.075ex]{\draw[line width={(1+0.33*\tmp)*0.045em},->](0,0) -- (60:0.45em) -- ++(-60:0.45em);}
}{%
\tikz[baseline=-0.06ex]{\draw[line width={(1+0.33*\tmp)*0.035em},->](0,0) -- (60:0.35em) -- ++ (-60:0.35em);}
}}}}
\begin{document}
$A\wedgearrow B_{C\wedgearrow D}$ {\Large $A\wedgearrow B_{C\wedgearrow D}$}

\boldmath$A\wedgearrow B_{C\wedgearrow D}$ {\Large $A\wedgearrow B_{C\wedgearrow D}$}
\unboldmath
\end{document}

enter image description here

(Note that I do not claim that this is 100% fool proof but I made a few checks it seems to work fine.)

added 186 characters in body
Source Link
user121799
user121799

I'd like to expand a bit on the "build the symbol from scratch" part. There are some very simple basic principles that help making the symbol scalable:

  • Use relative length scales for all dimensions. These are explained very nicely in this answer. The most important feature (for the purposes here) is that they scale with the font size.
  • Use relative length scales for the line widths.
  • Consider using the baseline option.

An example is given in this post:

\documentclass{article}
\usepackage{tikz}
\newcommand{\inftrian}{\begin{tikzpicture}[baseline=-0.25em]
\draw[line width=0.075em] (-45:0.5em) -- (105:0.5em) (-15:0.5em) -- (-165:0.5em) (-135:0.5em) -- (75:0.5em);
\end{tikzpicture}}
\begin{document}
ABC \inftrian\ DEF
\end{document}

enter image description here

You can combine this with all that has been said in Sandy G's nice answer about \mathchoice. The thing I like about TikZ, though, is that it is IMHO particularly intuitive to design the symbol since it offers polar and Cartesian coordinates, and works with all common compilers (latex, pdflatex, xelatex and lualatex, and even tex, though the syntax is slightly different). A potential drawback of the simple example above is that it does not detect the font weight and so on. I do not know if this has been discussed somewhere, nor do I know if there is a foolproof way of finding out the current font weight and so on. On the other hand, in many situations one may not need these features.

I'd like to expand a bit on the "build the symbol from scratch" part. There are some very simple basic principles that help making the symbol scalable:

  • Use relative length scales for all dimensions.
  • Use relative length scales for the line widths.
  • Consider using the baseline option.

An example is given in this post:

\documentclass{article}
\usepackage{tikz}
\newcommand{\inftrian}{\begin{tikzpicture}[baseline=-0.25em]
\draw[line width=0.075em] (-45:0.5em) -- (105:0.5em) (-15:0.5em) -- (-165:0.5em) (-135:0.5em) -- (75:0.5em);
\end{tikzpicture}}
\begin{document}
ABC \inftrian\ DEF
\end{document}

enter image description here

You can combine this with all that has been said in Sandy G's nice answer about \mathchoice. The thing I like about TikZ, though, is that it is IMHO particularly intuitive to design the symbol since it offers polar and Cartesian coordinates, and works with all common compilers (latex, pdflatex, xelatex and lualatex, and even tex, though the syntax is slightly different). A potential drawback of the simple example above is that it does not detect the font weight and so on. I do not know if this has been discussed somewhere, nor do I know if there is a foolproof way of finding out the current font weight and so on. On the other hand, in many situations one may not need these features.

I'd like to expand a bit on the "build the symbol from scratch" part. There are some very simple basic principles that help making the symbol scalable:

  • Use relative length scales for all dimensions. These are explained very nicely in this answer. The most important feature (for the purposes here) is that they scale with the font size.
  • Use relative length scales for the line widths.
  • Consider using the baseline option.

An example is given in this post:

\documentclass{article}
\usepackage{tikz}
\newcommand{\inftrian}{\begin{tikzpicture}[baseline=-0.25em]
\draw[line width=0.075em] (-45:0.5em) -- (105:0.5em) (-15:0.5em) -- (-165:0.5em) (-135:0.5em) -- (75:0.5em);
\end{tikzpicture}}
\begin{document}
ABC \inftrian\ DEF
\end{document}

enter image description here

You can combine this with all that has been said in Sandy G's nice answer about \mathchoice. The thing I like about TikZ, though, is that it is IMHO particularly intuitive to design the symbol since it offers polar and Cartesian coordinates, and works with all common compilers (latex, pdflatex, xelatex and lualatex, and even tex, though the syntax is slightly different). A potential drawback of the simple example above is that it does not detect the font weight and so on. I do not know if this has been discussed somewhere, nor do I know if there is a foolproof way of finding out the current font weight and so on. On the other hand, in many situations one may not need these features.

Source Link
user121799
user121799
Loading