emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Leo Butler <Leo.Butler@umanitoba.ca>
To: "Alain.Cochard@unistra.fr" <Alain.Cochard@unistra.fr>
Cc: Org Mode Mailing List <emacs-orgmode@gnu.org>
Subject: Re: setting export_file_name during export
Date: Fri, 6 Jan 2023 22:52:32 +0000	[thread overview]
Message-ID: <87r0w7qnrk.fsf@t14.reltub.ca> (raw)
In-Reply-To: <25528.40312.882538.752027@gargle.gargle.HOWL> (Alain Cochard's message of "Fri, 6 Jan 2023 23:15:20 +0100")

On Fri, Jan 06 2023, Alain.Cochard@unistra.fr wrote:

> Leo Butler writes on Fri  6 Jan 2023 21:38:
>  > Hello,
>  > 
>  > I am trying something new this semester: all my lecture notes are
>  > organized into a single org file. A minor problem: I want to export each
>  > lecture (see below) as a separate pdf file. I would like to know if
>  > anyone has ``solved'' this problem or has a suggestion on how to do it.
>  > 
>  > Ideally, I would like to have a single function that retains only the
>  > current subtree that contains point, sets EXPORT_FILE_NAME based on the
>  > top heading, and exports it as a complete beamer pdf.
>
> Hi.  Sorry if you already know this and want something more automated
> it is not too clear to me.  (What is not clear either is why you have
> '* Lecture 1' _and_ '** Lecture 1', etc., i.e., why not just
> '* Lecture 1'.)

For my setup, each heading is a separate lecture, each subheading is a
separate beamer slide, etc.

>
> So: if you insert 
>
>   :PROPERTIES:
>   :EXPORT_FILE_NAME: lecture-1.pdf
>   :END:
>

Aha! Thank you very much. I had forgotten about using property
drawers. It would be a simple matter to create a filter to insert that
property drawer under the heading that contains point.

> right after '** Lecture 1' and, with the point inside that subtree,
> do:
>
>   C-c C-e C-s l O
>
> it seems to me it does the job.

Yes, it does! Thanks again.

Leo

>
>  > #+AUTHOR: Leo Butler
>  > #+TITLE: Lectures in Math
>  > #+OPTIONS: H:2 toc:t num:t
>  > #+LATEX_CLASS: beamer
>  > #+LATEX_CLASS_OPTIONS: [presentation]
>  > #+STARTUP: beamer
>  > #+EXPORT_FILE_NAME: lectures
>  > 
>  > * Lecture 1
>  > ** Lecture 1
>  > In the beginning...This subtree should be exported to =lecture-1.pdf=.
>  > * Lecture 2
>  > ** Lecture 2
>  > Next...This subtree should be exported to =lecture-2.pdf=.


*and* that I needed to 

  reply	other threads:[~2023-01-06 22:53 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-06 21:38 setting export_file_name during export Leo Butler
2023-01-06 22:15 ` Alain.Cochard
2023-01-06 22:52   ` Leo Butler [this message]
2023-01-06 23:03     ` Alain.Cochard
2023-01-10 16:46     ` Nick Dokos
2023-01-10 20:01       ` Leo Butler

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87r0w7qnrk.fsf@t14.reltub.ca \
    --to=leo.butler@umanitoba.ca \
    --cc=Alain.Cochard@unistra.fr \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).