Hot answers tagged

12

It depends on whether you load the listings package in your .emacs file. You can check the contents of the Emacs variable org-latex-default-packages-alist (use the key combo C-h v to see the help and contents of a variable). If the listings package is not loaded, org-mode will use the verbatim LaTeX environment to typeset the code. In that case you can use ...


9

The following worked for me: emacs \ -u "$(id -un)" \ --batch \ --eval '(load user-init-file)' \ foo.org \ -f org-beamer-export-to-pdf Thanks go to @mutbuerger for the hint to pass -u <username> to get user-init-file defined.


8

Beamer export is very similiar to LaTeX export in Org-Mode, all you need to do is hitting M-x org-beamer-export-to-pdf or C-c C-e l p from the Org buffer you're working on. The majority of options are taken from the LaTeX export except for BEAMER_THEME and BEAMER_COLOR_THEME. Other than that there are a few Beamer-specific commands one can use to have ...


7

Instead of #+LaTeX: you should try #+BEAMER_HEADER: for all beamer specific configuration lines. For example: #+BEAMER_HEADER: \setbeamertemplate{navigation symbols}{} removes navigation symbols in all slides including title page and toc.


6

I came up with this recently to solve the problem of export cluttering the current directory, although it is not the solution asked for, I think it belongs here, plus it fixes it for any files org-export generates. (defvar org-export-output-directory-prefix "export_" "prefix of directory used for org-mode export") (defadvice org-export-output-file-name (...


6

Please change #+options: H:3 to #+options: H:2. This is working for me with Emacs 25.1, Org 9.0.4. Maybe #+beamer_frame_level: became obsolete in Org9, the example is from 2010!


5

As you mention, org-mode does not make use of the echo area to show export errors. Instead, it dumps all output that is produced during LaTeX export to a buffer called *Org PDF LaTeX Output*. If you want to get information about why the export process failed, you can switch to this buffer and search for error (or even warning). Example Contents of .org ...


5

You need to use a "closing" heading: *** :B_ignoreheading: :PROPERTIES: :BEAMER_env: ignoreheading :END: Hence, your example should look like this: * More Complex Example some text *** library.py :B_block: #+begin_src python code #+end_src *** ...


4

Two ways to color text in org-mode come into my mind: 1.) Simply add the usual LaTeX code @@latex:{\color{green}@@This@@latex:}@@ is green. 2.) Use John Kitchin's org-colored-text.el After downloading the file to your load-path directory, put the following in your init.el, which lets you use org-links to color text: (require 'org-colored-text) ;; Taken ...


4

Dang! This line #+ATTR_LATEX: width=0.4\textwidth has got wrong syntax. It should be: #+ATTR_LATEX: :width 0.4\textwidth


3

If you add the following code at the beginning of your org file: #+BEAMER_HEADER: \AtBeginSection[]{\begin{frame}<beamer>\frametitle{Presentat‌​‌​ion agenda}\tableofcontents[currentsection]\end{frame}} it will generate a toc frame at the beginning of each section, highlighting the upcoming section. You can change the title of the frame (Presentat‌​‌​...


3

You need to make AUCTeX aware of the frame environment, i.e., \frametitle: (add-to-list 'TeX-outline-extra '("\\\\frametitle\\b" 4)) From the documentation on Tex-outline-extra: List of extra TeX outline levels. Each element is a list with two entries. The first entry is the regular expression matching a header, and the second is the level of ...


3

That certainly is an edge case. Some might argue that you can't have a heading without some content in the heading, but your use case seems like a reasonable use of the outline. org-element-headline-parser isn't written to accommodate your use-case. You can change the regular expression that matches the tag portion from (org-re "[ \t]+\\(:[[:alnum:]_@#%:]...


3

I think it works ok if you remove the :B_block: from your headlines. * Introduction ** A block :PROPERTIES: :BEAMER_env: block :END: Some text in the block. ** :PROPERTIES: :BEAMER_env: block :END: Text in block without title leads to:


3

So it looks like mixed Org installation is to blame. It appears that Org FAQ has something to say on this subject: Is my Orgmode installation mixed? Emacs is distributed with a version of Orgmode bundled with it. A common problem among users who install a newer version of Orgmode separately is a mixed install where Emacs loads some files from the ...


3

(If I understand well,) the correct way to do this is to replace #+BEAMER_FRAME_LEVEL: 2 by H:2 in the global options: #+TITLE: Abandon all hope #+startup: beamer #+LaTeX_CLASS: beamer #+LaTeX_CLASS_OPTIONS: [bigger] #+options: H:2 * First page ** Stuff larifari ** second stuff larifari * Second page ** fdjsfsd larfdfj ** fjs iiinfdnf See for example here: ...


3

See the footnote in the Frames and Blocks in Beamer section of the Org mode manual: (1) If ‘BEAMER_ENV’ is set, Org export adds ‘B_environment’ tag to make it visible. The tag serves as a visual aid and has no semantic relevance.


2

The answer that @Lgen gave works as far as the export is concerned, but it breaks visibility cycling (the headline level is lifted). As the thread on the org-mode mailing list suggests, empty headlines are considered evil. So I'd propose to insert something that has no effects export-wise, for example @@latex:@@. With this, you can also keep the tag, which I ...


2

I'm using self-compiled emacs 27.0.9x on Linux and macOS. To generate my presentations, I use org-mode. emacs -Q \ --batch "(require 'ox-beamer)" \ <input>.org -f org-beamer-export-to-pdf works for me.


2

In order not to be prompted anymore for overlay specification in \item like macros, set the variable LaTeX-beamer-item-overlay-flag to nil. You can do it locally or globally, for the latter case customize that variable or add this code to your init file: (setq LaTeX-beamer-item-overlay-flag nil) As most style-specific options, this variable is not ...


2

You can mark headings with tags, and set options for including and excluding tags from export. E.g. #+EXCLUDE_TAGS: slow * My work ** This section takes time :slow: ** This other section is OK


2

In order to ensure that source code formatting is preserved in exports from Org-mode, set the variables org-src-preserve-indentation to 't', and indent-tabs-mode to 'nil' using customize-variable.


2

Try this (push '("frametitle" 2) TeX-outline-extra) See the documentation for TeX-outline-extra. The first element of the list being added is a regexp and the second is the imenu level. You can also see LaTeX-section-list for the default levels that imenu uses for latex. Update: As suggested in the comments, it might be a little safer to use the ...


2

After edebug-ing through org-export-to-file and peeking at related posts, including Export to multiple files according to tags, I have come up with the solution below. It keeps the necessary decorations in the org file at a minimum and uses some elisp code to do the presentation/handout switch. Note the caveat about global latex class options at the end. ...


2

I've learned here that there are two ways to modify an \item: - [@123] will set the counter of enumerations (or "ordered lists") to 123. - [$Rightarrow$] :: bla will generate a "description". Both do not really yield the flexibility that I was hoping for in my question, but it seems that this is as far as one can get. EDIT: I've stumbled over a not so ...


2

First of all, I suggest you create a proper class file beamer-preamble.cls like this: \NeedsTeXFormat{LaTeX2e} \ProvidesClass{beamer-preamble} [2017/04/26 v0.1 My Beamer Preamble] \LoadClass[<beamer-options>]{beamer} Next, you want to have an AUCTeX style file for beamer-preamble.cls. Doing M-x TeX-auto-generate RET in one way. But I recommend ...


2

Your problem is the structure of org-mode documents. The stuff from a head line up to a head line of at least the same level belongs to the heading. (See the worg-documentation of org-mode syntax.) Try to exploit that structure! For an example introduce a level-3 headline after the definition and before the list. That headline can even be empty! That puts ...


2

You have to allow frame breaking by adding the corresponding Beamer option as an Org property to the slide heading: * References :PROPERTIES: :BEAMER_opt: allowframebreaks,label= :END: bibliographystyle:unsrt bibliography:/path/to/my.bib


2

Here is an example of a slide with a note: * Slide - Item 1 - item 2 ** Note :PROPERTIES: :BEAMER_ENV: note :END: This is a note. IOW, a second level section with a BEAMER_ENV property with a value of "note" becomes a beamer note. Whether this will get printed out properly the way you want, I don't know. EDIT: if you look at the tex file ...


2

It's a pity that it's not mentioned in the manual nor in the tutorial, since it's a more natural mapping of constructs from org to beamer, but you can use special org blocks (avoiding the boilerplate of subsectioning with its drawers and everything) as defined here. For example: Some text... #+BEGIN_theorem ... #+END_theorem ...text continues here Then ...


Only top voted, non community-wiki answers of a minimum length are eligible