Page 1 of 1
[Solved] Add special character to favorite characters
Posted: Fri Sep 18, 2020 10:31 am
by MilosDj
I am using LibreOffice 7.0. Writer.
In "Insert Special Character" I want to add ∀ ∃ ∧ ∨ ⇒ ⤃ ⇔ ⤄ as favorites.
Its not working. Why? Is it a bug or I am doing something wrong?
If I try to put hex or decimal values manually I see "Missing character" message.
Is there a way to put those and similar characters to favorites?

Re: How to add special character to favorite characters?
Posted: Fri Sep 18, 2020 12:17 pm
by RoryOF
I do not think one can add personal special characters to the /insert /Special characters option. It is my understanding that this option shows the characters available in a particular font/character set. Change its font selection (selector top left of the Special Characters window) and choose a font that has the desired characters, changing the subset to "Mathematical operators" (righthand selector) to avoid having to scroll through the entire set of characters.
A quick test on my system (details as in my .sig) shows that the characters you require are in Mathjax_Main font. No doubt there is a font on Windows or available for Windows, that offers such characters.
Re: How to add special character to favorite characters?
Posted: Fri Sep 18, 2020 12:39 pm
by MilosDj
Well I am surprised. Normal copy paste of any symbol ∀ ∃ ∧ ∨ ⇒ ⤃ ⇔ ⤄ works independent of the selected font in the document.
But it seems that you are right. Choosing OpenSymbol fonts did enable adding those symbols to Special characters. Although inserted symbol is OpenSymbol font type not original doc font.
I stumbled on another potential solution using autocorrect. Mapping \forall \exist \and \or \... to corresponding symbol also works. And corrected font type is original font type from document!?!
I am puzzled how this works, but thanks. Now I have two working solutions.
Thanks

Re: [Solved] Add special character to favorite characters
Posted: Fri Sep 18, 2020 5:23 pm
by JeJe
A simple macro can show a popup menu with these characters to choose from. See attached document (macros will have to be enabled for it).
You don't need to understand the code to use it. To run it outside that document, you'd have to copy and paste it to somewhere like your MyMacros/Standard Library and then set a keyboard shortcut or toolbar button to run the sub SpecialCharactersPopup.
Code: Select all
Sub SpecialCharactersPopup
st ="1 ∀*2 ∃*3 ∧*4 ∨*5 ⇒*6 ⤃*7 ⇔*8 ⤄"
res = showpopup3(thiscomponent.currentcontroller.frame.componentwindow,st,0,0)
if res<> "" then
vc = thiscomponent.currentcontroller.viewcursor
vc.string = right(res,1)
vc.collapsetoend
end if
End Sub
function showpopup3(window,st as string,x,y) as string 'helper function to show a popup menu
'split by *
'separator_
'note ~ identifies accelerator
dim sts() as string,c as long
aRect = CreateUnoStruct("com.sun.star.awt.Rectangle")
arect.x = x
arect.y =y
oPopup = CreateUnoService("stardiv.vcl.PopupMenu")'"com.sun.star.awt.PopupMenu")
sts = split(st,"*")
for i = 0 to ubound(sts)
c =c+1
if sts(i) ="_" then
oPopup.insertSeparator(c)
else
if mid(sts(i),1,1) ="!" then isdefault = true else isdefault = false
if isdefault then
mid(sts(i),1,1) =""
oPopup.insertItem(c, sts(i),0, c)
opopup.setDefaultItem c
else
oPopup.insertItem(c, sts(i),0, c)
oPopup.setCommand(c, sts(i))
end if
end if
next
n = oPopup.execute( window, aRect, com.sun.star.awt.PopupMenuDirection.EXECUTE_DEFAULT)
If n > 0 Then
showpopup3 = oPopup.getCommand(n)
end if
End function
Re: How to add special character to favorite characters?
Posted: Fri Sep 18, 2020 6:18 pm
by Zizi64
RoryOF wrote:I do not think one can add personal special characters to the /insert /Special characters option. It is my understanding that this option shows the characters available in a particular font/character set. Change its font selection (selector top left of the Special Characters window) and choose a font that has the desired characters, changing the subset to "Mathematical operators" (righthand selector) to avoid having to scroll through the entire set of characters.
A quick test on my system (details as in my .sig) shows that the characters you require are in Mathjax_Main font. No doubt there is a font on Windows or available for Windows, that offers such characters.
The LibreOffice has a new feature named "Favourite characters" in the Insert - Special characters function bot it has a limit (16 characters):

- Click on the picture for a better view.
You can add only those characters to the Favourite list, what is present in the table.
Re: How to add special character to favorite characters?
Posted: Fri Sep 18, 2020 7:07 pm
by MilosDj
Zizi64 wrote:The LibreOffice has a new feature named "Favourite characters" in the Insert - Special characters function bot it has a limit (16 characters):
You can add only those characters to the Favourite list, what is present in the table.
I know. I tried that. It doesnt work for ∀ ∃ ∧ ∨ ⇒ ⤃ ⇔ ⤄. Or it works if I choose different font as suggested by RoryOF. Only problem is it inserts char AND char type. So far auto correct just replace character, preserving document font type.
Re: [Solved] Add special character to favorite characters
Posted: Fri Sep 18, 2020 7:20 pm
by RoryOF
The characters have to be in the font used.
Re: [Solved] Add special character to favorite characters
Posted: Fri Sep 18, 2020 9:18 pm
by MilosDj
RoryOF wrote:The characters have to be in the font used.
I understand that. But out of curiosity, how is auto correct able to convert \forall to right character and display it correctly with document font type, in this case Bahnschrift SemiLight? And special char insert does not have forall and must use OpenSymbols fonts?
Re: [Solved] Add special character to favorite characters
Posted: Sun Sep 29, 2024 1:18 pm
by bluegroper
Being able to save a list of Favourite (special) Characters is most helpful.
Please, where does OpenOffice actually save and store that personal list of favourites ?
I've searched but cannot find.