Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I'm looking for a way to get symbols for perpendicular and parallel with an equal height. I want to use the symbols as a superscript to a function like

\Psi^{\perp/\parallel}

However, it looks kind of awkward since the two symbols are not displayed at the same height (the parallel sign is way larger). If I use

\scriptstyle\parallel

the symbols have approximately the same height but are not aligned properly in the vertical direction.


Update: I found out that

\Psi^{\perp/\raisebox{0.5pt}{$\scriptscriptstyle\parallel$}}(x)

produces what I'm looking for. Still this is kind of a hack and more consistent solution would be really appreciated.

share|improve this question
add comment

1 Answer 1

up vote 6 down vote accepted

I suggest you construct a symbol using vertical rules. One version that will adapt itself to different math modes is

\newcommand{\myparallel}{{\mkern3mu\vphantom{\perp}\vrule depth 0pt\mkern2mu\vrule depth 0pt\mkern3mu}}

which you can use as

\Psi^{\perp/\myparallel}

The height of the \vrule here automatically adjusts to the height of \perp, setting the depth to 0pt makes it fit with the base of that symbol too.

share|improve this answer
    
Woohh, nice one. Thanks a lot. :) By the way, I think it looks a bit better with \mkern1mu in the middle. –  hennes Jul 25 '12 at 12:33
    
Different fonts will require different choices of the spacing parameters before, after and between the rules. Please feel free to adjust as necessary. –  Andrew Swann Jul 25 '12 at 15:15
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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