Let's see if the attached patch reads easier...

On 06/10/2026 20:47, Ihor Radchenko wrote:
"Pedro A. Aranda" <[email protected]> writes:

I am complaining
as a human being who was confused :)

;) OK, got it. How do you need me to mark future draft patches I want to
use as part of a discussion?

Something then makes the intent more obvious than in the original
message in this thread.
If you want concrete suggestion, [DRAFT] would work and have been used
by some people here in the past.

* lisp/ox-latex.el (org-latex-doc-metadata): Add a paragraph relating
the shorthand DOC_LANGS with 'org-export-language' and
'org-export-other-languages'.
---
  lisp/ox-latex.el | 8 +++++++-
  1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/lisp/ox-latex.el b/lisp/ox-latex.el
index 3430e18fc..2cf7237fd 100644
--- a/lisp/ox-latex.el
+++ b/lisp/ox-latex.el
@@ -667,7 +667,13 @@ (defcustom org-latex-doc-metadata nil
  These metadata add accesibility information to the PDF
  to make it usable by screen readers and similar applications.
  They will be inserted as \"\\DocumentMetadata{<metadata>}\"
-at the beginning of the generated LaTeX preamble."
+at the beginning of the generated LaTeX preamble.
+
+When included, replace the shorthand DOC_LANGS with the document's
+language information: `org-export-language' is inserted as
+\"language = {<lang>},\", and `org-export-other-languages'
+as \"other-languages = {<list of langs>},\"."

I have difficulty understanding this paragraph.
"When included" what? Shorthand? (what is even shorthand?)
included metadata?

I think providing an example would help to illustrate the point.


--
Pedro A. Aranda
ox-latex & ox-beamer maintainer

Sagen's Paradeiser! (ORF: Als Radiohören gefährlich war) => write BE!
IA: onomatopeya del rebuzno
2nd year of the New Koprocracy
From a03d5bf595d58759bdbb1ea1d44ca010e731e733 Mon Sep 17 00:00:00 2001
From: "Pedro A. Aranda" <[email protected]>
Date: Wed, 7 Oct 2026 08:07:42 +0200
Subject: [PATCH] ox-latex: Document DOC_LANGS in org-latex-doc-metadata

* lisp/ox-latex.el (org-latex-doc-metadata): Add a paragraph explaining
the use of the shorthand DOC_LANGS to insert the value of
'org-export-language' and 'org-export-other-languages' in the document
metadata.
---
 lisp/ox-latex.el | 18 +++++++++++++++++-
 1 file changed, 17 insertions(+), 1 deletion(-)

diff --git a/lisp/ox-latex.el b/lisp/ox-latex.el
index f9b9981e6..52da38dd0 100644
--- a/lisp/ox-latex.el
+++ b/lisp/ox-latex.el
@@ -658,7 +658,23 @@ (defcustom org-latex-doc-metadata nil
 These metadata add accesibility information to the PDF
 to make it usable by screen readers and similar applications.
 They will be inserted as \"\\DocumentMetadata{<metadata>}\"
-at the beginning of the generated LaTeX preamble."
+at the beginning of the generated LaTeX preamble.
+
+You can use the shorthand DOC_LANGS to insert language information
+based on `org-export-language' and `org-export-other-languages'.
+
+DOC_LANGS will be replaced with \"language=<org-export-language>\" and,
+when `org-export-other-languages' is not nil, it will append
+\",other-languages={<list of other languages>}\".  For example:
+
+  #+LANGUAGE: es
+  #+OTHER_LANGUAGES: de en
+  #+LATEX_DOC_METADATA: tagging=on, DOC_LANGS
+
+in your document header, will result in the following LaTeX command:
+
+  \\DocumentMetadata{tagging=on, language=es, other-languages={de en}}
+"
 
   :package-version '(Org . "10")
   :type '(choice (const :tag "No metadata" nil)
-- 
2.53.0

Reply via email to