* cannot export to beamer.
@ 2018-12-15 17:38 Uwe Brauer
2018-12-15 17:49 ` Ken Mankoff
2018-12-15 18:14 ` Josiah Schwab
0 siblings, 2 replies; 18+ messages in thread
From: Uwe Brauer @ 2018-12-15 17:38 UTC (permalink / raw)
To: emacs-orgmode
Hi
I am very used to the beamer style and it works on my machine quite
well.
Now I took the example
https://orgmode.org/manual/A-Beamer-example.html#A-Beamer-example
And wanted to export it to beamer but obtained the message
user-error: Unknown LaTeX class ‘beamer’
Which leaves me puzzled.
I am running Ubuntu 16.04 and have installed the latest org form master.
GNU Emacs master as well.
Any ideas?
Uwe Brauer
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: cannot export to beamer.
2018-12-15 17:38 cannot export to beamer Uwe Brauer
@ 2018-12-15 17:49 ` Ken Mankoff
2018-12-15 17:54 ` Uwe Brauer
2018-12-15 18:14 ` Josiah Schwab
1 sibling, 1 reply; 18+ messages in thread
From: Ken Mankoff @ 2018-12-15 17:49 UTC (permalink / raw)
To: Uwe Brauer; +Cc: emacs-orgmode
On 2018-12-15 at 09:38 -0800, Uwe Brauer <oub@mat.ucm.es> wrote:
> I am very used to the beamer style and it works on my machine quite
> well.
But it doesn't work quiet well according to this email. What changed? Are you on a new machine? Is LaTeX installed?
> Now I took the example
> https://orgmode.org/manual/A-Beamer-example.html#A-Beamer-example
>
> And wanted to export it to beamer but obtained the message
> user-error: Unknown LaTeX class ‘beamer’
>
> Which leaves me puzzled.
I'm using Org -> Beamer. I don't know it well, but on my system I do not have
#+LATEX_CLASS: beamer
I do have
#+STARTUP: beamer
However, the example you linked to works fine with for me with either of those settings.
-k.
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: cannot export to beamer.
2018-12-15 17:49 ` Ken Mankoff
@ 2018-12-15 17:54 ` Uwe Brauer
2018-12-17 14:20 ` Nick Dokos
0 siblings, 1 reply; 18+ messages in thread
From: Uwe Brauer @ 2018-12-15 17:54 UTC (permalink / raw)
To: emacs-orgmode
[-- Attachment #1: Type: text/plain, Size: 1271 bytes --]
>>> "Ken" == Ken Mankoff <mankoff@gmail.com> writes:
> On 2018-12-15 at 09:38 -0800, Uwe Brauer <oub@mat.ucm.es> wrote:
>> I am very used to the beamer style and it works on my machine quite
>> well.
> But it doesn't work quiet well according to this email. What
> changed? Are you on a new machine? Is LaTeX installed?
I don't understand. When I create (using emacs and auctex) a beamer
document I can compile it without problem.
What does not work is exporting the example org file to a working latex
(beamer) file.
It seems that I have to set up, manually (sigh!)
Org-latex-classes. That is quite annoying I thought the beamer class
would be included.
>> Now I took the example
>> https://orgmode.org/manual/A-Beamer-example.html#A-Beamer-example
>>
>> And wanted to export it to beamer but obtained the message
>> user-error: Unknown LaTeX class ‘beamer’
>>
>> Which leaves me puzzled.
> I'm using Org -> Beamer. I don't know it well, but on my system I do not have
> #+LATEX_CLASS: beamer
> I do have
> #+STARTUP: beamer
> However, the example you linked to works fine with for me with either of those settings.
I will try that
> -k.
Uwe
[-- Attachment #2: smime.p7s --]
[-- Type: application/pkcs7-signature, Size: 5025 bytes --]
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: cannot export to beamer.
2018-12-15 17:38 cannot export to beamer Uwe Brauer
2018-12-15 17:49 ` Ken Mankoff
@ 2018-12-15 18:14 ` Josiah Schwab
2018-12-15 18:48 ` Colin Baxter
` (2 more replies)
1 sibling, 3 replies; 18+ messages in thread
From: Josiah Schwab @ 2018-12-15 18:14 UTC (permalink / raw)
To: emacs-orgmode
Hi Uwe,
> Now I took the example
> https://orgmode.org/manual/A-Beamer-example.html#A-Beamer-example
>
> And wanted to export it to beamer but obtained the message
> user-error: Unknown LaTeX class ‘beamer’
This sounds to me like you are using the latex exporter, rather than the
beamer one.
After
(require 'ox-beamer)
then
C-c C-e l b
works well on the example for me.
Josiah
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: cannot export to beamer.
2018-12-15 18:14 ` Josiah Schwab
@ 2018-12-15 18:48 ` Colin Baxter
2018-12-15 19:30 ` Uwe Brauer
2018-12-15 20:43 ` Uwe Brauer
2 siblings, 0 replies; 18+ messages in thread
From: Colin Baxter @ 2018-12-15 18:48 UTC (permalink / raw)
To: Josiah Schwab; +Cc: emacs-orgmode
>>>>> Josiah Schwab <jschwab@gmail.com> writes:
>> Now I took the example
>> https://orgmode.org/manual/A-Beamer-example.html#A-Beamer-example
>>
>> And wanted to export it to beamer but obtained the message
>> user-error: Unknown LaTeX class ‘beamer’
> This sounds to me like you are using the latex exporter, rather
> than the beamer one.
> After
> (require 'ox-beamer)
I don't have this, only ox-latex - which appears to be sufficient. I can
export the example no problem.
Best wishes,
Colin Baxter
m43cap@yandex.com
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: cannot export to beamer.
2018-12-15 18:14 ` Josiah Schwab
2018-12-15 18:48 ` Colin Baxter
@ 2018-12-15 19:30 ` Uwe Brauer
2018-12-15 20:43 ` Uwe Brauer
2 siblings, 0 replies; 18+ messages in thread
From: Uwe Brauer @ 2018-12-15 19:30 UTC (permalink / raw)
To: emacs-orgmode
[-- Attachment #1: Type: text/plain, Size: 1054 bytes --]
>>> "Josiah" == Josiah Schwab <jschwab@gmail.com> writes:
> Hi Uwe,
>> Now I took the example
>> https://orgmode.org/manual/A-Beamer-example.html#A-Beamer-example
>>
>> And wanted to export it to beamer but obtained the message
>> user-error: Unknown LaTeX class ‘beamer’
> This sounds to me like you are using the latex exporter, rather than the
> beamer one.
> After
> (require 'ox-beamer)
I have this set.
> then
> C-c C-e l b
> works well on the example for me.
Not for me.
I have to open ox-beamer and go to
(unless (assoc "beamer" org-latex-classes)
(add-to-list 'org-latex-classes
'("beamer"
"\\documentclass[presentation]{beamer}"
("\\section{%s}" . "\\section*{%s}")
("\\subsection{%s}" . "\\subsection*{%s}")
("\\subsubsection{%s}" . "\\subsubsection*{%s}"))))
And run eval-last-sexp
Then it works.
So there is something fundamentally wrong here.
As I said I am using the latest org/emacs master.
Sounds like a bug
[-- Attachment #2: smime.p7s --]
[-- Type: application/pkcs7-signature, Size: 5025 bytes --]
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: cannot export to beamer.
2018-12-15 18:14 ` Josiah Schwab
2018-12-15 18:48 ` Colin Baxter
2018-12-15 19:30 ` Uwe Brauer
@ 2018-12-15 20:43 ` Uwe Brauer
2018-12-16 10:25 ` Eric S Fraga
2 siblings, 1 reply; 18+ messages in thread
From: Uwe Brauer @ 2018-12-15 20:43 UTC (permalink / raw)
To: emacs-orgmode
[-- Attachment #1: Type: text/plain, Size: 2075 bytes --]
>>> "Josiah" == Josiah Schwab <jschwab@gmail.com> writes:
> Hi Uwe,
>> Now I took the example
>> https://orgmode.org/manual/A-Beamer-example.html#A-Beamer-example
>>
>> And wanted to export it to beamer but obtained the message
>> user-error: Unknown LaTeX class ‘beamer’
> This sounds to me like you are using the latex exporter, rather than the
> beamer one.
> After
> (require 'ox-beamer)
My problem can be caused that I have used custom to add the exam class.
So my relevant custom entries looks like
'(org-latex-classes
'(("article" "\\documentclass[12pt]{article}"
("\\section{%s}" . "\\section*{%s}")
("\\subsection{%s}" . "\\subsection*{%s}")
("\\subsubsection{%s}" . "\\subsubsection*{%s}")
("\\paragraph{%s}" . "\\paragraph*{%s}")
("\\subparagraph{%s}" . "\\subparagraph*{%s}"))
("report" "\\documentclass[12pt]{report}"
("\\part{%s}" . "\\part*{%s}")
("\\chapter{%s}" . "\\chapter*{%s}")
("\\section{%s}" . "\\section*{%s}")
("\\subsection{%s}" . "\\subsection*{%s}")
("\\subsubsection{%s}" . "\\subsubsection*{%s}"))
("book" "\\documentclass[12pt]{book}"
("\\part{%s}" . "\\part*{%s}")
("\\chapter{%s}" . "\\chapter*{%s}")
("\\section{%s}" . "\\section*{%s}")
("\\subsection{%s}" . "\\subsection*{%s}")
("\\subsubsection{%s}" . "\\subsubsection*{%s}"))
("exam" "\\documentclass[12pt, addpoints, answers]{exam}"
("\\begin{questions}%%%s" "\\end{questions}" "\\begin{questions}%%%s" "\\end{questions}")
("\\titledquestion{%s}" . "")
("\\begin{parts}%%%s" "\\end{parts}" "\\begin{parts}%%%s" "\\end{parts}")
("\\part[%s] " . "")
("\\begin{subparts}%%%s" "\\end{subparts}" "\\begin{subparts}%%%s" "\\end{subparts}")
("\\subpart[%s] " . "")
("\\begin{solution}[%s]" "\\end{solution}" "\\begin{solution}[%s]" "\\end{solution}"))))
But heck, this is what custom is for!
If I don't figure it out I will send a bug report.
[-- Attachment #2: smime.p7s --]
[-- Type: application/pkcs7-signature, Size: 5025 bytes --]
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: cannot export to beamer.
2018-12-15 20:43 ` Uwe Brauer
@ 2018-12-16 10:25 ` Eric S Fraga
2018-12-16 18:16 ` Uwe Brauer
0 siblings, 1 reply; 18+ messages in thread
From: Eric S Fraga @ 2018-12-16 10:25 UTC (permalink / raw)
To: emacs-orgmode
Can you be explicit about how you are exporting to beamer and what
version of org you are using? What happens if you start emacs with -Q?
For me, all I require is to have (require 'ox-beamer) and then I can
export with "C-c C-e l O", having started emacs with -Q.
--
Eric S Fraga via Emacs 27.0.50, Org release_9.1.14-1035-gfeb442
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: cannot export to beamer.
2018-12-16 10:25 ` Eric S Fraga
@ 2018-12-16 18:16 ` Uwe Brauer
2018-12-16 19:21 ` Tim Cross
` (2 more replies)
0 siblings, 3 replies; 18+ messages in thread
From: Uwe Brauer @ 2018-12-16 18:16 UTC (permalink / raw)
To: emacs-orgmode
[-- Attachment #1: Type: text/plain, Size: 2420 bytes --]
>>> "Eric" == Eric S Fraga <esflists@gmail.com> writes:
> Can you be explicit about how you are exporting to beamer
Either
C-c C-e l l
Or
C-c C-e l o
> and what version of org you are using?
The latest master version
commit adec504d5ba3f2089cb689ce5a59692a8ebf6735
> What happens if you start emacs with -Q?
Then both commands do work (even I do not need 'ox-beamer)
So the problem is in my init file and I am quite sure that it has to do
with the following lines in my custom- file
'(org-latex-classes
'(("article" "\\documentclass[12pt]{article}"
("\\section{%s}" . "\\section*{%s}")
("\\subsection{%s}" . "\\subsection*{%s}")
("\\subsubsection{%s}" . "\\subsubsection*{%s}")
("\\paragraph{%s}" . "\\paragraph*{%s}")
("\\subparagraph{%s}" . "\\subparagraph*{%s}"))
("report" "\\documentclass[12pt]{report}"
("\\part{%s}" . "\\part*{%s}")
("\\chapter{%s}" . "\\chapter*{%s}")
("\\section{%s}" . "\\section*{%s}")
("\\subsection{%s}" . "\\subsection*{%s}")
("\\subsubsection{%s}" . "\\subsubsection*{%s}"))
("book" "\\documentclass[12pt]{book}"
("\\part{%s}" . "\\part*{%s}")
("\\chapter{%s}" . "\\chapter*{%s}")
("\\section{%s}" . "\\section*{%s}")
("\\subsection{%s}" . "\\subsection*{%s}")
("\\subsubsection{%s}" . "\\subsubsection*{%s}"))
("exam" "\\documentclass[12pt, addpoints, answers]{exam}"
("\\begin{questions}%%%s" "\\end{questions}" "\\begin{questions}%%%s" "\\end{questions}")
("\\titledquestion{%s}" . "")
("\\begin{parts}%%%s" "\\end{parts}" "\\begin{parts}%%%s" "\\end{parts}")
("\\part[%s] " . "")
("\\begin{subparts}%%%s" "\\end{subparts}" "\\begin{subparts}%%%s" "\\end{subparts}")
("\\subpart[%s] " . "")
("\\begin{solution}[%s]" "\\end{solution}" "\\begin{solution}[%s]"
"\\end{solution}"))))
I have them because I wanted to add the latex exam class and that is
what custom is for. For some bizarre reason
The code
(unless (assoc "beamer" org-latex-classes)
(add-to-list 'org-latex-classes
'("beamer"
"\\documentclass[presentation]{beamer}"
("\\section{%s}" . "\\section*{%s}")
("\\subsection{%s}" . "\\subsection*{%s}")
("\\subsubsection{%s}" . "\\subsubsection*{%s}"))))
In ox-beamer
Is ignored. It looks like a bug to me.
[-- Attachment #2: smime.p7s --]
[-- Type: application/pkcs7-signature, Size: 5025 bytes --]
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: cannot export to beamer.
2018-12-16 18:16 ` Uwe Brauer
@ 2018-12-16 19:21 ` Tim Cross
2018-12-16 21:01 ` Uwe Brauer
2018-12-16 19:46 ` Ken Mankoff
2018-12-16 22:37 ` Eric S Fraga
2 siblings, 1 reply; 18+ messages in thread
From: Tim Cross @ 2018-12-16 19:21 UTC (permalink / raw)
To: Uwe Brauer; +Cc: emacs-orgmode
Just a shot in the dark here .....
You mentioned you used custom to modify the org-latex-classes
variable. Does the code in the custom 'block' of your init file have
beamer as one of the classes? My suspicion is that when you added your
exam class, for some reason, beamer had not been loaded and was not yet
in the variable definition. When you edited it to add your exam class it
has saved a version without beamer as a class.
When you start emacs, with the new init and run order, the code
> (unless (assoc "beamer" org-latex-classes)
> (add-to-list 'org-latex-classes
> '("beamer"
> "\\documentclass[presentation]{beamer}"
> ("\\section{%s}" . "\\section*{%s}")
> ("\\subsection{%s}" . "\\subsection*{%s}")
> ("\\subsubsection{%s}" . "\\subsubsection*{%s}"))))
is executed and beamer is added, but then your custom settings are
evaluated and the variable is reset with the version you added the exam
class to, which has no beamer entry, is used to reset the variable and
the beamer setting is lost.
My guess is that at the time you customized the variable, beamer was not
loaded and so the beamer class was not added. Now, when you start emacs,
beamer is being loaded before your custom block is evaluated and your
customisation is overriding the value added by beamer when it is loaded.
There are numerous reasons why this might occur. It may simply be
something subtle arising from the new load order (for example,
previously, such a value may have been fine as your custom settings
would be loaded before the ox-beamer library, but now the library is
being loaded first and then custom settings?). This could be likely if
you are using a custom block saved with an earlier version of emacs.
I would start by deleting the org-latex-classes customization and try
adding it again to see if that fixes the problem. This is one reason I
rarely use customise - I prefer to have the code in my own init file so
that I can see exactly when everything is run.
Tim
>>>> "Eric" == Eric S Fraga <esflists@gmail.com> writes:
>
> > Can you be explicit about how you are exporting to beamer
>
> Either
>
> C-c C-e l l
>
> Or
>
> C-c C-e l o
>
> > and what version of org you are using?
>
> The latest master version
> commit adec504d5ba3f2089cb689ce5a59692a8ebf6735
> > What happens if you start emacs with -Q?
>
> Then both commands do work (even I do not need 'ox-beamer)
>
> So the problem is in my init file and I am quite sure that it has to do
> with the following lines in my custom- file
>
> '(org-latex-classes
> '(("article" "\\documentclass[12pt]{article}"
> ("\\section{%s}" . "\\section*{%s}")
> ("\\subsection{%s}" . "\\subsection*{%s}")
> ("\\subsubsection{%s}" . "\\subsubsection*{%s}")
> ("\\paragraph{%s}" . "\\paragraph*{%s}")
> ("\\subparagraph{%s}" . "\\subparagraph*{%s}"))
> ("report" "\\documentclass[12pt]{report}"
> ("\\part{%s}" . "\\part*{%s}")
> ("\\chapter{%s}" . "\\chapter*{%s}")
> ("\\section{%s}" . "\\section*{%s}")
> ("\\subsection{%s}" . "\\subsection*{%s}")
> ("\\subsubsection{%s}" . "\\subsubsection*{%s}"))
> ("book" "\\documentclass[12pt]{book}"
> ("\\part{%s}" . "\\part*{%s}")
> ("\\chapter{%s}" . "\\chapter*{%s}")
> ("\\section{%s}" . "\\section*{%s}")
> ("\\subsection{%s}" . "\\subsection*{%s}")
> ("\\subsubsection{%s}" . "\\subsubsection*{%s}"))
> ("exam" "\\documentclass[12pt, addpoints, answers]{exam}"
> ("\\begin{questions}%%%s" "\\end{questions}" "\\begin{questions}%%%s" "\\end{questions}")
> ("\\titledquestion{%s}" . "")
> ("\\begin{parts}%%%s" "\\end{parts}" "\\begin{parts}%%%s" "\\end{parts}")
> ("\\part[%s] " . "")
> ("\\begin{subparts}%%%s" "\\end{subparts}" "\\begin{subparts}%%%s" "\\end{subparts}")
> ("\\subpart[%s] " . "")
> ("\\begin{solution}[%s]" "\\end{solution}" "\\begin{solution}[%s]"
> "\\end{solution}"))))
>
> I have them because I wanted to add the latex exam class and that is
> what custom is for. For some bizarre reason
>
> The code
> (unless (assoc "beamer" org-latex-classes)
> (add-to-list 'org-latex-classes
> '("beamer"
> "\\documentclass[presentation]{beamer}"
> ("\\section{%s}" . "\\section*{%s}")
> ("\\subsection{%s}" . "\\subsection*{%s}")
> ("\\subsubsection{%s}" . "\\subsubsection*{%s}"))))
>
> In ox-beamer
>
> Is ignored. It looks like a bug to me.
--
Tim Cross
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: cannot export to beamer.
2018-12-16 18:16 ` Uwe Brauer
2018-12-16 19:21 ` Tim Cross
@ 2018-12-16 19:46 ` Ken Mankoff
2018-12-16 21:11 ` Uwe Brauer
2018-12-16 22:37 ` Eric S Fraga
2 siblings, 1 reply; 18+ messages in thread
From: Ken Mankoff @ 2018-12-16 19:46 UTC (permalink / raw)
To: Uwe Brauer; +Cc: emacs-orgmode
On 2018-12-16 at 10:16 -0800, Uwe Brauer <oub@mat.ucm.es> wrote:
> So the problem is in my init file and I am quite sure that it has to
> do with the following lines in my custom- file
>
> '(org-latex-classes
What is the full line here? Is this a "setq"?
I have:
(add-to-list 'org-latex-classes
`("copernicus"
"\\documentclass{copernicus}
[NO-DEFAULT-PACKAGES]
[NO-PACKAGES]...
At it doesn't damage the existing setup, juts adds to it...
-k.
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: cannot export to beamer.
2018-12-16 19:21 ` Tim Cross
@ 2018-12-16 21:01 ` Uwe Brauer
2018-12-16 21:36 ` Tim Cross
0 siblings, 1 reply; 18+ messages in thread
From: Uwe Brauer @ 2018-12-16 21:01 UTC (permalink / raw)
To: emacs-orgmode
[-- Attachment #1: Type: text/plain, Size: 1837 bytes --]
>>> "Tim" == Tim Cross <theophilusx@gmail.com> writes:
> Just a shot in the dark here .....
> You mentioned you used custom to modify the org-latex-classes
> variable. Does the code in the custom 'block' of your init file have
> beamer as one of the classes?
No it does not and this turns out a problem, also I thought the
ox-beamer code contains a add-to-list which should do add beamer, but it
seems not to do it.
> My suspicion is that when you added your exam class, for some
> reason, beamer had not been loaded and was not yet in the variable
> definition. When you edited it to add your exam class it has saved
> a version without beamer as a class.
> When you start emacs, with the new init and run order, the code
>> (unless (assoc "beamer" org-latex-classes)
>> (add-to-list 'org-latex-classes
>> '("beamer"
>> "\\documentclass[presentation]{beamer}"
>> ("\\section{%s}" . "\\section*{%s}")
>> ("\\subsection{%s}" . "\\subsection*{%s}")
>> ("\\subsubsection{%s}" . "\\subsubsection*{%s}"))))
> is executed and beamer is added, but then your custom settings are
> evaluated and the variable is reset with the version you added the exam
> class to, which has no beamer entry, is used to reset the variable and
> the beamer setting is lost.
What you say makes send but this seems to defy the whole idea of custom!
> I would start by deleting the org-latex-classes customization and try
> adding it again to see if that fixes the problem. This is one reason I
> rarely use customise - I prefer to have the code in my own init file so
> that I can see exactly when everything is run.
Thanks! I will do that and you are very right about custom, it is very
convenient but buggier than I thought.
Uwe
[-- Attachment #2: smime.p7s --]
[-- Type: application/pkcs7-signature, Size: 5025 bytes --]
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: cannot export to beamer.
2018-12-16 19:46 ` Ken Mankoff
@ 2018-12-16 21:11 ` Uwe Brauer
0 siblings, 0 replies; 18+ messages in thread
From: Uwe Brauer @ 2018-12-16 21:11 UTC (permalink / raw)
To: emacs-orgmode
[-- Attachment #1: Type: text/plain, Size: 427 bytes --]
>>> "Ken" == Ken Mankoff <mankoff@gmail.com> writes:
> On 2018-12-16 at 10:16 -0800, Uwe Brauer <oub@mat.ucm.es> wrote:
>> So the problem is in my init file and I am quite sure that it has to
>> do with the following lines in my custom- file
>>
>> '(org-latex-classes
> What is the full line here? Is this a "setq"?
No it is not a setq, it is a
(custom-set-variables
Which I did not copy.
[-- Attachment #2: smime.p7s --]
[-- Type: application/pkcs7-signature, Size: 5025 bytes --]
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: cannot export to beamer.
2018-12-16 21:01 ` Uwe Brauer
@ 2018-12-16 21:36 ` Tim Cross
0 siblings, 0 replies; 18+ messages in thread
From: Tim Cross @ 2018-12-16 21:36 UTC (permalink / raw)
To: Uwe Brauer; +Cc: emacs-orgmode
I suspect that the recent changes in how Emacs runs initialisation may
well expose a few edge cases for the customise interface. The custimise
interface is fairly basic and makes a few assumptions which may not hold
once you start altering the order of initialisation and package
loading. While it all works fine 80% of the time, it may fail for more
complex situations and the reality is, Org is large and complex.
Strictly speaking, I don't think it is a bug. The problem is getting the
right balance of what to load and what to leave for the user to decide
to load. If you never use beamer, then having all the beamer stuff
loaded by default is only going to slow down start up (though I do think
people are way too obsessed with startup time these days! I start emacs
about once per week and only that often because I shutdown my laptop on
the weekend when I leave work!). If beamer is not loaded when you
customise org-latex-classes, then it won't be in the variable and if it
isn't in the variable, it cannot be saved into the custom block. If you
then later decide to load it and it is loaded before your customisation
is loaded, then the value it adds to org-latex-classes is lost. If on
the other hand we 'hard code' it into the variable so it doesn't depend
on whether ox-beamer is loaded, then a definition will exist which won't
work when the user tries to use it as ox-beamer is not
loaded. Previously, I think custom blocks were loaded at the start of
your init, so before org was loaded, so this was less of an issue. No
with the early init stuff, things are not quite the same (a lot of guess
work here!).
Tim
Uwe Brauer <oub@mat.ucm.es> writes:
>>>> "Tim" == Tim Cross <theophilusx@gmail.com> writes:
>
> > Just a shot in the dark here .....
>
> > You mentioned you used custom to modify the org-latex-classes
> > variable. Does the code in the custom 'block' of your init file have
> > beamer as one of the classes?
>
> No it does not and this turns out a problem, also I thought the
> ox-beamer code contains a add-to-list which should do add beamer, but it
> seems not to do it.
>
>
> > My suspicion is that when you added your exam class, for some
> > reason, beamer had not been loaded and was not yet in the variable
> > definition. When you edited it to add your exam class it has saved
> > a version without beamer as a class.
>
> > When you start emacs, with the new init and run order, the code
>
> >> (unless (assoc "beamer" org-latex-classes)
> >> (add-to-list 'org-latex-classes
> >> '("beamer"
> >> "\\documentclass[presentation]{beamer}"
> >> ("\\section{%s}" . "\\section*{%s}")
> >> ("\\subsection{%s}" . "\\subsection*{%s}")
> >> ("\\subsubsection{%s}" . "\\subsubsection*{%s}"))))
>
> > is executed and beamer is added, but then your custom settings are
> > evaluated and the variable is reset with the version you added the exam
> > class to, which has no beamer entry, is used to reset the variable and
> > the beamer setting is lost.
>
>
> What you say makes send but this seems to defy the whole idea of custom!
>
>
> > I would start by deleting the org-latex-classes customization and try
> > adding it again to see if that fixes the problem. This is one reason I
> > rarely use customise - I prefer to have the code in my own init file so
> > that I can see exactly when everything is run.
>
> Thanks! I will do that and you are very right about custom, it is very
> convenient but buggier than I thought.
>
> Uwe
--
Tim Cross
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: cannot export to beamer.
2018-12-16 18:16 ` Uwe Brauer
2018-12-16 19:21 ` Tim Cross
2018-12-16 19:46 ` Ken Mankoff
@ 2018-12-16 22:37 ` Eric S Fraga
2018-12-17 8:02 ` Uwe Brauer
2 siblings, 1 reply; 18+ messages in thread
From: Eric S Fraga @ 2018-12-16 22:37 UTC (permalink / raw)
To: emacs-orgmode
On Sunday, 16 Dec 2018 at 19:16, Uwe Brauer wrote:
>>>> "Eric" == Eric S Fraga <esflists@gmail.com> writes:
>
> > Can you be explicit about how you are exporting to beamer
>
> Either
>
> C-c C-e l l
>
> Or
>
> C-c C-e l o
And here is the problem. These are not the export directives to use for
beamer. Use C-c C-e l b to generate beamer LaTeX code or C-c C-e l O to
open the PDF.
--
Eric S Fraga via Emacs 27.0.50, Org release_9.1.14-1035-gfeb442
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: cannot export to beamer.
2018-12-16 22:37 ` Eric S Fraga
@ 2018-12-17 8:02 ` Uwe Brauer
2018-12-17 9:53 ` Eric S Fraga
0 siblings, 1 reply; 18+ messages in thread
From: Uwe Brauer @ 2018-12-17 8:02 UTC (permalink / raw)
To: emacs-orgmode
[-- Attachment #1: Type: text/plain, Size: 2483 bytes --]
>>> "Eric" == Eric S Fraga <esflists@gmail.com> writes:
> On Sunday, 16 Dec 2018 at 19:16, Uwe Brauer wrote:
>>>>> "Eric" == Eric S Fraga <esflists@gmail.com> writes:
>>
>> > Can you be explicit about how you are exporting to beamer
>>
>> Either
>>
>> C-c C-e l l
>>
>> Or
>>
>> C-c C-e l o
> And here is the problem. These are not the export directives to use for
> beamer. Use C-c C-e l b to generate beamer LaTeX code or C-c C-e l O to
> open the PDF.
Sorry misprint.
I meant C-c C-e l b
Which does not work.
The problem is problem with custom, I thought the logic would be like this.
1. Emacs is started,
2. The customization is loaded, which in my case is
(custom-set-variables
'(org-latex-classes
'(("article" "\\documentclass[12pt]{article}"
("\\section{%s}" . "\\section*{%s}")
("\\subsection{%s}" . "\\subsection*{%s}")
("\\subsubsection{%s}" . "\\subsubsection*{%s}")
("\\paragraph{%s}" . "\\paragraph*{%s}")
("\\subparagraph{%s}" . "\\subparagraph*{%s}"))
("report" "\\documentclass[12pt]{report}"
("\\part{%s}" . "\\part*{%s}")
("\\chapter{%s}" . "\\chapter*{%s}")
("\\section{%s}" . "\\section*{%s}")
("\\subsection{%s}" . "\\subsection*{%s}")
("\\subsubsection{%s}" . "\\subsubsection*{%s}"))
("book" "\\documentclass[12pt]{book}"
("\\part{%s}" . "\\part*{%s}")
("\\chapter{%s}" . "\\chapter*{%s}")
("\\section{%s}" . "\\section*{%s}")
("\\subsection{%s}" . "\\subsection*{%s}")
("\\subsubsection{%s}" . "\\subsubsection*{%s}"))
("exam" "\\documentclass[12pt, addpoints, answers]{exam}"
("\\begin{questions}%%%s" "\\end{questions}" "\\begin{questions}%%%s" "\\end{questions}")
("\\titledquestion{%s}" . "")
("\\begin{parts}%%%s" "\\end{parts}" "\\begin{parts}%%%s" "\\end{parts}")
("\\part[%s] " . "")
("\\begin{subparts}%%%s" "\\end{subparts}" "\\begin{subparts}%%%s" "\\end{subparts}")
("\\subpart[%s] " . "")
("\\begin{solution}[%s]" "\\end{solution}" "\\begin{solution}[%s]" "\\end{solution}"))))
Then (require 'ox-beamer) should via add-to-list, add beamer but somehow
it does not. I would call this a bug, but Tim said Emacs changed its way
of initialization and this could be the result. In any case I will send
a bug report, maybe a developer will say something.
Uwe
[-- Attachment #2: smime.p7s --]
[-- Type: application/pkcs7-signature, Size: 5025 bytes --]
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: cannot export to beamer.
2018-12-17 8:02 ` Uwe Brauer
@ 2018-12-17 9:53 ` Eric S Fraga
0 siblings, 0 replies; 18+ messages in thread
From: Eric S Fraga @ 2018-12-17 9:53 UTC (permalink / raw)
To: emacs-orgmode
On Monday, 17 Dec 2018 at 09:02, Uwe Brauer wrote:
> Sorry misprint.
>
> I meant C-c C-e l b
>
> Which does not work.
>
> The problem is problem with custom, I thought the logic would be like this.
>
> 1. Emacs is started,
>
> 2. The customization is loaded, which in my case is
[...]
> Then (require 'ox-beamer) should via add-to-list, add beamer but somehow
> it does not.
Okay and yes, I would have expected this work flow to work fine. Have
you tried this sequence in emacs -Q to ensure that the problem is not
due to elsewhere in your initialization?
--
Eric S Fraga via Emacs 27.0.50, Org release_9.1.14-1035-gfeb442
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: cannot export to beamer.
2018-12-15 17:54 ` Uwe Brauer
@ 2018-12-17 14:20 ` Nick Dokos
0 siblings, 0 replies; 18+ messages in thread
From: Nick Dokos @ 2018-12-17 14:20 UTC (permalink / raw)
To: emacs-orgmode
Uwe Brauer <oub@mat.ucm.es> writes:
>>>> "Ken" == Ken Mankoff <mankoff@gmail.com> writes:
>
> > On 2018-12-15 at 09:38 -0800, Uwe Brauer <oub@mat.ucm.es> wrote:
> >> I am very used to the beamer style and it works on my machine quite
> >> well.
>
> > But it doesn't work quiet well according to this email. What
> > changed? Are you on a new machine? Is LaTeX installed?
>
> I don't understand. When I create (using emacs and auctex) a beamer
> document I can compile it without problem.
>
> What does not work is exporting the example org file to a working latex
> (beamer) file.
>
> It seems that I have to set up, manually (sigh!)
>
> Org-latex-classes. That is quite annoying I thought the beamer class
> would be included.
>
I think Ken was pointing out that export to beamer is a different operation
than exporting to latex: you use C-c l l (e.g.) for the latter, but C-c l b
for the former. Maybe that's where you get hung up?
--
Nick
"There are only two hard problems in computer science: cache
invalidation, naming things, and off-by-one errors." -Martin Fowler
^ permalink raw reply [flat|nested] 18+ messages in thread
end of thread, other threads:[~2018-12-17 14:20 UTC | newest]
Thread overview: 18+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-12-15 17:38 cannot export to beamer Uwe Brauer
2018-12-15 17:49 ` Ken Mankoff
2018-12-15 17:54 ` Uwe Brauer
2018-12-17 14:20 ` Nick Dokos
2018-12-15 18:14 ` Josiah Schwab
2018-12-15 18:48 ` Colin Baxter
2018-12-15 19:30 ` Uwe Brauer
2018-12-15 20:43 ` Uwe Brauer
2018-12-16 10:25 ` Eric S Fraga
2018-12-16 18:16 ` Uwe Brauer
2018-12-16 19:21 ` Tim Cross
2018-12-16 21:01 ` Uwe Brauer
2018-12-16 21:36 ` Tim Cross
2018-12-16 19:46 ` Ken Mankoff
2018-12-16 21:11 ` Uwe Brauer
2018-12-16 22:37 ` Eric S Fraga
2018-12-17 8:02 ` Uwe Brauer
2018-12-17 9:53 ` Eric S Fraga
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).