Hi I have a org file that I want to export to latex but would like to add %%% Local Variables: %%% mode: latex %%% TeX-master: t %%% TeX-output-dir: "/home/oub/ALLES/HGs/TFG-2020/build" %%% End: *after* \end{document} If I do #+begin_src latex :results latex replace :exports results :eval t %%% Local Variables: %%% mode: latex %%% TeX-master: t %%% TeX-output-dir: "/home/oub/ALLES/HGs/TFG-2020/build" %%% End: #+end_src It is added before \end{document} Any idea how to do that? Thanks
On Monday, 5 Oct 2020 at 09:27, Uwe Brauer wrote: > I have a org file that I want to export to latex but would like to add [...] > It is added before \end{document} > > Any idea how to do that? You could always add the '\end{document}' line as the first line of your LaTeX src block? Untested but LaTeX should stop processing anything after it encounters that line. It shouldn't matter that you have another such line inserted by org after. But I could be mistaken! -- : Eric S Fraga via Emacs 28.0.50, Org release_9.4-38-g16f505
[-- Attachment #1: Type: text/plain, Size: 677 bytes --] >>> "ESF" == Eric S Fraga <e.fraga@ucl.ac.uk> writes: > On Monday, 5 Oct 2020 at 09:27, Uwe Brauer wrote: >> I have a org file that I want to export to latex but would like to add > [...] >> It is added before \end{document} >> >> Any idea how to do that? > You could always add the '\end{document}' line as the first line of your > LaTeX src block? Untested but LaTeX should stop processing anything > after it encounters that line. It shouldn't matter that you have > another such line inserted by org after. Right this is correct and this is what I tried, however I hoped for a more, hm, elegant solution. But on the other hand, what the heck... [-- Attachment #2: smime.p7s --] [-- Type: application/pkcs7-signature, Size: 5673 bytes --]
On Monday, 5 Oct 2020 at 10:11, Uwe Brauer wrote:
> Right this is correct and this is what I tried, however I hoped for a
> more, hm, elegant solution. But on the other hand, what the heck...
This is pretty much my view: elegance is a bonus but anything that works
is enough! But if somebody does know an elegant solution, please chime
in. :-)
--
: Eric S Fraga via Emacs 28.0.50, Org release_9.4-38-g16f505
[-- Attachment #1: Type: text/plain, Size: 512 bytes --] >>> "ESF" == Eric S Fraga <e.fraga@ucl.ac.uk> writes: > On Monday, 5 Oct 2020 at 10:11, Uwe Brauer wrote: >> Right this is correct and this is what I tried, however I hoped for a >> more, hm, elegant solution. But on the other hand, what the heck... > This is pretty much my view: elegance is a bonus but anything that works > is enough! But if somebody does know an elegant solution, please chime > in. :-) On problem of this approach is now: if I open this org file emacs uses LaTeX mode not org mode :-( [-- Attachment #2: smime.p7s --] [-- Type: application/pkcs7-signature, Size: 5673 bytes --]
On Tuesday, 6 Oct 2020 at 13:22, Uwe Brauer wrote:
> On problem of this approach is now: if I open this org file emacs uses
> LaTeX mode not org mode :-(
What if you remove the mode: line and let Emacs choose the mode
according to file name?
--
: Eric S Fraga via Emacs 28.0.50, Org release_9.4-38-g16f505