4

I would prefer to work with a prime symbol that is less rotated. I tried the following

\usepackage[figuresright]{rotating}
\newcommand*{\p}{\turnbox{12}{$\,'$}\;}

which is visually what I desire. If I now write something like

$a+b\p$

things work fine, but when I use \p in subscript contexts

$a_{c\p,d}+b\p$

the symbol is not scaled and not placed right. Of course one can always work with hacks such as

$a_c\turnbox{12}{${}_{'}$}_{,d}+b\p$

but perhaps anyone knows of a simple solution?

  • 1
    If you want a completely vertical prime, the textcomp package provides \text{\textquotesingle}. – Chel Mar 12 '12 at 23:24
4

You can use \mathchoice to adjust the size depending on the math context as follows:

enter image description here

References:

Code:

\documentclass{article}
\usepackage[figuresright]{rotating}

\newcommand*{\p}{%
    \mathchoice%
        {\turnbox{12}{$\displaystyle\,'$}\;}%
        {\turnbox{12}{$\textstyle\,'$}\;}%
        {\turnbox{12}{$\scriptstyle\,'$}\;}%
        {\turnbox{12}{$\scriptscriptstyle\,'$}\;}%
}%

\begin{document}
$a+b\p$

$a_{c\p,d}+b\p$
\end{document}
  • By the way, after a subscripted variable, I use this as \!\p, not just \p. (Compare \(s_1\p\) with \(s_2\!\p\).) – Lover of Structure Mar 10 '13 at 11:08

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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