I am using a template that requires XeLaTeX. I usually use pdfLaTeX, but I need to use this template for my dissertation. I believe the template uses XeLaTeX to use particular fonts, but I am not sure how pdfLaTeX and XeLaTeX work... The issue is kind of odd.
If I use the following:
$\mathcal{A}$
The "A" is printed, but it is not calligraphic.
If I use the following:
$\mathcal{U}$
The "U" is printed, but it is not calligraphic, and also, I receive the following error:
Undefined control sequence... \mathcal -> \mathrsfs
I do not receive the error for particular character (e.g., A), but receive the error for others (e.g., U).
Edit:
I was able to partially resolve the issue (e.g., I resolved the error message), but \mathcal creates script fonts instead of calligraphic fonts. The .cls, included packages, and definitions are the following:
univ-thesis.cls:
\NeedsTeXFormat{LaTeX2e}
\ProvidesClass{univ-thesis}[v0.0 Thesis Class]
\LoadClass[12pt, oneside, letterpaper]{book}
% Required packages
\RequirePackage{graphicx}
\RequirePackage{hyperref}
\RequirePackage{glossaries-extra}
\hypersetup{
linktocpage,
linktoc=all,
colorlinks,
citecolor=univ_blue,
filecolor=black,
linkcolor=univ_blue,
urlcolor=univ_blue,
}
% colors
\RequirePackage{color}
\definecolor{univ_blue}{rgb}{0, 0.15686, 0.333333}
\definecolor{univ_gold}{rgb}{0.9176,0.6666, 0}
\RequirePackage{url}
\RequirePackage[titles]{tocloft}
\setcounter{tocdepth}{2} %% add subsections to toc ---> set to 1 for sections only
\renewcommand{\cftchapfont}{\normalsize \scshape}
\renewcommand\bibname{References}
\renewcommand\listfigurename{Listing of figures}
\raggedright
\RequirePackage{pdfsync} %do pdf synchronization [andy]
\usepackage[closeFloats, noSeparatorLine]{fltpage} %use the custom modified fltpage package
\RequirePackage{afterpage}
\synctex=1 % turn synctex on automatically to sync between pdf viewer [andy]
% list an entire bibliography entry inline. Useful for acknowledging when my paper was previously published
\RequirePackage{bibentry}
\nobibliography*
\RequirePackage{lettrine} % big letter at start of chapter
\RequirePackage[width=6in, letterpaper]{geometry}
\RequirePackage{fancyhdr}
\pagestyle{plain} % options: empty , plain , fancy
\RequirePackage[palatino]{quotchap}
\definecolor{chaptergrey}{rgb}{0, 0.15686, 0.333333} %% Set chapter number as univ blue
\RequirePackage{titling}
\RequirePackage{setspace}
\RequirePackage{booktabs} % for much better looking tables
\RequirePackage[labelfont={sf,bf,small},textfont={sf,small},justification=RaggedRight,margin=0pt, figurewithin=section, tablewithin=section]{caption}
\onehalfspacing
%\raggedright
\parindent 12pt
\RequirePackage{mathspec}
% use Arno Pro instead of standard LaTeX fonts
\setmathsfont(Digits,Latin,Greek)[
Path = fonts/,Extension = .otf,
UprightFont=ArnoPro-Regular,
BoldFont=ArnoPro-Bold,
ItalicFont=ArnoPro-Italic,
BoldItalicFont=ArnoPro-BoldItalic,
Numbers={OldStyle,Proportional}]{ArnoPro}
\setmathrm
[Path = fonts/,Extension = .otf,
UprightFont=ArnoPro-Regular,
BoldFont=ArnoPro-Bold,
ItalicFont=ArnoPro-Italic,
BoldItalicFont=ArnoPro-BoldItalic
]{ArnoPro}
\RequirePackage{xltxtra,xunicode}
\defaultfontfeatures{Mapping=tex-text, Numbers=OldStyle}
\aliasfontfeatureoption{Ligatures}{Historic}{Historical}
\setromanfont
[Path = fonts/,
Extension = .otf,
Mapping=tex-text,
Numbers=OldStyle,
Ligatures={Common},
SizeFeatures={%
{Size={-10}, Font=-RegularCaption},
{Size={10-13.0}, Font=},
{Size={13.01-19.9}, Font=-RegularSubhead, Ligatures=Rare, Contextuals={Swash,Alternate}},
{Size={19.91-},Font=-RegularDisplay, Ligatures=Rare, Contextuals={Swash,Alternate}}},
UprightFont=ArnoPro-Regular,
BoldFont=ArnoPro-Bold,
ItalicFont=ArnoPro-Italic,
BoldItalicFont=ArnoPro-BoldItalic
]{ArnoPro} %
\renewcommand*{\sectfont}{\normalcolor\usefont{T1}{ArnoPro}{b}{n}}
% some definitions
\def\degreeyear#1{\gdef@degreeyear{#1}}
\def\degreemonth#1{\gdef@degreemonth{#1}}
\def\degree#1{\gdef@degree{#1}}
\def\advisor#1{\gdef@advisor{#1}}
\def\department#1{\gdef@department{#1}}
\def\field#1{\gdef@field{#1}}
\def\university#1{\gdef@university{#1}}
\def\universitycity#1{\gdef@universitycity{#1}}
\def\universitystate#1{\gdef@universitystate{#1}}
% custom todo command
\newcommand\TODO[1]{\textcolor{red}{TODO: #1}}
%modify \autoref (must go after begin document)
\renewcommand{\figureautorefname}{Figure}
\renewcommand{\tableautorefname}{Table}
\renewcommand{\sectionautorefname}{Section}
\renewcommand{\subsectionautorefname}{Section}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%% Cover Page %%%%%%%%%%%%%%%%%%%%
\renewcommand{\maketitle}{
\singlespacing
\thispagestyle{empty}
\vspace*{\fill} \vspace{10pt} \begin{center}
\Huge \textcolor{univ_blue}{\textit{\thetitle}} \normalsize \ \sc \vspace{20pt}
\theauthor \vspace{20pt} \ Dissertation \ submitted to the\
College of ... \ at \ @university\
\vspace{10pt}
in partial fulfillment of the requirements for the degree of \
\vspace{10pt}
@degree \ in \ @field\
\vspace{40pt}
..., Ph.D., Chair \
..., Ph.D. \
... Ph.D. \
..., Ph.D. \
..., Ph.D. \
\vspace{20pt}
@department \
\vspace{40pt}
@universitycity, @universitystate\
@degreeyear \
\vspace{40pt}
Kpteywords: ... \
\textcolor{univ_blue}{Copyright \copyright~\textit{@degreeyear \hspace{3pt}~- \theauthor}} \
\noindent \href{https://creativecommons.org/licenses/by-nc/4.0/}{CC BY-NC 4.0}
\end{center} \vspace*{\fill}
\newpage
}
\newcommand{\copyrightpage}{
\newpage \thispagestyle{empty} \vspace{\fill}
\sc \noindent {\textbf{\textcolor{univ_blue}{\copyright~\textit{@degreeyear \hspace{3pt}~- \theauthor}}}} \
% Change the following line if you don't want to use the creative commons license
\noindent \href{https://creativecommons.org/licenses/by-nc-nd/4.0/}{CC BY-NC-ND 4.0}
\vspace{\fill} \newpage \rm
}
\newcommand{\abstractpage}{
\thispagestyle{empty}
\pagenumbering{roman}
\setcounter{page}{2}
\pagestyle{fancy}
\renewcommand{\headrulewidth}{0.0pt}
\begin{center}
\vspace{1pt}
\sc \textcolor{univ_blue}{Abstract} \ \rm
\vspace{10pt}
\Large \textcolor{univ_blue}{\textit{@title}} \normalsize\
\vspace{25pt}
... \ \vspace{25pt}
\end{center}
\singlespace %univ requests that abstract is single spaced
\input{frontmatter/abstract}
\singlespace %univ requests that abstract is single spaced
\newpage \lhead{} \rhead{}
\cfoot{\thepage}
\onehalfspacing
}
\newcommand{\dedicationpage}{
\pagestyle{fancy}
\newpage \thispagestyle{fancy} \vspace{\fill}
\sc \noindent \input{frontmatter/dedication}
\vspace{\fill} \newpage \rm
}
% the list of papers
\newcommand{\paperlist}{
\renewcommand{\headrulewidth}{0pt}% 0.5pt header rule
\pagestyle{fancy}
\newpage
\thispagestyle{fancy}
\chapter*{\textcolor{univ_blue}{Contributing Papers}}
\noindent \input{frontmatter/paperlist}
}
% acronym list
\newcommand{\acrolist}{
\renewcommand{\headrulewidth}{0pt}% 0.5pt header rule
\pagestyle{fancy}
\newpage
\thispagestyle{plain}
\chapter*{\textcolor{univ_blue}{List of Acronyms}}
\label{acro_chapter}
\noindent \begin{acronym} \color{univ_blue} \input{support/acronyms} \end{acronym}
}
% glossary package overrides
% \renewcommand{\glossarypreamble}{\glsfindwidesttoplevelname[\acronymtype] \setlength{\parskip}{0pt}} % <--------- THAT IS THE KEY, NOW USING alttree style.
\renewcommand*\glspostdescription{\dotfill}
% \newglossarystyle{owngloss}{%
% \setglossarystyle{treegroup}%
% \renewcommand*{\glossentry}[2]{%
% \glsentryitem{##1}\textbf{\glstarget{##1}{\glossentryname{##1}}}%
% \ \glossentrydesc{##1} \ \par
% }%
% }
% list of symbols
\newcommand{\listofsymbols}{
\renewcommand{\headrulewidth}{0pt}% 0.5pt header rule
\pagestyle{fancy}
% \newpage
\thispagestyle{plain}
% \chapter*{\textcolor{univ_blue}{List of Symbols}}
\label{symbols_chapter}
% \noindent \color{univ_blue} \input{support/symbols} \makeglossaries \printglossary
% \noindent \color{univ_blue} \input{support/symbols} \printglossary
% \noindent \color{univ_blue} \printglossary[sort=use,style=alttree,title=\textcolor{univ_blue}{List of Symbols}]
% \noindent {\color{univ_blue} \printglossary[title=\textcolor{univ_blue}{List of Symbols}]}
% option [style=long] condenses list
\noindent {\color{univ_blue} \printnoidxglossary[sort=use,title=\textcolor{univ_blue}{List of Symbols}]}
}
% the acknowledgments page
\newcommand{\acknowledgments}{
\chapter{\textcolor{univ_blue}{Acknowledgments}}
\noindent
\input{frontmatter/thanks}
\vspace{\fill}
\newpage
}
% An environment for paragraph-style section
\providecommand\newthought[1]{%
\addvspace{1.0\baselineskip plus 0.5ex minus 0.2ex}%
\noindent\textsc{#1}}
\newcommand{\bfB}[1] {
\textbf{\textcolor{univ_blue}{#1}}
}
\newcommand{\bfG}[1] {
\textbf{\textcolor{univ_gold}{#1}}
}
\newcommand{\tcB}[1] {
{\textcolor{univ_blue}{#1}}
}
\newcommand{\tcG}[1] {
{\textcolor{univ_gold}{#1}}
}
\renewcommand\listfigurename{\textcolor{univ_blue}{List of Figures}}
\renewcommand\listtablename{\textcolor{univ_blue}{List of Tables}}
Include packages:
\usepackage{bm}
\usepackage{mathtools}
\usepackage{graphicx}
\usepackage{epstopdf}
\usepackage{multicol}
\usepackage{lipsum,adjustbox}
\usepackage{calligra}
\usepackage{calrsfs}
\usepackage{environ}
\pagestyle{plain}
\usepackage{lastpage}
\usepackage{float}
\usepackage{textcomp}
\usepackage{tikz}
\usepackage{subcaption}
\usetikzlibrary{shapes}
\usepackage{comment}
\usepackage[hang,flushmargin]{footmisc}
\usepackage{tabularx,colortbl}
\usetikzlibrary{shapes.geometric, arrows, fit}
\usepackage{letltxmacro,xparse}
\usepackage{sidecap}
\usepackage{wrapfig}
\usepackage{floatrow}
\usepackage[printonlyused,withpage]{acronym}
\usepackage{array}
\usepackage{makecell}
\graphicspath{{figures/}}
\usepackage[section]{placeins}
\usepackage{enumitem}
\usepackage[linesnumbered,ruled,vlined]{algorithm2e}
\usepackage{multirow}
Definitions:
\newcommand\blfootnote[1]{%
\begingroup
\renewcommand\thefootnote{}\footnote{#1}%
\addtocounter{footnote}{-1}%
\endgroup}
\def\footnoterule{\relax%
\kern15pt
\hbox to \columnwidth{\hfill\vrule width 1\columnwidth height 0.6pt\hfill}
\kern4.6pt}
\LetLtxMacro\oldhref\href
\RenewDocumentCommand{\href}{o m m}{%
\IfValueTF{#1}
{\oldhref[#1]{#2}{\bfseries #3}}
{\oldhref{#2}{\bfseries #3}}%
}
\DeclareMathOperator{\argmin}{argmin}
\DeclareMathOperator{\argmax}{argmax}
\newcommand{\apre}{{\textit{a priori}}}
\newcommand{\apost}{{\textit{a posteriori}}}
\newcommand{\norm}[1]{\left\lVert#1\right\rVert}
\let\T\relax
\DeclareMathOperator*{\T}{\mathsf{T}}
\DeclareMathAlphabet\mathbfcal{OMS}{cmsy}{b}{n}
\newtheorem{thm}{Theorem}%[section]
\newtheorem{cor}{Corollary}%[section]
\newtheorem{lem}{Lemma}%[section]
\newtheorem{problem}{Problem}%[section]
\newtheorem{remark}{Remark}%[section]
\newtheorem{assumption}{Assumption}%[section]
\newtheorem{definition}{Definition}%[section]
\newtheorem{prop}{Proposition}%[section]
\newtheorem{fact}{Fact}%[section]
\NewEnviron{myblock}
{\colorbox{block-gray}{%
\parbox{\dimexpr\linewidth-2\fboxsep\relax}{%
\small\addtolength{\leftskip}{10mm}
\addtolength{\rightskip}{10mm}
\BODY}}
}
\renewcommand{\quote}{\myblock}
\renewcommand{\endquote}{\endmyblock}
\DeclareSymbolFontAlphabet{\mathcal} {symbols}but whether re-issuing that sets things back depends on ... stuff you haven't shown. – David Carlisle Jul 04 '21 at 17:44calrsfslooks very suspicious. If this is a package you've added, comment it out and see what happens. If it's part of the class file, I'm not really sure how to suppress it. – barbara beeton Jul 04 '21 at 18:51