emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Customising LaTeX packages in org-latex-default-packages-alist
@ 2024-09-06  7:49 Joost Kremers
  2024-09-08 18:27 ` Ihor Radchenko
  0 siblings, 1 reply; 5+ messages in thread
From: Joost Kremers @ 2024-09-06  7:49 UTC (permalink / raw)
  To: Emacs Org mode mailing list

Hi all,

I've long had this snippet in my Org config:

```
;; Add "colorlinks=true" to hyperref:
(setq org-latex-default-packages-alist '(("AUTO" "inputenc" t
                                          ("pdflatex"))
                                         ("T1" "fontenc" t
                                          ("pdflatex"))
                                         ("" "graphicx" t nil)
                                         ("" "longtable" nil nil)
                                         ("" "wrapfig" nil nil)
                                         ("" "rotating" nil nil)
                                         ("normalem" "ulem" t nil)
                                         ("" "amsmath" t nil)
                                         ("" "amssymb" t nil)
                                         ("" "capt-of" nil nil)
                                         ("colorlinks=true" "hyperref" nil nil)))
```

As the comment says, I modify `org-latex-default-packages-alist` because I
want to change the way hyperref marks hyperlinks. Just now, though I
happened to stumble upon the doc string of
`org-latex-default-packages-alist`, which says that the only reason to
modify this variable is when you load packages that conflict with these.

So that made me wonder; is there a different (better) way of configuring
the packages in `org-latex-default-packages-alist`?

TIA

Joost

-- 
Joost Kremers
Life has its moments


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

* Re: Customising LaTeX packages in org-latex-default-packages-alist
@ 2024-09-07  5:36 Pedro Andres Aranda Gutierrez
  2024-09-09  8:10 ` Joost Kremers
  0 siblings, 1 reply; 5+ messages in thread
From: Pedro Andres Aranda Gutierrez @ 2024-09-07  5:36 UTC (permalink / raw)
  To: joostkremers, Org Mode List

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

Hi

I' m on Emacs 30.0.90 and using use-package for org (9.7) and other emacs
stock packages.
I add the following in my :custom section

(org-latex-hyperref-template "\\hypersetup{
 colorlinks=true,linkcolor=black,citecolor=black,pagecolor=black,urlcolor=blue,
 pdfborder={0 0 0},
 pdfauthor={%a},
 pdftitle={%t},
 pdfkeywords={%k}, pdfsubject={%d},
 pdfcreator={%c}, pdflang={%L}}
")

instead of touching org-latex-default.packages-alist. Did that before for
specific packages and it was a mess...

Best, /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: 1203 bytes --]

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

* Re: Customising LaTeX packages in org-latex-default-packages-alist
  2024-09-06  7:49 Joost Kremers
@ 2024-09-08 18:27 ` Ihor Radchenko
  2024-09-09  8:16   ` Joost Kremers
  0 siblings, 1 reply; 5+ messages in thread
From: Ihor Radchenko @ 2024-09-08 18:27 UTC (permalink / raw)
  To: Joost Kremers; +Cc: Emacs Org mode mailing list

Joost Kremers <joostkremers@fastmail.fm> writes:

> So that made me wonder; is there a different (better) way of configuring
> the packages in `org-latex-default-packages-alist`?

https://orgmode.org/worg/org-tutorials/org-latex-export.html#org67ae7f0

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

* Re: Customising LaTeX packages in org-latex-default-packages-alist
  2024-09-07  5:36 Customising LaTeX packages in org-latex-default-packages-alist Pedro Andres Aranda Gutierrez
@ 2024-09-09  8:10 ` Joost Kremers
  0 siblings, 0 replies; 5+ messages in thread
From: Joost Kremers @ 2024-09-09  8:10 UTC (permalink / raw)
  To: Pedro Andres Aranda Gutierrez; +Cc: Org Mode List

On Sat, Sep 07 2024, Pedro Andres Aranda Gutierrez wrote:
> I' m on Emacs 30.0.90 and using use-package for org (9.7) and other emacs
> stock packages.
> I add the following in my :custom section
[...]
> instead of touching org-latex-default.packages-alist. Did that before for
> specific packages and it was a mess...

Thanks, I didn't know about `org-latex-hyperref-template`. For this
particular case, it seems to be the best option.


-- 
Joost Kremers
Life has its moments


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

* Re: Customising LaTeX packages in org-latex-default-packages-alist
  2024-09-08 18:27 ` Ihor Radchenko
@ 2024-09-09  8:16   ` Joost Kremers
  0 siblings, 0 replies; 5+ messages in thread
From: Joost Kremers @ 2024-09-09  8:16 UTC (permalink / raw)
  To: Ihor Radchenko; +Cc: Emacs Org mode mailing list

On Sun, Sep 08 2024, Ihor Radchenko wrote:
> Joost Kremers <joostkremers@fastmail.fm> writes:
>
>> So that made me wonder; is there a different (better) way of configuring
>> the packages in `org-latex-default-packages-alist`?
>
> https://orgmode.org/worg/org-tutorials/org-latex-export.html#org67ae7f0

Thanks, I hadn't thought of checking Worg... This gives me some options.

-- 
Joost Kremers
Life has its moments


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

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

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-09-07  5:36 Customising LaTeX packages in org-latex-default-packages-alist Pedro Andres Aranda Gutierrez
2024-09-09  8:10 ` Joost Kremers
  -- strict thread matches above, loose matches on Subject: below --
2024-09-06  7:49 Joost Kremers
2024-09-08 18:27 ` Ihor Radchenko
2024-09-09  8:16   ` Joost Kremers

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