emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Several questions about beamer export
@ 2013-07-11 21:55 Julien Cubizolles
  2013-07-12  3:21 ` Nick Dokos
                   ` (2 more replies)
  0 siblings, 3 replies; 15+ messages in thread
From: Julien Cubizolles @ 2013-07-11 21:55 UTC (permalink / raw)
  To: emacs-orgmode

I'm trying to switch all my LaTeX needs to orgmode but I'm still
confused by several little things I could not understand in the
manual. I'm not sure what the policy is on the mailing-list, let me know
if it's best to split this message into several ones.

* What's the difference between BEAMER_ENV and BEAMER_env ?

* What is the best way to generate 
 \only<2-3>{Some text of picture} without creating a new heading ?

* Is there a shortcut/easy template to ATTR_BEAMER ? I know I could use
  a yas snippet but maybe there is already something in place.

* in LaTeX you can use \graphicspath to define the directories in which
  to look for picture files. Does org mode offer the same possibility ?

* All the headers I add end up on the same line when I define them like
  in the following (even with an empty line).

 #+LATEX_HEADER_EXTRA: \institute{My Institure}
  
 #+LATEX_HEADER:\usepackage{mypackage}

 The LaTeX file produced is not very readable. How can I produce
 linebreaks between different LATEX_HEADER entries ?

Julien.

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

* Re: Several questions about beamer export
  2013-07-11 21:55 Several questions about beamer export Julien Cubizolles
@ 2013-07-12  3:21 ` Nick Dokos
  2013-07-12  5:16   ` Julien Cubizolles
  2013-07-12  7:02 ` Nick Dokos
  2013-07-12  7:16 ` Nicolas Goaziou
  2 siblings, 1 reply; 15+ messages in thread
From: Nick Dokos @ 2013-07-12  3:21 UTC (permalink / raw)
  To: emacs-orgmode

Julien Cubizolles <j.cubizolles@free.fr> writes:

> ...
> * All the headers I add end up on the same line when I define them like
>   in the following (even with an empty line).
>
>  #+LATEX_HEADER_EXTRA: \institute{My Institure}
>   
>  #+LATEX_HEADER:\usepackage{mypackage}
>
>  The LaTeX file produced is not very readable. How can I produce
>  linebreaks between different LATEX_HEADER entries ?
>

You need to modify the code to get them: that's probably an omission
(ngz will probably respond in much more detail than I can). They are
only cosmetic of course, but if you have to have them, you can try
adding them in org-beamer-template around line 880:

	       (concat (plist-get info :latex-header)
		       "\n"                                  
		       (plist-get info :latex-header-extra)
		       "\n"
		       (plist-get info :beamer-header-extra)
		       "\n")))

The problem with this is that the newlines are added even if the
various items are empty, so you may end up with more newlines than
are necessary.
-- 
Nick

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

* Re: Several questions about beamer export
  2013-07-12  3:21 ` Nick Dokos
@ 2013-07-12  5:16   ` Julien Cubizolles
  2013-07-12  7:13     ` Nick Dokos
  0 siblings, 1 reply; 15+ messages in thread
From: Julien Cubizolles @ 2013-07-12  5:16 UTC (permalink / raw)
  To: emacs-orgmode

Nick Dokos <ndokos@gmail.com> writes:

> Julien Cubizolles <j.cubizolles@free.fr> writes:
>
>> ...
>> * All the headers I add end up on the same line when I define them like
>>   in the following (even with an empty line).
>>
>>  #+LATEX_HEADER_EXTRA: \institute{My Institure}
>>   
>>  #+LATEX_HEADER:\usepackage{mypackage}
>>
>>  The LaTeX file produced is not very readable. How can I produce
>>  linebreaks between different LATEX_HEADER entries ?
>>
>
> You need to modify the code to get them: that's probably an omission
> (ngz will probably respond in much more detail than I can). They are
> only cosmetic of course, but if you have to have them, you can try
> adding them in org-beamer-template around line 880:
>
> 	       (concat (plist-get info :latex-header)
> 		       "\n"                                  
> 		       (plist-get info :latex-header-extra)
> 		       "\n"
> 		       (plist-get info :beamer-header-extra)
> 		       "\n")))

Let's make it an improvement suggestion then: getting \usepackage{} and
\date{} commands mixed in the LaTeX file isn't very nice.

> The problem with this is that the newlines are added even if the
> various items are empty, so you may end up with more newlines than
> are necessary.

I'd personally prefer having empty lines instead of everything on the
same line.

Julien.

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

* Re: Several questions about beamer export
  2013-07-11 21:55 Several questions about beamer export Julien Cubizolles
  2013-07-12  3:21 ` Nick Dokos
@ 2013-07-12  7:02 ` Nick Dokos
  2013-07-12 15:05   ` Julien Cubizolles
  2013-07-12  7:16 ` Nicolas Goaziou
  2 siblings, 1 reply; 15+ messages in thread
From: Nick Dokos @ 2013-07-12  7:02 UTC (permalink / raw)
  To: emacs-orgmode

Julien Cubizolles <j.cubizolles@free.fr> writes:


> * in LaTeX you can use \graphicspath to define the directories in which
>   to look for picture files. Does org mode offer the same possibility ?
>

No special mechanism afaik, but there is a general one.  Did you try
adding something like

#+LATEX_HEADER: \graphicspath{{images/}}

to your org file? Whatever you specify as a LATEX_HEADER ends up in the
preamble.

-- 
Nick

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

* Re: Several questions about beamer export
  2013-07-12  5:16   ` Julien Cubizolles
@ 2013-07-12  7:13     ` Nick Dokos
  2013-07-12  7:19       ` Nicolas Goaziou
  0 siblings, 1 reply; 15+ messages in thread
From: Nick Dokos @ 2013-07-12  7:13 UTC (permalink / raw)
  To: emacs-orgmode

Julien Cubizolles <j.cubizolles@free.fr> writes:

> Nick Dokos <ndokos@gmail.com> writes:
>
>> Julien Cubizolles <j.cubizolles@free.fr> writes:
>>
>>> ...
>>> * All the headers I add end up on the same line when I define them like
>>>   in the following (even with an empty line).
>>>
>>>  #+LATEX_HEADER_EXTRA: \institute{My Institure}
>>>   
>>>  #+LATEX_HEADER:\usepackage{mypackage}
>>>
>>>  The LaTeX file produced is not very readable. How can I produce
>>>  linebreaks between different LATEX_HEADER entries ?
>>>
>>
>> You need to modify the code to get them: that's probably an omission
>> (ngz will probably respond in much more detail than I can). They are
>> only cosmetic of course, but if you have to have them, you can try
>> adding them in org-beamer-template around line 880:
>>
>> 	       (concat (plist-get info :latex-header)
>> 		       "\n"                                  
>> 		       (plist-get info :latex-header-extra)
>> 		       "\n"
>> 		       (plist-get info :beamer-header-extra)
>> 		       "\n")))
>
> Let's make it an improvement suggestion then: getting \usepackage{} and
> \date{} commands mixed in the LaTeX file isn't very nice.
>
>> The problem with this is that the newlines are added even if the
>> various items are empty, so you may end up with more newlines than
>> are necessary.
>
> I'd personally prefer having empty lines instead of everything on the
> same line.
>

While we are talking about cosmetic whitespace issues, let me also point
out that the default beamer class in ox-beamer contains unnecessary
indentation. Clearly, it's there to make the lisp code look prettier but
it makes the resulting latex code uglier. Should anybody care? Eh, I
don't know... I certainly don't feel strongly about it either way.

-- 
Nick

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

* Re: Several questions about beamer export
  2013-07-11 21:55 Several questions about beamer export Julien Cubizolles
  2013-07-12  3:21 ` Nick Dokos
  2013-07-12  7:02 ` Nick Dokos
@ 2013-07-12  7:16 ` Nicolas Goaziou
  2 siblings, 0 replies; 15+ messages in thread
From: Nicolas Goaziou @ 2013-07-12  7:16 UTC (permalink / raw)
  To: Julien Cubizolles; +Cc: emacs-orgmode

Hello,

Julien Cubizolles <j.cubizolles@free.fr> writes:

> * What's the difference between BEAMER_ENV and BEAMER_env ?

Properties are case insensitive. Therefore there is none.

> * What is the best way to generate 
>  \only<2-3>{Some text of picture} without creating a new heading ?

You can use export snippets:

  @@beamer:\only<2-3>{@@Some text of picture@@beamer:}@@

and for more readability, you can wrap this in a macro:

  #+MACRO: only @@beamer:\only$1{@@$2@@beamer:}@@

Your example becomes:

  {{{only(<2-3>,Some text of picture)}}}
>
> * Is there a shortcut/easy template to ATTR_BEAMER ? I know I could use
>   a yas snippet but maybe there is already something in place.
>
> * in LaTeX you can use \graphicspath to define the directories in which
>   to look for picture files. Does org mode offer the same possibility ?
>
> * All the headers I add end up on the same line when I define them like
>   in the following (even with an empty line).

Not all the headers are concerned. There's only a missing newline
character between the last "header" and the first "header_extra". This
should now be fixed. Thanks for reporting it.


Regards,

-- 
Nicolas Goaziou

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

* Re: Several questions about beamer export
  2013-07-12  7:13     ` Nick Dokos
@ 2013-07-12  7:19       ` Nicolas Goaziou
  0 siblings, 0 replies; 15+ messages in thread
From: Nicolas Goaziou @ 2013-07-12  7:19 UTC (permalink / raw)
  To: Nick Dokos; +Cc: emacs-orgmode

Hello,

Nick Dokos <ndokos@gmail.com> writes:

> While we are talking about cosmetic whitespace issues, let me also point
> out that the default beamer class in ox-beamer contains unnecessary
> indentation. Clearly, it's there to make the lisp code look prettier but
> it makes the resulting latex code uglier. Should anybody care? Eh, I
> don't know... I certainly don't feel strongly about it either way.

This should be fixed. Thank you.


Regards,

-- 
Nicolas Goaziou

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

* Re: Several questions about beamer export
  2013-07-12  7:02 ` Nick Dokos
@ 2013-07-12 15:05   ` Julien Cubizolles
  2013-07-12 15:16     ` Nick Dokos
  0 siblings, 1 reply; 15+ messages in thread
From: Julien Cubizolles @ 2013-07-12 15:05 UTC (permalink / raw)
  To: emacs-orgmode

Nick Dokos <ndokos@gmail.com> writes:

> Julien Cubizolles <j.cubizolles@free.fr> writes:
>
>
>> * in LaTeX you can use \graphicspath to define the directories in which
>>   to look for picture files. Does org mode offer the same possibility ?
>>
>
> No special mechanism afaik, but there is a general one.  Did you try
> adding something like
>
> #+LATEX_HEADER: \graphicspath{{images/}}

I wasn't clear enough in my question. I would like the links in orgmode
made relative to a common root defined in the preamble.

Julien.

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

* Re: Several questions about beamer export
  2013-07-12 15:05   ` Julien Cubizolles
@ 2013-07-12 15:16     ` Nick Dokos
  2013-07-12 16:45       ` Darlan Cavalcante Moreira
  0 siblings, 1 reply; 15+ messages in thread
From: Nick Dokos @ 2013-07-12 15:16 UTC (permalink / raw)
  To: emacs-orgmode

Julien Cubizolles <j.cubizolles@free.fr> writes:

> Nick Dokos <ndokos@gmail.com> writes:
>
>> Julien Cubizolles <j.cubizolles@free.fr> writes:
>>
>>
>>> * in LaTeX you can use \graphicspath to define the directories in which
>>>   to look for picture files. Does org mode offer the same possibility ?
>>>
>>
>> No special mechanism afaik, but there is a general one.  Did you try
>> adding something like
>>
>> #+LATEX_HEADER: \graphicspath{{images/}}
>
> I wasn't clear enough in my question. I would like the links in orgmode
> made relative to a common root defined in the preamble.
>

Ah, OK - I misunderstood. AFAIK, the answer is "no".

-- 
Nick

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

* Re: Several questions about beamer export
  2013-07-12 15:16     ` Nick Dokos
@ 2013-07-12 16:45       ` Darlan Cavalcante Moreira
  2013-07-12 17:14         ` Nick Dokos
  2013-07-15  9:03         ` Julien Cubizolles
  0 siblings, 2 replies; 15+ messages in thread
From: Darlan Cavalcante Moreira @ 2013-07-12 16:45 UTC (permalink / raw)
  To: Nick Dokos; +Cc: emacs-orgmode


I don't think you can change the behavior of a link type to take into
account somethink similar to graphicspath, but you can easily define
custom link types: For instance, put this in your org-file
--8<---------------cut here---------------start------------->8---
#+LINK: fig file:my_figure_path/%s
--8<---------------cut here---------------end--------------->8---

Then you will be able to You write a link such as 

--8<---------------cut here---------------start------------->8---
[[fig:some_figure.png]]
--8<---------------cut here---------------end--------------->8---


ps: Remember to do "C-c C-c" in the #+LINK line after you insert it.

-- 
Darlan Cavalcante Moreira
darcamo@gmail.com


ndokos@gmail.com writes:

> Julien Cubizolles <j.cubizolles@free.fr> writes:
>
>> Nick Dokos <ndokos@gmail.com> writes:
>>
>>> Julien Cubizolles <j.cubizolles@free.fr> writes:
>>>
>>>
>>>> * in LaTeX you can use \graphicspath to define the directories in which
>>>>   to look for picture files. Does org mode offer the same possibility ?
>>>>
>>>
>>> No special mechanism afaik, but there is a general one.  Did you try
>>> adding something like
>>>
>>> #+LATEX_HEADER: \graphicspath{{images/}}
>>
>> I wasn't clear enough in my question. I would like the links in orgmode
>> made relative to a common root defined in the preamble.
>>
>
> Ah, OK - I misunderstood. AFAIK, the answer is "no".

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

* Re: Several questions about beamer export
  2013-07-12 16:45       ` Darlan Cavalcante Moreira
@ 2013-07-12 17:14         ` Nick Dokos
  2013-07-15  9:03         ` Julien Cubizolles
  1 sibling, 0 replies; 15+ messages in thread
From: Nick Dokos @ 2013-07-12 17:14 UTC (permalink / raw)
  To: emacs-orgmode

Darlan Cavalcante Moreira <darcamo@gmail.com> writes:

> I don't think you can change the behavior of a link type to take into
> account somethink similar to graphicspath, but you can easily define
> custom link types: For instance, put this in your org-file
> #+LINK: fig file:my_figure_path/%s
>
> Then you will be able to You write a link such as 
>
> [[fig:some_figure.png]]
>
>
> ps: Remember to do "C-c C-c" in the #+LINK line after you insert it.

You know, at some point in the distant past, I think I knew this - but
it must have escaped some time ago and I never noticed.

Thanks! And just in time too: I'm preparing a presentation and I can use
this. That *might* be enough to imprint it in my memory - but I wouldn't
be too sure...

-- 
Nick

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

* Re: Several questions about beamer export
  2013-07-12 16:45       ` Darlan Cavalcante Moreira
  2013-07-12 17:14         ` Nick Dokos
@ 2013-07-15  9:03         ` Julien Cubizolles
  2013-07-15 13:05           ` Nick Dokos
  1 sibling, 1 reply; 15+ messages in thread
From: Julien Cubizolles @ 2013-07-15  9:03 UTC (permalink / raw)
  To: emacs-orgmode

Darlan Cavalcante Moreira <darcamo@gmail.com> writes:

> I don't think you can change the behavior of a link type to take into
> account somethink similar to graphicspath, but you can easily define
> custom link types: For instance, put this in your org-file
> #+LINK: fig file:my_figure_path/%s
>
> Then you will be able to You write a link such as 
>
> [[fig:some_figure.png]]

It looks perfect, unfortunately, I can't get it to work:

#+LINK: fig file:/home/wilk/enseignement/doc_cours/optique/%s

[[fig:test.jpg]]
[[file:/home/wilk/enseignement/doc_cours/optique/test.jpg]]

The second one gives a picture, the first one doesn't. I'm running a
fairly recent git pull of org-mode, and this possibility is described in
its info file.

> ps: Remember to do "C-c C-c" in the #+LINK line after you insert it.

I was just about to ask about it, thanks !

Julien.

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

* Re: Several questions about beamer export
  2013-07-15  9:03         ` Julien Cubizolles
@ 2013-07-15 13:05           ` Nick Dokos
  2013-07-15 19:58             ` Julien Cubizolles
  0 siblings, 1 reply; 15+ messages in thread
From: Nick Dokos @ 2013-07-15 13:05 UTC (permalink / raw)
  To: emacs-orgmode

Julien Cubizolles <j.cubizolles@free.fr> writes:

> Darlan Cavalcante Moreira <darcamo@gmail.com> writes:
>
>> I don't think you can change the behavior of a link type to take into
>> account somethink similar to graphicspath, but you can easily define
>> custom link types: For instance, put this in your org-file
>> #+LINK: fig file:my_figure_path/%s
>>
>> Then you will be able to You write a link such as 
>>
>> [[fig:some_figure.png]]
>
> It looks perfect, unfortunately, I can't get it to work:
>
> #+LINK: fig file:/home/wilk/enseignement/doc_cours/optique/%s
>
> [[fig:test.jpg]]
> [[file:/home/wilk/enseignement/doc_cours/optique/test.jpg]]
>
> The second one gives a picture, the first one doesn't. I'm running a
> fairly recent git pull of org-mode, and this possibility is described in
> its info file.
>

It works fine here. The relevant function is org-link-expand-abbrev and
it depends on the variables org-link-abbrev-alist and
org-link-abbrev-alist-local.  The latter gets initialized from the
former and any #+LINK lines in the buffer are added on to it. In my
case, the first one is nil, so the second one is affected only by the
#+LINK lines in the org buffer. In the context of the org buffer
containing the link line, check that the variable is set:

        C-h v org-link-abbrev-alist-alist-local RET

should say that the variable has the value

  (("fig" . "file:/home/wilk/enseignement/doc_cours/optique/%s"))

If that is the case, then again in the context of the buffer,
doing

    ESC ESC : (org-link-expand-abbrev "fig:test.jpg") RET

should return the expanded value

    "file:/home/wilk/enseignement/doc_cours/optique/test.jpg"

Hope this helps to track it down.

>> ps: Remember to do "C-c C-c" in the #+LINK line after you insert it.
>
> I was just about to ask about it, thanks !
>

Closing and reopening the file should take care of the initialization
as well.

-- 
Nick

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

* Re: Several questions about beamer export
  2013-07-15 13:05           ` Nick Dokos
@ 2013-07-15 19:58             ` Julien Cubizolles
  2013-09-03  8:31               ` Julien Cubizolles
  0 siblings, 1 reply; 15+ messages in thread
From: Julien Cubizolles @ 2013-07-15 19:58 UTC (permalink / raw)
  To: emacs-orgmode

Nick Dokos <ndokos@gmail.com> writes:


> It works fine here. The relevant function is org-link-expand-abbrev and
> it depends on the variables org-link-abbrev-alist and
> org-link-abbrev-alist-local.  The latter gets initialized from the
> former and any #+LINK lines in the buffer are added on to it. In my
> case, the first one is nil, so the second one is affected only by the
> #+LINK lines in the org buffer. In the context of the org buffer
> containing the link line, check that the variable is set:
>
>         C-h v org-link-abbrev-alist-alist-local RET

It's weird, both variables (org-link-abbrev-alist and
org-link-abbrev-alist-local) are nil even though there is a #+LINK: line
in the file.

> Closing and reopening the file should take care of the initialization
> as well.

I tried that also.

Julien.

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

* Re: Several questions about beamer export
  2013-07-15 19:58             ` Julien Cubizolles
@ 2013-09-03  8:31               ` Julien Cubizolles
  0 siblings, 0 replies; 15+ messages in thread
From: Julien Cubizolles @ 2013-09-03  8:31 UTC (permalink / raw)
  To: emacs-orgmode

Julien Cubizolles <j.cubizolles@free.fr> writes:

> It's weird, both variables (org-link-abbrev-alist and
> org-link-abbrev-alist-local) are nil even though there is a #+LINK: line
> in the file.

Just a late closing message: I tried again today and everything is
working as it should.

Julien.

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

end of thread, other threads:[~2013-09-03 16:41 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-07-11 21:55 Several questions about beamer export Julien Cubizolles
2013-07-12  3:21 ` Nick Dokos
2013-07-12  5:16   ` Julien Cubizolles
2013-07-12  7:13     ` Nick Dokos
2013-07-12  7:19       ` Nicolas Goaziou
2013-07-12  7:02 ` Nick Dokos
2013-07-12 15:05   ` Julien Cubizolles
2013-07-12 15:16     ` Nick Dokos
2013-07-12 16:45       ` Darlan Cavalcante Moreira
2013-07-12 17:14         ` Nick Dokos
2013-07-15  9:03         ` Julien Cubizolles
2013-07-15 13:05           ` Nick Dokos
2013-07-15 19:58             ` Julien Cubizolles
2013-09-03  8:31               ` Julien Cubizolles
2013-07-12  7:16 ` Nicolas Goaziou

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