0

I am documenting my work using org mode and babel. I am exporting it to a LaTeX based pdf document by using the header:

#+TITLE: Document Title
#+AUTHOR: Author
#+EMAIL: [email protected]
#+LaTeX_HEADER: \usepackage{charter}
#+OPTIONS: toc:nil

I use C-c C-e l o to export the document to latex and then pdf.

I would like to convert the same document with Beamer presentation for headings and subheadings. By default the document class is \documentclass[11pt]{article}.

Can I have more than one class definition in the same org file or is there any other method to the same?

1 Answer 1

1

The default LaTeX class can be set with

#+LATEX_CLASS: article

or

#+LATEX_CLASS: beamer

at the top of the file, so you can have them commented out:

# #+LATEX_CLASS: article

and select which one you want by uncommenting one or the other. This should be enough for manual export: when you automate the process, you will probably want to use a different method, but this is enough to start (particularly in the light of the comments that follow, which are much more important than how exactly you do the switchover).

But I think you will find that it is difficult to write a document that behaves properly under both exporting methods. You will have to experiment. I would begin by writing two (small, example) files: one that looks good to you under "normal" export and a corresponding one for beamer export. Then worry about how to merge them together, or perhaps how to use one to produce the other (probably the full one to produce the beamer one).

Once you have examples that work for you, you might want to come back with a more detailed question of how to do these steps.

1
  • Alternatively you can have two files, each with a different #+LATEX_CLASS setting, which then #+INCLUDE your base file
    – rpluim
    Commented Jul 9, 2020 at 13:21

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.