Thanks Kay
This is OK for the case stritcly limited to m/n == p/q but m,n,p,q may represent much longer expressions.
So unless I create four new variables, your solution does not work as in the example below :
expr = (Cos[Pi/4] Power[3 x , (4)^-1])/x^3 == Log[var]/( x y z )
One of the problem is that MMA will evaluate an expression unless held from it and a solution based on pattern matching to change any expression seems to me difficult to generalize.