Short version

I use the letter X in my document. When I convert the *.tex to *.pdf, I want all occurrences of X to be replaced with Y, akin to if I opened the "search and replace" function in the text editor and replaced X with Y.

Long version

There is a certain letter in Russian language known as Yo (ё) which is a cause of a long-running holywar. Some people use it everywhere where it is appropriate in accordance with the rules of orthography. Some people replace it with the letter Ye (е) everywhere where it is still possible to understand the word. And some people simply do not use it at all. Sadly, many scientific journals (for whatever reason) fall in the last category.

I want to write proper, grammatically correct text using ё everywhere it is needed, and still be able to easily tell LaTeX to compile the "umlautless" version of the document.


The following settings in the preamble


will produce ё as composed character. Of course this can be also used to produce the umlautless version

  • Other suggestions caused obscure errors for my (admittedly troublesome) document, while yours worked. Please have a green tick good Sir. – ScumCoder May 26 '19 at 21:07

8-bit TeX engines, \usepackage[utf8]{inputenc}

% Redefine Yo/ye for umluatless version

Unicode TeX engines (LuaTeX, XeTeX)

Characters can be made active:

% Umlautless version
  • You are awesome. – ScumCoder Jul 16 '16 at 11:55

You can make it an active character, see TeX FAQ


\def  X{Y}


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.