3

I want to use a prime along a math symbol, but now it looks a little odd, e.g. like this: prime

I would like to lower the prime, if possible. Is there a nice way to do this?

Comment: stripping off all really irrelevant stuff, the code is as follows:

\documentclass[a4paper, twoside, 10pt]{report}
\usepackage[english]{babel}
\usepackage{mathpazo}
\linespread{1.05}
\usepackage[hidelinks]{hyperref}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{amsthm}
\usepackage{mathtools}
\begin{document}
%stuff
\begin{equation}
\Phi(p\triangleleft g)=\Phi(p_2)\triangleleft'g
\end{equation}
\end{document}

and so on. I would like to prime to be such that the upper edge of the triangle is sort of on level with the middle of the prime.

  • 1
    "I would like to lower the prime" -- by how much? E.g,, would you like the symbol to be centered on the math centerline? Please be specific. – Mico Jun 9 '16 at 14:25
  • What a big prime have you got: could you show the code that produces the picture you posted? – GuM Jun 9 '16 at 14:28
  • @GustavoMezzetti Is it that big? – Manuel Jun 9 '16 at 14:43
5

The following implementation of \myprime may be what you're looking for.

\newcommand\myprime{\mkern-3.5mu\raise0.6ex\hbox{$\scriptstyle\prime$}}

The \mkern-3.5mu instruction shifts the material to the left, while \raise0.6ex raises it a bit.

enter image description here

\documentclass{article}
\usepackage{newpxtext,newpxmath} % Palatino clone text and math font
\newcommand\myprime{\mkern-3.5mu\raise0.6ex\hbox{$\scriptstyle\prime$}}

\begin{document}
$\Phi(p_2)\triangleleft\myprime g$ vs.\ $\Phi(p_2)\triangleleft' g$
\end{document}

Here's the same screenshot, but with mathpazo loaded instead of newpxtext and newpxmath:

enter image description here


Addendum: To create more space after the lowered prime symbol, one could insert an instruction such as \mkern5mu. In case you're wondering how wide a "mu" is: There are 18 mu in 1 em. :-) Thus, the following definition may work for you:

\newcommand\lowprime{\mkern-3.5mu%
                     \raise0.6ex\hbox{$\scriptstyle\prime$}
                     \mkern5mu}

A full MWE:

enter image description here

\documentclass{article}
\usepackage{mathpazo}
\newcommand\myprime{\mkern-3.5mu%
                    \raise0.6ex\hbox{$\scriptstyle\prime$}}
\newcommand\lowprime{\mkern-3.5mu%
                     \raise0.55ex\hbox{$\scriptstyle\prime$}
                     \mkern5mu}
\begin{document}
\begin{tabular}{ll}
$\Phi(p_2)\triangleleft\myprime g$  & \verb+\myprime+\\
$\Phi(p_2)\triangleleft\lowprime g$ & \verb+\lowprime+\\
$\Phi(p_2)\triangleleft^{\prime}g$  & \verb+^{\prime}+ \\
\end{tabular}
\end{document}
  • That did it! Did you add the newpxtext and newpxmath (which made the triangle smaller) just for giggles or? – B. Pasternak Jun 9 '16 at 14:53
  • 2
    Also: Jabba, you're a wonderful human being. – B. Pasternak Jun 9 '16 at 14:54
  • @B.Pasternak - Actually, I started writing my answer before you posted a fully compilable example, and I thus had to guess which font you were using. I could tell it was some type of Palatino clone, and I simply worked with the first guess (newpxtext and newpxmath) that seemed about right. The output that's produced by loading mathpazo instead of newpxtext and newpxmath is quite similar, really. I've just posted a second screenshot, showing what's produced with mathpazo. The main difference indeed occurs with \triangleleft. – Mico Jun 9 '16 at 14:57
  • @B.Pasternak - A little-known fact: My illustrious ancestor of Tatooine, to whom I bear more than just a passing resemblance, was an early adopter of the TeX typesetting system! :-) – Mico Jun 9 '16 at 15:03
  • Thanks very much, that is clear. One more thing: you say that the mkern part shifts "the material" to the let, which it does, but it takes the symbols after the prime with it, and I would rather not have that. However, deleting it in the definition didn't help. So basically the lowering is perfect (and I can see how to adjust it as well), but I would just like to having the space with the symbols following the new prime to be as before. Is that possible? – B. Pasternak Jun 9 '16 at 15: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.