Re: [O] Several questions about beamer export
Julien Cubizolles 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.
Re: [O] Several questions about beamer export
Nick Dokos 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.
Re: [O] Several questions about beamer export
Julien Cubizolles writes: > Darlan Cavalcante Moreira 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
Re: [O] Several questions about beamer export
Darlan Cavalcante Moreira 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.
Re: [O] Several questions about beamer export
Darlan Cavalcante Moreira 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
Re: [O] Several questions about beamer export
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 darc...@gmail.com ndo...@gmail.com writes: > Julien Cubizolles writes: > >> Nick Dokos writes: >> >>> Julien Cubizolles 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".
Re: [O] Several questions about beamer export
Julien Cubizolles writes: > Nick Dokos writes: > >> Julien Cubizolles 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
Re: [O] Several questions about beamer export
Nick Dokos writes: > Julien Cubizolles 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.
Re: [O] Several questions about beamer export
Hello, Nick Dokos 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
Re: [O] Several questions about beamer export
Hello, Julien Cubizolles 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
Re: [O] Several questions about beamer export
Julien Cubizolles writes: > Nick Dokos writes: > >> Julien Cubizolles 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
Re: [O] Several questions about beamer export
Julien Cubizolles 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
Re: [O] Several questions about beamer export
Nick Dokos writes: > Julien Cubizolles 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.
Re: [O] Several questions about beamer export
Julien Cubizolles 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
[O] Several questions about beamer export
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.