MIT 论文包中的 \mathcal 问题

MIT 论文包中的 \mathcal 问题

我在用本论文模板,我正在使用以下软件包:

%\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}

问题在于\mathcal函数完全类似我最后一个问题,这意味着我想要正常的\mathcal字体,但我无法使用我上一个问题中提出的答案来解决这个问题。

我努力了:

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

但不影响字体的风格。

获得的结果示例,

在此处输入图片描述

预期结果,

在此处输入图片描述


第一次编辑:

如果我在之后添加声明,mathdesign则会收到以下错误:

! 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}

第二次编辑:

应用建议的解决方案后:

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

我收到以下错误:

! 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

这里我提到了我正在使用的其他包,只是为了确保它们之间没有冲突。

  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,

答案1

正如 egreg 所提到的,你必须声明你的数学字母表\mathcal 的加载mathdesign,因为这个包会为您改变所有的数学符号。

正如您所看到的,该包mathdesign似乎已经声明了相同的字母表。这就是为什么您在这里遇到“命令 \mathcal 已定义”的原因。在修补mathdesign或搜索非标准文档类中的某些可能的声明之前,我只想取消定义这个数学字母表并根据需要声明它。请参阅我的 MWE;希望它能澄清我的解释。

% arara: pdflatex

\documentclass[12pt]{mitthesis}
\usepackage[adobe-utopia]{mathdesign}
\let\mathcal\undefined
\DeclareMathAlphabet{\mathcal}{OMS}{cmsy}{m}{n}

\begin{document}
    This is the math, $\mathcal{P},\mathcal{O},\mathcal{W},\mathcal{F}$.    
\end{document}

在此处输入图片描述


如下所述,声明应在加载之前进行fontenc

相关内容