Issue 31517

Summary: not only "operator brackets" but also "bras" and "kets"
Product: Math Reporter: sternschnupper <e9525926>
Component: uiAssignee: AOO issues mailing list <issues>
Status: CONFIRMED --- QA Contact:
Severity: Trivial    
Priority: P5 (lowest) CC: issues
Version: OOo 1.1.1Keywords: oooqa
Target Milestone: ---   
Hardware: All   
OS: All   
Issue Type: ENHANCEMENT Latest Confirmation in: ---
Developer Difficulty: ---

Description sternschnupper 2004-07-15 11:53:44 UTC
by using "langle 4 mline 3 rangle" (selection: "operator brackets" in
"brackets") one can do something like <4|3>.

in quantum physics you need so called "bras", like <4|, and "kets", like |3>
seperately. 
i know that quantum physics is not the prime intention for OOo, but for me it
seems pretty easy to implement: 
"langle 4 mline" for <4| and 
"mline 3 rangle" for |3>.

and maybe someone else can use it for idontknowwhat ;)

thanks a lot, enjoy a nice day!!! ciao, georg.
Comment 1 michael.ruess 2004-07-15 14:59:26 UTC
Reassigned to BH.
Comment 2 lohmaier 2004-07-16 18:45:45 UTC
from issue 27195
Regarding the bra ket -thing I assume you want something like
left langle a mline right none newline
left none mline b right rangle newline
left langle a mline b mline c right rangle newline
left none mline a right rangle left langle b mline right none
Comment 3 sternschnupper 2004-07-18 00:28:28 UTC
hmm, i don't know what the "left" and "right" stand for in those lines.
aside of that it looks like what i'd need.

maybe the latter two lines are not really necessary, as you could easily do
<a|b|c> with:      bra-a  b  ket-c.
and |a><b| with:   ket-a  bra-b.
(with "bra-a" meaning the first line of the above comment.)

thanks!!

Comment 4 lohmaier 2004-07-18 15:37:26 UTC
"right" and "left" are needed when you want to combine different types of
brackets (and "none" is such another "type of bracket") and if you want your
brackets to be scalable.
Brackets are not only formatting elements, but also have grouping functionality.
Try the following:
lbrace a over b rbrace newline
left lbrace c over d right rbrace newline
left lbrace a* left langle c + d right rbrace  right rangle newline
(the last doesn't make much sense, but anyway :-)
Comment 5 sternschnupper 2004-07-18 16:22:49 UTC
ok, i ain't completely fond of it, but i got the idea.

so:
"left langle a mline b mline c right rangle newline
left none mline a right rangle left langle b mline right none"
is nice for being able to scale the whole expression at once, isn't it?
if so, including them makes sense to me.

thanks again!!!  :)
Comment 6 lohmaier 2004-07-18 17:32:31 UTC
> ok, i ain't completely fond of it, but i got the idea.

I'll try to explain better.

> "left langle a mline b mline c right rangle newline
> left none mline a right rangle left langle b mline right none"
> is nice for being able to scale the whole expression at once, isn't it?

No, it is not necessary to scale the whole expression at once (or maybe I got
that statement wrong).
compare the following:
"langle a over b rangle
 left langle a over b right rangle
 langle a rangle
 langle size *3 a rangle
 left langle size *3 a right rangle
 size *3 langle a rangle"

as you can see, you can scale the whole expression without using left/right. The
left/right is needed when you want the brackets to adapt to the enclosed expression.

> if so, including them makes sense to me.

Using the "none" bracket would not be necessary if the mline operator could be
used outside brackets.
By preceding the bracket's name with a backslash, the bracket looses its special
meaning and becomes a regular character (you don't need to "close" the bracket)
for example "\rangle \langle \rbrace"

So if you don't want scalable brackets, you could use
left none \langle a over b mline c right none
^^^^^^^^^                          ^^^^^^^^^^ only needed for mline to be happy
but in this case the mline would still be scaled, so you may want to use divides
instead:
\langle a over b divides c 

Either this made it clear or confused you even more... :-)
Comment 7 tdunning 2005-01-28 05:36:21 UTC
I think that it would be simpler to just use something like

left langle x right rline

for a bra or

left lline x right rangle

for a ket.  It is almost readable.
Comment 8 thomas.lange 2006-09-25 11:36:03 UTC
.