emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: reza <reza@housseini.me>
To: "emacs-orgmode@gnu.org" <emacs-orgmode@gnu.org>
Subject: Re: Use custom preamble from tex file for latex export
Date: Tue, 21 Feb 2023 08:40:57 +0000	[thread overview]
Message-ID: <0102018673220efd-ffb3b4e5-748c-4023-8f85-7e178fc0363e-000000@eu-west-1.amazonses.com> (raw)
In-Reply-To: <87zg9cl9ge.fsf@ucl.ac.uk>

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

> Yes, should be possible.  Check out info manual: (emacs) File Variables

I did manage to patch together a working example, but when I tried to 
move into an setupfile it doesn't work anymore. Is this intended or did 
I do something wrong?

template.org

# -*- org-export-allow-bind-keywords: t; -*-
#+BIND: org-latex-classes (my-latex-classes)
#+BIND: org-latex-hyperref-template nil
#+LATEX_CLASS: from-file
#+BEGIN_SRC emacs-lisp :exports results :results none
   (defun my-latex-classes
     '(("from-file"
        "\\RequirePackage{preamble}\n[NO-DEFAULT-PACKAGES]"
        ("\\section{%s}" . "\\section*{%s}")
        ("\\subsection{%s}" . "\\subsection*{%s}")
        ("\\subsubsection{%s}" . "\\subsubsection*{%s}")
        ("\\paragraph{%s}" . "\\paragraph*{%s}")
        ("\\subparagraph{%s}" . "\\subparagraph*{%s}"))))
#+END_SRC

report.org

# -*- org-export-allow-bind-keywords: t; -*-
#+title: A dummy report
#+subtitle: This is a dummy report
#+setupfile: ../template.org

* Title

asdasd

This gives me an error, unknown latex class "from-file" and checking the 
variable "org-latex-classes" with C-h v looks like it was not set.

Thanks for any help.

Cheers,
Reza

[-- Attachment #2: OpenPGP_0xC375C6AF05125C52.asc --]
[-- Type: application/pgp-keys, Size: 15557 bytes --]

[-- Attachment #3: OpenPGP_signature --]
[-- Type: application/pgp-signature, Size: 499 bytes --]

  parent reply	other threads:[~2023-02-21  8:41 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1535a463-91fd-d085-06ee-ebd816c57ec8@housseini.me>
2023-02-17  8:55 ` Use custom preamble from tex file for latex export reza
2023-02-17 10:08   ` Fraga, Eric
2023-02-17 10:28     ` Fraga, Eric
2023-02-17 10:30   ` Fraga, Eric
     [not found]     ` <ea7618de-c02e-ee1a-8f32-083046ac09bb@housseini.me>
2023-02-17 12:38       ` reza
2023-02-17 12:49         ` Fraga, Eric
     [not found]           ` <b6dad7bb-9ba2-39e9-5ad5-bbfd5c7a9d74@housseini.me>
2023-02-17 13:08             ` reza
2023-02-17 13:14               ` Ihor Radchenko
     [not found]                 ` <4f7041fc-4d26-0308-041b-e34365613074@housseini.me>
2023-02-17 13:16                   ` reza
2023-02-17 13:26                     ` Ihor Radchenko
2023-02-17 13:15               ` Fraga, Eric
     [not found]                 ` <2660604c-3d61-890b-1088-6b56d773f674@housseini.me>
2023-02-21  8:40                   ` reza [this message]
2023-02-21 10:08                     ` Fraga, Eric

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=0102018673220efd-ffb3b4e5-748c-4023-8f85-7e178fc0363e-000000@eu-west-1.amazonses.com \
    --to=reza@housseini.me \
    --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).