siunitx icon indicating copy to clipboard operation
siunitx copied to clipboard

Add support or alternative for steinmetz

Open eclecticfluff opened this issue 1 year ago • 8 comments

I wish to be able to typeset polar complex numbers in the style given by the steinmetz package, but unfortunately complex-symbol-angle = \phase does not work. I would appreciate it if the internal code could be changed for this to work, or alternatively another key be added explicitly for wrapping the phase component of polar complex numbers in an arbitrary macro. Ideally, a new function could be created within siunitx to match this style of typesetting, adding options to better match font and scale in a smarter way than blindly enclosing the bounding box. This would likely take considerably more effort to implement, however, so I understand if contributor motivation isn't there for it.

eclecticfluff avatar May 22 '24 13:05 eclecticfluff

I will see what Enrico thinks here

josephwright avatar May 22 '24 13:05 josephwright

The steinmetz package was written in order to implement a representation of complex numbers that's common in engineering fields, so I guess it would be good to allow using it with siunitx.

I'm not sure, however, about how to integrate it with siunitx, because the single command \phase actually only typesets the measure of the angle.

eg9 avatar May 22 '24 16:05 eg9

Would you say Steinmetz notation is a form of polar output, or an entirely independent format? Working out where the right options live.

josephwright avatar Oct 02 '24 16:10 josephwright

I would say that, basically, that is a form of polar output, yes, with or without a unit. It's quite common to write "I = 30∠30° mA", or also "I = 30 ∠π/6 mA", etc. etc. It's a bit complex here, because you can have a quantity with two different units for the main value and for the angle... (although the angle is in degrees or radian, I never saw anything different).

Rmano avatar Oct 03 '24 10:10 Rmano

@Rmano Would you please add a few printed examples?

eg9 avatar Oct 03 '24 11:10 eg9

I'll try to see if I can find some. We use here quite extensively, but being my field electronics, not electricity, I tend not to use that notation... If I find something I'll post it here.

Rmano avatar Oct 03 '24 12:10 Rmano

I checked with an electric engineering / EMC expert here, and he sent me this (here the unit is p.u. which is a bit a no-unit..). He told me that he will try to check for papers with that notation, that seems "natural" to him...

image

From

image

Rmano avatar Oct 04 '24 11:10 Rmano

This is better

image

image

(Power System Analysis, by Hadi Saadat)

Rmano avatar Oct 07 '24 08:10 Rmano

Suggestion: complex-phase-command which is normally empty but can be \phase or whatever to adjust the formatting - thoughts?

josephwright avatar Dec 01 '24 16:12 josephwright

@eg9 Thoughts ^^^

josephwright avatar Dec 01 '24 16:12 josephwright

It could be a good idea --- especially if the command could have the phase-number as a parameter, so that one can switch from, say "I = 30 ∠π/6 mA" to "I=30e^{jπ/6} mA" globally...

Rmano avatar Dec 02 '24 11:12 Rmano

Yay, thanks! @josephwright

Rmano avatar Dec 04 '24 10:12 Rmano