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 am looking for suggestions on how to typeset complex numbers in the modulo-argument form, sometimes called phasor notation. Have already checked Conventions for typesetting complex vectors and vectors with complex components but nobody mentions this in particular. I am explicitly excluding exponential and sine-cosine notations. My MWE is as follows

\documentclass{article}
\begin{document}
    $z = r \angle \phi$
\end{document}

I think it looks ugly, specially if the angle has many digits, ie

$z = 1.19 \angle -78.2039^{\circ}$

I was thinking of an \angle replacement which maybe would extend the lower segment up to the last digit. What do you think?

EDIT: It looks like the steinmetz package doesn't do a good job with the vertical space if the \phasor{} argument has a \fraction{}{} with parenthesis, see:

\documentclass{article}
\usepackage{steinmetz}

\begin{document}
    Something.
    \[I = I \phase{\left(\frac{A_0}{B_0}\right)}\]
    This line is too close to the upper equation, don't you think?

    \[I = I \phase{\left(\frac{A_0}{B_0}\right)}\]
    Whereas this line is NOT so close to the upper equation.
\end{document}

Strangely, commenting the first line (% Something.) fixes the problem. Is there any way to fix this?

share|improve this question
    
Use \textdegree insted of \circ –  pablos Jun 17 at 13:42
    
@pablos: \textdegree seems to be working in text mode only for me. Using it inside $...$ or \[...\] outputs nothing. –  Noitaenola Jun 18 at 2:28
    
@Noitaenola You can use an empty line after Something. Maybe you can try \phase[1]{\left(\frac{A_0}{B_0}\right)} that seems to "fix" it. –  jotagah Jun 18 at 23:54
1  
@Noitaenola, I guess you can try the siunitx package. So you can use, for instance, $I=10\phase{\ang{30}}$. –  jotagah Jun 18 at 23:59

1 Answer 1

up vote 11 down vote accepted

The steinmetz package was written exactly for this.

\documentclass{article}

\usepackage{steinmetz}

\begin{document}

$z = 1.19 \phase{-78.2039^{\circ}}$

\end{document}

enter image description here

share|improve this answer
    
It does the trick, thanks! –  Noitaenola Jun 18 at 3:08

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.