13

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?

3
  • 9
    \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
33

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.

7
  • 1
    Thank you very much, it worked – user66094 Oct 11 '20 at 10:48
  • +1 for "\uglyepsilon" – user222917 Oct 11 '20 at 22:44
  • 3
    @JetChung Did you catch that I don't like it? 😉 – egreg Oct 11 '20 at 22:46
  • 4
    Isn't the opposite of \varepsilion \constepsilon?? – alephzero Oct 12 '20 at 1:15
  • @alephzero Here “var” stands for “variant” ;-) – egreg Oct 12 '20 at 8:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.