unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#25594: 25.1.91; TeX input method is missing \sqrt macro
@ 2017-01-31 22:36 Tyler Smith
  2019-07-26 14:39 ` Lars Ingebrigtsen
  2020-01-22 15:43 ` Mattias Engdegård
  0 siblings, 2 replies; 11+ messages in thread
From: Tyler Smith @ 2017-01-31 22:36 UTC (permalink / raw)
  To: 25594

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





^ permalink raw reply	[flat|nested] 11+ messages in thread

* bug#25594: 25.1.91; TeX input method is missing \sqrt macro
  2017-01-31 22:36 bug#25594: 25.1.91; TeX input method is missing \sqrt macro Tyler Smith
@ 2019-07-26 14:39 ` Lars Ingebrigtsen
  2020-01-20 20:14   ` Stefan Kangas
  2020-01-22 15:43 ` Mattias Engdegård
  1 sibling, 1 reply; 11+ messages in thread
From: Lars Ingebrigtsen @ 2019-07-26 14:39 UTC (permalink / raw)
  To: Tyler Smith; +Cc: 25594

Tyler Smith <tyler@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





^ permalink raw reply related	[flat|nested] 11+ messages in thread

* bug#25594: 25.1.91; TeX input method is missing \sqrt macro
  2019-07-26 14:39 ` Lars Ingebrigtsen
@ 2020-01-20 20:14   ` Stefan Kangas
  2020-01-20 20:39     ` Tyler Smith
  0 siblings, 1 reply; 11+ messages in thread
From: Stefan Kangas @ 2020-01-20 20:14 UTC (permalink / raw)
  To: Lars Ingebrigtsen; +Cc: 25594, Tyler Smith

Lars Ingebrigtsen <larsi@gnus.org> writes:

> Tyler Smith <tyler@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" ?\〛)





^ permalink raw reply	[flat|nested] 11+ messages in thread

* bug#25594: 25.1.91; TeX input method is missing \sqrt macro
  2020-01-20 20:14   ` Stefan Kangas
@ 2020-01-20 20:39     ` Tyler Smith
  2020-01-20 23:19       ` James Cloos
  2020-01-20 23:58       ` Stefan Kangas
  0 siblings, 2 replies; 11+ messages in thread
From: Tyler Smith @ 2020-01-20 20:39 UTC (permalink / raw)
  To: Stefan Kangas, Lars Ingebrigtsen; +Cc: 25594

On Mon, Jan 20, 2020, at 3:14 PM, Stefan Kangas wrote:
> Lars Ingebrigtsen <larsi@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" ?\〛)
>





^ permalink raw reply	[flat|nested] 11+ messages in thread

* bug#25594: 25.1.91; TeX input method is missing \sqrt macro
  2020-01-20 20:39     ` Tyler Smith
@ 2020-01-20 23:19       ` James Cloos
  2020-01-20 23:58       ` Stefan Kangas
  1 sibling, 0 replies; 11+ messages in thread
From: James Cloos @ 2020-01-20 23:19 UTC (permalink / raw)
  To: Tyler Smith; +Cc: Stefan Kangas, Lars Ingebrigtsen, 25594

>>>>> "TS" == Tyler Smith <tyler@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@jhcloos.com>         OpenPGP: 0x997A9F17ED7DAEA6





^ permalink raw reply	[flat|nested] 11+ messages in thread

* bug#25594: 25.1.91; TeX input method is missing \sqrt macro
  2020-01-20 20:39     ` Tyler Smith
  2020-01-20 23:19       ` James Cloos
@ 2020-01-20 23:58       ` Stefan Kangas
  2020-01-22 13:51         ` Lars Ingebrigtsen
  1 sibling, 1 reply; 11+ messages in thread
From: Stefan Kangas @ 2020-01-20 23:58 UTC (permalink / raw)
  To: Tyler Smith; +Cc: Lars Ingebrigtsen, 25594

"Tyler Smith" <tyler@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







^ permalink raw reply	[flat|nested] 11+ messages in thread

* bug#25594: 25.1.91; TeX input method is missing \sqrt macro
  2020-01-20 23:58       ` Stefan Kangas
@ 2020-01-22 13:51         ` Lars Ingebrigtsen
  2020-01-22 14:07           ` Stefan Kangas
  0 siblings, 1 reply; 11+ messages in thread
From: Lars Ingebrigtsen @ 2020-01-22 13:51 UTC (permalink / raw)
  To: Stefan Kangas; +Cc: 25594, Tyler Smith

Stefan Kangas <stefan@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





^ permalink raw reply	[flat|nested] 11+ messages in thread

* bug#25594: 25.1.91; TeX input method is missing \sqrt macro
  2020-01-22 13:51         ` Lars Ingebrigtsen
@ 2020-01-22 14:07           ` Stefan Kangas
  2020-01-22 14:16             ` Lars Ingebrigtsen
  0 siblings, 1 reply; 11+ messages in thread
From: Stefan Kangas @ 2020-01-22 14:07 UTC (permalink / raw)
  To: Lars Ingebrigtsen; +Cc: 25594, Tyler Smith

Lars Ingebrigtsen <larsi@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





^ permalink raw reply	[flat|nested] 11+ messages in thread

* bug#25594: 25.1.91; TeX input method is missing \sqrt macro
  2020-01-22 14:07           ` Stefan Kangas
@ 2020-01-22 14:16             ` Lars Ingebrigtsen
  0 siblings, 0 replies; 11+ messages in thread
From: Lars Ingebrigtsen @ 2020-01-22 14:16 UTC (permalink / raw)
  To: Stefan Kangas; +Cc: 25594, Tyler Smith

Stefan Kangas <stefan@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





^ permalink raw reply	[flat|nested] 11+ messages in thread

* bug#25594: 25.1.91; TeX input method is missing \sqrt macro
  2017-01-31 22:36 bug#25594: 25.1.91; TeX input method is missing \sqrt macro Tyler Smith
  2019-07-26 14:39 ` Lars Ingebrigtsen
@ 2020-01-22 15:43 ` Mattias Engdegård
  2020-01-22 15:47   ` Lars Ingebrigtsen
  1 sibling, 1 reply; 11+ messages in thread
From: Mattias Engdegård @ 2020-01-22 15:43 UTC (permalink / raw)
  To: Lars Ingebrigtsen, Stefan Kangas, Tyler Smith; +Cc: 25594

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






^ permalink raw reply	[flat|nested] 11+ messages in thread

* bug#25594: 25.1.91; TeX input method is missing \sqrt macro
  2020-01-22 15:43 ` Mattias Engdegård
@ 2020-01-22 15:47   ` Lars Ingebrigtsen
  0 siblings, 0 replies; 11+ messages in thread
From: Lars Ingebrigtsen @ 2020-01-22 15:47 UTC (permalink / raw)
  To: Mattias Engdegård; +Cc: Stefan Kangas, 25594, Tyler Smith

Mattias Engdegård <mattiase@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





^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2020-01-22 15:47 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-01-31 22:36 bug#25594: 25.1.91; TeX input method is missing \sqrt macro Tyler Smith
2019-07-26 14:39 ` Lars Ingebrigtsen
2020-01-20 20:14   ` Stefan Kangas
2020-01-20 20:39     ` Tyler Smith
2020-01-20 23:19       ` James Cloos
2020-01-20 23:58       ` Stefan Kangas
2020-01-22 13:51         ` Lars Ingebrigtsen
2020-01-22 14:07           ` Stefan Kangas
2020-01-22 14:16             ` Lars Ingebrigtsen
2020-01-22 15:43 ` Mattias Engdegård
2020-01-22 15:47   ` Lars Ingebrigtsen

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).