GNU bug report logs - #25594
25.1.91; TeX input method is missing \sqrt macro

Previous Next

Package: emacs;

Reported by: Tyler Smith <tyler <at> plantarum.ca>

Date: Tue, 31 Jan 2017 22:37:01 UTC

Severity: wishlist

Tags: fixed, patch

Found in version 25.1.91

Fixed in version 28.1

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 25594 in the body.
You can then email your comments to 25594 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#25594; Package emacs. (Tue, 31 Jan 2017 22:37:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Tyler Smith <tyler <at> plantarum.ca>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Tue, 31 Jan 2017 22:37:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Tyler Smith <tyler <at> plantarum.ca>
To: bug-gnu-emacs <at> gnu.org
Subject: 25.1.91; TeX input method is missing \sqrt macro
Date: Tue, 31 Jan 2017 17:36:28 -0500
Hi,

The TeX input method does not provide a translation for the \sqrt macro.
The appropriate symbol, unicode Square Root, is available, and can be
inserted using the obscure name \surd.

Perhaps that's a well-known word to some, but for regular TeX users, it
would be very helpful to have the following rule added to the
(latin-ltx--define-rules ...) form in lisp/leim/quail/latin-ltx.el:

 ("\\sqrt" ?√)

Thanks,

Tyler

In GNU Emacs 25.1.91.1 (x86_64-pc-linux-gnu, X toolkit, Xaw3d scroll
bars)
 of 2017-01-17 built on onottra672626p
Repository revision: a1ef10e6a0a216e80551dd179fc511ea8fdc4c88
Windowing system distributor 'The X.Org Foundation', version
11.0.11900000
System Description:     Debian GNU/Linux 9.0 (stretch)

Configured using:
 'configure --with-x-toolkit=lucid'

Configured features:
XAW3D XPM JPEG TIFF GIF PNG RSVG IMAGEMAGICK SOUND GPM DBUS GCONF
GSETTINGS NOTIFY ACL LIBSELINUX GNUTLS LIBXML2 FREETYPE M17N_FLT LIBOTF
XFT ZLIB TOOLKIT_SCROLL_BARS LUCID X11

Important settings:
  value of $LANG: en_CA.UTF-8
  locale-coding-system: utf-8-unix

Major mode: Lisp Interaction

Minor modes in effect:
  tooltip-mode: t
  global-eldoc-mode: t
  electric-indent-mode: t
  mouse-wheel-mode: t
  tool-bar-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  blink-cursor-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  line-number-mode: t
  transient-mark-mode: t

Recent messages:
For information about GNU Emacs and the GNU system, type C-h C-a.

Load-path shadows:
/usr/local/share/emacs/25.1.91/lisp/net/rfc2104 hides
/usr/local/share/emacs/25.1.91/lisp/gnus/rfc2104
/usr/local/share/emacs/25.1.91/lisp/emacs-lisp/gulp hides
/usr/local/share/emacs/25.1.91/lisp/obsolete/gulp
/usr/local/share/emacs/25.1.91/lisp/play/landmark hides
/usr/local/share/emacs/25.1.91/lisp/obsolete/landmark
/usr/local/share/emacs/25.1.91/lisp/vc/vc-arch hides
/usr/local/share/emacs/25.1.91/lisp/obsolete/vc-arch
/usr/local/share/emacs/25.1.91/lisp/net/eudcb-ph hides
/usr/local/share/emacs/25.1.91/lisp/obsolete/eudcb-ph

Features:
(shadow sort mail-extr emacsbug message dired format-spec rfc822 mml
mml-sec password-cache epg epg-config gnus-util mm-decode mm-bodies
mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader sendmail
rfc2047 rfc2045 ietf-drums mm-util help-fns help-mode easymenu
cl-loaddefs pcase cl-lib mail-prsvr mail-utils time-date mule-util
tooltip eldoc electric uniquify ediff-hook vc-hooks lisp-float-type
mwheel x-win term/common-win x-dnd tool-bar dnd fontset image regexp-opt
fringe tabulated-list newcomment elisp-mode lisp-mode prog-mode register
page menu-bar rfn-eshadow timer select scroll-bar mouse jit-lock
font-lock syntax facemenu font-core frame cl-generic cham georgian
utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean
japanese eucjp-ms cp51932 hebrew greek romanian slovak czech european
ethiopic indian cyrillic chinese charscript case-table epa-hook
jka-cmpr-hook help simple abbrev minibuffer cl-preloaded nadvice
loaddefs button faces cus-face macroexp files text-properties overlay
sha1 md5 base64 format env code-pages mule custom widget
hashtable-print-readable backquote dbusbind inotify dynamic-setting
system-font-setting font-render-setting x-toolkit x multi-tty
make-network-process emacs)

Memory information:
((conses 16 86936 3712)
 (symbols 48 19915 0)
 (miscs 40 54 146)
 (strings 32 15119 5124)
 (string-bytes 1 421250)
 (vectors 16 11796)
 (vector-slots 8 433683 4134)
 (floats 8 166 43)
 (intervals 56 221 0)
 (buffers 976 20))


-- 
plantarum.ca




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#25594; Package emacs. (Fri, 26 Jul 2019 14:40:02 GMT) Full text and rfc822 format available.

Message #8 received at 25594 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Tyler Smith <tyler <at> plantarum.ca>
Cc: 25594 <at> debbugs.gnu.org
Subject: Re: bug#25594: 25.1.91; TeX input method is missing \sqrt macro
Date: Fri, 26 Jul 2019 16:39:03 +0200
Tyler Smith <tyler <at> plantarum.ca> writes:

> The TeX input method does not provide a translation for the \sqrt macro.
> The appropriate symbol, unicode Square Root, is available, and can be
> inserted using the obscure name \surd.
>
> Perhaps that's a well-known word to some, but for regular TeX users, it
> would be very helpful to have the following rule added to the
> (latin-ltx--define-rules ...) form in lisp/leim/quail/latin-ltx.el:
>
>  ("\\sqrt" ?√)

(I'm going through older Emacs bug reports that have received no
response.)

That seems a reasonable thing to add, and it's in patch form below.  But
what makes me hesitate to add it is that there's a commented-out
"\\sqrt[3]" in the file...  Does this mean that this should be
"\\sqrt[2]"?  Why is it commented out in the first place?  Don't
latin-ltx people like squares?  And roots?

So if anybody else who uses this input method could weigh in here, that
would be nice.

diff --git a/lisp/leim/quail/latin-ltx.el b/lisp/leim/quail/latin-ltx.el
index 93b1250a35..aed34d1265 100644
--- a/lisp/leim/quail/latin-ltx.el
+++ b/lisp/leim/quail/latin-ltx.el
@@ -703,6 +703,7 @@
  ("\\ldq" ?\“)
  ("\\rdq" ?\”)
  ("\\defs" ?≙)				; per fuzz/zed
+ ("\\sqrt" ?√)
  ;; ("\\sqrt[3]" ?∛)
  ("\\llbracket" ?\〚) 			; stmaryrd
  ("\\rrbracket" ?\〛)


-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




Added tag(s) patch. Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Fri, 26 Jul 2019 14:40:04 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#25594; Package emacs. (Mon, 20 Jan 2020 20:15:01 GMT) Full text and rfc822 format available.

Message #13 received at 25594 <at> debbugs.gnu.org (full text, mbox):

From: Stefan Kangas <stefan <at> marxist.se>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: 25594 <at> debbugs.gnu.org, Tyler Smith <tyler <at> plantarum.ca>
Subject: Re: bug#25594: 25.1.91; TeX input method is missing \sqrt macro
Date: Mon, 20 Jan 2020 21:14:40 +0100
Lars Ingebrigtsen <larsi <at> gnus.org> writes:

> Tyler Smith <tyler <at> plantarum.ca> writes:
>
>> The TeX input method does not provide a translation for the \sqrt macro.
>> The appropriate symbol, unicode Square Root, is available, and can be
>> inserted using the obscure name \surd.
>>
>> Perhaps that's a well-known word to some, but for regular TeX users, it
>> would be very helpful to have the following rule added to the
>> (latin-ltx--define-rules ...) form in lisp/leim/quail/latin-ltx.el:
>>
>>  ("\\sqrt" ?√)
>
> (I'm going through older Emacs bug reports that have received no
> response.)
>
> That seems a reasonable thing to add, and it's in patch form below.  But
> what makes me hesitate to add it is that there's a commented-out
> "\\sqrt[3]" in the file...  Does this mean that this should be
> "\\sqrt[2]"?  Why is it commented out in the first place?  Don't
> latin-ltx people like squares?  And roots?
>
> So if anybody else who uses this input method could weigh in here, that
> would be nice.

No one has commented within 25 weeks.

AFAIK, TeX has the \sqrt command for a basic square root, and \sqrt[3]
for the cubic root.  That suggests that the proposal is fine (we can
leave the sqrt[3] commented out as is for now IMHO).

Best regards,
Stefan Kangas

>
> diff --git a/lisp/leim/quail/latin-ltx.el b/lisp/leim/quail/latin-ltx.el
> index 93b1250a35..aed34d1265 100644
> --- a/lisp/leim/quail/latin-ltx.el
> +++ b/lisp/leim/quail/latin-ltx.el
> @@ -703,6 +703,7 @@
>   ("\\ldq" ?\“)
>   ("\\rdq" ?\”)
>   ("\\defs" ?≙)				; per fuzz/zed
> + ("\\sqrt" ?√)
>   ;; ("\\sqrt[3]" ?∛)
>   ("\\llbracket" ?\〚) 			; stmaryrd
>   ("\\rrbracket" ?\〛)




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#25594; Package emacs. (Mon, 20 Jan 2020 20:41:01 GMT) Full text and rfc822 format available.

Message #16 received at 25594 <at> debbugs.gnu.org (full text, mbox):

From: "Tyler Smith" <tyler <at> plantarum.ca>
To: "Stefan Kangas" <stefan <at> marxist.se>, "Lars Ingebrigtsen" <larsi <at> gnus.org>
Cc: 25594 <at> debbugs.gnu.org
Subject: Re: bug#25594: 25.1.91; TeX input method is missing \sqrt macro
Date: Mon, 20 Jan 2020 15:39:38 -0500
On Mon, Jan 20, 2020, at 3:14 PM, Stefan Kangas wrote:
> Lars Ingebrigtsen <larsi <at> gnus.org> writes:
> 
> > That seems a reasonable thing to add, and it's in patch form below.  But
> > what makes me hesitate to add it is that there's a commented-out
> > "\\sqrt[3]" in the file...  Does this mean that this should be
> > "\\sqrt[2]"?  Why is it commented out in the first place?  Don't
> > latin-ltx people like squares?  And roots?
> >
> > So if anybody else who uses this input method could weigh in here, that
> > would be nice.
> 
> No one has commented within 25 weeks.
> 
> AFAIK, TeX has the \sqrt command for a basic square root, and \sqrt[3]
> for the cubic root.  That suggests that the proposal is fine (we can
> leave the sqrt[3] commented out as is for now IMHO).

FWIW, `\sqrt[3]` in LaTeX produces the ∛ symbol, so it would appear that line could be uncommented. I don't think there is a Unicode symbol for the square root that includes the `2`, just the 'naked' √. So there wouldn't be any point in adding support for `\sqrt[2]`.

I have no idea why that would have been commented out to begin with, and use cube roots so rarely that it doesn't make much practical difference to me if it is included or not.

Best,

Tyler


> >
> > diff --git a/lisp/leim/quail/latin-ltx.el b/lisp/leim/quail/latin-ltx.el
> > index 93b1250a35..aed34d1265 100644
> > --- a/lisp/leim/quail/latin-ltx.el
> > +++ b/lisp/leim/quail/latin-ltx.el
> > @@ -703,6 +703,7 @@
> >   ("\\ldq" ?\“)
> >   ("\\rdq" ?\”)
> >   ("\\defs" ?≙)				; per fuzz/zed
> > + ("\\sqrt" ?√)
> >   ;; ("\\sqrt[3]" ?∛)
> >   ("\\llbracket" ?\〚) 			; stmaryrd
> >   ("\\rrbracket" ?\〛)
>




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#25594; Package emacs. (Mon, 20 Jan 2020 23:20:02 GMT) Full text and rfc822 format available.

Message #19 received at 25594 <at> debbugs.gnu.org (full text, mbox):

From: James Cloos <cloos <at> jhcloos.com>
To: "Tyler Smith" <tyler <at> plantarum.ca>
Cc: 25594 <at> debbugs.gnu.org, Lars Ingebrigtsen <larsi <at> gnus.org>,
 Stefan Kangas <stefan <at> marxist.se>
Subject: Re: bug#25594: 25.1.91; TeX input method is missing \sqrt macro
Date: Mon, 20 Jan 2020 18:19:17 -0500
>>>>> "TS" == Tyler Smith <tyler <at> plantarum.ca> writes:

TS> I have no idea why that would have been commented out to begin with, and use cube roots so rarely that it doesn't make much practical difference to me if it is included or not.

It seems likely that ∛ was commented to avoid confusion for those
who want to type √.

-JimC
-- 
James Cloos <cloos <at> jhcloos.com>         OpenPGP: 0x997A9F17ED7DAEA6




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#25594; Package emacs. (Mon, 20 Jan 2020 23:59:02 GMT) Full text and rfc822 format available.

Message #22 received at 25594 <at> debbugs.gnu.org (full text, mbox):

From: Stefan Kangas <stefan <at> marxist.se>
To: "Tyler Smith" <tyler <at> plantarum.ca>
Cc: Lars Ingebrigtsen <larsi <at> gnus.org>, 25594 <at> debbugs.gnu.org
Subject: Re: bug#25594: 25.1.91; TeX input method is missing \sqrt macro
Date: Tue, 21 Jan 2020 00:58:12 +0100
"Tyler Smith" <tyler <at> plantarum.ca> writes:

> FWIW, `\sqrt[3]` in LaTeX produces the ∛ symbol, so it would appear that line
> could be uncommented. I don't think there is a Unicode symbol for the square
> root that includes the `2`, just the 'naked' √. So there wouldn't be any point
> in adding support for `\sqrt[2]`.
>
> I have no idea why that would have been commented out to begin with,
> and use cube roots so rarely that it doesn't make much practical
> difference to me if it is included or not.

BTW, I now see that √ is already available under the name \surd, but
this seems to have caused at least some user confusion.[1]  It's not
really something I would think to try, either.

I don't see any problem with uncommenting \sqrt[3] as well.

Best regards,
Stefan Kangas

Footnotes:
[1]  https://emacs.stackexchange.com/questions/30324/how-to-make-all-special-symbols-available-in-org-latex






Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#25594; Package emacs. (Wed, 22 Jan 2020 13:52:02 GMT) Full text and rfc822 format available.

Message #25 received at 25594 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Stefan Kangas <stefan <at> marxist.se>
Cc: 25594 <at> debbugs.gnu.org, Tyler Smith <tyler <at> plantarum.ca>
Subject: Re: bug#25594: 25.1.91; TeX input method is missing \sqrt macro
Date: Wed, 22 Jan 2020 14:51:47 +0100
Stefan Kangas <stefan <at> marxist.se> writes:

> I don't see any problem with uncommenting \sqrt[3] as well.

I don't think we can have both \sqrt and \sqrt[3] in this input method?
Granted, I don't know much about input methods, but I thought this meant
that if you typed \sqrt then you'd get √ immediately.  That's why I
wondered whether the method should be \sqrt[2] to get √, so that you
could get both √ and ∛.

If I've misunderstood and you can continue to write [3] after getting √
to get ∛, then I have no objection to adding \sqrt.  :-)

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#25594; Package emacs. (Wed, 22 Jan 2020 14:08:02 GMT) Full text and rfc822 format available.

Message #28 received at 25594 <at> debbugs.gnu.org (full text, mbox):

From: Stefan Kangas <stefan <at> marxist.se>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: 25594 <at> debbugs.gnu.org, Tyler Smith <tyler <at> plantarum.ca>
Subject: Re: bug#25594: 25.1.91; TeX input method is missing \sqrt macro
Date: Wed, 22 Jan 2020 15:07:06 +0100
Lars Ingebrigtsen <larsi <at> gnus.org> writes:

> I don't think we can have both \sqrt and \sqrt[3] in this input method?
> Granted, I don't know much about input methods, but I thought this meant
> that if you typed \sqrt then you'd get √ immediately.  That's why I
> wondered whether the method should be \sqrt[2] to get √, so that you
> could get both √ and ∛.

I was concerned about that too at first, but when testing learned that
you can have both.  It will show you √ after typing "\sqrt", but it
still shows that the completion can continue in the minibuffer.  You
can then just enter "[3]" to replace the √ with ∛.

To be honest, the only surprise here was how smooth and intuitive it
all was.  You should give it a try.  :-)

Best regards,
Stefan Kangas




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#25594; Package emacs. (Wed, 22 Jan 2020 14:17:01 GMT) Full text and rfc822 format available.

Message #31 received at 25594 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Stefan Kangas <stefan <at> marxist.se>
Cc: 25594 <at> debbugs.gnu.org, Tyler Smith <tyler <at> plantarum.ca>
Subject: Re: bug#25594: 25.1.91; TeX input method is missing \sqrt macro
Date: Wed, 22 Jan 2020 15:16:43 +0100
Stefan Kangas <stefan <at> marxist.se> writes:

> I was concerned about that too at first, but when testing learned that
> you can have both.  It will show you √ after typing "\sqrt", but it
> still shows that the completion can continue in the minibuffer.  You
> can then just enter "[3]" to replace the √ with ∛.

Oh, cool!

> To be honest, the only surprise here was how smooth and intuitive it
> all was.  You should give it a try.  :-)

:-)

I'll apply the patch, then.  (And un-comment the [3].)

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




Added tag(s) fixed. Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Wed, 22 Jan 2020 14:19:02 GMT) Full text and rfc822 format available.

bug marked as fixed in version 28.1, send any further explanations to 25594 <at> debbugs.gnu.org and Tyler Smith <tyler <at> plantarum.ca> Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Wed, 22 Jan 2020 14:19:02 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#25594; Package emacs. (Wed, 22 Jan 2020 15:44:02 GMT) Full text and rfc822 format available.

Message #38 received at 25594 <at> debbugs.gnu.org (full text, mbox):

From: Mattias Engdegård <mattiase <at> acm.org>
To: Lars Ingebrigtsen <larsi <at> gnus.org>, Stefan Kangas <stefan <at> marxist.se>,
 Tyler Smith <tyler <at> plantarum.ca>
Cc: 25594 <at> debbugs.gnu.org
Subject: bug#25594: 25.1.91; TeX input method is missing \sqrt macro
Date: Wed, 22 Jan 2020 16:43:25 +0100
Might as well add \sqrt[4] as ∜ for completeness. That's how far Unicode goes.





Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#25594; Package emacs. (Wed, 22 Jan 2020 15:48:02 GMT) Full text and rfc822 format available.

Message #41 received at 25594 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Mattias Engdegård <mattiase <at> acm.org>
Cc: 25594 <at> debbugs.gnu.org, Stefan Kangas <stefan <at> marxist.se>,
 Tyler Smith <tyler <at> plantarum.ca>
Subject: Re: bug#25594: 25.1.91; TeX input method is missing \sqrt macro
Date: Wed, 22 Jan 2020 16:47:35 +0100
Mattias Engdegård <mattiase <at> acm.org> writes:

> Might as well add \sqrt[4] as ∜ for completeness. That's how far Unicode goes.

Makes sense.  I've now done so on the trunk.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Thu, 20 Feb 2020 12:24:07 GMT) Full text and rfc822 format available.

This bug report was last modified 4 years and 60 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.