16

I am writing a document, and I used \epsilon throughout. I would really like to change it to \varepsilon, but manually it would be quite a struggle.

So the question is whether I can put something in the preamble so that \epsilon actually give the same output as \varepsilon.

I tried with \newcommand{\epsilon}{\varepsilon}, but it didn't work (I imagine because \epsilon is an already defined command). How can I solve this problem?

user66094
  • 379
  • 11
    \renewcommand instead of \newcommand – David Carlisle Oct 11 '20 at 10:19
  • 3
    \let\epsilonTMP\epsilon\let\epsilon\varepsilon\let\varepsilon\epsilonTMP after that \epsilon and \varepsilon should be switched. – Skillmon Oct 11 '20 at 10:19
  • 2
    By help of editor \find/replace function you can simple replace all epsilon with \varepsilon in your document. I would not give new meaning to \epsilon ... – Zarko Oct 11 '20 at 10:32

1 Answers1

34

Indeed, \epsilon is already defined.

In this case it's safe to do

\renewcommand{\epsilon}{\varepsilon}

I know that \let\epsilon\varepsilon would be slightly more efficient, but it's not for beginners.

Note that in this way you have no way to recover the original \epsilon symbol, but that should not be a problem. In case you need the original, you need to save its meaning, so you can do

\let\uglyepsilon\epsilon
\let\epsilon\varepsilon

(choose a different name than \uglyepsilon, if you so prefer). Now using \epsilon or \varepsilon in the document will produce ε, while \uglyepsilon will produce ϵ. For this purpose, \let is needed.

egreg
  • 1,121,712