So, I've just seen a video about a method of notation called "Triangle of Power", which simplifies things when it comes down to exponents, logarithms, etc. It was originally introduced in this post on Math.Stackexchange: https://math.stackexchange.com/questions/30046/alternative-notation-for-exponents-logs-and-roots/165225#165225

I wanted to use it in my LaTeX documents, but couldn't figure out a way to actually write it easily; my knowledge of custom commands and positioning of symbols is not enough.

So, what I want to do is this:

Triangle of Power And it needs to have some nice way of not providing one of the values (really, see the video if you're interested). Moreover, it should more-or-less fit in line with other notation, so it shouldn't be too big nor sticking out, though it probably will look okay if the values themselves stick out a little.

How can I implement this?

  • 4
    In that post from the math site, alex.jordan uses \stackrel{y}{_x\triangle_{z}}. You could make a simple macro as \newcommand\PowerTriangle[3]{\stackrel{#2}{_{#1}\triangle_{#3}}}, and use it as $\PowerTriangle{x}{y}{z}. There is room for improvement though, probably someone can make a better version. – Torbjørn T. May 4 '16 at 10:45

Working from Akiiino's answer I came up with this, which also works in display mode



\newcommand{\tripow}[3]{% Syntax: \tripow{#1}{#2}{#3} gives you #1 ^ {#2} = #3
   \mathop{% We want it to an operator
      \mathchoice% We want different functionality in text and display mode
         {% DISPLAY MODE
            \vphantom{\dotriangle\LARGE}% \vphantom off-set: places the bottom entries.
            \rule[-1.4ex]{0.1em}{0pt}% Syntax: [<vetical drop #1>]{<left margin>}{<Should be 0>}
            _{\scriptstyle #1}% style of #1 entry
            {\overset{\scriptstyle #2}% style of #2 entry
            {\dotriangle\LARGE}}% Size of the displayed operator - should match the \vphantom off-set.
            \rule[-1.4ex]{0em}{0pt}% Syntax: [<vetical drop #3>]{<Should be 0>}{<Should be 0>} 
            _{\scriptstyle #3}% style of #3 entry
            \rule[0ex]{0.1em}{0pt}% Syntax: [<Should be 0>]{<right margin>}{<Should be 0>}
        {% TEXT MODE
            {\dotriangle\normalsize}% size in text mode
        {% SCRIPT MODE
            _{\scriptstyle #1}%
            {\overset{\scriptstyle #2}%
            {\dotriangle\normalsize}}% size in script mode
            _{\scriptstyle #3}%

Compiling this code

Here we see some fundamental relations:
    \text{or}& \tripow{x}{\tripow{x}{}{z}}{z}
    \text{or}& \tripow{x}{y}{\tripow{x}{y}{}}
    \text{or}& \tripow{x}{y}{\tripow{x}{y}{}}
    \text{or}& \tripow{\tripow{}{y}{z}}{y}{z}
This is a line of text. This text says alot of interesting stuff and 
does not intersect.
Here is some more in-line text followed by $\tripow{x}{y}{z}$ which is
the same as saying $x^y=z$. The text on the this line does not 
intersect either.

gives you example

  • 2
    Very nice! Can you make a MathJax version that has similar behavior? You'd have to swap out \rule for \Rule and maybe \raisebox for \raise. If you get something that works, I'd employ it at the math.se post and cross-post back here. All the newcommmand definition stuff could go into MathJax math delimiters early in the post. – alex.jordan May 14 '16 at 1:16
  • 1
    Could you release that under a license compatible with TeX? – Nowhere man Dec 15 '17 at 11:04

After some tinkering with the variants, I've come up with this:

\newcommand{\PowerTriangle}[3]{ \mathop{\vphantom{\triangle}}_{#1}\hspace{-0.17em}{\stackrel{#2}{\triangle}}_{#3}}

enter image description here

The subscripts are a bit lower than in the original post and it looks better in my opinion.


I've attempted to create a command which will typeset the "Triangle of Power" in a nice way. My best effort so far is the following:

\newcommand{\tripow}[3]{ _{#1}{\stackrel{#2}{\triangle}}_{#3}}

The only issue is that the right subscript appears a little low. But it does allow nesting fairly well.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.