From: Pedro <pinmacs@cas.cat>
To: emacs-orgmode@gnu.org
Subject: Re: ox-latex: help: LATEX_HEADER from different subtrees collision
Date: Wed, 4 Sep 2024 12:21:30 +0200 [thread overview]
Message-ID: <224ef5a7-33fc-4467-b146-0899aa61b223@cas.cat> (raw)
In-Reply-To: <m2ttewgxma.fsf@adamkovic.org>
[-- Attachment #1.1.1: Type: text/plain, Size: 864 bytes --]
Hi Rudy,
You nailed it!! Using property EXPORT_LATEX_HEADER exactly solves my
problem, thank you very much. For completeness, I will re-attach the
file with the solution
How did you know that, should that be mentioned in the corresponding
section? (I could not find another one) [1] [2]. Maybe that two links
together should be more linked and more explained the subtree case.
Serve at least this discussion as a pre-documentation
Regarding the attached file: I thought it was minimal enough, 94 lines
that runs on vanilla emacs (emacs-30 branch); but maybe I missed a
little summary: it is two subtree exports handled with a ~#+begin_src
emacs-lisp~, and there was a clash using the LATEX_HEADER
Cheers,
Pedro
[1] https://orgmode.org/manual/LaTeX-header-and-sectioning.html
[2] https://orgmode.org/manual/Export-Settings.html
[-- Attachment #1.1.2: ox-latex-solution.org --]
[-- Type: text/org, Size: 1822 bytes --]
* ox-latex-problem
** [2024-09-02 Mon]
*** report #1 (landscape)
:PROPERTIES:
:EXPORT_LANGUAGE: en
:EXPORT_TITLE:
:EXPORT_SUBTITLE:
:EXPORT_AUTHOR:
:EXPORT_DATE:
:EXPORT_OPTIONS: toc:nil timestamp:nil num:nil
:EXPORT_TOC: headlines 2
:EXPORT_FILE_NAME: /tmp/report2.pdf
:EXPORT_LATEX_HEADER: \usepackage[a4paper, landscape, margin=0.5cm]{geometry}
:CLICK_TO_SEE_REPORT: file:/tmp/report2.pdf
:END:
#+name: sourceblock_created_2024-09-02_23-36-05
#+begin_src emacs-lisp :exports none :results none
(defun my/export-pdf ()
"renders the PDF"
(org-narrow-to-subtree)
(org-show-subtree)
(org-latex-export-to-pdf nil t t nil)
(widen)
)
(my/export-pdf)
#+end_src
# do not use this LATEX_HEADER because is buffer scoped!
# #+LATEX_HEADER: \usepackage[a4paper, landscape, margin=0.5cm]{geometry}
**** My report #2
***** Introduction
Introduction text
***** The report #2
Report #2 text
***** Conclusions
Conclusions text
** [2024-09-01 Sun]
*** report #2 (portrait)
:PROPERTIES:
:EXPORT_LANGUAGE: ca
:EXPORT_TITLE:
:EXPORT_SUBTITLE:
:EXPORT_AUTHOR:
:EXPORT_DATE:
:EXPORT_OPTIONS: toc:nil timestamp:nil num:nil
:EXPORT_TOC: headlines 2
:EXPORT_FILE_NAME: /tmp/report1.pdf
:CLICK_TO_SEE_REPORT: file:/tmp/report1.pdf
:EXPORT_LATEX_HEADER: \usepackage[a4paper, margin=3cm]{geometry}
:END:
#+name: sourceblock_created_2024-09-02_23-36-07
#+begin_src emacs-lisp :exports none :results none
(defun my/export-pdf ()
"renders the PDF"
(org-narrow-to-subtree)
(org-show-subtree)
(org-latex-export-to-pdf nil t t nil)
(widen)
)
(my/export-pdf)
#+end_src
# do not use this LATEX_HEADER because is buffer scoped!
# #+LATEX_HEADER: \usepackage[a4paper, margin=3cm]{geometry}
**** My report #1
***** Introduction
Introduction text
***** The report #1
Report #1 text
***** Conclusions
Conclusions text
[-- Attachment #1.1.3: OpenPGP public key --]
[-- Type: application/pgp-keys, Size: 3323 bytes --]
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 495 bytes --]
next prev parent reply other threads:[~2024-09-04 10:31 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-09-02 22:09 ox-latex: help: LATEX_HEADER from different subtrees collision pinmacs
2024-09-03 22:50 ` Rudolf Adamkovič
2024-09-04 10:21 ` Pedro [this message]
2024-09-04 13:24 ` pinmacs
2024-09-04 17:28 ` Rudolf Adamkovič
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.orgmode.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=224ef5a7-33fc-4467-b146-0899aa61b223@cas.cat \
--to=pinmacs@cas.cat \
--cc=emacs-orgmode@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).