Re: Use custom preamble from tex file for latex export

2023-02-21 Thread Fraga, Eric
I'm travelling so will keep this short. A few things potentially wrong with your setup: 1. the elisp src block won't be executed automatically. 2. I do not know if the BIND statements are interpreted when included but I imagine they are. Sometimes it's better to use the base Emacs feature

Re: Use custom preamble from tex file for latex export

2023-02-21 Thread reza
> 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; -*

Re: Use custom preamble from tex file for latex export

2023-02-17 Thread Ihor Radchenko
reza writes: >> Two possibilities: >> >> 1. Put file-local variable >> 2. Create an "Empty" class with empty documentclass statement >> and then #+LATEX_CLASS: Empty #+LATEX_HEADER: \input{...} >> > > Sorry for my noobish questions: > > 1. How do I put file-local variables in my org file?

Re: Use custom preamble from tex file for latex export

2023-02-17 Thread reza
> Two possibilities: > > 1. Put file-local variable > 2. Create an "Empty" class with empty documentclass statement > and then #+LATEX_CLASS: Empty #+LATEX_HEADER: \input{...} > Sorry for my noobish questions: 1. How do I put file-local variables in my org file? 2. Is it possible to do this

Re: Use custom preamble from tex file for latex export

2023-02-17 Thread Fraga, Eric
On Friday, 17 Feb 2023 at 13:08, reza wrote: > Is there a way to extend org-latex-classes inside my org file, so I can > keep using C-c C-e l l (export to latex)? Yes, should be possible. Check out info manual: (emacs) File Variables -- : Eric S Fraga, with org release_9.6.1-250-ge6353d in Emac

Re: Use custom preamble from tex file for latex export

2023-02-17 Thread Ihor Radchenko
reza writes: >> The full org alternative is to customise org-latex-classes with all the >> LaTeX preamble you want or need. This is what I do. > > Is there a way to extend org-latex-classes inside my org file, so I can > keep using C-c C-e l l (export to latex)? Two possibilities: 1. Put file

Re: Use custom preamble from tex file for latex export

2023-02-17 Thread reza
> The full org alternative is to customise org-latex-classes with all the > LaTeX preamble you want or need. This is what I do. Is there a way to extend org-latex-classes inside my org file, so I can keep using C-c C-e l l (export to latex)? OpenPGP_0xC375C6AF05125C52.asc Description: applica

Re: Use custom preamble from tex file for latex export

2023-02-17 Thread Fraga, Eric
On Friday, 17 Feb 2023 at 12:38, reza wrote: > Thanks for the idea, will test this, but I fear this will collide with > the latex class provided by org? Well, you could have just the documentclass line removed from the preamble and define an org latex class appropriately. There's always going to

Re: Use custom preamble from tex file for latex export

2023-02-17 Thread reza
> #+latex_header: \input{preamble} Thanks for the idea, will test this, but I fear this will collide with the latex class provided by org? OpenPGP_0xC375C6AF05125C52.asc Description: application/pgp-keys OpenPGP_signature Description: PGP signature

Re: Use custom preamble from tex file for latex export

2023-02-17 Thread Fraga, Eric
Let me try again (I first response wrong). The following may work: #+latex_header: \input{preamble} -- : Eric S Fraga, with org release_9.6.1-250-ge6353d in Emacs 30.0.50

Re: Use custom preamble from tex file for latex export

2023-02-17 Thread Fraga, Eric
You probably want "input" and not "include" in my suggestion. -- : Eric S Fraga, with org release_9.6.1-250-ge6353d in Emacs 30.0.50

Re: Use custom preamble from tex file for latex export

2023-02-17 Thread Fraga, Eric
Maybe (untested) #+latex_header: \include(preamble) (maybe with .tex in the file name but probably not needed) -- : Eric S Fraga, with org release_9.6.1-250-ge6353d in Emacs 30.0.50

Use custom preamble from tex file for latex export

2023-02-17 Thread reza
Hi List Normally when exporting to latex one can set org headers to control the latex class and additional packages. I have now a tex file with the corresponding latex class and packages I normally use for my documents. Is there a way to use this tex file directly in org mode, without having t