emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Max Nikulin <manikulin@gmail.com>
To: emacs-orgmode@gnu.org
Subject: [PATCH] org-manual.org: $n$-th is not math
Date: Wed, 15 Mar 2023 20:32:01 +0700	[thread overview]
Message-ID: <tushci$amt$1@ciao.gmane.io> (raw)

[-- Attachment #1: Type: text/plain, Size: 194 bytes --]

Hi,

yesterday an issue with $n$-th TeX markup was risen again. I think, the 
manual should not declare that it is supported. It is broken for a 
decade. So \(n\)-th should be suggested instead.

[-- Attachment #2: 0001-org-manual.org-n-th-is-not-math.patch --]
[-- Type: text/x-patch, Size: 2674 bytes --]

From 6feb228a1bcc485441bab707771e6d87a3d69671 Mon Sep 17 00:00:00 2001
From: Max Nikulin <manikulin@gmail.com>
Date: Wed, 15 Mar 2023 19:08:37 +0700
Subject: [PATCH] org-manual.org: $n$-th is not math
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

* doc/org-manual.org (LaTeX fragments): Do not state that dash is
allowed after single "$" math delimiter and recommend "\(...\)".

Detection of "$-" as closing math delimiters is broken since 2015 as a
side effect of using punctuation class in regular expressions while
dash is considered as a word constituent.  See commits
6779f8f424 and c0369a7984.  Bring the manual in accordance to the code
instead of allowing "($-2 change)" false positives.  Users who do not
like "\(...\)" constructs may use a helper for typing it and may change
how it is displayed to minimize visual noise by fontification, see

- Eric S Fraga to emacs-orgmode. Re: Depreciating TeX-style LaTeX
  fragments. Sun, 16 Jan 2022 12:10:30 +0000.
  <https://list.orgmode.org/87k0ezdgp5.fsf@ucl.ac.uk>
- Ihor Radchenko to emacs-orgmode. Re: [PATCH] Add support for $…$ latex
  fragments followed by a dash. Thu, 27 Jan 2022 16:28:10 +0800.
  <https://list.orgmode.org/87r18t7fc5.fsf@localhost>
---
 doc/org-manual.org | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/doc/org-manual.org b/doc/org-manual.org
index 1c97d6aa8..7bb1ac637 100644
--- a/doc/org-manual.org
+++ b/doc/org-manual.org
@@ -11152,14 +11152,14 @@ *** LaTeX fragments
   =\begin= statement appears on a new line, preceded by only
   whitespace.
 
-- Text within the usual LaTeX math delimiters.  To avoid conflicts
-  with currency specifications, single =$= characters are only
-  recognized as math delimiters if the enclosed text contains at most
-  two line breaks, is directly attached to the =$= characters with no
-  whitespace in between, and if the closing =$= is followed by
-  whitespace, punctuation or a dash.  For the other delimiters, there
-  is no such restriction, so when in doubt, use =\(...\)= as inline
-  math delimiters.
+- Text within the usual LaTeX math delimiters.  Prefer =\(...\)= for
+  inline snippets.  The =$...$= alternative has some restrictions and
+  may be source of confusion.  To avoid conflicts with currency
+  specifications, single =$= characters are only recognized as math
+  delimiters if the enclosed text contains at most two line breaks, is
+  directly attached to the =$= characters with no whitespace in
+  between, and if the closing =$= is followed by whitespace or
+  punctuation (but not a dash).
 
 #+texinfo: @noindent
 For example:
-- 
2.25.1


             reply	other threads:[~2023-03-15 13:33 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-15 13:32 Max Nikulin [this message]
2023-03-15 14:01 ` [PATCH] org-manual.org: $n$-th is not math Loris Bennett
2023-03-15 17:25 ` Rudolf Adamkovič
2023-03-17 12:13   ` [PATCH v2] " Max Nikulin
2023-03-18 12:21     ` Ihor Radchenko
2023-03-19 11:08     ` Rudolf Adamkovič
2023-03-19 11:24       ` Ihor Radchenko
2023-03-19 15:18       ` Max Nikulin
2023-03-21 16:38         ` Rudolf Adamkovič
2023-03-22 11:47           ` Max Nikulin
2023-03-22 12:37           ` Timothy
2023-03-22 17:17             ` Rudolf Adamkovič
2023-03-23 12:03               ` Ihor Radchenko
2023-03-23 21:51                 ` Rudolf Adamkovič

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='tushci$amt$1@ciao.gmane.io' \
    --to=manikulin@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.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).