emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* change the latex header per subtree
@ 2012-11-12 12:39 Andreas Leha
  2012-11-12 17:25 ` Suvayu Ali
  2012-11-14 14:10 ` Nicolas Goaziou
  0 siblings, 2 replies; 9+ messages in thread
From: Andreas Leha @ 2012-11-12 12:39 UTC (permalink / raw)
  To: emacs-orgmode

Hi all,

I'd like to change the LaTeX header per subtree.  Is that possible?

Use case:  I have two documents that I want to export from a single
orgmode file.  Each in its own subtree.  One of them should use the
endfloat package, the other should not.

Like this:
,----
| * Document 1
| #+LATEX_HEADER: \usepackage[nomarkers,nolists,heads,tablesfirst]{endfloat}
| 
| * Document 2
| 
| * Code
`----


Regards,
Andreas

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

* Re: change the latex header per subtree
  2012-11-12 12:39 change the latex header per subtree Andreas Leha
@ 2012-11-12 17:25 ` Suvayu Ali
  2012-11-14 14:10 ` Nicolas Goaziou
  1 sibling, 0 replies; 9+ messages in thread
From: Suvayu Ali @ 2012-11-12 17:25 UTC (permalink / raw)
  To: emacs-orgmode

On Mon, Nov 12, 2012 at 01:39:10PM +0100, Andreas Leha wrote:
> Hi all,
> 
> I'd like to change the LaTeX header per subtree.  Is that possible?
> 
> Use case:  I have two documents that I want to export from a single
> orgmode file.  Each in its own subtree.  One of them should use the
> endfloat package, the other should not.
> 
> Like this:
> ,----
> | * Document 1
> | #+LATEX_HEADER: \usepackage[nomarkers,nolists,heads,tablesfirst]{endfloat}
> | 
> | * Document 2
> | 
> | * Code
> `----
> 

This would be quite useful for me too; something akin to
EXPORT_BEAMER_HEADER_EXTRA for beamer export.

-- 
Suvayu

Open source is the future. It sets us free.

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

* Re: change the latex header per subtree
  2012-11-12 12:39 change the latex header per subtree Andreas Leha
  2012-11-12 17:25 ` Suvayu Ali
@ 2012-11-14 14:10 ` Nicolas Goaziou
  2012-11-14 20:12   ` Achim Gratz
  2012-11-15  8:51   ` Andreas Leha
  1 sibling, 2 replies; 9+ messages in thread
From: Nicolas Goaziou @ 2012-11-14 14:10 UTC (permalink / raw)
  To: Andreas Leha; +Cc: emacs-orgmode

Hello,

Andreas Leha <andreas.leha@med.uni-goettingen.de> writes:

> I'd like to change the LaTeX header per subtree.  Is that possible?
>
> Use case:  I have two documents that I want to export from a single
> orgmode file.  Each in its own subtree.  One of them should use the
> endfloat package, the other should not.

Define two LaTeX classes, one with "endfloat" package and one without.
Then use :EXPORT_LATEX_CLASS: node property.


Regards,

-- 
Nicolas Goaziou

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

* Re: change the latex header per subtree
  2012-11-14 14:10 ` Nicolas Goaziou
@ 2012-11-14 20:12   ` Achim Gratz
  2012-11-14 22:20     ` Nicolas Goaziou
  2012-11-15  8:51   ` Andreas Leha
  1 sibling, 1 reply; 9+ messages in thread
From: Achim Gratz @ 2012-11-14 20:12 UTC (permalink / raw)
  To: emacs-orgmode

Nicolas Goaziou writes:
> Define two LaTeX classes, one with "endfloat" package and one without.
> Then use :EXPORT_LATEX_CLASS: node property.

Speaking of which, couldn't this be made easier?  There's only one
org-export-latex-packages-alist and if you're trying to use very
different LaTeX classes you'll end up specifying [NO-DEFAULT-PACKAGES]
and then copying a lot of \usepackage stuff around.  If it was possible
to give an argument to [PACKAGES] (default, header, <custom>), then
there would be no need for [NO-PACKAGES] and [DEFAULT-PACKAGES] and one
yould use several sets of package definitions in multiple class
definitions.  It would be especially neat if there was a pendant to
LATEX_HEADER that would allow to specify additional package collections
on the fly.


Regards,
Achim.
-- 
+<[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]>+

Wavetables for the Waldorf Blofeld:
http://Synth.Stromeko.net/Downloads.html#BlofeldUserWavetables

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

* Re: change the latex header per subtree
  2012-11-14 20:12   ` Achim Gratz
@ 2012-11-14 22:20     ` Nicolas Goaziou
  2012-11-15 18:37       ` Achim Gratz
  0 siblings, 1 reply; 9+ messages in thread
From: Nicolas Goaziou @ 2012-11-14 22:20 UTC (permalink / raw)
  To: Achim Gratz; +Cc: emacs-orgmode

Achim Gratz <Stromeko@nexgo.de> writes:

> Speaking of which, couldn't this be made easier?  There's only one
> org-export-latex-packages-alist and if you're trying to use very
> different LaTeX classes you'll end up specifying [NO-DEFAULT-PACKAGES]
> and then copying a lot of \usepackage stuff around.

So what? You define your latex classes once in your configuration
variable, and you're all set. That doesn't sound that bad.

> If it was possible to give an argument to [PACKAGES] (default, header,
> <custom>), then there would be no need for [NO-PACKAGES] and
> [DEFAULT-PACKAGES] and one yould use several sets of package
> definitions in multiple class definitions. It would be especially neat
> if there was a pendant to LATEX_HEADER that would allow to specify
> additional package collections on the fly.

So, you may to make it easier by providing an even more complex
machinery? ;) IMO, the current system is good enough for the job, even
if the initial step introduces a lot of duplicate lines.

Also, if you want to add package collections, you may include
a header-only file in your class, I guess.


Regards,

-- 
Nicolas Goaziou

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

* Re: change the latex header per subtree
  2012-11-14 14:10 ` Nicolas Goaziou
  2012-11-14 20:12   ` Achim Gratz
@ 2012-11-15  8:51   ` Andreas Leha
  1 sibling, 0 replies; 9+ messages in thread
From: Andreas Leha @ 2012-11-15  8:51 UTC (permalink / raw)
  To: emacs-orgmode

Hi Nicolas,

Nicolas Goaziou <n.goaziou@gmail.com> writes:

> Hello,
>
> Andreas Leha <andreas.leha@med.uni-goettingen.de> writes:
>
>> I'd like to change the LaTeX header per subtree.  Is that possible?
>>
>> Use case:  I have two documents that I want to export from a single
>> orgmode file.  Each in its own subtree.  One of them should use the
>> endfloat package, the other should not.
>
> Define two LaTeX classes, one with "endfloat" package and one without.
> Then use :EXPORT_LATEX_CLASS: node property.

Thanks for that suggestion.  I constantly forget about the option of
different export classes.  For me this solution is good enough.

Regards,
Andreas

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

* Re: change the latex header per subtree
  2012-11-14 22:20     ` Nicolas Goaziou
@ 2012-11-15 18:37       ` Achim Gratz
  2012-11-15 22:24         ` Nicolas Goaziou
  0 siblings, 1 reply; 9+ messages in thread
From: Achim Gratz @ 2012-11-15 18:37 UTC (permalink / raw)
  To: emacs-orgmode

Nicolas Goaziou writes:
> Achim Gratz <Stromeko@nexgo.de> writes:
>
>> Speaking of which, couldn't this be made easier?  There's only one
>> org-export-latex-packages-alist and if you're trying to use very
>> different LaTeX classes you'll end up specifying [NO-DEFAULT-PACKAGES]
>> and then copying a lot of \usepackage stuff around.
>
> So what? You define your latex classes once in your configuration
> variable, and you're all set. That doesn't sound that bad.

I'm supposed to do this via configury, which is _very_ clumsy in dealing
with this perticular issue.

>> If it was possible to give an argument to [PACKAGES] (default, header,
>> <custom>), then there would be no need for [NO-PACKAGES] and
>> [DEFAULT-PACKAGES] and one yould use several sets of package
>> definitions in multiple class definitions. It would be especially neat
>> if there was a pendant to LATEX_HEADER that would allow to specify
>> additional package collections on the fly.
>
> So, you may to make it easier by providing an even more complex
> machinery? ;) IMO, the current system is good enough for the job, even
> if the initial step introduces a lot of duplicate lines.

Getting rid of special cased machinery to provide a more general one
counts as simplification in my book.

> Also, if you want to add package collections, you may include
> a header-only file in your class, I guess.

I don't get what you are telling me here, sorry.


Regards,
Achim.
-- 
+<[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]>+

Waldorf MIDI Implementation & additional documentation:
http://Synth.Stromeko.net/Downloads.html#WaldorfDocs

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

* Re: change the latex header per subtree
  2012-11-15 18:37       ` Achim Gratz
@ 2012-11-15 22:24         ` Nicolas Goaziou
  2012-11-16 19:24           ` Achim Gratz
  0 siblings, 1 reply; 9+ messages in thread
From: Nicolas Goaziou @ 2012-11-15 22:24 UTC (permalink / raw)
  To: Achim Gratz; +Cc: emacs-orgmode

Achim Gratz <Stromeko@nexgo.de> writes:

> Getting rid of special cased machinery to provide a more general one
> counts as simplification in my book.

Unless I'm mistaken, current set-up can generate any preamble. Then, how
could it be special cased and how could another system be more general?

I agree that current system is far from being perfect. Some other system
may even be more convenient to use. But I won't buy that it will be
simpler.

My judgment may be clouded because I think some other parts of the
exporter deserve a more immediate attention, though.

>> Also, if you want to add package collections, you may include
>> a header-only file in your class, I guess.
>
> I don't get what you are telling me here, sorry.

You can have "\input{my-special-headers-A.tex}" somewhere in your class,
where "my-special-headers-A.tex" file contains some package collection.


Regards,

-- 
Nicolas Goaziou

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

* Re: change the latex header per subtree
  2012-11-15 22:24         ` Nicolas Goaziou
@ 2012-11-16 19:24           ` Achim Gratz
  0 siblings, 0 replies; 9+ messages in thread
From: Achim Gratz @ 2012-11-16 19:24 UTC (permalink / raw)
  To: emacs-orgmode

Nicolas Goaziou writes:
>> I don't get what you are telling me here, sorry.
>
> You can have "\input{my-special-headers-A.tex}" somewhere in your class,
> where "my-special-headers-A.tex" file contains some package collection.

Actually I'd write my own style file and give it appropriate arguments
and options if a fallback to LaTeX's devices is what you're proposing.
This may even be easier, but it introduces a dependency at yet another
place that I currently don't want to deal with.  Thanks for the
suggestion anyway.


Regards,
Achim.
-- 
+<[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]>+

SD adaptation for Waldorf microQ V2.22R2:
http://Synth.Stromeko.net/Downloads.html#WaldorfSDada

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

end of thread, other threads:[~2012-11-16 19:25 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-11-12 12:39 change the latex header per subtree Andreas Leha
2012-11-12 17:25 ` Suvayu Ali
2012-11-14 14:10 ` Nicolas Goaziou
2012-11-14 20:12   ` Achim Gratz
2012-11-14 22:20     ` Nicolas Goaziou
2012-11-15 18:37       ` Achim Gratz
2012-11-15 22:24         ` Nicolas Goaziou
2012-11-16 19:24           ` Achim Gratz
2012-11-15  8:51   ` 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).