* Re: input methods for mathematical glyphs
2021-12-08 16:40 input methods for mathematical glyphs Leo Butler
@ 2021-12-08 17:18 ` Eli Zaretskii
2021-12-08 19:52 ` Marcin Borkowski
` (2 more replies)
2021-12-08 18:33 ` Emanuel Berg via Users list for the GNU Emacs text editor
` (2 subsequent siblings)
3 siblings, 3 replies; 34+ messages in thread
From: Eli Zaretskii @ 2021-12-08 17:18 UTC (permalink / raw)
To: help-gnu-emacs
> From: Leo Butler <leo.butler@umanitoba.ca>
> Date: Wed, 08 Dec 2021 10:40:02 -0600
>
> I have, for years, used abbrevs for entering greek letters (and several
> other commonly-used symbols in math). As I have learned how to use
> latex's support for other unicode math glyphs, I can see that my old
> solution does not scale and I would like to find an input method to
> easily input something like:
>
> #+begin_src latex
> Let $𝒯 ⊂ 𝐑$, $𝒯 ≠ ∅$, be a null set...
> #+end_src
>
> I used C-x 8 RET to do this. I am ignorant of any input method that
> would do what I want (ucs may be the closest, but it only uses 4 digit
> hex, and who wants to memorize 4-5 digit hex numbers?)
>
> Suggestions or thoughts?
Did you try the 'TeX' input method? AFAIK, it was invented for these
purposes.
^ permalink raw reply [flat|nested] 34+ messages in thread
* Re: input methods for mathematical glyphs
2021-12-08 17:18 ` Eli Zaretskii
@ 2021-12-08 19:52 ` Marcin Borkowski
2021-12-08 23:15 ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-12-08 20:07 ` Leo Butler
2021-12-08 20:42 ` Stefan Monnier via Users list for the GNU Emacs text editor
2 siblings, 1 reply; 34+ messages in thread
From: Marcin Borkowski @ 2021-12-08 19:52 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: help-gnu-emacs
On 2021-12-08, at 18:18, Eli Zaretskii <eliz@gnu.org> wrote:
>> From: Leo Butler <leo.butler@umanitoba.ca>
>> Date: Wed, 08 Dec 2021 10:40:02 -0600
>>
>> I have, for years, used abbrevs for entering greek letters (and several
>> other commonly-used symbols in math). As I have learned how to use
>> latex's support for other unicode math glyphs, I can see that my old
>> solution does not scale and I would like to find an input method to
>> easily input something like:
>>
>> #+begin_src latex
>> Let $𝒯 ⊂ 𝐑$, $𝒯 ≠ ∅$, be a null set...
>> #+end_src
>>
>> I used C-x 8 RET to do this. I am ignorant of any input method that
>> would do what I want (ucs may be the closest, but it only uses 4 digit
>> hex, and who wants to memorize 4-5 digit hex numbers?)
>>
>> Suggestions or thoughts?
>
> Did you try the 'TeX' input method? AFAIK, it was invented for these
> purposes.
I second that. I am fairly proficient in (La)TeX and I use it often to
e.g. include math symbols in emails.
Best,
--
Marcin Borkowski
http://mbork.pl
^ permalink raw reply [flat|nested] 34+ messages in thread
* Re: input methods for mathematical glyphs
2021-12-08 19:52 ` Marcin Borkowski
@ 2021-12-08 23:15 ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-12-09 5:20 ` Marcin Borkowski
0 siblings, 1 reply; 34+ messages in thread
From: Emanuel Berg via Users list for the GNU Emacs text editor @ 2021-12-08 23:15 UTC (permalink / raw)
To: help-gnu-emacs
Marcin Borkowski wrote:
>> Did you try the 'TeX' input method? AFAIK, it was invented
>> for these purposes.
>
> I second that. I am fairly proficient in (La)TeX and I use
> it often to e.g. include math symbols in emails.
In mails - ASCII only.
You can use LaTeX uncompiled. \beta programmers
shouldn't bother.
--
underground experts united
https://dataswamp.org/~incal
^ permalink raw reply [flat|nested] 34+ messages in thread
* Re: input methods for mathematical glyphs
2021-12-08 23:15 ` Emanuel Berg via Users list for the GNU Emacs text editor
@ 2021-12-09 5:20 ` Marcin Borkowski
2021-12-09 10:03 ` Emanuel Berg via Users list for the GNU Emacs text editor
0 siblings, 1 reply; 34+ messages in thread
From: Marcin Borkowski @ 2021-12-09 5:20 UTC (permalink / raw)
To: Emanuel Berg; +Cc: help-gnu-emacs
On 2021-12-09, at 00:15, Emanuel Berg via Users list for the GNU Emacs text editor <help-gnu-emacs@gnu.org> wrote:
> Marcin Borkowski wrote:
>
>>> Did you try the 'TeX' input method? AFAIK, it was invented
>>> for these purposes.
>>
>> I second that. I am fairly proficient in (La)TeX and I use
>> it often to e.g. include math symbols in emails.
>
> In mails - ASCII only.
Because...?
--
Marcin Borkowski
http://mbork.pl
^ permalink raw reply [flat|nested] 34+ messages in thread
* Re: input methods for mathematical glyphs
2021-12-09 5:20 ` Marcin Borkowski
@ 2021-12-09 10:03 ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-12-10 5:49 ` Marcin Borkowski
0 siblings, 1 reply; 34+ messages in thread
From: Emanuel Berg via Users list for the GNU Emacs text editor @ 2021-12-09 10:03 UTC (permalink / raw)
To: help-gnu-emacs
Marcin Borkowski wrote:
>>>> Did you try the 'TeX' input method? AFAIK, it was
>>>> invented for these purposes.
>>>
>>> I second that. I am fairly proficient in (La)TeX and I use
>>> it often to e.g. include math symbols in emails.
>>
>> In mails - ASCII only.
>
> Because...?
It is not encouraged to include anything else.
--
underground experts united
https://dataswamp.org/~incal
^ permalink raw reply [flat|nested] 34+ messages in thread
* Re: input methods for mathematical glyphs
2021-12-09 10:03 ` Emanuel Berg via Users list for the GNU Emacs text editor
@ 2021-12-10 5:49 ` Marcin Borkowski
2021-12-10 5:58 ` Po Lu
0 siblings, 1 reply; 34+ messages in thread
From: Marcin Borkowski @ 2021-12-10 5:49 UTC (permalink / raw)
To: Emanuel Berg; +Cc: help-gnu-emacs
On 2021-12-09, at 11:03, Emanuel Berg via Users list for the GNU Emacs text editor <help-gnu-emacs@gnu.org> wrote:
> Marcin Borkowski wrote:
>
>>>>> Did you try the 'TeX' input method? AFAIK, it was
>>>>> invented for these purposes.
>>>>
>>>> I second that. I am fairly proficient in (La)TeX and I use
>>>> it often to e.g. include math symbols in emails.
>>>
>>> In mails - ASCII only.
>>
>> Because...?
>
> It is not encouraged to include anything else.
Because...?
--
Marcin Borkowski
http://mbork.pl
^ permalink raw reply [flat|nested] 34+ messages in thread
* Re: input methods for mathematical glyphs
2021-12-10 5:49 ` Marcin Borkowski
@ 2021-12-10 5:58 ` Po Lu
2021-12-10 13:18 ` Stefan Monnier via Users list for the GNU Emacs text editor
0 siblings, 1 reply; 34+ messages in thread
From: Po Lu @ 2021-12-10 5:58 UTC (permalink / raw)
To: Marcin Borkowski; +Cc: Emanuel Berg, help-gnu-emacs
Marcin Borkowski <mbork@mbork.pl> writes:
> On 2021-12-09, at 11:03, Emanuel Berg via Users list for the GNU Emacs text editor <help-gnu-emacs@gnu.org> wrote:
>
>> Marcin Borkowski wrote:
>>
>>>>>> Did you try the 'TeX' input method? AFAIK, it was
>>>>>> invented for these purposes.
>>>>>
>>>>> I second that. I am fairly proficient in (La)TeX and I use
>>>>> it often to e.g. include math symbols in emails.
>>>>
>>>> In mails - ASCII only.
>>>
>>> Because...?
>>
>> It is not encouraged to include anything else.
>
> Because...?
FWIW, I don't know of any modern net etiquette that says "emails should
be ASCII only", but in my opinion mathematical symbols and Unicode art
do cross a line.
^ permalink raw reply [flat|nested] 34+ messages in thread
* Re: input methods for mathematical glyphs
2021-12-10 5:58 ` Po Lu
@ 2021-12-10 13:18 ` Stefan Monnier via Users list for the GNU Emacs text editor
2021-12-10 17:08 ` H. Dieter Wilhelm
0 siblings, 1 reply; 34+ messages in thread
From: Stefan Monnier via Users list for the GNU Emacs text editor @ 2021-12-10 13:18 UTC (permalink / raw)
To: help-gnu-emacs
> FWIW, I don't know of any modern net etiquette that says "emails should
> be ASCII only", but in my opinion mathematical symbols and Unicode art
> do cross a line.
When I write things like `Γ ⊢ e : τ₁ → τ₂` in my email, some (human) readers
are admittedly surprised (enough to say something about it in their
reply, typically "how do you do that?"), so it does "cross a line"
somehow (since those same readers aren't surprised when I use various
kinds of accented letters or an emoji), but I can't remember a single
time where it caused a problem.
Stefan
^ permalink raw reply [flat|nested] 34+ messages in thread
* Re: input methods for mathematical glyphs
2021-12-10 13:18 ` Stefan Monnier via Users list for the GNU Emacs text editor
@ 2021-12-10 17:08 ` H. Dieter Wilhelm
2021-12-10 17:28 ` Stefan Monnier
0 siblings, 1 reply; 34+ messages in thread
From: H. Dieter Wilhelm @ 2021-12-10 17:08 UTC (permalink / raw)
To: Stefan Monnier via Users list for the GNU Emacs text editor
Cc: hans-dieter.wilhelm, Stefan Monnier
Stefan Monnier via Users list for the GNU Emacs text editor
<help-gnu-emacs@gnu.org> writes:
>> FWIW, I don't know of any modern net etiquette that says "emails should
>> be ASCII only", but in my opinion mathematical symbols and Unicode art
>> do cross a line.
>
> When I write things like `Γ ⊢ e : τ₁ → τ₂` in my email, some (human) readers
> are admittedly surprised (enough to say something about it in their
> reply, typically "how do you do that?"), so it does "cross a line"
> somehow (since those same readers aren't surprised when I use various
> kinds of accented letters or an emoji), but I can't remember a single
> time where it caused a problem.
When it doesn't distract and is more readable than it is a good thing.
Might utf-8 characters pose a problem for Windows mailing systems? I've
sometimes funny glitches when I copy utf-8 characters into their Outlook
calendar application.
Dieter
--
Best wishes
H. Dieter Wilhelm
Zwingenberg, Germany
^ permalink raw reply [flat|nested] 34+ messages in thread
* Re: input methods for mathematical glyphs
2021-12-10 17:08 ` H. Dieter Wilhelm
@ 2021-12-10 17:28 ` Stefan Monnier
2021-12-10 17:34 ` H. Dieter Wilhelm
0 siblings, 1 reply; 34+ messages in thread
From: Stefan Monnier @ 2021-12-10 17:28 UTC (permalink / raw)
To: H. Dieter Wilhelm
Cc: Stefan Monnier via Users list for the GNU Emacs text editor,
hans-dieter.wilhelm
> Might utf-8 characters pose a problem for Windows mailing systems?
There's no such thing as "utf-8 characters": there's the utf-8 encoding,
and there are Unicode characters.
If the problem is specific to a mailing system it would tend to affect
the utf-8 encoding and hence all uses of accented chars as well.
If the problem is specific to a character it would likely not depend on
the mailing system, but only on the fonts available and the way the
application controls/chooses them.
Stefan
^ permalink raw reply [flat|nested] 34+ messages in thread
* Re: input methods for mathematical glyphs
2021-12-10 17:28 ` Stefan Monnier
@ 2021-12-10 17:34 ` H. Dieter Wilhelm
0 siblings, 0 replies; 34+ messages in thread
From: H. Dieter Wilhelm @ 2021-12-10 17:34 UTC (permalink / raw)
To: Stefan Monnier
Cc: hans-dieter.wilhelm,
Stefan Monnier via Users list for the GNU Emacs text editor
Stefan Monnier <monnier@iro.umontreal.ca> writes:
>> Might utf-8 characters pose a problem for Windows mailing systems?
>
> There's no such thing as "utf-8 characters": there's the utf-8 encoding,
> and there are Unicode characters.
> If the problem is specific to a mailing system it would tend to affect
> the utf-8 encoding and hence all uses of accented chars as well.
> If the problem is specific to a character it would likely not depend on
> the mailing system, but only on the fonts available and the way the
> application controls/chooses them.
Thanks for clarifying this.
Dieter
--
Best wishes
H. Dieter Wilhelm
Zwingenberg, Germany
^ permalink raw reply [flat|nested] 34+ messages in thread
* Re: input methods for mathematical glyphs
2021-12-08 17:18 ` Eli Zaretskii
2021-12-08 19:52 ` Marcin Borkowski
@ 2021-12-08 20:07 ` Leo Butler
2021-12-08 20:15 ` André A. Gomes
2021-12-08 20:15 ` Eli Zaretskii
2021-12-08 20:42 ` Stefan Monnier via Users list for the GNU Emacs text editor
2 siblings, 2 replies; 34+ messages in thread
From: Leo Butler @ 2021-12-08 20:07 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: help-gnu-emacs
Eli Zaretskii <eliz@gnu.org> writes:
>> From: Leo Butler <leo.butler@umanitoba.ca>
>> Date: Wed, 08 Dec 2021 10:40:02 -0600
>>
>> I have, for years, used abbrevs for entering greek letters (and several
>> other commonly-used symbols in math). As I have learned how to use
>> latex's support for other unicode math glyphs, I can see that my old
>> solution does not scale and I would like to find an input method to
>> easily input something like:
>>
>> #+begin_src latex
>> Let $𝒯 ⊂ 𝐑$, $𝒯 ≠ ∅$, be a null set...
>> #+end_src
>>
>> I used C-x 8 RET to do this. I am ignorant of any input method that
>> would do what I want (ucs may be the closest, but it only uses 4 digit
>> hex, and who wants to memorize 4-5 digit hex numbers?)
>>
>> Suggestions or thoughts?
>
> Did you try the 'TeX' input method? AFAIK, it was invented for these
> purposes.
Yes, I have and ucs, too.
If I do
M-x list-input-methods RET
search for and select TeX, the *Help* buffer is populated by a large
number of supported glyphs. When I search for 𝒯 (or 𝐑), it is not
found. It looks like there is some large, but limited number of glyphs
that are supported, but many are not. ;-(
Suggestions?
TIA,
Leo
^ permalink raw reply [flat|nested] 34+ messages in thread
* Re: input methods for mathematical glyphs
2021-12-08 20:07 ` Leo Butler
@ 2021-12-08 20:15 ` André A. Gomes
2021-12-09 14:24 ` Leo Butler
2021-12-08 20:15 ` Eli Zaretskii
1 sibling, 1 reply; 34+ messages in thread
From: André A. Gomes @ 2021-12-08 20:15 UTC (permalink / raw)
To: Leo Butler; +Cc: help-gnu-emacs
Leo Butler <leo.butler@umanitoba.ca> writes:
> Eli Zaretskii <eliz@gnu.org> writes:
>
>>> From: Leo Butler <leo.butler@umanitoba.ca>
>>> Date: Wed, 08 Dec 2021 10:40:02 -0600
>>>
>>> I have, for years, used abbrevs for entering greek letters (and several
>>> other commonly-used symbols in math). As I have learned how to use
>>> latex's support for other unicode math glyphs, I can see that my old
>>> solution does not scale and I would like to find an input method to
>>> easily input something like:
>>>
>>> #+begin_src latex
>>> Let $𝒯 ⊂ 𝐑$, $𝒯 ≠ ∅$, be a null set...
>>> #+end_src
>>>
>>> I used C-x 8 RET to do this. I am ignorant of any input method that
>>> would do what I want (ucs may be the closest, but it only uses 4 digit
>>> hex, and who wants to memorize 4-5 digit hex numbers?)
>>>
>>> Suggestions or thoughts?
>>
>> Did you try the 'TeX' input method? AFAIK, it was invented for these
>> purposes.
>
> Yes, I have and ucs, too.
>
> If I do
>
> M-x list-input-methods RET
>
> search for and select TeX, the *Help* buffer is populated by a large
> number of supported glyphs. When I search for 𝒯 (or 𝐑), it is not
> found. It looks like there is some large, but limited number of glyphs
> that are supported, but many are not. ;-(
Take a look at /path/to/emacs/sources/lisp/leim/quail/latin.ltx.el.
--
André A. Gomes
"Free Thought, Free World"
^ permalink raw reply [flat|nested] 34+ messages in thread
* Re: input methods for mathematical glyphs
2021-12-08 20:15 ` André A. Gomes
@ 2021-12-09 14:24 ` Leo Butler
0 siblings, 0 replies; 34+ messages in thread
From: Leo Butler @ 2021-12-09 14:24 UTC (permalink / raw)
To: André A. Gomes; +Cc: help-gnu-emacs
André A. Gomes <andremegafone@gmail.com> writes:
> Leo Butler <leo.butler@umanitoba.ca> writes:
>
>> Eli Zaretskii <eliz@gnu.org> writes:
>>
>>>> From: Leo Butler <leo.butler@umanitoba.ca>
>>>> Date: Wed, 08 Dec 2021 10:40:02 -0600
>>>>
>>>> I have, for years, used abbrevs for entering greek letters (and several
>>>> other commonly-used symbols in math). As I have learned how to use
>>>> latex's support for other unicode math glyphs, I can see that my old
>>>> solution does not scale and I would like to find an input method to
>>>> easily input something like:
>>>>
>>>> #+begin_src latex
>>>> Let $𝒯 ⊂ 𝐑$, $𝒯 ≠ ∅$, be a null set...
>>>> #+end_src
>>>>
>>>> I used C-x 8 RET to do this. I am ignorant of any input method that
>>>> would do what I want (ucs may be the closest, but it only uses 4 digit
>>>> hex, and who wants to memorize 4-5 digit hex numbers?)
>>>>
>>>> Suggestions or thoughts?
>>>
>>> Did you try the 'TeX' input method? AFAIK, it was invented for these
>>> purposes.
>>
>> Yes, I have and ucs, too.
>>
>> If I do
>>
>> M-x list-input-methods RET
>>
>> search for and select TeX, the *Help* buffer is populated by a large
>> number of supported glyphs. When I search for 𝒯 (or 𝐑), it is not
>> found. It looks like there is some large, but limited number of glyphs
>> that are supported, but many are not. ;-(
>
> Take a look at /path/to/emacs/sources/lisp/leim/quail/latin.ltx.el.
André, thank you for the pointer to latin-ltx.el. I think I can see,
roughly, how to add the functionality I want.
Leo
^ permalink raw reply [flat|nested] 34+ messages in thread
* Re: input methods for mathematical glyphs
2021-12-08 20:07 ` Leo Butler
2021-12-08 20:15 ` André A. Gomes
@ 2021-12-08 20:15 ` Eli Zaretskii
1 sibling, 0 replies; 34+ messages in thread
From: Eli Zaretskii @ 2021-12-08 20:15 UTC (permalink / raw)
To: help-gnu-emacs
> From: Leo Butler <leo.butler@umanitoba.ca>
> Cc: help-gnu-emacs@gnu.org
> Date: Wed, 08 Dec 2021 14:07:45 -0600
>
> If I do
>
> M-x list-input-methods RET
>
> search for and select TeX, the *Help* buffer is populated by a large
> number of supported glyphs. When I search for 𝒯 (or 𝐑), it is not
> found. It looks like there is some large, but limited number of glyphs
> that are supported, but many are not. ;-(
>
> Suggestions?
Use the same strings as you'd use in LaTeX to insert these. For
example, \neq produces ≠, \Bbb{A} produces 𝔸, etc.
^ permalink raw reply [flat|nested] 34+ messages in thread
* Re: input methods for mathematical glyphs
2021-12-08 17:18 ` Eli Zaretskii
2021-12-08 19:52 ` Marcin Borkowski
2021-12-08 20:07 ` Leo Butler
@ 2021-12-08 20:42 ` Stefan Monnier via Users list for the GNU Emacs text editor
2021-12-09 14:26 ` Leo Butler
2 siblings, 1 reply; 34+ messages in thread
From: Stefan Monnier via Users list for the GNU Emacs text editor @ 2021-12-08 20:42 UTC (permalink / raw)
To: help-gnu-emacs
> Did you try the 'TeX' input method? AFAIK, it was invented for these
> purposes.
Also if you don't like the TeX input method, you might like to try the
input method included in `agda2-mode`.
https://github.com/agda/agda/blob/master/src/data/emacs-mode/agda-input.el
Stefan
^ permalink raw reply [flat|nested] 34+ messages in thread
* Re: input methods for mathematical glyphs
2021-12-08 16:40 input methods for mathematical glyphs Leo Butler
2021-12-08 17:18 ` Eli Zaretskii
@ 2021-12-08 18:33 ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-12-08 18:38 ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-12-08 18:43 ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-12-08 19:41 ` André A. Gomes
2021-12-08 20:35 ` Eduardo Ochs
3 siblings, 2 replies; 34+ messages in thread
From: Emanuel Berg via Users list for the GNU Emacs text editor @ 2021-12-08 18:33 UTC (permalink / raw)
To: help-gnu-emacs
Leo Butler wrote:
> I have, for years, used abbrevs for entering greek letters
> (and several other commonly-used symbols in math). As I have
> learned how to use latex's support for other unicode math
> glyphs, I can see that my old solution does not scale and
> I would like to find an input method to easily input
> something like:
>
> #+begin_src latex
> Let $𝒯 ⊂ 𝐑$, $𝒯 ≠ ∅$, be a null set...
> #+end_src
>
> I used C-x 8 RET to do this. I am ignorant of any input
> method that would do what I want (ucs may be the closest,
> but it only uses 4 digit hex, and who wants to memorize 4-5
> digit hex numbers?)
>
> Suggestions or thoughts?
Abbrevs are my first thought ...
My second thought is a virtual keyboard and a shortcut to
enable it (say `C-h g' for "CHange to Greek" :)), that
keyboard will then take over the normal keyboard so if you
press 'd' a downcase delta will be inserted (and so on), and
either it will automatically go back to the normal keyboard at
that point after insertion, _or_ you'd have to do `C-h g'
again for it to return ...
--
underground experts united
https://dataswamp.org/~incal
^ permalink raw reply [flat|nested] 34+ messages in thread
* Re: input methods for mathematical glyphs
2021-12-08 18:33 ` Emanuel Berg via Users list for the GNU Emacs text editor
@ 2021-12-08 18:38 ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-12-08 18:43 ` Emanuel Berg via Users list for the GNU Emacs text editor
1 sibling, 0 replies; 34+ messages in thread
From: Emanuel Berg via Users list for the GNU Emacs text editor @ 2021-12-08 18:38 UTC (permalink / raw)
To: help-gnu-emacs
> Abbrevs are my first thought ...
Like this:
;;; (kill-all-abbrevs)
(let ((greek '(("gdelta" "δ")
("gDelta" "Δ")
;; add more
)))
(define-abbrev-table 'global-abbrev-table greek) )
--
underground experts united
https://dataswamp.org/~incal
^ permalink raw reply [flat|nested] 34+ messages in thread
* Re: input methods for mathematical glyphs
2021-12-08 18:33 ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-12-08 18:38 ` Emanuel Berg via Users list for the GNU Emacs text editor
@ 2021-12-08 18:43 ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-12-09 3:05 ` Emanuel Berg via Users list for the GNU Emacs text editor
1 sibling, 1 reply; 34+ messages in thread
From: Emanuel Berg via Users list for the GNU Emacs text editor @ 2021-12-08 18:43 UTC (permalink / raw)
To: help-gnu-emacs
> My second thought is a virtual keyboard and a shortcut to
> enable it (say `C-h g' for "CHange to Greek" :)), that
> keyboard will then take over the normal keyboard so if you
> press 'd' a downcase delta will be inserted (and so on), and
> either it will automatically go back to the normal keyboard
> at that point after insertion, _or_ you'd have to do `C-h g'
> again for it to return ...
If you like this idea, it can be done easily (I think) based
on this:
;;; caps-back.el --- one-keystroke word pre-capitalizer -*- lexical-binding: t -*-
;;;
;;; Commentary:
;;;
;;; Author: Emanuel Berg (incal) <moasenwood@zoho.eu>
;;; Created: 2021-05-23
;;; Keywords: caps lock key
;;; License: GPL3+
;;; URL: https://dataswamp.org/~incal/emacs-init/caps-back.el
;;; Version: 2.0.0
;;;
;;; This minor mode capitalizes the entire next word that is
;;; typed, at the same time as it is typed, then quietly
;;; disables itself at the word boundary.
;;;
;;; For this to work efficiently, a short and close keystroke,
;;; optimally a single key, should be assigned to invoke the
;;; minor mode, which happens with the
;;; `toggle-caps-mode' function.
;;;
;;; Setup a shortcut like this:
;;;
;;; (global-set-key KEY #'toggle-caps-mode)
;;;
;;; Then, hit \\[toggle-caps-mode] and type one and only one
;;; WORD in caps.
;;;
;;; Code:
(defun char-alphanum-or-dash (c)
"True if C is a character, a number, or a dash."
(or (eq c ?-)
(member c '(?å ?Å ?ä ?Ä ?ö ?Ö))
(and (>= c ?1) (<= c ?9))
(and (>= c ?A) (<= c ?Z))
(and (>= c ?a) (<= c ?z)) ))
(defun caps-mode-self-insert-command (n)
"Insert the `last-command-event' char N times.
Uppercase unless something else than an alphanum or a dash."
(interactive "p")
(let*((the-char last-command-event)
(alphanum-or-dash (char-alphanum-or-dash the-char)))
(if alphanum-or-dash
(insert-char (upcase the-char) n)
(caps-mode 0)
(insert-char the-char n) )))
(defvar caps-mode-map
(let ((map (make-keymap)))
(substitute-key-definition #'self-insert-command
#'caps-mode-self-insert-command
map global-map)
map) )
(define-minor-mode caps-mode
"Caps on you."
:init-value nil
:lighter " Caps")
(defun toggle-caps-mode ()
"Toggle Caps mode."
(interactive)
(caps-mode 'toggle) )
(provide 'caps-back)
;;; caps-back.el ends here
--
underground experts united
https://dataswamp.org/~incal
^ permalink raw reply [flat|nested] 34+ messages in thread
* Re: input methods for mathematical glyphs
2021-12-08 18:43 ` Emanuel Berg via Users list for the GNU Emacs text editor
@ 2021-12-09 3:05 ` Emanuel Berg via Users list for the GNU Emacs text editor
0 siblings, 0 replies; 34+ messages in thread
From: Emanuel Berg via Users list for the GNU Emacs text editor @ 2021-12-09 3:05 UTC (permalink / raw)
To: help-gnu-emacs
;;; greek-ao.el --- insert Greek chars -*- lexical-binding: t -*-
;;;
;;; Commentary:
;;;
;;; Author: Emanuel Berg (incal) <moasenwood@zoho.eu>
;;; Created: 2021-12-09
;;; Keywords: key
;;; License: GPL3+
;;; URL: https://dataswamp.org/~incal/emacs-init/greek-ao.el
;;; Version: 1.0.0
;;;
;;; Invoke this mode. Insert a Greek char.
;;; Return automatically.
;;;
;;; Code:
(defun char-to-greek (c)
"Convert C to the corresponding Greek char."
(when (and (<= ?A c)
(<= c ?Y) )
(+ c 848) ))
(defun greek-ao-mode-self-insert-command (n)
"Insert the `last-command-event' char N times, in Greek."
(interactive "p")
(let*((chr last-command-event)
(greek-char (char-to-greek chr)) )
(when greek-char
(insert-char greek-char n))
(greek-ao-mode 0) ))
(defvar greek-ao-mode-map
(let ((map (make-keymap)))
(substitute-key-definition #'self-insert-command
#'greek-ao-mode-self-insert-command
map global-map)
map) )
(define-minor-mode greek-ao-mode
"Greek Alpha Omega (ao) mode (greek-ao-mode)."
:init-value nil
:lighter " Caps")
(defun toggle-greek-ao-mode ()
"Toggle Greek Alpha Omega (ao) mode (greek-ao-mode)."
(interactive)
(greek-ao-mode 'toggle) )
(provide 'greek-ao)
;;; greek-ao.el ends here
--
underground experts united
https://dataswamp.org/~incal
^ permalink raw reply [flat|nested] 34+ messages in thread
* Re: input methods for mathematical glyphs
2021-12-08 16:40 input methods for mathematical glyphs Leo Butler
2021-12-08 17:18 ` Eli Zaretskii
2021-12-08 18:33 ` Emanuel Berg via Users list for the GNU Emacs text editor
@ 2021-12-08 19:41 ` André A. Gomes
2021-12-08 23:11 ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-12-08 20:35 ` Eduardo Ochs
3 siblings, 1 reply; 34+ messages in thread
From: André A. Gomes @ 2021-12-08 19:41 UTC (permalink / raw)
To: Leo Butler; +Cc: Emacs
Leo Butler <leo.butler@umanitoba.ca> writes:
> Hello,
>
> I have, for years, used abbrevs for entering greek letters (and several
> other commonly-used symbols in math). As I have learned how to use
> latex's support for other unicode math glyphs, I can see that my old
> solution does not scale and I would like to find an input method to
> easily input something like:
>
> #+begin_src latex
> Let $𝒯 ⊂ 𝐑$, $𝒯 ≠ ∅$, be a null set...
> #+end_src
>
> I used C-x 8 RET to do this. I am ignorant of any input method that
> would do what I want (ucs may be the closest, but it only uses 4 digit
> hex, and who wants to memorize 4-5 digit hex numbers?)
>
> Suggestions or thoughts?
To my mind such a system/configuration lies at the keyboard level. The
OS could provide another layer on top, but it shouldn't be necessary.
The reality is that we're stuck with ANSI and ISO standards that aren't
sane today. The experts please correct me if I'm wrong.
For example, AFAIK, there's no way to program a keyboard to insert
characters from the russian alphabet directly and working for all major
OSs. Why do I have select a input method on the OS level? It's
frustrating. At most, you might be able to insert arbitrary unicode
characters for a single specific OS. And I own a programmable keyboard
that runs the flexible QMK firmware. I find it unfortunate that you
need the OS to translate keycodes. Historically, this is understandable
since the US and ascii led the way.
Emacs can provide some sanity in this department, since it's input
method system is quite developed. And then you'll have smth that works
for any OS.
I have no concrete advice to give you. As Eli mentions, there's the TeX
input method (that I never tried). Even it doesn't fit your needs, you
could define your own system.
--
André A. Gomes
"Free Thought, Free World"
^ permalink raw reply [flat|nested] 34+ messages in thread
* Re: input methods for mathematical glyphs
2021-12-08 19:41 ` André A. Gomes
@ 2021-12-08 23:11 ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-12-09 14:08 ` André A. Gomes
0 siblings, 1 reply; 34+ messages in thread
From: Emanuel Berg via Users list for the GNU Emacs text editor @ 2021-12-08 23:11 UTC (permalink / raw)
To: help-gnu-emacs
André A. Gomes wrote:
> To my mind such a system/configuration lies at the keyboard
> level. The OS could provide another layer on top, but it
> shouldn't be necessary. The reality is that we're stuck with
> ANSI and ISO standards that aren't sane today. The experts
> please correct me if I'm wrong.
>
> For example, AFAIK, there's no way to program a keyboard to
> insert characters from the russian alphabet directly and
> working for all major OSs.
?
One can do it in Emacs! Isn't that the question?
gnu._emacs_.help, anyone?
--
underground experts united
https://dataswamp.org/~incal
^ permalink raw reply [flat|nested] 34+ messages in thread
* Re: input methods for mathematical glyphs
2021-12-08 23:11 ` Emanuel Berg via Users list for the GNU Emacs text editor
@ 2021-12-09 14:08 ` André A. Gomes
2021-12-09 14:24 ` Emanuel Berg via Users list for the GNU Emacs text editor
0 siblings, 1 reply; 34+ messages in thread
From: André A. Gomes @ 2021-12-09 14:08 UTC (permalink / raw)
To: help-gnu-emacs
Emanuel Berg via Users list for the GNU Emacs text editor
<help-gnu-emacs@gnu.org> writes:
> André A. Gomes wrote:
>
>> To my mind such a system/configuration lies at the keyboard
>> level. The OS could provide another layer on top, but it
>> shouldn't be necessary. The reality is that we're stuck with
>> ANSI and ISO standards that aren't sane today. The experts
>> please correct me if I'm wrong.
>>
>> For example, AFAIK, there's no way to program a keyboard to
>> insert characters from the russian alphabet directly and
>> working for all major OSs.
>
> ?
>
> One can do it in Emacs! Isn't that the question?
> gnu._emacs_.help, anyone?
No, that's trivial. I simply noted that it's a pity that such a
configuration can't happen at the level where it makes more sense---at
the keyboard firmware level.
--
André A. Gomes
"Free Thought, Free World"
^ permalink raw reply [flat|nested] 34+ messages in thread
* Re: input methods for mathematical glyphs
2021-12-09 14:08 ` André A. Gomes
@ 2021-12-09 14:24 ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-12-09 22:06 ` André A. Gomes
0 siblings, 1 reply; 34+ messages in thread
From: Emanuel Berg via Users list for the GNU Emacs text editor @ 2021-12-09 14:24 UTC (permalink / raw)
To: help-gnu-emacs
André A. Gomes wrote:
>> ?
>>
>> One can do it in Emacs! Isn't that the question?
>> gnu._emacs_.help, anyone?
>
> No, that's trivial.
... it isn't trivial.
> I simply noted that it's a pity that such a configuration
> can't happen at the level where it makes more sense---at the
> keyboard firmware level.
"makes more sense"
jerk
*plonk*
--
underground experts united
https://dataswamp.org/~incal
^ permalink raw reply [flat|nested] 34+ messages in thread
* Re: input methods for mathematical glyphs
2021-12-09 14:24 ` Emanuel Berg via Users list for the GNU Emacs text editor
@ 2021-12-09 22:06 ` André A. Gomes
0 siblings, 0 replies; 34+ messages in thread
From: André A. Gomes @ 2021-12-09 22:06 UTC (permalink / raw)
To: help-gnu-emacs
Emanuel Berg via Users list for the GNU Emacs text editor
<help-gnu-emacs@gnu.org> writes:
> André A. Gomes wrote:
>
>>> ?
>>>
>>> One can do it in Emacs! Isn't that the question?
>>> gnu._emacs_.help, anyone?
>>
>> No, that's trivial.
>
> ... it isn't trivial.
>
>> I simply noted that it's a pity that such a configuration
>> can't happen at the level where it makes more sense---at the
>> keyboard firmware level.
>
> "makes more sense"
>
> jerk
>
> *plonk*
There was a misunderstanding. Most likely I didn't understand what
exactly you said that can be done in Emacs, but I'm eager to listen.
--
André A. Gomes
"Free Thought, Free World"
^ permalink raw reply [flat|nested] 34+ messages in thread
* Re: input methods for mathematical glyphs
2021-12-08 16:40 input methods for mathematical glyphs Leo Butler
` (2 preceding siblings ...)
2021-12-08 19:41 ` André A. Gomes
@ 2021-12-08 20:35 ` Eduardo Ochs
2021-12-08 21:59 ` H. Dieter Wilhelm
2021-12-09 14:55 ` Leo Butler
3 siblings, 2 replies; 34+ messages in thread
From: Eduardo Ochs @ 2021-12-08 20:35 UTC (permalink / raw)
To: Leo Butler; +Cc: Emacs
Hi Leo,
many many many years ago I tried to add my own characters to existing
input methods, failed miserably, and wrote my own way to do that - in
which if I typed `M-, char1 char2' the two chars would be "composed"
using a table that was easy to edit, and the result would be inserted.
In june of this year I rewrote my definition for `M-,' to make it
support compose tables written in a better format, and it became this:
http://angg.twu.net/eev-current/eev-compose-hash.el
http://angg.twu.net/eev-current/eev-compose-hash.el.html
The new version can also generate definitions for these characters in
a format that lualatex accepts,
http://angg.twu.net/LATEX/edrx21chars.tex
http://angg.twu.net/LATEX/edrx21chars.tex.html
and in a format that pdflatex accepts:
http://angg.twu.net/LATEX/edrx21chars-d.tex
http://angg.twu.net/LATEX/edrx21chars-d.tex.html
If you can't make the standard ways work, get in touch! =)
Cheers,
Eduardo Ochs
http://angg.twu.net/#eev
On Wed, 8 Dec 2021 at 14:02, Leo Butler <leo.butler@umanitoba.ca> wrote:
>
> Hello,
>
> I have, for years, used abbrevs for entering greek letters (and several
> other commonly-used symbols in math). As I have learned how to use
> latex's support for other unicode math glyphs, I can see that my old
> solution does not scale and I would like to find an input method to
> easily input something like:
>
> #+begin_src latex
> Let $𝒯 ⊂ 𝐑$, $𝒯 ≠ ∅$, be a null set...
> #+end_src
>
> I used C-x 8 RET to do this. I am ignorant of any input method that
> would do what I want (ucs may be the closest, but it only uses 4 digit
> hex, and who wants to memorize 4-5 digit hex numbers?)
>
> Suggestions or thoughts?
>
> TIA,
> Leo
>
^ permalink raw reply [flat|nested] 34+ messages in thread
* Re: input methods for mathematical glyphs
2021-12-08 20:35 ` Eduardo Ochs
@ 2021-12-08 21:59 ` H. Dieter Wilhelm
2021-12-09 14:55 ` Leo Butler
1 sibling, 0 replies; 34+ messages in thread
From: H. Dieter Wilhelm @ 2021-12-08 21:59 UTC (permalink / raw)
To: Eduardo Ochs; +Cc: Emacs, Leo Butler
Hi Eduardo
Eduardo Ochs <eduardoochs@gmail.com> writes:
>
> many many many years ago I tried to add my own characters to existing
> input methods, failed miserably, and wrote my own way to do that - in
> which if I typed `M-, char1 char2' the two chars would be "composed"
> using a table that was easy to edit, and the result would be inserted.
> In june of this year I rewrote my definition for `M-,' to make it
> support compose tables written in a better format, and it became this:
>
> http://angg.twu.net/eev-current/eev-compose-hash.el
> http://angg.twu.net/eev-current/eev-compose-hash.el.html
This looks very impressive! But for my limited use of utf-8 characters
the TeX input method is already working well. (I'm using greek letters
for variable definitions in R and Emacs' calc. The formulae are way
easier to grock and to compare with recipes from handbooks.)
> and in a format that pdflatex accepts:
>
> http://angg.twu.net/LATEX/edrx21chars-d.tex
> http://angg.twu.net/LATEX/edrx21chars-d.tex.html
> If you can't make the standard ways work, get in touch! =)
Wow, how could I reuse the above to export PDFLaTeX from org-mode
buffers with utf-8 characters?
Thanks a lot
Dieter
> Eduardo Ochs
> http://angg.twu.net/#eev
--
Best wishes
H. Dieter Wilhelm
Zwingenberg, Germany
^ permalink raw reply [flat|nested] 34+ messages in thread
* Re: input methods for mathematical glyphs
2021-12-08 20:35 ` Eduardo Ochs
2021-12-08 21:59 ` H. Dieter Wilhelm
@ 2021-12-09 14:55 ` Leo Butler
2021-12-09 16:06 ` Eduardo Ochs
1 sibling, 1 reply; 34+ messages in thread
From: Leo Butler @ 2021-12-09 14:55 UTC (permalink / raw)
To: Eduardo Ochs; +Cc: Emacs
Eduardo Ochs <eduardoochs@gmail.com> writes:
> Hi Leo,
>
> many many many years ago I tried to add my own characters to existing
> input methods, failed miserably, and wrote my own way to do that - in
> which if I typed `M-, char1 char2' the two chars would be "composed"
> using a table that was easy to edit, and the result would be inserted.
> In june of this year I rewrote my definition for `M-,' to make it
> support compose tables written in a better format, and it became this:
>
> http://angg.twu.net/eev-current/eev-compose-hash.el
> http://angg.twu.net/eev-current/eev-compose-hash.el.html
Hi Eduardo, Thanks for the pointer to your work. It looks very
accessible and much closer to my wants than the TeX input method. I
wonder if you have an idea of how difficult it would be to extend it to
include all (or almost all) glyphs found here:
https://en.wikipedia.org/wiki/Mathematical_operators_and_symbols_in_Unicode
Leo
>
> The new version can also generate definitions for these characters in
> a format that lualatex accepts,
>
> http://angg.twu.net/LATEX/edrx21chars.tex
> http://angg.twu.net/LATEX/edrx21chars.tex.html
>
> and in a format that pdflatex accepts:
>
> http://angg.twu.net/LATEX/edrx21chars-d.tex
> http://angg.twu.net/LATEX/edrx21chars-d.tex.html
>
> If you can't make the standard ways work, get in touch! =)
>
> Cheers,
> Eduardo Ochs
> http://angg.twu.net/#eev
>
> On Wed, 8 Dec 2021 at 14:02, Leo Butler <leo.butler@umanitoba.ca> wrote:
>>
>> Hello,
>>
>> I have, for years, used abbrevs for entering greek letters (and several
>> other commonly-used symbols in math). As I have learned how to use
>> latex's support for other unicode math glyphs, I can see that my old
>> solution does not scale and I would like to find an input method to
>> easily input something like:
>>
>> #+begin_src latex
>> Let $𝒯 ⊂ 𝐑$, $𝒯 ≠ ∅$, be a null set...
>> #+end_src
>>
>> I used C-x 8 RET to do this. I am ignorant of any input method that
>> would do what I want (ucs may be the closest, but it only uses 4 digit
>> hex, and who wants to memorize 4-5 digit hex numbers?)
>>
>> Suggestions or thoughts?
>>
>> TIA,
>> Leo
>>
^ permalink raw reply [flat|nested] 34+ messages in thread
* Re: input methods for mathematical glyphs
2021-12-09 14:55 ` Leo Butler
@ 2021-12-09 16:06 ` Eduardo Ochs
2021-12-09 16:22 ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-12-09 17:39 ` Leo Butler
0 siblings, 2 replies; 34+ messages in thread
From: Eduardo Ochs @ 2021-12-09 16:06 UTC (permalink / raw)
To: Leo Butler; +Cc: Emacs
On Thu, 9 Dec 2021 at 11:55, Leo Butler <leo.butler@umanitoba.ca> wrote:
>
> Hi Eduardo, Thanks for the pointer to your work. It looks very
> accessible and much closer to my wants than the TeX input method. I
> wonder if you have an idea of how difficult it would be to extend it to
> include all (or almost all) glyphs found here:
>
> https://en.wikipedia.org/wiki/Mathematical_operators_and_symbols_in_Unicode
Hi Leo,
that wouldn't be practical because you would have to choose a two-character
abbreviation for each of all these unicode characters. But it would be easy
to add, say, 200 characters, and then add others when you need to...
[[]], E.
^ permalink raw reply [flat|nested] 34+ messages in thread
* Re: input methods for mathematical glyphs
2021-12-09 16:06 ` Eduardo Ochs
@ 2021-12-09 16:22 ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-12-09 17:39 ` Leo Butler
1 sibling, 0 replies; 34+ messages in thread
From: Emanuel Berg via Users list for the GNU Emacs text editor @ 2021-12-09 16:22 UTC (permalink / raw)
To: help-gnu-emacs
Eduardo Ochs wrote:
> that wouldn't be practical because you would have to choose
> a two-character abbreviation for each of all these
> unicode characters.
In order to use them you must have a way of referring to them.
If that's not practical what you describe, then what would
you prefer?
There is no need to worry about choosing, adding, etc - step 1
is to decide what one wants, after that there is always a way
(often several ways) to figure out how it will be put into
practice ...
--
underground experts united
https://dataswamp.org/~incal
^ permalink raw reply [flat|nested] 34+ messages in thread
* Re: input methods for mathematical glyphs
2021-12-09 16:06 ` Eduardo Ochs
2021-12-09 16:22 ` Emanuel Berg via Users list for the GNU Emacs text editor
@ 2021-12-09 17:39 ` Leo Butler
2021-12-09 18:21 ` Eduardo Ochs
1 sibling, 1 reply; 34+ messages in thread
From: Leo Butler @ 2021-12-09 17:39 UTC (permalink / raw)
To: Eduardo Ochs; +Cc: Emacs
Eduardo Ochs <eduardoochs@gmail.com> writes:
> On Thu, 9 Dec 2021 at 11:55, Leo Butler <leo.butler@umanitoba.ca> wrote:
>>
>> Hi Eduardo, Thanks for the pointer to your work. It looks very
>> accessible and much closer to my wants than the TeX input method. I
>> wonder if you have an idea of how difficult it would be to extend it to
>> include all (or almost all) glyphs found here:
>>
>> https://en.wikipedia.org/wiki/Mathematical_operators_and_symbols_in_Unicode
>
> Hi Leo,
> that wouldn't be practical because you would have to choose a two-character
> abbreviation for each of all these unicode characters. But it would be easy
> to add, say, 200 characters, and then add others when you need to...
> [[]], E.
Hi Eduardo,
Yes, thanks for confirming my suspicion. It might be preferable to allow
an arbitrarily long sequence of characters (3 or 4 should suffice), to
accomodate the larger number of symblols.
Do you have this code in a public repo somewhere?
Leo
^ permalink raw reply [flat|nested] 34+ messages in thread
* Re: input methods for mathematical glyphs
2021-12-09 17:39 ` Leo Butler
@ 2021-12-09 18:21 ` Eduardo Ochs
0 siblings, 0 replies; 34+ messages in thread
From: Eduardo Ochs @ 2021-12-09 18:21 UTC (permalink / raw)
To: Leo Butler; +Cc: Emacs
On Thu, 9 Dec 2021 at 14:39, Leo Butler <leo.butler@umanitoba.ca> wrote:
>
> Hi Eduardo,
> Yes, thanks for confirming my suspicion. It might be preferable to allow
> an arbitrarily long sequence of characters (3 or 4 should suffice), to
> accomodate the larger number of symblols.
>
> Do you have this code in a public repo somewhere?
>
> Leo
Hi Leo,
the current version only supports combinations of two characters. It
is part of eev -
http://angg.twu.net/#eev
http://elpa.gnu.org/packages/eev.html
I sometimes give workshops on LaTeX for beginners, and I use Emacs and
eev in these workshops. When it comes to the point in which people
have to learn how to type unicode characters I prefer to teach the
trick that I've shown you - actually I start by its predecessor, that
doesn't have a "hash" in its filename; see below - first,
http://angg.twu.net/eev-current/eev-compose-hash.el.html
http://angg.twu.net/eev-current/eev-compose-hash.el
http://angg.twu.net/eev-current/eev-compose.el.html
http://angg.twu.net/eev-current/eev-compose.el
and only then I teach the basics of input methods. So these
"eev-compose"s are meant to be useful enough, simple enough - even for
the people who like to understand the source code -, extensible
enough, and a good starting point for learning input methods, and just
that. I use my eev-composes-hash for everything except Agda code and
emojis, but that's irrelevant...
Cheers, E.
http://angg.twu.net/#eev
^ permalink raw reply [flat|nested] 34+ messages in thread