; takes string (Title) and identifies any symbols to add

pro GiveSymbol, Title

SearchN = 6

Keyword = strarr (SearchN)
Symbol  = strarr (SearchN)

KeyWord = ['degrees','degree','deg','**2','^2','^*']
Symbol  = ['!Uo!N','!Uo!N','!Uo!N','!E2!N','!E2!N','!E*!N']

Title = strtrim(Title)
FoundKeyword = -1 & NewTitle = ""

while (FoundKeyword NE 0) do begin
  FoundKeyWord = 0
  
  for XSearch = 0, (SearchN-1) do begin
    FoundBeg = strpos (Title,Keyword[XSearch])
    
    if (FoundBeg GT -1) then begin
      Parts = str_sep (Title,Keyword[XSearch])
      Dims  = size (Parts)
      Title = ""
      
      for XPart = 0, (Dims[1]-1) do begin
        Title = strtrim(Title) + strtrim(Parts[XPart])
        if ((Dims[1]-1) GT XPart) then Title = strtrim(Title) + strtrim(Symbol[XSearch])
      endfor
      
      FoundKeyword = FoundKeyword + 1
    endif
  endfor
endwhile

end
