Re: Need just enough underbars

*To*: mathgroup at smc.vnet.net*Subject*: [mg18367] Re: Need just enough underbars*From*: Jens-Peer Kuska <kuska at informatik.uni-leipzig.de>*Date*: Wed, 30 Jun 1999 14:13:30 -0400*Organization*: Universitaet Leipzig*References*: <7l5sf2$ih2@smc.vnet.net>*Sender*: owner-wri-mathgroup at wolfram.com

Hi, helps ubn[s:(_Symbol|_UnderBar),n_Integer]:=Nest[UnderBar,s,n] eqn = Equal[ Plus[Times[j, P], D[UnderBar[T][UnderBar[P]], UnderBar[P]], Times[-1, T, D[UnderBar[V][UnderBar[U]], UnderBar[U]]]], 0] eqn /. a_UnderBar :> ubn[a, 1] you ? Regards Jens Patrick Reany wrote: > > I'm trying to use underbars to distinguish new variables from old in a > differential eqn of state under a change of independent variables. I > want all upper case letters to have an underbar in the new form. Some > already have the underbar while others do not. How do I add the > underbars to the ones that do not have them while not adding another > underbar to the ones that already do. Below is an example form derived > by using FullForm[]: > > Equal[Plus[Times[j,P],HoldForm[D[UnderBar[T],UnderBar[P]]], > Times[-1,T,HoldForm[D[UnderBar[V],UnderBar[U]]]]],0] > > where one 'P' and one 'T' need to have the underbar added. > > Thanks > > Patrick