On Mon, Oct 28 2024, David Masterson wrote: > Does anyone have a recommendation on how to structure an Org document > such that it can be exported to either Latex or Beamer? Suppose you > have a (small) thesis that you are writing and you want to generate > Beamer slides of a high-level view of the document, but also generate > a PDF for the whole document.   I suppose you could break it into two > files, but then you'd have to copy (certain) changes from file to > file.  I was wondering if it could be done with one file such that > updates to the master document are simultaneously reflected in the > Beamer slides.  Is this going to involve liberal use of > #+BEGIN...#+END blocks? > > David Masterson > > I think I would add the tags #+TAGS: beameronly latexonly noexport and then define an elisp function that changes beameronly tags to noexport when the export backend is latex and similar for latexonly. Add that function to the `org-export-before-processing-functions' so it gets executed before export begins. Attached is an example. Note that you likely would need to fiddle with conditionally loading packages, depending on the export backend. Best regards, Leo