Text FormattingFourier transform custom command

Information and discussion about LaTeX's general text formatting features (e.g. bold, italic, enumerations, ...)
Post Reply
Hoopes
Posts: 1
Joined: Mon Jun 20, 2011 1:29 pm

Fourier transform custom command

Post by Hoopes »

Hi All,

I am trying to create a custom command that will display the Fourier transform of a given argument, with subscripts and superscripts in the correct position.
What I mean is something like the following,

Code: Select all

\ft{h_c^*} = \tilde{h}_c^*(f)
So basically, I want a tilde over the non-super or subscript (the h), and then apply the sub/superscripts (if any), and then postfix with (f). I would rather not use additional arguments, because I wanted to save that for a non-default choice of (f). E.g the closest I got was

Code: Select all

\newcommand{\ft}[2][f]{\ensuremath{\tilde{#2}\left(#1\right)}}
I thought maybe I could use some sort of \expandafter technique, but this didn't work.

Is there a way to break the ordering of the sub/superscript?

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

Post Reply