* empty LaTeX export template
@ 2013-06-11 9:31 Andreas Leha
2013-06-11 12:14 ` Suvayu Ali
0 siblings, 1 reply; 8+ messages in thread
From: Andreas Leha @ 2013-06-11 9:31 UTC (permalink / raw)
To: emacs-orgmode
Hi all,
I am lazy (main reason for this question) and I would like to avoid
filling my org-latex-classes with too many entries (surrogate reason).
So I'd like to ask: Is there a possibility to get a really empty LaTeX
export that reads everything (including the documentclass) from the
#+LATEX_HEADER ?
The reason for this is, that many journals/conferences come with their
own LaTeX template (if I am lucky, that is). It would be very
convenient, if I could just yank the provided header into my *.org
file (and prefix with #+LATEX_HEADER).
Is that possible?
Regards,
Andreas
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: empty LaTeX export template
2013-06-11 9:31 empty LaTeX export template Andreas Leha
@ 2013-06-11 12:14 ` Suvayu Ali
2013-06-11 13:01 ` Andreas Leha
0 siblings, 1 reply; 8+ messages in thread
From: Suvayu Ali @ 2013-06-11 12:14 UTC (permalink / raw)
To: emacs-orgmode
On Tue, Jun 11, 2013 at 11:31:39AM +0200, Andreas Leha wrote:
>
> So I'd like to ask: Is there a possibility to get a really empty LaTeX
> export that reads everything (including the documentclass) from the
> #+LATEX_HEADER ?
>
> The reason for this is, that many journals/conferences come with their
> own LaTeX template (if I am lucky, that is). It would be very
> convenient, if I could just yank the provided header into my *.org
> file (and prefix with #+LATEX_HEADER).
I think you can just define a minimal class in org-latex-classes;
something like
\documentclass{article}
[NO-DEFAULT-PACKAGES]
[NO-PACKAGES]
[EXTRA]
Then none of the packages listed in org-latex-default-packages-alist and
org-latex-packages-alist are included, and only the
#+LATEX_HEADER(_EXTRA) keywords are considered.
Hope this helps,
--
Suvayu
Open source is the future. It sets us free.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: empty LaTeX export template
2013-06-11 12:14 ` Suvayu Ali
@ 2013-06-11 13:01 ` Andreas Leha
2013-06-13 7:57 ` Eric S Fraga
0 siblings, 1 reply; 8+ messages in thread
From: Andreas Leha @ 2013-06-11 13:01 UTC (permalink / raw)
To: emacs-orgmode
Suvayu Ali <fatkasuvayu+linux@gmail.com> writes:
> On Tue, Jun 11, 2013 at 11:31:39AM +0200, Andreas Leha wrote:
>>
>> So I'd like to ask: Is there a possibility to get a really empty LaTeX
>> export that reads everything (including the documentclass) from the
>> #+LATEX_HEADER ?
>>
>> The reason for this is, that many journals/conferences come with their
>> own LaTeX template (if I am lucky, that is). It would be very
>> convenient, if I could just yank the provided header into my *.org
>> file (and prefix with #+LATEX_HEADER).
>
> I think you can just define a minimal class in org-latex-classes;
> something like
>
> \documentclass{article}
> [NO-DEFAULT-PACKAGES]
> [NO-PACKAGES]
> [EXTRA]
>
> Then none of the packages listed in org-latex-default-packages-alist and
> org-latex-packages-alist are included, and only the
> #+LATEX_HEADER(_EXTRA) keywords are considered.
>
> Hope this helps,
Hi Suvayu,
this did help, indeed. Thanks a lot. I did not think it was that easy.
I found, that I can just omit the documentclass from the
org-latex-classes.
So, now I have:
--8<---------------cut here---------------start------------->8---
(add-to-list 'org-latex-classes
'("bare"
"
\[NO-DEFAULT-PACKAGES]
\[NO-PACKAGES]
\[EXTRA]"
("\\section{%s}" . "\\section*{%s}")
("\\subsection{%s}" . "\\subsection*{%s}")
("\\subsubsection{%s}" . "\\subsubsection*{%s}")))
--8<---------------cut here---------------end--------------->8---
This should work in most cases.
To use this I do:
--8<---------------cut here---------------start------------->8---
#+OPTIONS: toc:nil author:nil skip:nil
#+LATEX_CLASS: bare
#+LATEX_HEADER: % everything from the template
--8<---------------cut here---------------end--------------->8---
One problem remains, though: orgmode keeps messing with the title.
I can, of course, set the title through #+TITLE: but I would prefer to
set it through some #+LATEX_HEADER as the templates often require their
own title setting directives.
So, my follow-up question is: How can I get orgmode to not fiddle with
the title in a LaTeX export?
Regards,
Andreas
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: empty LaTeX export template
2013-06-11 13:01 ` Andreas Leha
@ 2013-06-13 7:57 ` Eric S Fraga
2013-06-13 13:47 ` Rasmus
0 siblings, 1 reply; 8+ messages in thread
From: Eric S Fraga @ 2013-06-13 7:57 UTC (permalink / raw)
To: Andreas Leha; +Cc: emacs-orgmode
Andreas Leha <andreas.leha@med.uni-goettingen.de> writes:
> [...]
> To use this I do:
> #+OPTIONS: toc:nil author:nil skip:nil
> #+LATEX_CLASS: bare
> #+LATEX_HEADER: % everything from the template
>
> One problem remains, though: orgmode keeps messing with the title.
> [...]
> So, my follow-up question is: How can I get orgmode to not fiddle with
> the title in a LaTeX export?
A simple hack is to redefine \title in the header, noting that the
exporter puts the title specification *after* all the latex_header lines
in the latex file.
In one case, I needed the title to be right at the top of the page so I
did the following:
#+latex_header: \title{\vspace*{-1.5cm}Workplan}\renewcommand{\title}[1]{}
Note that the title command is redefined to do nothing.
HTH,
eric
--
: Eric S Fraga (0xFFFCF67D), Emacs 24.3.50.1, Org release_8.0.3-193-g334581
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: empty LaTeX export template
2013-06-13 7:57 ` Eric S Fraga
@ 2013-06-13 13:47 ` Rasmus
2013-06-13 16:10 ` Andreas Leha
0 siblings, 1 reply; 8+ messages in thread
From: Rasmus @ 2013-06-13 13:47 UTC (permalink / raw)
To: emacs-orgmode
Eric S Fraga <e.fraga@ucl.ac.uk> writes:
> Andreas Leha <andreas.leha@med.uni-goettingen.de> writes:
>
>> [...]
>> To use this I do:
>> #+OPTIONS: toc:nil author:nil skip:nil
>> #+LATEX_CLASS: bare
>> #+LATEX_HEADER: % everything from the template
>>
>> One problem remains, though: orgmode keeps messing with the title.
>> [...]
>> So, my follow-up question is: How can I get orgmode to not fiddle with
>> the title in a LaTeX export?
>
> A simple hack is to redefine \title in the header, noting that the
> exporter puts the title specification *after* all the latex_header lines
> in the latex file.
I think this might be the best way to do it. It's possible to omit
\maketitle by changing `org-latex-title-command'. Whether to set the
title is unfortunately not configurable at the moment, it seems.
–Rasmus
--
Don't panic!!!
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: empty LaTeX export template
2013-06-13 13:47 ` Rasmus
@ 2013-06-13 16:10 ` Andreas Leha
2013-06-13 18:16 ` Rasmus
0 siblings, 1 reply; 8+ messages in thread
From: Andreas Leha @ 2013-06-13 16:10 UTC (permalink / raw)
To: emacs-orgmode
Hi Eric and Rasmus,
Rasmus <rasmus@gmx.us> writes:
> Eric S Fraga <e.fraga@ucl.ac.uk> writes:
>
>> Andreas Leha <andreas.leha@med.uni-goettingen.de> writes:
>>
>>> [...]
>>> To use this I do:
>>> #+OPTIONS: toc:nil author:nil skip:nil
>>> #+LATEX_CLASS: bare
>>> #+LATEX_HEADER: % everything from the template
>>>
>>> One problem remains, though: orgmode keeps messing with the title.
>>> [...]
>>> So, my follow-up question is: How can I get orgmode to not fiddle with
>>> the title in a LaTeX export?
>>
>> A simple hack is to redefine \title in the header, noting that the
>> exporter puts the title specification *after* all the latex_header lines
>> in the latex file.
>
> I think this might be the best way to do it. It's possible to omit
> \maketitle by changing `org-latex-title-command'. Whether to set the
> title is unfortunately not configurable at the moment, it seems.
>
> –Rasmus
Thanks a lot. I'll use this approach. That change to the latex header
I paste from the template into my org file is small enough to be
acceptable.
Best,
Andreas
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: empty LaTeX export template
2013-06-13 16:10 ` Andreas Leha
@ 2013-06-13 18:16 ` Rasmus
2013-06-13 20:58 ` Andreas Leha
0 siblings, 1 reply; 8+ messages in thread
From: Rasmus @ 2013-06-13 18:16 UTC (permalink / raw)
To: emacs-orgmode
Andreas,
> Thanks a lot. I'll use this approach. That change to the latex header
> I paste from the template into my org file is small enough to be
> acceptable.
Speaking of which, did you consider just exporting the body without
header-info? Then you could prepare a minimal .tex file and input the
file generated by org. The minimal file could even just be a tangled
file from the org file . . .
–Rasmus
--
Got mashed potatoes. Ain't got no T-Bone. No T-Bone
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: empty LaTeX export template
2013-06-13 18:16 ` Rasmus
@ 2013-06-13 20:58 ` Andreas Leha
0 siblings, 0 replies; 8+ messages in thread
From: Andreas Leha @ 2013-06-13 20:58 UTC (permalink / raw)
To: emacs-orgmode
Hi Rasmus,
>> Thanks a lot. I'll use this approach. That change to the latex header
>> I paste from the template into my org file is small enough to be
>> acceptable.
>
> Speaking of which, did you consider just exporting the body without
> header-info? Then you could prepare a minimal .tex file and input the
> file generated by org. The minimal file could even just be a tangled
> file from the org file . . .
>
No, I never considered this. But it seems like a very nice idea!
Thanks for the pointer. I will investigate that route (at some point).
Best,
Andreas
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2013-06-13 20:58 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-06-11 9:31 empty LaTeX export template Andreas Leha
2013-06-11 12:14 ` Suvayu Ali
2013-06-11 13:01 ` Andreas Leha
2013-06-13 7:57 ` Eric S Fraga
2013-06-13 13:47 ` Rasmus
2013-06-13 16:10 ` Andreas Leha
2013-06-13 18:16 ` Rasmus
2013-06-13 20:58 ` Andreas Leha
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).