emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* [PATCH]: suggest the xcolor package everywhere in the ox-latex.el DOCSTRINGs
@ 2024-09-14  6:52 Pedro Andres Aranda Gutierrez
  2024-09-15 14:14 ` Ihor Radchenko
  0 siblings, 1 reply; 3+ messages in thread
From: Pedro Andres Aranda Gutierrez @ 2024-09-14  6:52 UTC (permalink / raw)
  To: Org Mode List


[-- Attachment #1.1: Type: text/plain, Size: 593 bytes --]

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

[-- Attachment #1.2: Type: text/html, Size: 1148 bytes --]

[-- Attachment #2: 0001-Suggest-xcolor-instead-of-color.patch --]
[-- Type: text/x-patch, Size: 2060 bytes --]

From e924880069d9f2592cb32f79ed8fe585b5afc3ce Mon Sep 17 00:00:00 2001
From: "Pedro A. Aranda" <paaguti@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

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH]: suggest the xcolor package everywhere in the ox-latex.el DOCSTRINGs
  2024-09-14  6:52 [PATCH]: suggest the xcolor package everywhere in the ox-latex.el DOCSTRINGs Pedro Andres Aranda Gutierrez
@ 2024-09-15 14:14 ` Ihor Radchenko
  2024-09-16  6:37   ` Pedro Andres Aranda Gutierrez
  0 siblings, 1 reply; 3+ messages in thread
From: Ihor Radchenko @ 2024-09-15 14:14 UTC (permalink / raw)
  To: Pedro Andres Aranda Gutierrez; +Cc: Org Mode List

Pedro Andres Aranda Gutierrez <paaguti@gmail.com> writes:

> 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.

Thanks!
Applied, onto main, with amendments.
I removed ORG-NEWS item as there is nothing really new from Org mode
perspective. We just change the suggestion to users a bit.
I also added your rationale points to the commit message.
https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=cdcde091b9

-- 
Ihor Radchenko // yantar92,
Org mode contributor,
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>


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH]: suggest the xcolor package everywhere in the ox-latex.el DOCSTRINGs
  2024-09-15 14:14 ` Ihor Radchenko
@ 2024-09-16  6:37   ` Pedro Andres Aranda Gutierrez
  0 siblings, 0 replies; 3+ messages in thread
From: Pedro Andres Aranda Gutierrez @ 2024-09-16  6:37 UTC (permalink / raw)
  To: Ihor Radchenko; +Cc: Org Mode List

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

Great!

On Sun, 15 Sept 2024 at 16:12, Ihor Radchenko <yantar92@posteo.net> wrote:

> Pedro Andres Aranda Gutierrez <paaguti@gmail.com> writes:
>
> > 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.
>
> Thanks!
> Applied, onto main, with amendments.
> I removed ORG-NEWS item as there is nothing really new from Org mode
> perspective. We just change the suggestion to users a bit.
> I also added your rationale points to the commit message.
> https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=cdcde091b9
>
> --
> Ihor Radchenko // yantar92,
> Org mode contributor,
> 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

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

[-- Attachment #2: Type: text/html, Size: 2255 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2024-09-16  6:38 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-09-14  6:52 [PATCH]: suggest the xcolor package everywhere in the ox-latex.el DOCSTRINGs Pedro Andres Aranda Gutierrez
2024-09-15 14:14 ` Ihor Radchenko
2024-09-16  6:37   ` Pedro Andres Aranda Gutierrez

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).