Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Change imath command

  1. Feb 24, 2009 #1
    change imath command (LaTeX)

    Hello,
    I have a question about the \imath command.... :confused:

    I am a physics student and I wrote a huge document with many equations. In some equations there is the \imath symbol. When my professor saw this document he told me to change the symbol and use one with a dotted \imath.

    So I thought to change the \imath command and use at the beginning


    Code (Text):
     \renewcommand{\imath}{\ensuremath{\dot{\imath}}}

    but when I compile the document using this command the compiler comes with some errors concerning the \imath symbol.

    There are a lot of \imath symbols in my document and changing them one by one it is going to take a lot of time :cry: .

    Thank you in advance!!!
     
    Last edited: Feb 24, 2009
  2. jcsd
  3. Feb 24, 2009 #2

    cristo

    User Avatar
    Staff Emeritus
    Science Advisor

    What text editor are you using? You can just find/replace all and replace \imath with \dot{\imath} (or just i)!
     
  4. Feb 24, 2009 #3
    The question is about LaTeX......

    It will take hours to replace one by one the symbol \imath, because the document is more than 150 pages and more than 400 equations.
     
  5. Feb 24, 2009 #4

    cristo

    User Avatar
    Staff Emeritus
    Science Advisor

    Yes, but my point was that, if you're using a standard text editor, you can use the built in "find & replace all" function to replace all the occurances of \imath. This will have less potential for causing problems than redefining characters.

    However, if you wish to do that, then use something like \renewcommand\imath{i}

    (Latex doesn't like you dotting \imath, for some reason).
     
  6. Feb 24, 2009 #5

    CRGreathouse

    User Avatar
    Science Advisor
    Homework Helper

    The problem is that your redefinition uses the original command, causing LaTeX to substitute it over and over:

    \imath

    \ensuremath{\dot{\imath}}

    \ensuremath{\dot{\ensuremath{\dot{\imath}}}}

    \ensuremath{\dot{\ensuremath{\dot{\ensuremath{\dot{\imath}}}}}}

    ...

    I would recommend replacing it everywhere -- 150 pages of replacements should take Notepad 10 seconds or any modern editor < 50 ms. But I would replace \imath with \myi and define
    \define{\myi}{\ensuremath{\dot{\imath}}}
    (replacing \myi with some appropriate name).
     
  7. Feb 24, 2009 #6

    robphy

    User Avatar
    Science Advisor
    Homework Helper
    Gold Member

    Last edited by a moderator: May 4, 2017
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook




Similar Discussions: Change imath command
Loading...