emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* [DISCUSSION]: LaTeX - include the xcolor package in the packages list
@ 2024-09-07  6:07 Pedro Andres Aranda Gutierrez
  2024-09-08 17:37 ` Ihor Radchenko
  0 siblings, 1 reply; 8+ messages in thread
From: Pedro Andres Aranda Gutierrez @ 2024-09-07  6:07 UTC (permalink / raw)
  To: Org Mode List

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

Hi list,
before I create a storm, I would like to poll if there would be too much of
a resistance to include the xcolor package in the default packages list.
It is used in most examples in the docs and provides all functionality of
the color package and doesn't produce clashes with other packages AFAICT.

Anyone completely against this?

Don't shoot the pianist ;-) /PA
-- 
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: 982 bytes --]

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

* Re: [DISCUSSION]: LaTeX - include the xcolor package in the packages list
  2024-09-07  6:07 [DISCUSSION]: LaTeX - include the xcolor package in the packages list Pedro Andres Aranda Gutierrez
@ 2024-09-08 17:37 ` Ihor Radchenko
  2024-09-09  5:20   ` Pedro Andres Aranda Gutierrez
  0 siblings, 1 reply; 8+ messages in thread
From: Ihor Radchenko @ 2024-09-08 17:37 UTC (permalink / raw)
  To: Pedro Andres Aranda Gutierrez; +Cc: Org Mode List

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

> before I create a storm, I would like to poll if there would be too much of
> a resistance to include the xcolor package in the default packages list.
> It is used in most examples in the docs and provides all functionality of
> the color package and doesn't produce clashes with other packages AFAICT.

May you please link to the docs you are referring to?

-- 
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] 8+ messages in thread

* Re: [DISCUSSION]: LaTeX - include the xcolor package in the packages list
  2024-09-08 17:37 ` Ihor Radchenko
@ 2024-09-09  5:20   ` Pedro Andres Aranda Gutierrez
  2024-09-09  6:05     ` Ihor Radchenko
  0 siblings, 1 reply; 8+ messages in thread
From: Pedro Andres Aranda Gutierrez @ 2024-09-09  5:20 UTC (permalink / raw)
  To: Ihor Radchenko; +Cc: Org Mode List

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

Would the description of the package at https://ctan.org/pkg/xcolor be
enough?
Additionally, there is a nice discussion at
https://tex.stackexchange.com/questions/89763/when-to-use-the-xcolor-package-instead-of-the-color-package

Best, /PA

On Sun, 8 Sept 2024 at 19:36, Ihor Radchenko <yantar92@posteo.net> wrote:

> Pedro Andres Aranda Gutierrez <paaguti@gmail.com> writes:
>
> > before I create a storm, I would like to poll if there would be too much
> of
> > a resistance to include the xcolor package in the default packages list.
> > It is used in most examples in the docs and provides all functionality of
> > the color package and doesn't produce clashes with other packages AFAICT.
>
> May you please link to the docs you are referring to?
>
> --
> 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: 2349 bytes --]

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

* Re: [DISCUSSION]: LaTeX - include the xcolor package in the packages list
  2024-09-09  5:20   ` Pedro Andres Aranda Gutierrez
@ 2024-09-09  6:05     ` Ihor Radchenko
  2024-09-09  7:27       ` Pedro Andres Aranda Gutierrez
  0 siblings, 1 reply; 8+ messages in thread
From: Ihor Radchenko @ 2024-09-09  6:05 UTC (permalink / raw)
  To: Pedro Andres Aranda Gutierrez; +Cc: Org Mode List

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

> Would the description of the package at https://ctan.org/pkg/xcolor be
> enough?
> Additionally, there is a nice discussion at
> https://tex.stackexchange.com/questions/89763/when-to-use-the-xcolor-package-instead-of-the-color-package

That's not what I am asking about.
I am asking about the docs for _Org mode_.

I am sure that xcolor is a nice package and that it can be useful in
many scenarios, but I do not see why we should load it every single time
Org mode export is running.

-- 
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] 8+ messages in thread

* Re: [DISCUSSION]: LaTeX - include the xcolor package in the packages list
  2024-09-09  6:05     ` Ihor Radchenko
@ 2024-09-09  7:27       ` Pedro Andres Aranda Gutierrez
  2024-09-09  7:49         ` Ihor Radchenko
  0 siblings, 1 reply; 8+ messages in thread
From: Pedro Andres Aranda Gutierrez @ 2024-09-09  7:27 UTC (permalink / raw)
  To: Ihor Radchenko; +Cc: Org Mode List

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

Ahh, sorry...

Look at the docstring for `org-latex-engraved-preamble', for example. And
then, there are other places where it is not mentioned explicitly, but not
including it may result in a compilation error
(`org-latex-listings-src-omit-language',
for example)
It could also help a lot in `org-latex-src-block-backend': there we ask to
load package color... why not xcolor to get a richer control of colours?

Best, /PA

On Mon, 9 Sept 2024 at 08:04, Ihor Radchenko <yantar92@posteo.net> wrote:

> Pedro Andres Aranda Gutierrez <paaguti@gmail.com> writes:
>
> > Would the description of the package at https://ctan.org/pkg/xcolor be
> > enough?
> > Additionally, there is a nice discussion at
> >
> https://tex.stackexchange.com/questions/89763/when-to-use-the-xcolor-package-instead-of-the-color-package
>
> That's not what I am asking about.
> I am asking about the docs for _Org mode_.
>
> I am sure that xcolor is a nice package and that it can be useful in
> many scenarios, but I do not see why we should load it every single time
> Org mode export is running.
>
> --
> 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: 3115 bytes --]

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

* Re: [DISCUSSION]: LaTeX - include the xcolor package in the packages list
  2024-09-09  7:27       ` Pedro Andres Aranda Gutierrez
@ 2024-09-09  7:49         ` Ihor Radchenko
  2024-09-11  5:28           ` Pedro Andres Aranda Gutierrez
  0 siblings, 1 reply; 8+ messages in thread
From: Ihor Radchenko @ 2024-09-09  7:49 UTC (permalink / raw)
  To: Pedro Andres Aranda Gutierrez; +Cc: Org Mode List

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

> Ahh, sorry...
>
> Look at the docstring for `org-latex-engraved-preamble', for example.

That's not relevant. When engraved is used, we automatically include xcolor.

> ... And
> then, there are other places where it is not mentioned explicitly, but not
> including it may result in a compilation error
> (`org-latex-listings-src-omit-language',
> for example)

May you elaborate?

> It could also help a lot in `org-latex-src-block-backend': there we ask to
> load package color... why not xcolor to get a richer control of colours?

I guess that you are referring to

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

We can indeed include color package, but I do not see why we should do
it by default. We may instead include it conditionally, only when
listings backend is selected by the user.
Just as it is done for engraved.

-- 
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] 8+ messages in thread

* Re: [DISCUSSION]: LaTeX - include the xcolor package in the packages list
  2024-09-09  7:49         ` Ihor Radchenko
@ 2024-09-11  5:28           ` Pedro Andres Aranda Gutierrez
  2024-09-15  8:17             ` Ihor Radchenko
  0 siblings, 1 reply; 8+ messages in thread
From: Pedro Andres Aranda Gutierrez @ 2024-09-11  5:28 UTC (permalink / raw)
  To: Ihor Radchenko; +Cc: Org Mode List

Hi

> El 9 sept 2024, a las 9:49, Ihor Radchenko <yantar92@posteo.net> escribió:
> 
>> It could also help a lot in `org-latex-src-block-backend': there we ask to
>> load package color... why not xcolor to get a richer control of colours?
> 
> I guess that you are referring to
> 
>    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
>    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"))

A first step would be to use xcolor here. It gives just much more control over colors, if and when you need it. 

> 
> We can indeed include color package, but I do not see why we should do
> it by default. We may instead include it conditionally, only when
> listings backend is selected by the user.
> Just as it is done for engraved.

I would say that we include graphicx by default, even when we are not going to use it in many documents. In my case it is a 50/50 of using graphics vs- pure text documents ;-)

> 
> -- 
> 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] 8+ messages in thread

* Re: [DISCUSSION]: LaTeX - include the xcolor package in the packages list
  2024-09-11  5:28           ` Pedro Andres Aranda Gutierrez
@ 2024-09-15  8:17             ` Ihor Radchenko
  0 siblings, 0 replies; 8+ messages in thread
From: Ihor Radchenko @ 2024-09-15  8:17 UTC (permalink / raw)
  To: Pedro Andres Aranda Gutierrez; +Cc: Org Mode List

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

>> I guess that you are referring to
>> 
>>    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
>>    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"))
>
> A first step would be to use xcolor here. It gives just much more control over colors, if and when you need it. 

I do not see any downside changing our recommendation from using color
to using xcolor in the docstrings.

>> We can indeed include color package, but I do not see why we should do
>> it by default. We may instead include it conditionally, only when
>> listings backend is selected by the user.
>> Just as it is done for engraved.
>
> I would say that we include graphicx by default, even when we are not going to use it in many documents. In my case it is a 50/50 of using graphics vs- pure text documents ;-)

My stance is to minimize the number of loaded packages to the bare
minimum. If something is not strictly necessary, we do not load it.
Loading a bunch of extra LaTeX packages increases export time.

In the future, when we have the new LaTeX preview branch [1] merged, we
will cut the number of loaded LaTeX packages even more, only loading the
packages that are necessary to export the specific document
contents. For example, if the exported Org file does not contain images,
no image-related packages will be used during Latex export.

[1] https://list.orgmode.org/87lek2up0w.fsf@tec.tecosaur.net/

-- 
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] 8+ messages in thread

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

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-09-07  6:07 [DISCUSSION]: LaTeX - include the xcolor package in the packages list Pedro Andres Aranda Gutierrez
2024-09-08 17:37 ` Ihor Radchenko
2024-09-09  5:20   ` Pedro Andres Aranda Gutierrez
2024-09-09  6:05     ` Ihor Radchenko
2024-09-09  7:27       ` Pedro Andres Aranda Gutierrez
2024-09-09  7:49         ` Ihor Radchenko
2024-09-11  5:28           ` Pedro Andres Aranda Gutierrez
2024-09-15  8:17             ` Ihor Radchenko

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