emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* org-->latex add local variables after \end{document}
@ 2020-10-05  7:27 Uwe Brauer
  2020-10-05  7:39 ` Eric S Fraga
  0 siblings, 1 reply; 6+ messages in thread
From: Uwe Brauer @ 2020-10-05  7:27 UTC (permalink / raw)
  To: emacs-orgmode



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



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

* Re: org-->latex add local variables after \end{document}
  2020-10-05  7:27 org-->latex add local variables after \end{document} Uwe Brauer
@ 2020-10-05  7:39 ` Eric S Fraga
  2020-10-05  8:11   ` Uwe Brauer
  0 siblings, 1 reply; 6+ messages in thread
From: Eric S Fraga @ 2020-10-05  7:39 UTC (permalink / raw)
  To: emacs-orgmode

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


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

* Re: org-->latex add local variables after \end{document}
  2020-10-05  7:39 ` Eric S Fraga
@ 2020-10-05  8:11   ` Uwe Brauer
  2020-10-05  9:58     ` Eric S Fraga
  0 siblings, 1 reply; 6+ messages in thread
From: Uwe Brauer @ 2020-10-05  8:11 UTC (permalink / raw)
  To: emacs-orgmode

[-- 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 --]

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

* Re: org-->latex add local variables after \end{document}
  2020-10-05  8:11   ` Uwe Brauer
@ 2020-10-05  9:58     ` Eric S Fraga
  2020-10-06 11:22       ` Uwe Brauer
  0 siblings, 1 reply; 6+ messages in thread
From: Eric S Fraga @ 2020-10-05  9:58 UTC (permalink / raw)
  To: emacs-orgmode

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


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

* Re: org-->latex add local variables after \end{document}
  2020-10-05  9:58     ` Eric S Fraga
@ 2020-10-06 11:22       ` Uwe Brauer
  2020-10-06 13:07         ` Eric S Fraga
  0 siblings, 1 reply; 6+ messages in thread
From: Uwe Brauer @ 2020-10-06 11:22 UTC (permalink / raw)
  To: emacs-orgmode

[-- 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 --]

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

* Re: org-->latex add local variables after \end{document}
  2020-10-06 11:22       ` Uwe Brauer
@ 2020-10-06 13:07         ` Eric S Fraga
  0 siblings, 0 replies; 6+ messages in thread
From: Eric S Fraga @ 2020-10-06 13:07 UTC (permalink / raw)
  To: emacs-orgmode

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


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

end of thread, other threads:[~2020-10-06 13:23 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-05  7:27 org-->latex add local variables after \end{document} Uwe Brauer
2020-10-05  7:39 ` Eric S Fraga
2020-10-05  8:11   ` Uwe Brauer
2020-10-05  9:58     ` Eric S Fraga
2020-10-06 11:22       ` Uwe Brauer
2020-10-06 13:07         ` Eric S Fraga

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