Hi

This has annoyed me for years, honestly.

I sometimes receive latex files, with constructions like this


In fact, if $6/5<\gamma<2$, there exists a solution
Then
\begin{equation}
  \rho(t, x)=\left\{
    \begin{array}{ll}
      {\left[\frac{K \gamma}{4 \pi 
\kappa(\gamma-1)}\right]^{1/\left(2-\gamma^{\prime}\right)} u(|x|)^{1 
/(\gamma-1)}} & \text { for } 0 \leqq|x| \leqq R \\
      0 & \text { for } R<|x|
    \end{array}
  \right.
\end{equation}


What annoys me is the use of 6/5 instead of \frac{5}{6} (I know
sometimes it is even advised to use it).

But in general I want \frac

So I have the following function

(defun my-change-frac ()                
  "Changes stuff like 1/2 to \frac{1}{2}."
  (interactive)
  (query-replace-regexp "\\(\\<[0-9]*\\)\\([\\/]\\)\\([0-9]*\\>\\)" 
"\\\\frac{\\1}{\\3}"))

It covers the 6/5 case but not, for example,
1/\left(2-\gamma^{\prime}\right)

Does anybody have an idea?
In general shouldn't auctex have such a function?

Regards

Uwe Brauer

Attachment: smime.p7s
Description: S/MIME cryptographic signature

Reply via email to