1

Can I get the prime from Junicode (second and fourth line) to be used in math mode without having to use \text{′} every time? That is, can I get the first line in the code (with an ascii apostrophe for prime) to produce the output of the 2nd and 4th?

After including the glyph with setmathfont, the prime is too small and high.

\documentclass{article}
\usepackage{amsmath}
\usepackage{fontspec}
\usepackage[math-style=upright]{unicode-math}

\setmainfont{Junicode}
\setmathfont{Asana-Math.otf}
\setmathfont[
 range={"0370-"03FF,   % greek
 "0000-"003C,"003E-"007F},  % ascii range minus =
 ] {Junicode}

\begin{document}
$p'$\par
p′\par
$p′$\par
$p\text{′}$

\bigskip

\setmathfont[ range={"2032} ] {Junicode}

$p'$\par
p′\par
$p′$\par
$p\text{′}$
\end{document}
2
  • Are willing to type instead of '?
    – egreg
    Feb 27, 2016 at 22:40
  • @egreg, yes, it wouldn't be ideal, but if it produced the right output and there were no other way, then yes.
    – Toothrot
    Feb 27, 2016 at 22:45

1 Answer 1

1

Not really portable, because it requires knowing that Junicode corresponds to mathgroup 4. However, p'' will not give a very pretty double prime.

\documentclass{article}
\usepackage{amsmath}
\usepackage{fontspec}
\usepackage[math-style=upright]{unicode-math}

\setmainfont{Junicode}
\setmathfont{Asana-Math.otf}
\setmathfont[
 range={"0370-"03FF,   % greek
 "0000-"003C,"003E-"007F},  % ascii range minus =
 ] {Junicode}

\AtBeginDocument{%
  \Umathcode`'="0 "4 "2032
  \Umathcode`′="0 "4 "2032
}

\begin{document}

$p'$\par
p′\par
$p′$\par
$p\text{′}$

\end{document}

enter image description here

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .