I would like to cross a symbol like p, in math mode, similar to what we get for h by using \hbar, i.e. ꝑ (U+A751).
Picture in case of font problems:
I would like to cross a symbol like p, in math mode, similar to what we get for h by using \hbar, i.e. ꝑ (U+A751).
Picture in case of font problems:
Something similar has been defined by @egreg in this post. But here is a customized command:
\newcommand{\pbar}{\lower1.5ex\hbox{$\mathchar'26$}\mkern-6mu p}
Here is mwe:
\documentclass{article}
\newcommand{\pbar}{\lower1.5ex\hbox{$\mathchar'26$}\mkern-6mu p}
\begin{document}
$\pbar$ {\large$\pbar$} {\huge$\pbar$}
\end{document}
Here is another take at the symbol. The extra horizontal space can be addressed with a \!. The vertical space has been accounted for by keeping the original height and setting the depth to 0pt.
\newcommand{\pbar}{\raisebox{-1.5ex}[\height][0pt]{$\mathchar'26$}\mkern-6mu p}
\log \pbar.
– passerby51
May 13 '16 at 16:36
\smash command.
– azetina
May 13 '16 at 17:23
The symbol has a Unicode code point:
U+A751 LATIN SMALL LETTER P WITH STROKE THROUGH DESCENDER
There are some (at least) text fonts, which do provide the symbol. Example for LuaTeX/XeTeX:
\documentclass{article}
\usepackage{booktabs}
\usepackage{fontspec}
\newfontfamily\DejaVuSans{DejaVu Sans}
\newcommand*{\Rows}{}
\makeatletter
\newcommand*{\TestFamily}[1]{%
\expandafter\newfontfamily\csname FONT@#1\endcsname{#1}%
\g@addto@macro\Rows{\RowFamily{#1}}%
}
\newcommand*{\TestSingle}[1]{%
\expandafter\newfontfamily\csname FONT@#1\endcsname{#1}%
\g@addto@macro\Rows{\RowSingle{#1}}%
}
\newcommand*{\RowFamily}[1]{%
#1 & \csname FONT@#1\endcsname\symbol{"A751}
& \csname FONT@#1\endcsname\bfseries\symbol{"A751}
& \csname FONT@#1\endcsname\itshape\symbol{"A751}
& \csname FONT@#1\endcsname\bfseries\itshape\symbol{"A751}
\tabularnewline
}
\newcommand*{\RowSingle}[1]{%
#1 & \csname FONT@#1\endcsname\symbol{"A751}
\tabularnewline
}
\TestFamily{DejaVu Sans}
\TestSingle{Quivira}
\TestFamily{Segoe UI}
\TestFamily{FreeSerif}
\makeatother
\begin{document}
\begin{tabular}{lllll}
\toprule
Name & Regular & Bold & Italic & Bold Italic\\
\midrule
\Rows
\bottomrule
\end{tabular}
\end{document}
The symbol could then be used inside math via \text{\symbol{"A751}} (package amstext or amsmath).
The width of the bar is 9mu, so we need such amount of back up.
Here's a version that works also in sub/superscripts and has no spacing issues.
\documentclass{article}
\usepackage{amsmath}
\makeatletter
\DeclareRobustCommand{\pbar}{\mathord{%
\text{$\m@th\mkern-2mu\raisebox{-1.5ex}[0pt][0pt]{$\mathchar'26$}\mkern-7mu p$}%
}}
\makeatother
\begin{document}
$a\pbar_{\pbar_{\pbar}}\hbar$
$ap$
\end{document}
\m@th does and what it is? http://tex.stackexchange.com/a/153398/10898
– azetina
May 14 '16 at 16:06
$\not\! p$? – azetina May 12 '16 at 23:39p"?\hbarhas the [bar] running across the top due to the ascender inh. Should the [bar] run across the bottom in apdue to the descender? – Werner May 12 '16 at 23:41pwith a stroke through the vertical line, much as withħ, or in other words, likeƀreflected in the baseline. Here it is:ꝑU+A751 – Au101 May 13 '16 at 00:02