LaTeX forum ⇒ GeneralSymbol Celsius degree replaced by "xB0"

General information and discussion about TeXnicCenter
DottX
Posts: 2
Joined: Wed Nov 01, 2017 9:50 pm

Symbol Celsius degree replaced by "xB0"

Postby DottX » Wed Nov 01, 2017 10:06 pm

I have accidentally typesetted some keys, so the symbol ° (Celsius degree) has been replaced by "xB0".
How can I solve this problem?
Thank you

User avatar
Stefan Kottwitz
Site Admin
Posts: 8537
Joined: Mon Mar 10, 2008 9:44 pm
Location: Hamburg, Germany
Contact:

Postby Stefan Kottwitz » Wed Nov 01, 2017 10:41 pm

Welcome to the forum!

Just post your code here, then we probably can point to he cause.

The code you saw is HTML. Perhaps copy and paste a real ° (like from here) or use the \degree command.

Stefan
Site admin

DottX
Posts: 2
Joined: Wed Nov 01, 2017 9:50 pm

Postby DottX » Thu Nov 02, 2017 5:06 pm

Thank you.

  1. \documentclass[12pt]{article}
  2. \usepackage[latin1]{inputenc}
  3. \usepackage[italian]{babel}
  4. \usepackage[a4paper,top=1.8cm,bottom=1.8 cm,left=2.5 cm,right=2.5 cm,]{geometry}%includehead,includefoot
  5. \usepackage{amssymb,latexsym}
  6. \usepackage{amsmath}
  7. \usepackage{mathrsfs}
  8. \usepackage{mathabx}
  9. \usepackage{xypic}
  10. \usepackage{pst-plot}
  11. \usepackage{pstricks,pstricks-add,pst-math,pst-xkey,pst-func,pst-coil}%
  12. \usepackage{pst-eucl}
  13. \usepackage{graphicx}
  14. \usepackage{color}
  15. \usepackage{cancel}
  16. \usepackage{float}
  17. \usepackage[format=hang,labelfont={bf},labelsep=quad]{caption}
  18. \usepackage[colorlinks=true,bookmarks=true,urlcolor=green,citecolor=green,linkcolor=green,unicode=true]{hyperref}
  19. \usepackage{pifont}
  20. \usepackage{dsfont}
  21. \usepackage{fancyhdr}$
  22. \pagestyle{fancy}
  23. \lhead{}
  24. \chead{}
  25. \rhead{19 marzo 2016}
  26. \lfoot{}
  27. \cfoot{\thepage}
  28. \rfoot{}
  29. \newtheorem{theorem}{Teorema}%[section]$
  30. \newtheorem{lemma}[theorem]{Lemma}
  31. \newtheorem{corollary}[theorem]{Corollario}
  32. \newtheorem{definition}{Definizione}%[section]
  33. \newtheorem{observation}{Osservazione}%[section]
  34. \newtheorem{example}{Esempio}%[section]
  35. \newtheorem{proposition}[theorem]{Proposizione}
  36. \newtheorem{notation}{Notazione}%[section]
  37. \newtheorem{principle}{Principio}%[section]
  38. \definecolor{light-blue}{rgb}{0.8,0.85,1}
  39. \definecolor{viola}{rgb}{0.9,0.2,0.9}
  40. \definecolor{marrone}{rgb}{0.75,0.25,0}
  41. \begin{document}
  42. \title{\textbf{{Esercizi}}}
  43. \author{}
  44. \date{}
  45. \maketitle
  46. \begin{itemize}
  47. \item [i)] <span style="text-decoration: underline"><span style="font-weight: bold">$\theta=27,2Ф</span></span>, $F=37\ N$ e $r=1,73\ m$;\hfill$[57\ J]$
  48. \end{itemize}
  49. \end{document}


The code "xB0$" is copied as Ф. I don't know...

User avatar
Stefan Kottwitz
Site Admin
Posts: 8537
Joined: Mon Mar 10, 2008 9:44 pm
Location: Hamburg, Germany
Contact:

Postby Stefan Kottwitz » Thu Nov 02, 2017 5:09 pm

  1. \documentclass[12pt]{article}
  2. \usepackage[latin1]{inputenc}
  3. \usepackage[italian]{babel}
  4. \usepackage[a4paper,top=1.8cm,bottom=1.8 cm,left=2.5 cm,right=2.5 cm,]{geometry}%includehead,includefoot
  5. \usepackage{amssymb,latexsym}
  6. \usepackage{amsmath}
  7. \usepackage{mathrsfs}
  8. \usepackage{mathabx}
  9. \usepackage{xypic}
  10. \usepackage{pst-plot}
  11. \usepackage{pstricks,pstricks-add,pst-math,pst-xkey,pst-func,pst-coil}%
  12. \usepackage{pst-eucl}
  13. \usepackage{graphicx}
  14. \usepackage{color}
  15. \usepackage{cancel}
  16. \usepackage{float}
  17. \usepackage[format=hang,labelfont={bf},labelsep=quad]{caption}
  18. \usepackage[colorlinks=true,bookmarks=true,urlcolor=green,citecolor=green,linkcolor=green,unicode=true]{hyperref}
  19. \usepackage{pifont}
  20. \usepackage{dsfont}
  21. \usepackage{fancyhdr}$
  22. \pagestyle{fancy}
  23. \lhead{}
  24. \chead{}
  25. \rhead{19 marzo 2016}
  26. \lfoot{}
  27. \cfoot{\thepage}
  28. \rfoot{}
  29. \newtheorem{theorem}{Teorema}%[section]$
  30. \newtheorem{lemma}[theorem]{Lemma}
  31. \newtheorem{corollary}[theorem]{Corollario}
  32. \newtheorem{definition}{Definizione}%[section]
  33. \newtheorem{observation}{Osservazione}%[section]
  34. \newtheorem{example}{Esempio}%[section]
  35. \newtheorem{proposition}[theorem]{Proposizione}
  36. \newtheorem{notation}{Notazione}%[section]
  37. \newtheorem{principle}{Principio}%[section]
  38. \definecolor{light-blue}{rgb}{0.8,0.85,1}
  39. \definecolor{viola}{rgb}{0.9,0.2,0.9}
  40. \definecolor{marrone}{rgb}{0.75,0.25,0}
  41. \begin{document}
  42. \title{\textbf{{Esercizi}}}
  43. \author{}
  44. \date{}
  45. \maketitle
  46. \begin{itemize}
  47. \item [i)] <span style="text-decoration: underline"><span style="font-weight: bold">$\theta=27,2°</span></span>, $F=37\ N$ e $r=1,73\ m$;\hfill$[57\ J]$
  48. \end{itemize}
  49. \end{document}
Site admin

User avatar
Stefan Kottwitz
Site Admin
Posts: 8537
Joined: Mon Mar 10, 2008 9:44 pm
Location: Hamburg, Germany
Contact:

Postby Stefan Kottwitz » Thu Nov 02, 2017 5:15 pm

In your code, simply write

$\theta=27,2^\degree$

or

$\theta=27,2^\circ$

Not all special characters work with all encodings. Here it's latin1, not even utf8. So, use commands for symbols.

Stefan
Site admin


Return to “General”

Who is online

Users browsing this forum: No registered users and 1 guest