Hi

attached is a really small patch to suggest the use of the xcolor package
everywhere in ox-latex.el

Rationale:
1. read through [1]
2. Some "more modern" (i.e. > 2016) packages clash with color and require
xcolor.

Best, /PA

[1]
https://tex.stackexchange.com/questions/89763/when-to-use-the-xcolor-package-instead-of-the-color-package

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

Headaches with a Juju log:
unit-basic-16: 09:17:36 WARNING juju.worker.uniter.operation we should run
a leader-deposed hook here, but we can't yet
From e924880069d9f2592cb32f79ed8fe585b5afc3ce Mon Sep 17 00:00:00 2001
From: "Pedro A. Aranda" <paag...@gmail.com>
Date: Sat, 14 Sep 2024 08:28:07 +0200
Subject: [PATCH] Suggest xcolor instead of color

ox-latex.el: Suggest =xcolor= for listings too.

---
 etc/ORG-NEWS     | 7 +++++++
 lisp/ox-latex.el | 6 +++---
 2 files changed, 10 insertions(+), 3 deletions(-)

diff --git a/etc/ORG-NEWS b/etc/ORG-NEWS
index 392788055..7dd5d2ec0 100644
--- a/etc/ORG-NEWS
+++ b/etc/ORG-NEWS
@@ -223,6 +223,13 @@ This way, attachments will remain accessible when opening symlinked Org file.
 When no attach dir exists, Org mode will still prefer creating it in
 the "default" directory - where the symlink is located.

+*** =ox-latex.el= suggests to use the =xcolor= package everywhere
+
+The =xcolor= LaTeX package is suggested in all docstrings in
+=ox-latex.el=. This package is a superset of the old =color= package.
+It provides a richer control over color definitions and is needed in
+advanced scenarios (for example, when TiKZ packages are used).
+
 * Version 9.7

 ** Important announcements and breaking changes
diff --git a/lisp/ox-latex.el b/lisp/ox-latex.el
index 79df1fe11..9a2e584c9 100644
--- a/lisp/ox-latex.el
+++ b/lisp/ox-latex.el
@@ -956,13 +956,13 @@ The first two options provide basic syntax
 highlighting (listings), or none at all (verbatim).

 When using listings, you also need to make use of LaTeX package
-\"listings\".  The \"color\" LaTeX package is also needed if you
-would like color too.  These can simply be added to
+\"listings\".  The \"xcolor\" LaTeX package is also needed for
+color management.  These can simply be added to
 `org-latex-packages-alist', using customize or something like:

   (require \\='ox-latex)
   (add-to-list \\='org-latex-packages-alist \\='(\"\" \"listings\"))
-  (add-to-list \\='org-latex-packages-alist \\='(\"\" \"color\"))
+  (add-to-list \\='org-latex-packages-alist \\='(\"\" \"xcolor\"))

 There are two further options for more comprehensive
 fontification.  The first can be set with,
--
2.34.1

Reply via email to