Capital Omega problem, I can not renewcommand it

I want to change all the \Omega in my paper into \varOmega, but always receive an error information. Here is the details.

I have add the line in the preamble \renewcommand{\Omega}{\varOmega} when I compile the TeX file, it said that

Command \Omega' already defined. \begin{document}


Because there are too many \Omega, it is almost impossible to change them one by one. Therefore I want to use \renewcommand{\Omega}{\varOmega} to realize my purpose. What is wrong with my method?

This is my MWE:

\documentclass{article}
\usepackage{amsmath,amssymb}
\renewcommand{\Omega}{\varOmega}
\usepackage{xeCJK}
\begin{document}
$\Omega$
\end{document}

-
That's strange. Can you narrow down the problem in terms of a minimal working example (MWE)? For example, a document with only \Omega in it together with the current preamble? Or even sequentially removing packages from the preamble until the problem goes away? – Werner Mar 5 '14 at 5:16
the following works fine for me: \documentclass{article} \usepackage{amsmath} \renewcommand{\Omega}{\varOmega} \begin{document} $\Omega$ \end{document} – cmhughes Mar 5 '14 at 5:21
@azhi make a copy of your 'huge' file, add the command, and start stripping it while keeping the error- this will get you close to a MWE that you can post in your question :) – cmhughes Mar 5 '14 at 5:30
I have found the reason! Here is my MWE, you can check if xeCJK package will conflict with that command line I gave before: \documentclass{article} \usepackage{amsmath,amssymb} \renewcommand{\Omega}{\varOmega} \usepackage{xeCJK} \begin{document} $\Omega$ \end{document} – azhi Mar 5 '14 at 6:05

Redefine \Omega at the beginning of the document, that is replace

\renewcommand{\Omega}{\varOmega}


with

\AtBeginDocument{\renewcommand{\Omega}{\varOmega}}


MWE:

\documentclass{article}
\usepackage{amsmath,amssymb}
\usepackage{xeCJK}
\AtBeginDocument{\renewcommand{\Omega}{\varOmega}}

\begin{document}
$\Omega$
\end{document}


-

You may want to pass the no-math option to fontspec.

\documentclass{article}
\usepackage{amsmath,amssymb}
\usepackage[no-math]{xeCJK}

\setCJKmainfont{SimSun} % this one I have on my machine

\renewcommand{\Omega}{\varOmega}

\begin{document}
$\Omega$
\end{document}

-