[Tex/LaTex] Feynman Trig Notation: Creating Custom Characters

feynmanmath-mode

Some of you may have heard Richard Feynman talk about a notation he invented for trigonometric functions to give them a more symbolic representation. He stopped using the notation in his teens and I can't find any published examples of it so I had to make assumptions as to what it would have looked like.

"While I was doing all this trigonometry, I didn't like the symbols for sine, cosine, tangent, and so on. To me, "sin f" looked like s times i times n times f! So I invented another symbol, like a square root sign, that was a sigma with a long arm sticking out of it, and I put the f underneath. For the tangent it was a tau with the top of the tau extended, and for the cosine I made a kind of gamma, but it looked a little bit like the square root sign. Now the inverse sine was the same sigma, but left -to-right reflected so that it started with the horizontal line with the value underneath, and then the sigma. That was the inverse sine, NOT sink f–that was crazy! They had that in books! To me, sin_i meant i/sine, the reciprocal. So my symbols were better."

Reference https://www.physicsforums.com/threads/feynmans-trig-notations.78087/

Here is my interpretation of that:
[edit: after re-listening to him describe it he was definitely using lower case greek letters, not upper case as I previously thought. Image edited to reflect this.]

enter image description here

How could I create these symbols in Latex and have them extend over terms of any length?

Best Answer

Here you go. I didn't put too much effort into it, as I hope you will realize that it is ill-advised to use this.

\documentclass{article}
\usepackage{graphicx}% provides \resizebox
\makeatletter
\def\fsin#1{\mathpalette\f@op{{#1}{\sigma}}}
\def\fcos#1{\mathpalette\f@op{{#1}{\gamma}}}
\def\ftan#1{\mathpalette\f@op{{#1}{\tau}}}
\def\f@op#1#2{%
  \f@@op{#1}#2
}
\def\f@@op#1#2#3{%
  \sbox0{$#1#2$}%
  \resizebox{\width}{\dimexpr\ht0+1.4pt\relax}{$#3$}%
  \hskip-.6pt% <-- this is a guess
  \vrule height \dimexpr\ht0+1.4pt\relax depth -\dimexpr\ht0+.4pt\relax width \wd0\relax
  \llap{\box0}%
}
\makeatother
\begin{document}
$\fcos{\theta} = \cos\theta$

$\fsin{\theta} = \sin\theta$

$\ftan{\theta} = \tan\theta$
\end{document}

enter image description here

Related Question