GeneralSymbol Celsius degree replaced by "xB0"

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

Symbol Celsius degree replaced by "xB0"

Post by DottX »

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

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org
LaTeX Beginner's Guide LaTeX Cookbook LaTeX TikZ graphics TikZによるLaTeXグラフィックス
User avatar
Stefan Kottwitz
Site Admin
Posts: 10290
Joined: Mon Mar 10, 2008 9:44 pm

Symbol Celsius degree replaced by "xB0"

Post by Stefan Kottwitz »

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
LaTeX.org admin
DottX
Posts: 2
Joined: Wed Nov 01, 2017 9:50 pm

Symbol Celsius degree replaced by "xB0"

Post by DottX »

Thank you.

Code: Select all

\documentclass[12pt]{article}
\usepackage[latin1]{inputenc}
\usepackage[italian]{babel}
\usepackage[a4paper,top=1.8cm,bottom=1.8 cm,left=2.5 cm,right=2.5 cm,]{geometry}%includehead,includefoot
\usepackage{amssymb,latexsym}
\usepackage{amsmath}
\usepackage{mathrsfs}
\usepackage{mathabx}
\usepackage{xypic}
\usepackage{pst-plot}
\usepackage{pstricks,pstricks-add,pst-math,pst-xkey,pst-func,pst-coil}%
\usepackage{pst-eucl}
\usepackage{graphicx}
\usepackage{color}
\usepackage{cancel}
\usepackage{float}
\usepackage[format=hang,labelfont={bf},labelsep=quad]{caption}
\usepackage[colorlinks=true,bookmarks=true,urlcolor=green,citecolor=green,linkcolor=green,unicode=true]{hyperref}
\usepackage{pifont}
\usepackage{dsfont}
\usepackage{fancyhdr}$
\pagestyle{fancy}
\lhead{}
\chead{}
\rhead{19 marzo 2016}
\lfoot{}
\cfoot{\thepage}
\rfoot{}
\newtheorem{theorem}{Teorema}%[section]$
\newtheorem{lemma}[theorem]{Lemma}
\newtheorem{corollary}[theorem]{Corollario}
\newtheorem{definition}{Definizione}%[section]
\newtheorem{observation}{Osservazione}%[section]
\newtheorem{example}{Esempio}%[section]
\newtheorem{proposition}[theorem]{Proposizione}
\newtheorem{notation}{Notazione}%[section]
\newtheorem{principle}{Principio}%[section]
\definecolor{light-blue}{rgb}{0.8,0.85,1}
\definecolor{viola}{rgb}{0.9,0.2,0.9}
\definecolor{marrone}{rgb}{0.75,0.25,0}
\begin{document}
\title{\textbf{{Esercizi}}}
\author{}
\date{}
\maketitle
\begin{itemize}
\item [i)] [u][b]$\theta=27,2Ф[/b][/u], $F=37\ N$ e $r=1,73\ m$;\hfill$[57\ J]$
\end{itemize}
\end{document}
The code "xB0$" is copied as Ф. I don't know...
User avatar
Stefan Kottwitz
Site Admin
Posts: 10290
Joined: Mon Mar 10, 2008 9:44 pm

Symbol Celsius degree replaced by "xB0"

Post by Stefan Kottwitz »

Code: Select all

\documentclass[12pt]{article}
\usepackage[latin1]{inputenc}
\usepackage[italian]{babel}
\usepackage[a4paper,top=1.8cm,bottom=1.8 cm,left=2.5 cm,right=2.5 cm,]{geometry}%includehead,includefoot
\usepackage{amssymb,latexsym}
\usepackage{amsmath}
\usepackage{mathrsfs}
\usepackage{mathabx}
\usepackage{xypic}
\usepackage{pst-plot}
\usepackage{pstricks,pstricks-add,pst-math,pst-xkey,pst-func,pst-coil}%
\usepackage{pst-eucl}
\usepackage{graphicx}
\usepackage{color}
\usepackage{cancel}
\usepackage{float}
\usepackage[format=hang,labelfont={bf},labelsep=quad]{caption}
\usepackage[colorlinks=true,bookmarks=true,urlcolor=green,citecolor=green,linkcolor=green,unicode=true]{hyperref}
\usepackage{pifont}
\usepackage{dsfont}
\usepackage{fancyhdr}$
\pagestyle{fancy}
\lhead{}
\chead{}
\rhead{19 marzo 2016}
\lfoot{}
\cfoot{\thepage}
\rfoot{}
\newtheorem{theorem}{Teorema}%[section]$
\newtheorem{lemma}[theorem]{Lemma}
\newtheorem{corollary}[theorem]{Corollario}
\newtheorem{definition}{Definizione}%[section]
\newtheorem{observation}{Osservazione}%[section]
\newtheorem{example}{Esempio}%[section]
\newtheorem{proposition}[theorem]{Proposizione}
\newtheorem{notation}{Notazione}%[section]
\newtheorem{principle}{Principio}%[section]
\definecolor{light-blue}{rgb}{0.8,0.85,1}
\definecolor{viola}{rgb}{0.9,0.2,0.9}
\definecolor{marrone}{rgb}{0.75,0.25,0}
\begin{document}
\title{\textbf{{Esercizi}}}
\author{}
\date{}
\maketitle
\begin{itemize}
\item [i)] [u][b]$\theta=27,2°[/b][/u], $F=37\ N$ e $r=1,73\ m$;\hfill$[57\ J]$
\end{itemize}
\end{document}
LaTeX.org admin
User avatar
Stefan Kottwitz
Site Admin
Posts: 10290
Joined: Mon Mar 10, 2008 9:44 pm

Symbol Celsius degree replaced by "xB0"

Post by Stefan Kottwitz »

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
LaTeX.org admin
Post Reply