Page 1 of 1

[Solved] a over a cancels -- overstrike of a reverse virgule

Posted: Mon Oct 22, 2018 10:45 pm
by clarkw
When showing a derivation of a formula I want to know if there is a way to show that "this" cancels "that". For instance:
{ {a_0^2} over {a_0^2} } times r^2

but with a scaled reverse virgule (backward slash) through the two a_0^2 values.

It would be wonderful if it is something simple like:
{ cancels {a_0^2} over cancels {a_0^2} } times r^2

Any information appreciated
TIA
ClarkW

Re: a over a cancels -- an overstrike of a reverse virgule

Posted: Mon Oct 22, 2018 10:56 pm
by clarkw
Quick correction or feature request it should be a virgule not a reverse virgule but really it should be any character so maybe:
cancels( <char> '#' <formula>)

ClarkW

Re: a over a cancels -- an overstrike of a reverse virgule

Posted: Tue Oct 23, 2018 1:15 am
by FJCC
There is an overstrike attribute

Code: Select all

overstrike {a_0^2} over overstrike {a_0^2}
It is probably not quite what you want but that is all I could find.

Re: a over a cancels -- an overstrike of a reverse virgule

Posted: Tue Oct 23, 2018 1:38 am
by clarkw
Not quite what I wanted but I might make it work. I appreciate the response though.

Thank you FJCC
ClarkW

Re: a over a cancels -- an overstrike of a reverse virgule

Posted: Tue Oct 23, 2018 1:46 am
by clarkw
Yeah! I tried to make it work. It really needs to be a / over the top of the factor. I guess I'll try using an image of a line with a transparent background over the factor and see what I can do to scale that. Appreciate the knowledge though I actually used overstrike in another place.
ClarkW

Re: a over a cancels -- an overstrike of a reverse virgule

Posted: Tue Oct 23, 2018 1:54 pm
by keme
Workaround: insert the formula in a Draw window and draw the overstrike lines on top. Copy the group of objects and paste them as one object into Writer (or where you need it).

Paste special as a Draw object makes the formula editable, but it may be harder to position it nicely in line with other text.

Re: a over a cancels -- an overstrike of a reverse virgule

Posted: Tue Oct 23, 2018 6:07 pm
by MrProgrammer
clarkw wrote:It would be wonderful if it is something simple like … but with a scaled reverse virgule (backward slash) through the two a_0^2 values.
The documentation doesn't show a feature which could display the formula in the way you want.
clarkw wrote:When showing a derivation of a formula I want to know if there is a way to show that "this" cancels "that". For instance:
{ {a_0^2} over {a_0^2} } times r^2
Perhaps this?
{color cyan {a_0^2} overbrace  size 5 color red "cancel"} over
{color cyan {a_0^2} underbrace size 5 color red "cancel"} times r^2
Screen Shot 2018-10-23 at 11.05.23 .png
clarkw wrote:Quick correction or feature request it should be a virgule not a reverse virgule but really it should be any character so maybe:
cancels( <char> '#' <formula>)
This is a user-to-user forum. Developers don't look at these discussions, and users here can't fix OpenOffice. See Reporting bugs or suggestions. All of the source code for the project is freely available. If you are a programmer you can register as an AOO developer and add the feature youself.

Re: a over a cancels -- an overstrike of a reverse virgule

Posted: Tue Oct 23, 2018 9:19 pm
by clarkw
All of these responses have been GREAT!
Thank you all for taking the time to respond.
Keme's solution may be the best workaround. I'll try that out later today.
The altered color "Cancel" is also good (although locale specific, where a slash is fairly universal).
I'll post what I finally came up with/use.

ClarkW