all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* EXPORT_LATEX_HEADER property
@ 2016-03-03 11:02 Fabrice Popineau
  2016-03-03 11:26 ` Nicolas Goaziou
  0 siblings, 1 reply; 8+ messages in thread
From: Fabrice Popineau @ 2016-03-03 11:02 UTC (permalink / raw)
  To: emacs-orgmode@gnu.org

[-- Attachment #1: Type: text/plain, Size: 905 bytes --]

Hi,

I need some help here.

I'm using org 8.3.4.

I am exporting subtrees to LaTeX.
So I configure as much as possible per subtree.

First, I can't find where is documented the difference between
:EXPORT_LATEX_HEADER:
and
:EXPORT_LATEX_HEADER+:

Clearly, I need to use the latter form with my configuration (the former
doesn't output anything), but I'd like to know precisely where the behavior
is described.

Second, when I use several lines with
:EXPORT_LATEX_HEADER+:
they  are concatenated into a single line.

This is annoying because:

:PROPERTIES:
:EXPORT_LATEX_HEADER+: \usepackage{mathptmx} % rm & math
:EXPORT_LATEX_HEADER+: \usepackage[scaled=0.90]{helvet} % ss
...
:END:

results in

\usepackage{mathptmx} % rm & math  \usepackage[scaled=0.90]{helvet} % ss

which is obviously unintended.

Could it be possible to add a '\n' between those lines?

Thanks for any help / clarification

Fabrice

[-- Attachment #2: Type: text/html, Size: 1485 bytes --]

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

* Re: EXPORT_LATEX_HEADER property
  2016-03-03 11:02 EXPORT_LATEX_HEADER property Fabrice Popineau
@ 2016-03-03 11:26 ` Nicolas Goaziou
  2016-03-03 11:58   ` Fabrice Popineau
  0 siblings, 1 reply; 8+ messages in thread
From: Nicolas Goaziou @ 2016-03-03 11:26 UTC (permalink / raw)
  To: Fabrice Popineau; +Cc: emacs-orgmode@gnu.org

Hello,

Fabrice Popineau <fabrice.popineau@gmail.com> writes:

> First, I can't find where is documented the difference between
> :EXPORT_LATEX_HEADER:
> and
> :EXPORT_LATEX_HEADER+:

See (info "(org) Property syntax").

> Second, when I use several lines with
> :EXPORT_LATEX_HEADER+:
> they  are concatenated into a single line.

Correct.

> This is annoying because:
>
> :PROPERTIES:
> :EXPORT_LATEX_HEADER+: \usepackage{mathptmx} % rm & math
> :EXPORT_LATEX_HEADER+: \usepackage[scaled=0.90]{helvet} % ss
> ...
> :END:
>
> results in
>
> \usepackage{mathptmx} % rm & math  \usepackage[scaled=0.90]{helvet} % ss
>
> which is obviously unintended.
>
> Could it be possible to add a '\n' between those lines?

Not quite what you are asking for, but couldn't you simply not comment
each line?

Actually

  :PROPERTY: A
  :PROPERTY+: B

is meant to be an equivalent for

  :PROPERTY: A B

Introducing newline characters would break this expectation.


Regards,

-- 
Nicolas Goaziou

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

* Re: EXPORT_LATEX_HEADER property
  2016-03-03 11:26 ` Nicolas Goaziou
@ 2016-03-03 11:58   ` Fabrice Popineau
  2016-03-03 15:49     ` Nicolas Goaziou
  2016-03-03 16:16     ` Eric S Fraga
  0 siblings, 2 replies; 8+ messages in thread
From: Fabrice Popineau @ 2016-03-03 11:58 UTC (permalink / raw)
  To: Fabrice Popineau, emacs-orgmode@gnu.org

[-- Attachment #1: Type: text/plain, Size: 2021 bytes --]

2016-03-03 12:26 GMT+01:00 Nicolas Goaziou <mail@nicolasgoaziou.fr>:

> Hello,
>
>
Hi Nicolas,


> Fabrice Popineau <fabrice.popineau@gmail.com> writes:
>
> > First, I can't find where is documented the difference between
> > :EXPORT_LATEX_HEADER:
> > and
> > :EXPORT_LATEX_HEADER+:
>
> See (info "(org) Property syntax").
>
>
I need to learn to read better because I didn't see that this paragraph was
about it:

If you want to add to the value of an existing property, append a + to the
property name.
The following results in the property var having the value “foo=1 bar=2”.
#+PROPERTY: var foo=1
#+PROPERTY: var+ bar=2



> Second, when I use several lines with
> > :EXPORT_LATEX_HEADER+:
> > they  are concatenated into a single line.
>
> Correct.
>
> > This is annoying because:
> >
> > :PROPERTIES:
> > :EXPORT_LATEX_HEADER+: \usepackage{mathptmx} % rm & math
> > :EXPORT_LATEX_HEADER+: \usepackage[scaled=0.90]{helvet} % ss
> > ...
> > :END:
> >
> > results in
> >
> > \usepackage{mathptmx} % rm & math  \usepackage[scaled=0.90]{helvet} % ss
> >
> > which is obviously unintended.
> >
> > Could it be possible to add a '\n' between those lines?
>
> Not quite what you are asking for, but couldn't you simply not comment
> each line?
>
> Yes, I can remove the comments, however, from time to time, it may be
useful to be able to comment
some \usepackage line, and I don't see how it can be done in Org, except by
killing the whole line.

In org reference, 12.7.2, it is said that:

‘LATEX_HEADER’
Arbitrary lines added to the preamble of the document, before the ‘hyperref’
settings. The location can be controlled via org-latex-classes.

Note the plural to lines. How can several lines be specified? AFAICS, if I
do :

:EXPORT_LATEX_HEADER: \usepackage{mathptmx} % rm & math
:EXPORT_LATEX_HEADER: \usepackage[scaled=0.90]{helvet} % ss

The second line will take precedence over the first one.

Thanks for your help,

Fabrice

[-- Attachment #2: Type: text/html, Size: 3443 bytes --]

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

* Re: EXPORT_LATEX_HEADER property
  2016-03-03 11:58   ` Fabrice Popineau
@ 2016-03-03 15:49     ` Nicolas Goaziou
  2016-03-03 18:58       ` Eric S Fraga
  2016-03-03 19:17       ` Fabrice Popineau
  2016-03-03 16:16     ` Eric S Fraga
  1 sibling, 2 replies; 8+ messages in thread
From: Nicolas Goaziou @ 2016-03-03 15:49 UTC (permalink / raw)
  To: Fabrice Popineau; +Cc: emacs-orgmode@gnu.org

Fabrice Popineau <fabrice.popineau@gmail.com> writes:

> In org reference, 12.7.2, it is said that:
>
> ‘LATEX_HEADER’
> Arbitrary lines added to the preamble of the document, before the ‘hyperref’
> settings. The location can be controlled via org-latex-classes.
>
> Note the plural to lines. How can several lines be specified? AFAICS, if I
> do :
>
> :EXPORT_LATEX_HEADER: \usepackage{mathptmx} % rm & math
> :EXPORT_LATEX_HEADER: \usepackage[scaled=0.90]{helvet} % ss
>
> The second line will take precedence over the first one.

The manual reference is about keywords, i.e, #+LATEX_HEADER:. You are
using properties. The two are slightly different. 

In particular, each value from a #+LATEX_HEADER keyword becomes a new
line whereas new values from properties replace the old ones (hence the
PROP+ syntax).

Long story short: if you want multiple lines, use keywords. There is no
support in multi lines properties in Org. Moreover, the use cases are
sufficiently rare that I don't even think it is worth implementing. In
any case, such implementation should preserve the equivalence explained
before.


Regards,

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

* Re: EXPORT_LATEX_HEADER property
  2016-03-03 11:58   ` Fabrice Popineau
  2016-03-03 15:49     ` Nicolas Goaziou
@ 2016-03-03 16:16     ` Eric S Fraga
  1 sibling, 0 replies; 8+ messages in thread
From: Eric S Fraga @ 2016-03-03 16:16 UTC (permalink / raw)
  To: Fabrice Popineau; +Cc: emacs-orgmode@gnu.org

On Thursday,  3 Mar 2016 at 12:58, Fabrice Popineau wrote:

[...]

> Note the plural to lines. How can several lines be specified? AFAICS, if I
> do :
>
> :EXPORT_LATEX_HEADER: \usepackage{mathptmx} % rm & math
> :EXPORT_LATEX_HEADER: \usepackage[scaled=0.90]{helvet} % ss
>
> The second line will take precedence over the first one.

No, they all get included in the exported LaTeX.  This approach adds a
newline to the end of each header line, which is what you want.
-- 
: Eric S Fraga (0xFFFCF67D), Emacs 25.0.90.1, Org release_8.3.3-535-g7213aa

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

* Re: EXPORT_LATEX_HEADER property
  2016-03-03 15:49     ` Nicolas Goaziou
@ 2016-03-03 18:58       ` Eric S Fraga
  2016-03-03 19:17       ` Fabrice Popineau
  1 sibling, 0 replies; 8+ messages in thread
From: Eric S Fraga @ 2016-03-03 18:58 UTC (permalink / raw)
  To: Fabrice Popineau; +Cc: emacs-orgmode@gnu.org

On Thursday,  3 Mar 2016 at 16:49, Nicolas Goaziou wrote:

[...]

> The manual reference is about keywords, i.e, #+LATEX_HEADER:. You are
> using properties. The two are slightly different. 

Ah, true.  Please ignore my other email on this topic.  <blush>

-- 
: Eric S Fraga (0xFFFCF67D), Emacs 25.0.91.1, Org release_8.3.4-626-gb62d55

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

* Re: EXPORT_LATEX_HEADER property
  2016-03-03 15:49     ` Nicolas Goaziou
  2016-03-03 18:58       ` Eric S Fraga
@ 2016-03-03 19:17       ` Fabrice Popineau
  2016-03-03 21:16         ` Eric S Fraga
  1 sibling, 1 reply; 8+ messages in thread
From: Fabrice Popineau @ 2016-03-03 19:17 UTC (permalink / raw)
  To: Fabrice Popineau, emacs-orgmode@gnu.org

[-- Attachment #1: Type: text/plain, Size: 1592 bytes --]

2016-03-03 16:49 GMT+01:00 Nicolas Goaziou <mail@nicolasgoaziou.fr>:

> Fabrice Popineau <fabrice.popineau@gmail.com> writes:
>
> > In org reference, 12.7.2, it is said that:
> >
> > ‘LATEX_HEADER’
> > Arbitrary lines added to the preamble of the document, before the
> ‘hyperref’
> > settings. The location can be controlled via org-latex-classes.
> >
> > Note the plural to lines. How can several lines be specified? AFAICS, if
> I
> > do :
> >
> > :EXPORT_LATEX_HEADER: \usepackage{mathptmx} % rm & math
> > :EXPORT_LATEX_HEADER: \usepackage[scaled=0.90]{helvet} % ss
> >
> > The second line will take precedence over the first one.
>
> The manual reference is about keywords, i.e, #+LATEX_HEADER:. You are
> using properties. The two are slightly different.
>
> In particular, each value from a #+LATEX_HEADER keyword becomes a new
> line whereas new values from properties replace the old ones (hence the
> PROP+ syntax).
>

Ok, thanks for the confirmation. There is no strict equivalence in what can
be done
on a subtree and what can be done at the document level.


> Long story short: if you want multiple lines, use keywords.


I think I'll deport the LaTeX stuff into a single external file rather.


> There is no
> support in multi lines properties in Org. Moreover, the use cases are
> sufficiently rare that I don't even think it is worth implementing.


I don't know what it could look like, but rare ... Am I the only one who
has a setup
to export different subtrees from the same Org file?


Best regards,

Fabrice

[-- Attachment #2: Type: text/html, Size: 2452 bytes --]

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

* Re: EXPORT_LATEX_HEADER property
  2016-03-03 19:17       ` Fabrice Popineau
@ 2016-03-03 21:16         ` Eric S Fraga
  0 siblings, 0 replies; 8+ messages in thread
From: Eric S Fraga @ 2016-03-03 21:16 UTC (permalink / raw)
  To: Fabrice Popineau; +Cc: emacs-orgmode@gnu.org

On Thursday,  3 Mar 2016 at 20:17, Fabrice Popineau wrote:

[...]

> I don't know what it could look like, but rare ... Am I the only one
> who has a setup to export different subtrees from the same Org file?

I used to try to do this but eventually realised it was easier to have
separate files sharing an included file for general
settings...  Especially for beamer export, subtrees never quite worked
for me.  YMMV, of course.

-- 
: Eric S Fraga (0xFFFCF67D), Emacs 25.0.91.1, Org release_8.3.4-626-gb62d55

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

end of thread, other threads:[~2016-03-03 21:16 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-03-03 11:02 EXPORT_LATEX_HEADER property Fabrice Popineau
2016-03-03 11:26 ` Nicolas Goaziou
2016-03-03 11:58   ` Fabrice Popineau
2016-03-03 15:49     ` Nicolas Goaziou
2016-03-03 18:58       ` Eric S Fraga
2016-03-03 19:17       ` Fabrice Popineau
2016-03-03 21:16         ` Eric S Fraga
2016-03-03 16:16     ` Eric S Fraga

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.