I am using this thesis template, and I am using the following packages:
%\documentclass[a4paper,12pt,oneside,leftblank]{mitthesis} % commented out by suggestion
\documentclass{article}
\usepackage{amsmath}
\usepackage[adobe-utopia]{mathdesign}
%\DeclareMathAlphabet{\mathcal}{OMS}{cmsy}{m}{n}
\usepackage[T1]{fontenc}
\newcommand*{\mycommand}[1]{\texttt{\emph{#1}}}
\pagestyle{plain}
\begin{document}
\section{sect-1}
This is the math, $\mathcal{P},\mathcal{O},\mathcal{W},\mathcal{F}$, $\mathcal{L}$
\end{document}
The problem is with \mathcal
function exactly like my last question, meaning that I would like to have the normal \mathcal
font but I could not resolve it using the proposed answer in my previous question.
I have tried:
\DeclareMathAlphabet{\mathcal}{OMS}{cmsy}{m}{n}
but it does not affect the style of the font.
Obtained result example,
Expected result,
First Edit:
If I add the declaration after the mathdesign
I receive the following error:
! LaTeX Error: Command `\mathcal' already defined.
See the LaTeX manual or LaTeX Companion for explanation.
Type H <return> for immediate help.
...
l.104 ...reMathAlphabet{\mathcal}{OMS}{cmsy}{m}{n}
Second Edit:
After applying the solution proposed as:
\let\mathcal\undefined
\DeclareMathAlphabet{\mathcal}{OMS}{cmsy}{m}{n}
I am getting the following error:
! Use of \reserved@a doesn't match its definition.
\reserved@b ->\relax
\ifmmode \else \non@alpherr \mathcal \fi \use@mathgrou...
l.842 ...ed baseline (mark $\mathcal{L}
$) which cannot
Here I mention the other packages I am using, just to be sure that there is no conflict between them.
lgrind, cmap, times, graphicx, makeidx, subfig, amsmath, algorithm2e, epstopdf, multirow, multicol, tabularx, rotating, framed,color, fancybox, paralist, float, afterpage, quotchap, cite, verbatim, vector, xcolor, babel, hyphenat, footnote, enumerate, bibentry, afterpage, mathdesign, fontenc,
Best Answer
As mentioned by egreg, you will have to declare your math-alphabet
\mathcal
after the loading ofmathdesign
, as this package changes all the math-symbols for you.As you have seen, the package
mathdesign
seems to be declaring that same alphabet already. That is why you encounter a "Command \mathcal already defined." here. Before patching around inmathdesign
or searching for some possible declaration in your non-standard documentclass, I would just undefine this math-alphabet and declare it as you please. See my MWE; it should hopefully clarify my explanation.As noted below, the declaration should take place before the loading of
fontenc
.