emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Per-backend export options?
@ 2015-07-06  8:58 tomas
  2015-07-06  9:32 ` Rasmus
  0 siblings, 1 reply; 6+ messages in thread
From: tomas @ 2015-07-06  8:58 UTC (permalink / raw)
  To: emacs-orgmode

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi,

it must be in the fine manual. But after wandering there without a good
idea on how to find that...

What I'm trying to do is to suppress footnotes in Beamer export, and
keep them in PDF export.

Suppressing the footnotes is easy enough:

  #+OPTIONS: f:nil [... possibly other options ...]

Can I do that in a way that the value depends on backend? I.e. f:nil
for beamer and f:t for latex/pdf?

Thanks for any hints
- -- t
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (GNU/Linux)

iEYEARECAAYFAlWaQx4ACgkQBcgs9XrR2kY99ACff0BrSXEMSL7zGkx075WD/kXL
ql4AmQEH64rzQh6FFtpW3tb8Ggt2iYyR
=ANuG
-----END PGP SIGNATURE-----

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

* Re: Per-backend export options?
  2015-07-06  8:58 Per-backend export options? tomas
@ 2015-07-06  9:32 ` Rasmus
  2015-07-06 10:07   ` tomas
  2015-07-06 14:16   ` tomas
  0 siblings, 2 replies; 6+ messages in thread
From: Rasmus @ 2015-07-06  9:32 UTC (permalink / raw)
  To: emacs-orgmode

Hi,

<tomas@tuxteam.de> writes:

> it must be in the fine manual. But after wandering there without a good
> idea on how to find that...
>
> What I'm trying to do is to suppress footnotes in Beamer export, and
> keep them in PDF export.
>
> Suppressing the footnotes is easy enough:
>
>   #+OPTIONS: f:nil [... possibly other options ...]
>
> Can I do that in a way that the value depends on backend? I.e. f:nil
> for beamer and f:t for latex/pdf?

I'd use a macro for this.  E.g.

#+MACRO: dvipng-if-odt (eval (if (org-export-derived-backend-p org-export-current-backend 'odt) "#+OPTIONS: tex:dvipng" ))

Rasmus

-- 
Summon the Mothership!

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

* Re: Per-backend export options?
  2015-07-06  9:32 ` Rasmus
@ 2015-07-06 10:07   ` tomas
  2015-07-06 14:16   ` tomas
  1 sibling, 0 replies; 6+ messages in thread
From: tomas @ 2015-07-06 10:07 UTC (permalink / raw)
  To: Rasmus; +Cc: emacs-orgmode

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Mon, Jul 06, 2015 at 11:32:21AM +0200, Rasmus wrote:
> Hi,
> 
> <tomas@tuxteam.de> writes:
> 
[...]

> >   #+OPTIONS: f:nil [... possibly other options ...]
> >
> > Can I do that in a way that the value depends on backend? [...]

> I'd use a macro for this.  E.g.
> 
> #+MACRO: dvipng-if-odt (eval (if (org-export-derived-backend-p org-export-current-backend 'odt) "#+OPTIONS: tex:dvipng" ))

Thanks!

regards
- -- t
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (GNU/Linux)

iEYEARECAAYFAlWaU1QACgkQBcgs9XrR2kYmSQCcCSzHFLx+lkegXQ/udthbmmgH
YrUAnjfNrfwMMrzduMqv9WVSnuXiGeDh
=yQU0
-----END PGP SIGNATURE-----

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

* Re: Per-backend export options?
  2015-07-06  9:32 ` Rasmus
  2015-07-06 10:07   ` tomas
@ 2015-07-06 14:16   ` tomas
       [not found]     ` <CAE+_6TzaTv0COwEkPrOrB8K_4sTFrU2rT7mxBHjhJ5iRRTPLrA@mail.gmail.com>
  1 sibling, 1 reply; 6+ messages in thread
From: tomas @ 2015-07-06 14:16 UTC (permalink / raw)
  To: Rasmus; +Cc: emacs-orgmode

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Mon, Jul 06, 2015 at 11:32:21AM +0200, Rasmus wrote:
[...]
> I'd use a macro for this.  E.g.

Works like a charm now :-)

- -- t
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (GNU/Linux)

iEYEARECAAYFAlWaja4ACgkQBcgs9XrR2kaEzgCfbM0McF+Yi3sR1prWI8ix1cpu
pTIAn0PQumh5sUJmE4UBQm9OFd8Nc/CV
=z5tl
-----END PGP SIGNATURE-----

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

* Re: Per-backend export options?
       [not found]     ` <CAE+_6TzaTv0COwEkPrOrB8K_4sTFrU2rT7mxBHjhJ5iRRTPLrA@mail.gmail.com>
@ 2015-08-20  3:45       ` Jay Dixit
  2015-08-20  5:43         ` tomas
  0 siblings, 1 reply; 6+ messages in thread
From: Jay Dixit @ 2015-08-20  3:45 UTC (permalink / raw)
  To: tomas; +Cc: org-mode, Rasmus

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

I do something similar to change export options between HTML and LaTeX:

(defun my-org-export-change-options (plist backend)
  (cond
   ((equal backend 'html)
    (plist-put plist :with-toc nil)
    (plist-put plist :section-numbers nil))
   ((equal backend 'latex)
    (plist-put plist :with-toc t)
    (plist-put plist :section-numbers t)))
  plist)
(add-to-list 'org-export-filter-options-functions
'my-org-export-change-options)



---
Jay Dixit
jaydixit.com
(646) 355-8001
Jay Dixit


On Mon, Jul 6, 2015 at 10:16 AM, <tomas@tuxteam.de> wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> On Mon, Jul 06, 2015 at 11:32:21AM +0200, Rasmus wrote:
> [...]
> > I'd use a macro for this.  E.g.
>
> Works like a charm now :-)
>
> - -- t
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.12 (GNU/Linux)
>
> iEYEARECAAYFAlWaja4ACgkQBcgs9XrR2kaEzgCfbM0McF+Yi3sR1prWI8ix1cpu
> pTIAn0PQumh5sUJmE4UBQm9OFd8Nc/CV
> =z5tl
> -----END PGP SIGNATURE-----
>
>
>

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

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

* Re: Per-backend export options?
  2015-08-20  3:45       ` Jay Dixit
@ 2015-08-20  5:43         ` tomas
  0 siblings, 0 replies; 6+ messages in thread
From: tomas @ 2015-08-20  5:43 UTC (permalink / raw)
  To: Jay Dixit; +Cc: tomas, org-mode, Rasmus

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Wed, Aug 19, 2015 at 11:45:37PM -0400, Jay Dixit wrote:
> I do something similar to change export options between HTML and LaTeX:
> 
> (defun my-org-export-change-options (plist backend)
>   (cond
>    ((equal backend 'html)
>     (plist-put plist :with-toc nil)
>     (plist-put plist :section-numbers nil))
>    ((equal backend 'latex)
>     (plist-put plist :with-toc t)
>     (plist-put plist :section-numbers t)))
>   plist)
> (add-to-list 'org-export-filter-options-functions
> 'my-org-export-change-options)

Thanks!

this one has the charm of being a more centralized solution.

While the macro thingie does the trick for me (for now), I'll give
it a try.

Regards
- -- tomás
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (GNU/Linux)

iEYEARECAAYFAlXVaR0ACgkQBcgs9XrR2kaBCgCeJnYBnUtZmYI9mt7hsKLaPsuv
n50An3o03vZWGIihXhQfM8/e6WFeb5AA
=UY8i
-----END PGP SIGNATURE-----

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

end of thread, other threads:[~2015-08-20  5:44 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-07-06  8:58 Per-backend export options? tomas
2015-07-06  9:32 ` Rasmus
2015-07-06 10:07   ` tomas
2015-07-06 14:16   ` tomas
     [not found]     ` <CAE+_6TzaTv0COwEkPrOrB8K_4sTFrU2rT7mxBHjhJ5iRRTPLrA@mail.gmail.com>
2015-08-20  3:45       ` Jay Dixit
2015-08-20  5:43         ` tomas

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