Math & Science ⇒ overbar in parentheses
overbar in parentheses
I would like to have an overbar in parentheses to imply particles and antiparticles (ie p or \bar{p}). I've seen this notation used in PRL so I presume it can be done in latex.
Does anyone know how?
Cheers,
Steve
Does anyone know how?
Cheers,
Steve
NEW: TikZ book now 40% off at Amazon.com for a short time.

Re: overbar in parentheses
I'm not entirely sure exactly what look you're after -- perhaps I'd need to know more about particle physics -- but does the \overline{ ... } command do what you want? There's also \bar{...} but you seem to know about that one already...
Re: overbar in parentheses
sorry I should have been more clear. I would like the parentheses included in the 'overness.' That is, parenthesis around the line, all over the 'p'
Kinda like this:
(-)
p
Kinda like this:
(-)
p
overbar in parentheses
Hi,
perhaps you are looking for something like the following?
perhaps you are looking for something like the following?
Code: Select all
\documentclass{article}
\usepackage{amsmath}
\begin{document}
\[ \overset{(-)}{p} \]
\end{document}
1,1,2,3,5,8,13,21,34,55,89,144,233,...
Re: overbar in parentheses
\overset is a step in the right direction, but it can't seem to get the size of parentheses right. The standard font size is way to big, the parenthesis should not be significantly wider than the bar. I can make them bigger using \Big etc... but \small,\tiny etc doesn't seem to do anything.
overbar in parentheses
Try this:
Code: Select all
\documentclass{article}
\usepackage{amsmath}
\usepackage{relsize}
\begin{document}
\[ \overset{\text{\relsize{-1}(}-\text{\relsize{-1})}}{p} \]
\end{document}
1,1,2,3,5,8,13,21,34,55,89,144,233,...
Re: overbar in parentheses
I can only get down to 6pt font. This is still too big. Even if I define a new size command as 1pt, latex complains and returns me to 6pt. I think I need an actual smaller '(' character that does not need to be scaled. I'll look around and post back.
overbar in parentheses
Another option, using some of the features provided by the graphicx package (now you can control the parentheses size at will):
Code: Select all
\documentclass{article}
\usepackage{amsmath}
\usepackage{graphicx}
\newcommand\mysymb{\scalebox{.3}{(}\raisebox{-1.7pt}{$-$}\scalebox{.3}{)}}
\begin{document}
\[ \overset{\mysymb}{p} \]
\end{document}
1,1,2,3,5,8,13,21,34,55,89,144,233,...
overbar in parentheses
The problem with arbitrary scaling is that quality is substantially degraded because the stroke widths don't match any more. The quality is a bit better if you use the smallest boldface font:
Code: Select all
\documentclass{article}
\usepackage{lmodern}
\usepackage{amsmath}
\begin{document}
\[ \overset{\textbf{\fontsize{3pt}{3pt}\selectfont(---)}}{p} \]
\end{document}
overbar in parentheses
The smallest font that I can use is 5pt. If I request anything smaller than that, latex complains and makes it 5pt anyways.
I've managed to get approximately what I was after using a combination of \raisebox and \scalebox. it doesn't look the best (it doesn't render properly in the dvi file either), but it's most functional for basic things like pbars. More exotic particle names that involve superscripts don't look so good.
The command I'm using is this;
Then apply it like this;
Example results (with a regular pbar for reference)

If i could get the superscript 0 to sit properly as though the bar wasn't there, it would be a bit nicer. Also the right bracket is a bit to close to the bar.
I've managed to get approximately what I was after using a combination of \raisebox and \scalebox. it doesn't look the best (it doesn't render properly in the dvi file either), but it's most functional for basic things like pbars. More exotic particle names that involve superscripts don't look so good.
The command I'm using is this;
Code: Select all
\newcommand\brabar{\raisebox{-4.0pt}{\scalebox{.2}{
\textbf{(}}}\raisebox{-4.0pt}{{\_}}\raisebox{-4.0pt}{\scalebox{.2}{\textbf{)
}}}}
Code: Select all
$\overset{\brabar}{p}$

If i could get the superscript 0 to sit properly as though the bar wasn't there, it would be a bit nicer. Also the right bracket is a bit to close to the bar.