Abbreviations For Greek Letters

87 views
Skip to first unread message

Thomas Passin

unread,
Jan 8, 2023, 2:19:32 PM1/8/23
to leo-editor
Sometimes I want to insert a Greek letter into text, often sigma or mu.  On Windows, at least, it's always annoying and clumsy.   So I thought I'd try out Leo's abbreviations, which I've never used in the past.  It's working well, so I've collected them here in case it will save someone else some trouble.

When you type one of the abbreviations (like alph;;), Leo replaces what you typed with the corresponding text.  That text can be long and complicated, but here it's just a single symbol.  The abbreviation definitions must be copied into a settings node, best placed in myLeoSettings.leo, and the node's headline must start with @data global-abbreviations 
to make them available in all outlines.  My node has the headline
@data global-abbreviations - Symbols.  Here is the content of the node's body, ready to be copy-pasted:

alph;;=α
beta;;=β
delt;;=δ
gam;;=γ
mu;;=μ
pi;;=π
sig;;=σ

Delt;;=Δ
Sig;;=Σ
pm;;=±


The abbreviations don't have to end with ";;" but that's easy to type and unlikely to be typed for any other reason.  That's probably why it's used in many of the examples.  

To make abbreviations active you also have to add a new setting
@bool enable-abbreviations = True.

Edward K. Ream

unread,
Jan 8, 2023, 2:55:45 PM1/8/23
to leo-e...@googlegroups.com
On Sun, Jan 8, 2023 at 1:19 PM Thomas Passin <tbp1...@gmail.com> wrote:
Sometimes I want to insert a Greek letter into text, often sigma or mu.  On Windows, at least, it's always annoying and clumsy.   So I thought I'd try out Leo's abbreviations, which I've never used in the past.  It's working well, so I've collected them here in case it will save someone else some trouble.

Thanks. These abbreviations could be described in Leo's FAQ, or perhaps (disabled) in leoSettings.leo.

Edward

Rob

unread,
Jan 9, 2023, 2:32:39 PM1/9/23
to leo-editor
Thanks for the list! I do much the same thing and have an even longer list; not just Greek letters. Is there a better place to add to the list than here?

Rob...

Thomas Passin

unread,
Jan 9, 2023, 4:16:16 PM1/9/23
to leo-editor
Maybe in the section in LeoDocs that mentions abbreviations?  It's very short, and these shortcuts could serve as examples, too.  @Edward suggested disabled in LeoSettings.leo.  That would be all right too, but how many of us troll through there looking for interesting things?

I expect my own list to grow.  I'm trying to avoid too much growth, just because if it's large I won't remember them.

Edward K. Ream

unread,
Jan 9, 2023, 5:34:32 PM1/9/23
to leo-e...@googlegroups.com
On Mon, Jan 9, 2023 at 1:32 PM Rob <lar...@gmail.com> wrote:


The abbreviation definitions must be copied into a settings node, best placed in myLeoSettings.leo, and the node's headline must start with @data global-abbreviations to make them available in all outlines.  My node has the headline
@data global-abbreviations - Symbols.  Here is the content of the node's body, ready to be copy-pasted:

alph;;=α
beta;;=β
delt;;=δ
gam;;=γ
mu;;=μ
pi;;=π
sig;;=σ

Delt;;=Δ
Sig;;=Σ
pm;;=±

Thanks for this. I'll add them to LeoDocs.leo and LeoSettings.leo soon.

Edward

Rob

unread,
Jan 9, 2023, 5:48:04 PM1/9/23
to leo-editor
Perhaps also useful:

degree;;=°
half;;=½
quarter;;=¼
3fourths;;=¾
divide;;=÷
bullet;;=•
infinity;;=∞
# Ellipsis
...;;=…
ergo;;=∴
because;;=∵

# Currency
cent;;=¢
euro;;=€
pound;;=£
yen;;=¥

Edward K. Ream

unread,
Jan 9, 2023, 5:49:31 PM1/9/23
to leo-e...@googlegroups.com
On Mon, Jan 9, 2023 at 3:16 PM Thomas Passin <tbp1...@gmail.com> wrote:
Maybe in the section in LeoDocs that mentions abbreviations? 

Rev 353404b in devel adds the disabled version of these abbreviations to `@data abbreviations` in leoSettings.leo.

The node has this comment: "Typically you would define @data global-abbreviation nodes in myLeoSettings.leo and @data abbreviation nodes in local files."

Edward

Edward K. Ream

unread,
Jan 9, 2023, 5:52:18 PM1/9/23
to leo-e...@googlegroups.com
On Mon, Jan 9, 2023 at 4:48 PM Rob <lar...@gmail.com> wrote:
Perhaps also useful:

degree;;=°
half;;=½
quarter;;=¼
3fourths;;=¾
divide;;=÷
bullet;;=•
infinity;;=∞
# Ellipsis
...;;=…
ergo;;=∴
because;;=∵

# Currency
cent;;=¢
euro;;=€
pound;;=£
yen;;=¥

Thanks. Rev 45b20a7 in devel adds the disabled version of these abbreviations to leoSettings.leo.

Edward

Thomas Passin

unread,
Jan 9, 2023, 5:57:58 PM1/9/23
to leo-editor
because;;=∵

That's one I've never heard of before! An inverted "therefore".

jkn

unread,
Jan 10, 2023, 3:33:47 AM1/10/23
to leo-editor
Heh - I was about to say the opposite ... I have always liked the use of a shorthand
for the inverted triangle 'because' in my notes (I did a maths degree), but have never
found a good equivalent in the ASCII character set.

Perhaps now is the time to bite the bullet and use Unicode...

Edward K. Ream

unread,
Jan 10, 2023, 11:09:51 AM1/10/23
to leo-e...@googlegroups.com
On Tue, Jan 10, 2023 at 2:33 AM jkn <jkn...@nicorp.f9.co.uk> wrote:

Perhaps now is the time to bite the bullet and use Unicode...

Ya think?!?

Edward

jkn

unread,
Jan 10, 2023, 11:31:02 AM1/10/23
to leo-editor

I *do* use Unicode, of course ... just not extensively within my Leo notes, for instance.

I am not planning to use non-ASCII glyphs within my Python *code*, either.

Edward K. Ream

unread,
Jan 10, 2023, 11:36:23 AM1/10/23
to leo-editor
On Tuesday, January 10, 2023 at 10:31:02 AM UTC-6 jkn wrote:

I *do* use Unicode, of course ... just not extensively within my Leo notes, for instance.

:-)
 
I am not planning to use non-ASCII glyphs within my Python *code*, either.

It's easy to allow Unicode within .py files.  Just start `@file` nodes with:

  @first # -*- coding: utf-8 -*-

or just:

     # -*- coding: utf-8 -*-

For other kinds of @<file> nodes.

Edward

jkn

unread,
Jan 10, 2023, 11:53:41 AM1/10/23
to leo-editor
Hi Edward

Yeah, I appreciate that. I just choose not to have such characters in my Python.
(I actually don't write much of my Python with Leo, but that's a different matter... ;-/)

Regards, J^n
 

Thomas Passin

unread,
Jan 10, 2023, 2:47:01 PM1/10/23
to leo-editor
I don't think you need that coding line any more.  That was a Python2 thing.  Python3 uses unicode/utf-8 automatically.  FWIW, I generally (before the abbreviations) copied and pasted non-ascii characters from various web pages, and it's always worked well.

Edward K. Ream

unread,
Jan 10, 2023, 4:17:57 PM1/10/23
to leo-editor
On Tuesday, January 10, 2023 at 1:47:01 PM UTC-6 tbp1...@gmail.com wrote:
I don't think you need that coding line any more.  That was a Python2 thing.  Python3 uses unicode/utf-8 automatically. 

I didn't know that!

Edward

jkn

unread,
Jan 12, 2023, 6:13:30 AM1/12/23
to leo-editor
I am also liking:

tick;;=✔
cross;;=✖
exists;;=∃

On Monday, January 9, 2023 at 10:57:58 PM UTC tbp1...@gmail.com wrote:

Edward K. Ream

unread,
Jan 12, 2023, 9:10:03 AM1/12/23
to leo-e...@googlegroups.com
On Thu, Jan 12, 2023 at 5:13 AM jkn <jkn...@nicorp.f9.co.uk> wrote:
I am also liking:

tick;;=✔
cross;;=✖
exists;;=∃

Thanks for these :-) Rev da83227 in devel adds them as disabled abbreviations in leoSettings.leo.

Edward

Offray Vladimir Luna Cárdenas

unread,
Jan 12, 2023, 9:34:24 AM1/12/23
to leo-e...@googlegroups.com

The excellent TeXmacs [1] has the most fluent math/symbolic writing experience I have experienced so far, mostly because of its use of environments (normal text, equations, math, sections/subsections, tabular material and so on). On a particular  environment you press a shortcut and you start to cycle in variants of a particular letter/symbol as explained in the TeXmacs Manual[2] under the section "Typing mathematical symbols". For example, if the author is in a math environment and types [AltGr]+@@ (s)he obtains ∞, and so on. In general using shortcuts like that eases the writing of symbols a lot.

I would advice installing TeXmacs and writing symbols in it to get this tactile and fluent feeling, and to see what this can inspire in the shortcuts/abbreviations front. For example, maybe "3/4;;=¾" and ".:;;=∴" are more fluent and less Anglo-centric to write some symbols.

[1] https://texmacs.org/
[2] https://texmacs.org/tmweb/documents/manuals/texmacs-manual.en.pdf

Hope it helps,

Offray

--
You received this message because you are subscribed to the Google Groups "leo-editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email to leo-editor+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/leo-editor/c111f578-b811-43b5-9db5-15989664d985n%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages