Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I'm trying to use \mathscr in my documents, but it just doesn't show up. I'm using MacTeX, with pdfTeX and XeTeX version 3.1415926 and TeXShop version 3.26. As an MWE, I can use:

%!TEX TS-program = xelatex  
%!TEX encoding = UTF-8 Unicode  
\documentclass[a4paper]{report}  
\usepackage{mathrsfs}  
\begin{document}  
$\mathscr{abcdefghijklmnopqrstuvwxyz}$  
\end{document}  

the first two lines being TeXShop's way to be told to use XeLaTeX (though using pdfTeX changes nothing) and to save the document in UTF-8 Unicode encoding. How do I get the \mathscr to appear?

share|improve this question
add comment

2 Answers 2

up vote 7 down vote accepted

You have to define a math font, e.g. XITS Math

%!TEX TS-program = xelatex
%!TEX encoding = UTF-8 Unicode
\documentclass[a4paper]{report}
\usepackage{unicode-math}
\setmathfont{XITS Math}
\setmathfont[version=setB,StylisticSet=1]{XITS Math}
\begin{document}
$\mathscr{abcdefghijklmnopqrstuvwxyz}$

$\mathscr{ABCDEFGHIJKLMNOPQRST}$

\mathversion{setB}%
$\mathscr{abcdefghijklmnopqrstuvwxyz}$

$\mathscr{ABCDEFGHIJKLMNOPQRST}$
\end{document}

enter image description here

share|improve this answer
add comment

Talking about pdfLaTeX, the command \mathscr from the package mathrsfs only support capital letters...

MWE

%!TEX TS-program = pdflatex
%!TEX encoding = UTF-8 Unicode  
\documentclass[a4paper]{report}
\usepackage{mathrsfs}
\begin{document}
$\mathscr{ABCDEFGHIJKLMNOPQRSTUVWXYZ}$
\end{document}  

enter image description here

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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