7

My preamble :

\documentclass[12pt,a4paper]{report}
\usepackage[lmargin=3.81cm,tmargin=2.54cm,rmargin=2.54cm,bmargin=2.52cm]{geometry}
\linespread{1.5}
\usepackage{amssymb}
\usepackage{ dsfont }
\usepackage{textcomp}
\usepackage{wrapfig}
\usepackage{array}
\usepackage{indentfirst}
\usepackage{colortbl}
\usepackage{float}
\usepackage{changepage}
\usepackage{longtable}
\usepackage{mathptmx}
\usepackage{color}
\usepackage{graphicx}
\usepackage{lettrine}
\usepackage{hyperref} 
\usepackage[nottoc,notlof,notlot]{tocbibind} % add to TOC
\usepackage{caption}

When I add the command :

 $\mathcal{U}$

I get

enter image description here

instead of

enter image description here

Can anyone tell me why is that happening ? and how to get the second U instead of my current one.

5
  • It's because you are loading mathptmx. Apr 22, 2013 at 3:20
  • -1: What kept you from removing the packages e.g. one by one until you found the culprit?
    – doncherry
    Apr 22, 2013 at 4:35
  • @doncherry Because I'm a newbie and just started using Latex recently. My knowledge about how packages work and the possible relation to problems such as this is limited. I would never have thought that the packages are related. Thanks for the -1, very supportive of you.
    – Razor
    Apr 22, 2013 at 4:43
  • 4
    @NLed Not meaning to be a turn-off, but you seem to have understood the notion that a package adds some kind of functionality, and that it must be because of some package that you’re not getting the output you want. Finding out which package it is is just the logical next step, which I consider to be part of the “research effort” which is part of the basis for votes. In your defense, I’m surprised that in none of your 23 questions you’ve been pointed to our minimal working example (MWE) thread. It’s standard use to create and provide a MWE for tex.sx.
    – doncherry
    Apr 22, 2013 at 4:53
  • 3
    Oh and please don’t tell me you just revenge-downvoted me at How to use \textbackslash? How old are we?
    – doncherry
    Apr 22, 2013 at 4:54

2 Answers 2

14

It's because you are loading mathptmx, which also changes the math fonts. If you want to keep the mathptmx package, but with the original \mathcal symbols, use

\DeclareMathAlphabet{\mathcal}{OMS}{cmsy}{m}{n}

A complete example:

\documentclass[12pt,a4paper]{report}
\usepackage{mathptmx}

\DeclareMathAlphabet{\mathcal}{OMS}{cmsy}{m}{n}

\begin{document}

$\mathcal{U}$

\end{document}

If you are only interested in changing the text fonts, but keeping the math fonts, instead of mathptmx you could use newtxtext package instead:

\documentclass[12pt,a4paper]{report}
\usepackage{newtxtext}

\begin{document}

$\mathcal{U}$

\end{document}
1
  • 2
    That's great !! I keep discovering hidden tips about LaTeX almost daily !!
    – Razor
    Apr 22, 2013 at 3:51
1

To obtain an ordinary \mathcal, please comment the

\usepackage{mathptmx}

line in your file.

BTW: do you really need all these packages?

1
  • Thank you for replying. Yeah I know I have a lot of packages .. It's a dissertation so I try to make it look good :)
    – Razor
    Apr 22, 2013 at 3:51

Not the answer you're looking for? Browse other questions tagged or ask your own question.