1 character fix to make ob-haskell compatible with table outputs

2023-03-14 Thread General discussions about Org-mode.


Just change the `[` and `]` to `(` and `)` respectively.

List of lists aren't parsed correctly by ob-haskell, but tuples of
tuples are.

That means this code change I just tested works:

(defun org-babel-haskell-var-to-haskell (var)
  "Convert an elisp value VAR into a haskell variable.
The elisp VAR is converted to a string of haskell source code
specifying a variable of the same value."
  (if (listp var)
  (concat "(" (mapconcat #'org-babel-haskell-var-to-haskell var ", ") ")")
(format "%S" var)))

For something like:

name:tbl
#+begin_src sh
echo -e "1\t2\t3"
#+end_src

#+RESULTS:
| 1 | 2 | 3 |

#+begin_src haskell :var table=tbl
print table
#+end_src

#+RESULTS:
| 1 | 2 | 3 |

Whereas before it would not print the table out because it isn't parsed 
correctly.




Re: [PATCH] org-src: Improve the name of source editing buffers

2023-03-14 Thread Rudolf Adamkovič
Ihor Radchenko  writes:

> [...] it may affect existing uses of `display-buffer-alist' [...]  Canceled.

Yeah, I did not realize it would be a breaking change.

Thank you folks for discussing my patch!

Rudy
-- 
"Be especially critical of any statement following the word
'obviously.'"
-- Anna Pell Wheeler, 1883-1966

Rudolf Adamkovič  [he/him]
Studenohorská 25
84103 Bratislava
Slovakia



Hyphen after LaTeX fragments

2023-03-14 Thread Yuchen Guo
Sometimes I encounter such texts:

   One of the useful features of a basis $B$ in an $n$-dimensional space

When entered as-is in Org mode and exported to LaTeX, the string
"$n$-dimensional" is exported as plain text, as

  One of the useful features of a basis \(B\) in an \$n\$-dimensional space

However, in cases such as "$n$;" and "$n$.", they are correctly exported
as "\(n\);" and "\(n\).".

Are there any option to treat hypen the same as semicolon or full stop
in LaTeX exports?

-- 
Yuchen Guo



yc_pubkey.gpg.asc
Description: application/pgp-keys


signature.asc
Description: PGP signature


Re: bug#58371: Org and Hyperbole

2023-03-14 Thread Mats Lidell
> Jean Louis writes:
> * Robert Weiner  [2022-10-04 09:29]:
> > Another good thought.  Anyone can add an embeddable export of Koutlines; I
> > don't think we'll find time to do that in the mainline development branch
> > though.
>
> Creating HTML export that is messy has greater impact on people, no
> matter of popularity of the package. 
>
> KOTL may be said to be specialized lightweight markup language as it
> has export to HTML and various features. Thus authors shall put care
> on proper HTML and including on the fact that all lightweight markup
> languages allow export without headers and footers, for the reason to
> insert the information into ready HTML templates.
>
> Verify it here: https://validator.w3.org/nu/#file
> by using KOTL EXAMPLE:

Thanks for the report. The export should now produce HTML that passes the 
validation. It is available at elpa-devel.

Work on exporting embedded HTML still remains.

%% Mats



Hyphen after LaTeX fragments

2023-03-14 Thread Yuchen Guo
Sometimes I encounter such texts:

   One of the useful features of a basis $B$ in an $n$-dimensional space

When entered as-is in Org mode and exported to LaTeX, the string
"$n$-dimensional" is exported as plain text, as

  One of the useful features of a basis \(B\) in an \$n\$-dimensional space

However, in cases such as "$n$;" and "$n$.", they are correctly exported
as "\(n\);" and "\(n\).".

Are there any option to treat hypen the same as semicolon or full stop
in LaTeX exports?

-- 
Yuchen Guo



Re: [Pre-PATCH] Overhaul of the LaTeX preview system

2023-03-14 Thread Timothy
Hi Ihor,

>> • Preview overlays can hide and show themselves dynamically based on cursor 
>> position.
>
> How? I do not see anything and I cannot find any relevant customization
> in org-latex-preview.el

I think the docs might need to be edited to make `org-latex-preview-auto-mode'
more prominently mentioned.

All the best,
Timothy

-- 
Timothy (‘tecosaur’/‘TEC’), Org mode contributor.
Learn more about Org mode at .
Support Org development at ,
or support my work at .


Re: [Pre-PATCH] Overhaul of the LaTeX preview system

2023-03-14 Thread Timothy
Hi Ihor,

>> • Org mode can keep equation numbering consistent by regenerating previews 
>> as needed.
>
> This is disabled by default, right?
> But I am still seeing the numbering (see the attached) the Org text
> below.

Correct. Numbering settings have been re-done to hopefully make what’s happening
more obvious.

> Also, One of the preview is truncated.
>
> [2. image/png; preview-artifact.png]…

LaTeX has a page width when generating previews, you can increase how wide the
text area is easily via `org-latex-preview-width'. This could be developed more 
in
the future, but for now it works I think.

All the best,
Timothy

-- 
Timothy (‘tecosaur’/‘TEC’), Org mode contributor.
Learn more about Org mode at .
Support Org development at ,
or support my work at .


Re: [Pre-PATCH] Overhaul of the LaTeX preview system

2023-03-14 Thread Timothy
Hi Ihor,

> 1. Plenty of valid warnings and one of third-party packages broken when
>using the branch [*]

Thanks for highlighting these, I’m gradually going through them.

> 2. I had to (require ’org-latex-preview). `org-latex-preview’ is not
>autoloaded for some reason.

I haven’t had that issue, so I’m guessing it’s something to do with how your
autoloads were built.

> 3. It took 20+ seconds (!!!) to generate previews in a single section in
>my large notes.org. Profile attached - org-latex-preview parses the
>whole 20Mb buffer to generate the preamble. Why?

Because of the use of buffer info in generating the preamble, which calls
`org-export--annotate-info'. I’m currently considering introducing a variable to
allow for the use of buffer-specific info to be toggled.

> 4. Triangle symbols do not disappear if I C-g in the middle of
>generating the preamble.

Hmm, we haven’t really considered the preamble generation being interrupted.

> 5. Why triangles? Something resembling “waiting” would be more
>meaningful.

It has to be a small icon, so that basically means simple geometric shapes only.
There’s also the “grey text” indicator, and “no indicator” option.

> 6. What will happen if I add/remove #+LATEX_HEADER in the buffer? in
>subtree properties? Are in-buffer latex settings supposed to affect
>anything? I tried to add #+LATEX_HEADER on top of the file, but the
>preview do not appear to be re-generated.

Currently you need to set `org-latex-preview--preamble-content' to nil, which
currently can be done by doing `C-c C-c' on the header / otherwise running
`org-restart'.

All the best,
Timothy

-- 
Timothy (‘tecosaur’/‘TEC’), Org mode contributor.
Learn more about Org mode at .
Support Org development at ,
or support my work at .


Re: [patch] ob-clojure: Fix results output

2023-03-14 Thread Daniel Kraus

Daniel Kraus  writes:

> Attached is the new patch with the changes.
>
> [2. text/x-patch; 0001-lisp-ob-sql.el-Add-support-for-Athena.patch]...

Ups, I attached the wrong one.
Here the correct patch..


>From db0634b5ab0b5c8c996c5dcbbeb266b720c67459 Mon Sep 17 00:00:00 2001
From: Daniel Kraus 
Date: Thu, 9 Mar 2023 16:11:27 +0100
Subject: [PATCH] ob-clojure.el: Fix results output, support clojure-cli

* lisp/ob-clojure.el (org-babel-clojure-backend): Add support for
clojure-cli.
* lisp/ob-clojure.el (org-babel-clojurescript-backend): Move nbb to
clojurescript.
* lisp/ob-clojure.el (org-babel-expand-body:clojure)
* lisp/ob-clojure.el (ob-clojure-eval-with-cider): Return only the
last expression when :results is not set or value, and return only
stdout when :results is set to output.
* lisp/ob-clojure.el (ob-clojure-eval-with-cmd): Rename function as
it is not only for babashka.
* lisp/ob-clojure.el (org-babel-execute:clojure): Differentiate
between Clojure and ClojureScript source blocks.

The problem was that the ob-clojure results where not correctly
taking the results parameter into account.
E.g. with the cider backend, you would get all printed or returned
values for each line in your block:

(def small-map {:a 2 :b 4 :c 8})
{:some :map}
(prn :xx)
(:b small-map)

| #'user/small-map |
| {:some :map} |
| 4|

or for babashka you would only get the printed values but not the
last return value:
(def small-map {:a 2 :b 4 :c 8})
{:some :map}
(prn :xx)
(:b small-map)

: :xx

Now when you specify :results value, the result is only the last
returned value, and with :results output you get all values
printed to stdout.
So the examples above would all result in the same:
(def small-map {:a 2 :b 4 :c 8})
{:some :map}
(prn :xx)
(:b small-map)

: 4
---
 etc/ORG-NEWS   |  23 +++
 lisp/ob-clojure.el | 149 -
 lisp/org-compat.el |   4 ++
 3 files changed, 120 insertions(+), 56 deletions(-)

diff --git a/etc/ORG-NEWS b/etc/ORG-NEWS
index b9d7b3459..4ca13af17 100644
--- a/etc/ORG-NEWS
+++ b/etc/ORG-NEWS
@@ -96,6 +96,21 @@ The face ~org-agenda-calendar-daterange~ is used to show entries with
 a date range in the agenda.  It inherits from the default face in
 order to remain backward-compatible.
 
+*** New ~org-babel-clojurescript-backend~ option to choose ClojureScript backend
+
+Before, a ClojureScript source block used the same backend as Clojure,
+configured in ~org-babel-clojure-backend~ and relied on an undocumented
+~:target~ paramter.
+
+Now, there's ~org-babel-clojurescript-backend~ to determine the
+backend used for evaluation of ClojureScript.
+
+*** Support for Clojure CLI in ~ob-clojure~
+
+~ob-clojure~ now supports executing babel source blocks with the
+official [[https://clojure.org/guides/deps_and_cli][Clojure CLI tools]].
+The command can be customized with ~ob-clojure-cli-command~.
+
 ** New features
 *** ~org-metaup~ and ~org-metadown~ now act on headings in region
 
@@ -116,6 +131,14 @@ selection.
 TODO state, priority, tags, statistics cookies, and COMMENT keywords
 are allowed in the tree structure.
 
+** Miscellaneous
+*** Remove undocumented ~:target~ header parameter in ~ob-clojure~
+
+The ~:target~ header was only used internally to distinguish
+from Clojure and ClojureScript.
+This is now handled with an optional function parameter in
+the respective functions that need this information.
+
 * Version 9.6
 
 ** Important announcements and breaking changes
diff --git a/lisp/ob-clojure.el b/lisp/ob-clojure.el
index 5f589db00..f254fa204 100644
--- a/lisp/ob-clojure.el
+++ b/lisp/ob-clojure.el
@@ -25,20 +25,21 @@
 
 ;;; Commentary:
 
-;; Support for evaluating Clojure code
+;; Support for evaluating Clojure / ClojureScript code.
 
 ;; Requirements:
 
 ;; - Clojure (at least 1.2.0)
 ;; - clojure-mode
-;; - inf-clojure, Cider, SLIME, babashka or nbb
+;; - babashka, nbb, Clojure CLI tools, Cider, inf-clojure or SLIME
 
 ;; For clojure-mode, see https://github.com/clojure-emacs/clojure-mode
-;; For inf-clojure, see https://github.com/clojure-emacs/inf-clojure
-;; For Cider, see https://github.com/clojure-emacs/cider
-;; For SLIME, see https://slime.common-lisp.dev
 ;; For babashka, see https://github.com/babashka/babashka
 ;; For nbb, see https://github.com/babashka/nbb
+;; For Clojure CLI tools, see https://clojure.org/guides/deps_and_cli
+;; For Cider, see https://github.com/clojure-emacs/cider
+;; For inf-clojure, see https://github.com/clojure-emacs/inf-clojure
+;; For SLIME, see https://slime.common-lisp.dev
 
 ;; For SLIME, the best way to install its components is by following
 ;; the directions as set out by Phil Hagelberg (Technomancy) on the
@@ -78,20 +79,33 @@ defvar org-babel-header-args:clojurescript
 
 (defcustom org-babel-clojure-backend (cond
   ((executable-find "bb") 'babashka)
-  ((executable-find "nbb") 'nbb)
+   

Re: [Pre-PATCH] Overhaul of the LaTeX preview system

2023-03-14 Thread Timothy
Hi Ihor,

Thanks for mentioning this, I’ve now added a priority of -80 .

All the best,
Timothy

-- 
Timothy (‘tecosaur’/‘TEC’), Org mode contributor.
Learn more about Org mode at .
Support Org development at ,
or support my work at .


Re: [patch] ob-clojure: Fix results output

2023-03-14 Thread Daniel Kraus
Hi!

Ihor Radchenko  writes:

> Daniel Kraus  writes:
>
>> This was apparently a kludge that ob-clojure used to evaluate ClojureScript
>> in the normal clojure:execute function.
>> I simply used the same kludge where I need to check for cljs, but after
>> reviewing it's not really necessary and I removed the :target parameter
>> completely. As this was undocumented I guess it's ok to remove?!
>
> Yes, it is OK to remove what is undocumented. We may still announce the
> change though.

I added an entry to ORG-NEWS under Misc.

 -(defun ob-clojure-eval-with-babashka (bb expanded)
>> I created an obsolete-function-alias.
>
> It should better go to org-compat.el.

Moved the alias to org-compat.
I wasn't sure where to put it exactly.
It's now in the ~Obsolete aliases~ page.

> What about the new customization `ob-clojure-cli-command'?

I added a news entry in ORG-NEWS.

>> +(defcustom ob-clojure-nbb-command (or (executable-find "nbb")
>> +  (when-let (npx (executable-find 
>> "npx"))
>> +(concat npx " nbb")))
>>"Path to the nbb executable."
>
> This is not a path anymore, when the value is "npx nbb".
> Can just use "Command to invoke nbb executable".

Fixed.


Attached is the new patch with the changes.


Thanks for your review and guidance,
  Daniel
>From ddace051205d20b24c047962ca9d1335bdd90284 Mon Sep 17 00:00:00 2001
From: Daniel Kraus 
Date: Mon, 16 Jan 2023 11:35:02 +0100
Subject: [PATCH] lisp/ob-sql.el: Add support for Athena

* lisp/ob-sql.el (org-babel-execute:sql): Add support for Athena
---
 lisp/ob-sql.el | 18 --
 1 file changed, 12 insertions(+), 6 deletions(-)

diff --git a/lisp/ob-sql.el b/lisp/ob-sql.el
index 39a4573a5..640ecb2c0 100644
--- a/lisp/ob-sql.el
+++ b/lisp/ob-sql.el
@@ -53,14 +53,15 @@
 ;; - rowname-names
 ;;
 ;; Engines supported:
-;; - mysql
+;; - athena
 ;; - dbi
 ;; - mssql
-;; - sqsh
-;; - postgresql (postgres)
+;; - mysql
 ;; - oracle
-;; - vertica
+;; - postgresql (postgres)
 ;; - saphana
+;; - sqsh
+;; - vertica
 ;;
 ;; TODO:
 ;;
@@ -254,6 +255,11 @@ This function is called by `org-babel-execute-src-block'."
(org-babel-temp-file "sql-out-")))
 	 (header-delim "")
  (command (cl-case (intern engine)
+(athena (format "athenacli %s -e %s %s > %s"
+			(or cmdline "")
+			(org-babel-process-file-name in-file)
+database
+			(org-babel-process-file-name out-file)))
 (dbi (format "dbish --batch %s < %s | sed '%s' > %s"
  (or cmdline "")
  (org-babel-process-file-name in-file)
@@ -352,7 +358,7 @@ SET COLSEP '|'
 	(progn (insert-file-contents-literally out-file) (buffer-string)))
   (with-temp-buffer
 	(cond
-	 ((memq (intern engine) '(dbi mysql postgresql postgres saphana sqsh vertica))
+	 ((memq (intern engine) '(athena dbi mysql postgresql postgres saphana sqsh vertica))
 	  ;; Add header row delimiter after column-names header in first line
 	  (cond
 	   (colnames-p
@@ -377,7 +383,7 @@ SET COLSEP '|'
 	  (goto-char (point-max))
 	  (forward-char -1))
 	(write-file out-file
-	(org-table-import out-file (if (string= engine "sqsh") '(4) '(16)))
+	(org-table-import out-file (if (memq (intern engine) '(athena sqsh)) '(4) '(16)))
 	(org-babel-reassemble-table
 	 (mapcar (lambda (x)
 		   (if (string= (car x) header-delim)
-- 
2.39.0



Re: [patch] ob-clojure: Fix results output

2023-03-14 Thread Ihor Radchenko
Daniel Kraus  writes:

>> Also, make sure that
>> https://orgmode.org/worg/org-contrib/babel/languages/ob-doc-clojure.html
>> is up-to-date.
>
> Good reminder. I send a PR for this when this patch is installed?!

Or together. Either way is fine.

>> Note: I do not see :target header arg being documented in
>> https://orgmode.org/worg/org-contrib/babel/languages/ob-doc-clojure.html
>
> This was apparently a kludge that ob-clojure used to evaluate ClojureScript
> in the normal clojure:execute function.
> I simply used the same kludge where I need to check for cljs, but after
> reviewing it's not really necessary and I removed the :target parameter
> completely. As this was undocumented I guess it's ok to remove?!

Yes, it is OK to remove what is undocumented. We may still announce the
change though.

>>> -(defun ob-clojure-eval-with-babashka (bb expanded)
>>> -  "Evaluate EXPANDED code block using BB (babashka or nbb)."
>>> -  (let ((script-file (org-babel-temp-file "clojure-bb-script-" ".clj")))
>>
>> This will remove a non-private function. May you leave a fallback
>> obsolete alias to not break third-party code that calls the old function
>> name?
>
> I created an obsolete-function-alias.

It should better go to org-compat.el.

> Attached is the new patch with the changes.

Thanks!
A few more comments below.

> +*** New ~org-babel-clojurescript-backend~ option to choose ClojureScript 
> backend
> +
> +Before, a ClojureScript source block used the same backend as Clojure,
> +configured in ~org-babel-clojure-backend~ and relied on an undocumented
> +~:target~ paramter.
> +
> +Now, there's ~org-babel-clojurescript-backend~ to determine the
> +backend used for evaluation of ClojureScript.

What about the new customization `ob-clojure-cli-command'?

> -(defcustom ob-clojure-nbb-command (executable-find "nbb")
> +(defcustom ob-clojure-nbb-command (or (executable-find "nbb")
> +  (when-let (npx (executable-find "npx"))
> +(concat npx " nbb")))
>"Path to the nbb executable."

This is not a path anymore, when the value is "npx nbb".
Can just use "Command to invoke nbb executable".

-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at .
Support Org development at ,
or support my work at 



Re: [bug?] anybody experience priorites inserted in links?

2023-03-14 Thread Ihor Radchenko
Samuel Wales  writes:

> i am currently on an old version of everything, so please do not take
> this too seriously, but it has been around forever.
>
> * [[https://google.com][google]] [or whatever]
>
> if i run org-priority-up, on occasion the priority cookie gets wrongly
> inserted into the link description.

I cannot reproduce.

-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at .
Support Org development at ,
or support my work at 



Re: [PATCH]: Small type in ox-latex.el

2023-03-14 Thread Ihor Radchenko
Pedro Andres Aranda Gutierrez  writes:

> Attached is a silly small patch, not even a TINYCHANGE ;-) Its a typo
> I found skimming through the latex exported...

Applied, on your behalf. Thanks!
https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=3eb51d8db

-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at .
Support Org development at ,
or support my work at 



Re: [BUG] No space after footnote with org-export-with-footnotes set to nil [9.6.1 ( @ /Users/test/.emacs.d/elpa/28.0/develop/org-9.6.1/)]

2023-03-14 Thread Ihor Radchenko
Max Nikulin  writes:

> On 11/03/2023 17:38, Ihor Radchenko wrote:
>> 
>> Newlines are tricky. They may or may not be significant.
>> For example, in CJK paragraphs, newlines are to be stripped.
>> 
>> I think that a reasonable thing to do could be not adding newlines if
>> the previous object is a plain string ending with a newline.
>
> It is in agreement with my expectation that the fix should not be 
> LaTeX-specific. That is why I raised the issue in this thread.

I still think that the issue with removing a lone object in a line is
LaTeX specific.

>> This is latex-specific.
>> See the attached tentative fix.
>
>> Reported-by: Max Nikulin 
>> Link: https://orgmode.org/list/tufdb6$11h2$1...@ciao.gmane.io
>
> and Max Nikulin to emacs-orgmode. Re: Comments break up a paragraph when 
> writing one-setence-per-line. Sun, 3 Oct 2021 18:34:10 +0700. 
> https://list.orgmode.org/sjc4fk$76r$1...@ciao.gmane.io
>
> 
> I have realized that the following is a kind of pitfall in Org syntax:
>
> #+macro: comment
> Another
> {{{comment(Paragraph separator! Do you expect it?)}}}
> paragraph.

I do not consider that a bug. Macros can insert anything, all the way to
headings - users who use the macros are expected to know what they are doing.

>> +  (replace-regexp-in-string
>> +   (rx (1+ (0+ space) "\n")) "\n"
>> +   contents))
>
> What I do not like with this regexp is that it matches every newline 
> character, not only blank lines:
>
> (replace-regexp-in-string
>   (rx (1+ (0+ space) "\n")) "[n]"
>   "a   \nb")
> "a[n]b"
>
> If you still believe that a fix should be for LaTeX only then I would 
> consider extra "\n": (rx "\n" (1+ (0+ space) "\n"))

Applied, onto main. With your amendment.
https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=3d04af382

-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at .
Support Org development at ,
or support my work at 



Re: Hyphen after LaTeX fragments

2023-03-14 Thread Max Nikulin

On 14/03/2023 14:02, Yuchen Guo wrote:

Sometimes I encounter such texts:

One of the useful features of a basis $B$ in an $n$-dimensional space

When entered as-is in Org mode and exported to LaTeX, the string
"$n$-dimensional" is exported as plain text, as

One of the useful features of a basis \(B\) in an \$n\$-dimensional space


I assume "\(n\)-dimensional".


In cases such as "$n$;" and "$n$.", they are correctly exported as
"\(n\);" and "\(n\).".

So, are there any option that can be tweaked to export "$MATH$-text"
correctly?


Consider "$M$" as deprecated. Balance of lightweight markup and 
heuristics to distinguish literal symbols and markup markers is quite 
subtle. Dash detection is broken for a long time despite the manual 
still says that it is supported:


Max Nikulin to emacs-orgmode. Re: [PATCH] Add support for $…$ latex 
fragments followed by a dash. Tue, 1 Feb 2022 21:26:50 +0700. 
https://list.orgmode.org/stbfvc$3rs$1...@ciao.gmane.io


That thread contains examples what may be false positives, e.g.

Max Nikulin to emacs-orgmode. Re: [PATCH] Add support for $…$ latex 
fragments followed by a dash. Sun, 30 Jan 2022 22:28:38 +0700. 
https://list.orgmode.org/st6ar8$tjk$1...@ciao.gmane.io


Another thread:

Timothy to emacs-orgmode… Re: Depreciating TeX-style LaTeX fragments 
(was: Org Syntax Specification) Sun, 16 Jan 2022 00:36:35 +0800. 
https://list.orgmode.org/87lezgly20@gmail.com





Re: Hyphen after LaTeX fragments

2023-03-14 Thread Dominik Schrempf
Hi!

I think we had this discussion quite some times already. Org Mode
supports $...$ syntax wherever possible but not in all places and
encourages the use of \(...\). I switched from using $...$ to \(...\)
everywhere, and have not had any problems since.

Dominik

Yuchen Guo  writes:

> [[PGP Signed Part:Undecided]]
> Sometimes I encounter such texts:
>
>One of the useful features of a basis $B$ in an $n$-dimensional space
>
> When entered as-is in Org mode and exported to LaTeX, the string
> "$n$-dimensional" is exported as plain text, as
>
>One of the useful features of a basis \(B\) in an \$n\$-dimensional space
>
> In cases such as "$n$;" and "$n$.", they are correctly exported as
> "\(n\);" and "\(n\).".
>
> So, are there any option that can be tweaked to export "$MATH$-text"
> correctly?



Hyphen after LaTeX fragments

2023-03-14 Thread Yuchen Guo
Sometimes I encounter such texts:

   One of the useful features of a basis $B$ in an $n$-dimensional space

When entered as-is in Org mode and exported to LaTeX, the string
"$n$-dimensional" is exported as plain text, as

   One of the useful features of a basis \(B\) in an \$n\$-dimensional space

In cases such as "$n$;" and "$n$.", they are correctly exported as
"\(n\);" and "\(n\).".

So, are there any option that can be tweaked to export "$MATH$-text"
correctly?

-- 
Yuchen Guo


signature.asc
Description: PGP signature