HI,

Addressed everything (hopefully)...

On Sun, 10 May 2026 at 16:25, Ihor Radchenko <[email protected]> wrote:

> Pedro Andres Aranda Gutierrez <[email protected]> writes:
>
> > OK, done (hopefully.)
>
> I have a few more comments.
>
> > Subject: [PATCH] ox-latex.el: New variable
> org-latex-descriptive-environment
> >
> > lisp/ox-latex.el: (org-latex-descriptive-environment): New custom
> > variable with options for the custom interface.
> > (org-latex-plain-list): use it instead of the hard-coded value.
>
> use->Use
>
> > +*** Description lists in LaTeX export
> > +#+cindex: description lists, in @LaTeX{} export
> > +#+vindex: org-latex-descriptive-environment
> > +
> > +Description lists are exported using the LaTeX environment
> > +~description~ by default.  You can change it setting custom variable
> > +~org-latex-descriptive-environment~.  You may need to do so, if you
> > +mix plain list items with descriptive items like in:
> > +
> > +#+begin_src org
> > +- Note :: this is a list of things I need
> > +- Water
> > +- Sleep
> > +- Silence
> > +#+end_src
> > +
> > +To use environment ~itemize~ in this case, add this to your
> > +configuration
> > +
> > +#+begin_src emacs-lisp
> > +(setq-default org-latex-descriptive-environment "itemize")
> > +#+end_src
>
> It is worth noting that
>
> #+attr_latex: :environment itemize
> will still work on per-list basis.



> > +(defcustom org-latex-descriptive-environment "description"

> +  "The environment to use for lists tagged as descriptive.
> > +
> > +Set this variable if using
> > + - tag ::
> > +upsets the typesetting of a list."
> > +  :group 'org-export-latex
> > +  :package-version '(Org . "10.0")
> > +  :type '(choice
> > +          (const :tag "description (default)" "description")
> > +          (const :tag "itemize" "itemize")
> > +          (const :tag "enumerate" "enumerate")
> > +          (string :tag "User defined"))
> > +  :safe #'stringp)
>
> We might also provide in-buffer keyword for this option.
> That's not super-important, but would be cleaner.
>
> --
> Ihor Radchenko // yantar92,
> Org mode maintainer,
> Learn more about Org mode at <https://orgmode.org/>.
> Support Org development at <https://liberapay.com/org-mode>,
> or support my work at <https://liberapay.com/yantar92>
>


-- 
Fragen sind nicht da, um beantwortet zu werden,
Fragen sind da um gestellt zu werden
Georg Kreisler

"Sagen's Paradeiser" (ORF: Als Radiohören gefährlich war) => write BE!
Year 2 of the New Koprocracy
From d3c4b5e49d19e3b6574a4046970e4357f1402115 Mon Sep 17 00:00:00 2001
From: "Pedro A. Aranda" <[email protected]>
Date: Sun, 10 May 2026 18:11:59 +0200
Subject: [PATCH] ox-latex.el: New variable org-latex-descriptive-environment

lisp/ox-latex.el: (org-latex-descriptive-environment): New custom
variable with options for the custom interface and keyword
LATEX_DESCRIPTIVE_ENV.
(org-latex-plain-list): Use it instead of the hard-coded value.
doc/org-manual.doc: Document `org-latex-descriptive-environment`.
etc/ORG-NEWS: Announce `org-latex-descriptive-environment`and
LATEX_DESCRIPTIVE_ENV.
testing/lisp/test-ox-latex.el: (test-ox-latex/change-descriptive-environment)
New test for the descriptive environment.
---
 doc/org-manual.org            | 36 +++++++++++++++++++++++++++++++++++
 etc/ORG-NEWS                  |  7 +++++++
 lisp/ox-latex.el              | 22 +++++++++++++++++++--
 testing/lisp/test-ox-latex.el | 15 +++++++++++++++
 4 files changed, 78 insertions(+), 2 deletions(-)

diff --git a/doc/org-manual.org b/doc/org-manual.org
index f4cbdcfbd..efdcab4e2 100644
--- a/doc/org-manual.org
+++ b/doc/org-manual.org
@@ -14723,6 +14723,42 @@ four:
         - Five
 #+end_example
 
+*** Description lists in LaTeX export
+#+cindex: description lists, in @LaTeX{} export
+#+vindex: org-latex-descriptive-environment
+
+Description lists are exported using the LaTeX environment
+~description~ by default.  You can change it setting custom variable
+~org-latex-descriptive-environment~ or keyword
+~LATEX_DESCRIPTIVE_ENV~.  You may need to do so, if you mix plain list
+items with descriptive items like in:
+
+#+begin_src org
+- Note :: this is a list of things I need
+- Water
+- Sleep
+- Silence
+#+end_src
+
+To always use environment ~itemize~ in this case, add this to your
+configuration
+
+#+begin_src emacs-lisp
+(setq-default org-latex-descriptive-environment "itemize")
+#+end_src
+
+You can also add the desired value to your file or directory-local
+variables to set it on a case-by-case basis.
+
+If you don't need all description lists to be adjusted, you can also
+use
+
+#+begin_src org
+,#+attr_latex: :environment itemize
+#+end_src
+
+on a per-list basis.
+
 *** Source blocks in LaTeX export
 :PROPERTIES:
 :DESCRIPTION: Attributes specific to source code blocks.
diff --git a/etc/ORG-NEWS b/etc/ORG-NEWS
index 3c61d5b4f..aef019552 100644
--- a/etc/ORG-NEWS
+++ b/etc/ORG-NEWS
@@ -201,6 +201,13 @@ By default, ~org-babel-tangle~ skips source blocks located in
 archived subtrees.  When this option is non-nil, source blocks in
 archived subtrees are included during tangling.
 
+*** New custom variable ~org-latex-descriptive-environment~ and ~#+LATEX_DESCRIPTIVE_ENV~ keyword
+
+~org-latex-descriptive-environment~ allows you to use custom
+environment for descriptive lists when exporting to LaTeX.
+Use it when the default ~description~ environment does not fit your
+needs. The recommended alternative value is ~itemize~.
+
 ** New functions and changes in function arguments
 
 # This also includes changes in function behavior from Elisp perspective.
diff --git a/lisp/ox-latex.el b/lisp/ox-latex.el
index 95914dee4..2542edf9a 100644
--- a/lisp/ox-latex.el
+++ b/lisp/ox-latex.el
@@ -171,6 +171,7 @@
     (:latex-title-command nil nil org-latex-title-command)
     (:latex-toc-command nil nil org-latex-toc-command)
     (:latex-compiler "LATEX_COMPILER" nil org-latex-compiler)
+    (:latex-descriptive-env "LATEX_DESCRIPTIVE_ENV" nil org-latex-descriptive-environment)
     (:latex-use-sans nil "latex-use-sans" org-latex-use-sans)
     ;; Redefine regular options.
     (:date "DATE" nil "\\today" parse)))
@@ -884,6 +885,24 @@ When nil, no transformation is made."
 	  (string :tag "Format string")
 	  (const :tag "No formatting" nil)))
 
+;;;; Lists
+
+(defcustom org-latex-descriptive-environment "description"
+  "The environment to use for lists tagged as descriptive.
+
+Set this variable if using
+ - tag ::
+upsets the typesetting of a list."
+  :group 'org-export-latex
+  :package-version '(Org . "10.0")
+  :type '(choice
+          (const :tag "description (default)" "description")
+          (const :tag "itemize" "itemize")
+          (const :tag "enumerate" "enumerate")
+          (string :tag "User defined"))
+  :safe #'stringp)
+
+
 ;;;; Text markup
 
 (defcustom org-latex-text-markup-alist '((bold . "\\textbf{%s}")
@@ -2160,7 +2179,6 @@ holding export options."
      ;; Document end.
      "\\end{document}")))
 
-
 
 ;;; Transcode Functions
 
@@ -3220,7 +3238,7 @@ contextual information."
 	 (latex-type (let ((env (plist-get attr :environment)))
 		       (cond (env (format "%s" env))
 			     ((eq type 'ordered) "enumerate")
-			     ((eq type 'descriptive) "description")
+			     ((eq type 'descriptive) (plist-get info :latex-descriptive-env))
 			     (t "itemize")))))
     (org-latex--wrap-label
      plain-list
diff --git a/testing/lisp/test-ox-latex.el b/testing/lisp/test-ox-latex.el
index 7db371d31..0664a2478 100644
--- a/testing/lisp/test-ox-latex.el
+++ b/testing/lisp/test-ox-latex.el
@@ -486,5 +486,20 @@ How do you do?
    (goto-char (point-min))
    (should (search-forward "\\framebox{\\#C}"))))
 
+(ert-deftest test-ox-latex/change-descriptive-environment ()
+  "Test numeric priorities in headlines."
+  (let ((org-latex-descriptive-environment "itemize"))
+    (org-test-with-exported-text
+     'latex
+   "* Acronyms
+- SDN :: Software Defined Networks
+"
+   (goto-char (point-min))
+   (should (search-forward "\\section{Acronyms}"))
+   (should (search-forward "\\begin{itemize}
+\\item[{SDN}] Software Defined Networks
+\\end{itemize}
+")))))
+
 (provide 'test-ox-latex)
 ;;; test-ox-latex.el ends here
-- 
2.43.0

Reply via email to