emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Exporting book handouts
@ 2013-11-03 16:54 Jarmo Hurri
  2013-11-03 19:08 ` Thomas S. Dye
  2013-11-03 19:15 ` Nicolas Goaziou
  0 siblings, 2 replies; 6+ messages in thread
From: Jarmo Hurri @ 2013-11-03 16:54 UTC (permalink / raw)
  To: emacs-orgmode


Greetings.

I have been writing a math book, and am still exploring the possibility
of using org for the task. Currently all my material is still in plain
LaTeX. The tools used are LaTeX, Asymptote, and R.

We all know many advantages that the use of org would bring. ;-) For me,
one of the possible benefits would be the use of org to export in
different formats: a PDF containing the whole book, an HTML site with
the same contents, and last, but not least, a set of Beamer handout
slides containing _only some parts_ of the material. I am using the
material to teach, and sometimes give handouts to students. Having to
create the handouts separately is boring and counterproductive.

Usually handouts contain relatively little information. There is a
title, often accompanied by a figure, and perhaps a sentence or two with
some equations. Typically at least parts of the equations are the same
as in the main text (we may derive the final results in class). The
figures in the book and handouts contain the same information, but the
handout figures may have e.g. larger fonts. The title of a handout may
be a part of the book text, or it may not.

I guess the things I would need include the following.

1. A way to denote that a certain element (figure, equation, part of a
   longer equation, a piece of text etc.) goes into the Beamer
   export. By default, material should _not_ be included in the Beamer
   export. I don't know how to achieve this.

   I did find SELECT_TAGS in the manual, so if I were to export entire
   subtrees into Beamer, maybe I could change the value of this when I
   am doing a Beamer export. But could I use this for individual
   elements, such as an equation or a figure?

2. A way to add some material into the Beamer handouts, material that is
   not in the book. I think this is easy to achieve with #+BEAMER and
   #+BEGIN_BEAMER ... #+END_BEAMER.

3. A way to change some values in Asymptote and R Babel blocks depending
   on whether I am exporting a Beamer or regular PDF / HTML. I don't
   know yet how to achieve this.

I am still in an explorative stage, so I am sure I will come up with
10^6 other questions when I need to face the details. But I would first
like to clear these general issues before I even try to proceed.

All the best,

Jarmo

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Exporting book handouts
  2013-11-03 16:54 Exporting book handouts Jarmo Hurri
@ 2013-11-03 19:08 ` Thomas S. Dye
  2013-11-04 13:01   ` Jarmo Hurri
  2013-11-03 19:15 ` Nicolas Goaziou
  1 sibling, 1 reply; 6+ messages in thread
From: Thomas S. Dye @ 2013-11-03 19:08 UTC (permalink / raw)
  To: Jarmo Hurri; +Cc: emacs-orgmode

Aloha Jarmo,

I find it easiest to use separate sub-trees for the various different
documents I create from a given body of material.  In your case, I would
make a sub-tree for the book and a sub-tree for the handout.

If I try to create two different documents under the same heading, the
complexity overwhelms me.  Of course, you're writing a math book, so
your tolerance for complexity probably exceeds mine :)

Where possible, I #+name: the elements that will be used in more than
one place and then use #+call: lines to place them where I want.  

For figures, the source code blocks can be written to expose the
variables that let you set font size, etc., so the figures can look
different wherever they appear.

For other elements, the echo() function, which is part of the library of
babel, can be used.

** Echo function

#+name: test-list
  - One
  - Two
  - Three

#+name: test-table
| One   | Two |
| Three | Four |

#+name: echo-table
#+call: echo(input=test-table) :results table

#+results: echo-table
| One   | Two  |
| Three | Four |

#+name: echo-list
#+call: echo(input=test-list) :results list

#+results: echo-list
- One
- Two
- Three

I don't know off-hand the full list of elements that can be named and
echoed this way.

hth,
Tom


Jarmo Hurri <jarmo.hurri@syk.fi> writes:

> Greetings.
>
> I have been writing a math book, and am still exploring the possibility
> of using org for the task. Currently all my material is still in plain
> LaTeX. The tools used are LaTeX, Asymptote, and R.
>
> We all know many advantages that the use of org would bring. ;-) For me,
> one of the possible benefits would be the use of org to export in
> different formats: a PDF containing the whole book, an HTML site with
> the same contents, and last, but not least, a set of Beamer handout
> slides containing _only some parts_ of the material. I am using the
> material to teach, and sometimes give handouts to students. Having to
> create the handouts separately is boring and counterproductive.
>
> Usually handouts contain relatively little information. There is a
> title, often accompanied by a figure, and perhaps a sentence or two with
> some equations. Typically at least parts of the equations are the same
> as in the main text (we may derive the final results in class). The
> figures in the book and handouts contain the same information, but the
> handout figures may have e.g. larger fonts. The title of a handout may
> be a part of the book text, or it may not.
>
> I guess the things I would need include the following.
>
> 1. A way to denote that a certain element (figure, equation, part of a
>    longer equation, a piece of text etc.) goes into the Beamer
>    export. By default, material should _not_ be included in the Beamer
>    export. I don't know how to achieve this.
>
>    I did find SELECT_TAGS in the manual, so if I were to export entire
>    subtrees into Beamer, maybe I could change the value of this when I
>    am doing a Beamer export. But could I use this for individual
>    elements, such as an equation or a figure?
>
> 2. A way to add some material into the Beamer handouts, material that is
>    not in the book. I think this is easy to achieve with #+BEAMER and
>    #+BEGIN_BEAMER ... #+END_BEAMER.
>
> 3. A way to change some values in Asymptote and R Babel blocks depending
>    on whether I am exporting a Beamer or regular PDF / HTML. I don't
>    know yet how to achieve this.
>
> I am still in an explorative stage, so I am sure I will come up with
> 10^6 other questions when I need to face the details. But I would first
> like to clear these general issues before I even try to proceed.
>
> All the best,
>
> Jarmo
>
>
>

-- 
Thomas S. Dye
http://www.tsdye.com

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Exporting book handouts
  2013-11-03 16:54 Exporting book handouts Jarmo Hurri
  2013-11-03 19:08 ` Thomas S. Dye
@ 2013-11-03 19:15 ` Nicolas Goaziou
  2013-11-04 13:19   ` Jarmo Hurri
  1 sibling, 1 reply; 6+ messages in thread
From: Nicolas Goaziou @ 2013-11-03 19:15 UTC (permalink / raw)
  To: Jarmo Hurri; +Cc: emacs-orgmode

Hello,

Jarmo Hurri <jarmo.hurri@syk.fi> writes:

> 1. A way to denote that a certain element (figure, equation, part of a
>    longer equation, a piece of text etc.) goes into the Beamer
>    export. By default, material should _not_ be included in the Beamer
>    export. I don't know how to achieve this.
>
>    I did find SELECT_TAGS in the manual, so if I were to export entire
>    subtrees into Beamer, maybe I could change the value of this when I
>    am doing a Beamer export. But could I use this for individual
>    elements, such as an equation or a figure?

You can use drawers:

  * Some section

    :HANDOUT:
    ...
    :END:

    :BOOK:
    ...
    :END:

Then, you can play with `org-export-with-drawers' and its OPTIONS
counterpart:

  #+OPTIONS: d:("BOOK")

for a book-only export.

  #+OPTIONS: d:(not "HANDOUT")

for an everything-but-handout export...


Regards,

-- 
Nicolas Goaziou

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Exporting book handouts
  2013-11-03 19:08 ` Thomas S. Dye
@ 2013-11-04 13:01   ` Jarmo Hurri
  2013-11-04 16:34     ` Thomas S. Dye
  0 siblings, 1 reply; 6+ messages in thread
From: Jarmo Hurri @ 2013-11-04 13:01 UTC (permalink / raw)
  To: emacs-orgmode


tsd@tsdye.com (Thomas S. Dye) writes:

> Aloha Jarmo,

Greetings to Hawaii from the dark and cold north.

> I find it easiest to use separate sub-trees for the various different
> documents I create from a given body of material.  In your case, I
> would make a sub-tree for the book and a sub-tree for the handout.  If
> I try to create two different documents under the same heading, the
> complexity overwhelms me.

I can also foresee problems with interleaving two documents, but I will
take some complexity over duplication any day. However, your approach
with named elements and reusable functions does appeal to me.

What is the mechanism you use to select the subtrees that you are
exporting? Are you employing SELECT_TAGS or something else?

> Where possible, I #+name: the elements that will be used in more than
> one place and then use #+call: lines to place them where I want.  

Great tip, thanks.

> I don't know off-hand the full list of elements that can be named and
> echoed this way.

I am in the process of starting to write a new section, so I will try it
out. For equations etc. it would also be possible to define LaTeX macros
for reuse.

Thanks a lot!

Jarmo

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Exporting book handouts
  2013-11-03 19:15 ` Nicolas Goaziou
@ 2013-11-04 13:19   ` Jarmo Hurri
  0 siblings, 0 replies; 6+ messages in thread
From: Jarmo Hurri @ 2013-11-04 13:19 UTC (permalink / raw)
  To: emacs-orgmode


Greetings Nicolas.

Nicolas Goaziou <n.goaziou@gmail.com> writes:

>> 1. A way to denote that a certain element (figure, equation, part of
>>    a longer equation, a piece of text etc.) goes into the Beamer
>>    export. By default, material should _not_ be included in the
>>    Beamer export. I don't know how to achieve this.
>>
>>    I did find SELECT_TAGS in the manual, so if I were to export entire
>>    subtrees into Beamer, maybe I could change the value of this when I
>>    am doing a Beamer export. But could I use this for individual
>>    elements, such as an equation or a figure?
>
> You can use drawers:
>   * Some section
>     :HANDOUT:
>     ...
>     :END:
>     :BOOK:
>     ...
>     :END:
>
> Then, you can play with `org-export-with-drawers' and its OPTIONS
> counterpart:
>   #+OPTIONS: d:("BOOK")
> for a book-only export.
>   #+OPTIONS: d:(not "HANDOUT")
> for an everything-but-handout export...

This looks like a nice approach if I did not have to specify any BOOK
drawers. That is, if there would be a way to export _only_ the contents
of HANDOUT drawers so that the macros, elements etc. outside the drawers
would still be applicable.

It also seems that the scope of a drawer can not include a new
headline. That is, the following does not seem to work:

# --------------------------------------------------------------------
#+TITLE: drawer-test
#+OPTIONS: d:(not "HANDOUT")

* testing drawers
** part of the main text
   :HANDOUT:
** only in handouts
   :END:
   :HANDOUT:
   also just in handouts
   :END:
# --------------------------------------------------------------------

Thanks! I will keep this in mind when I try out different things.

Jarmo

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Exporting book handouts
  2013-11-04 13:01   ` Jarmo Hurri
@ 2013-11-04 16:34     ` Thomas S. Dye
  0 siblings, 0 replies; 6+ messages in thread
From: Thomas S. Dye @ 2013-11-04 16:34 UTC (permalink / raw)
  To: Jarmo Hurri; +Cc: emacs-orgmode

Jarmo Hurri <jarmo.hurri@syk.fi> writes:

> What is the mechanism you use to select the subtrees that you are
> exporting? Are you employing SELECT_TAGS or something else?

Interleaving is too complex for me. I use separate sub-trees and then
restrict export to one sub-tree or another. This way, when I make a
mistake in one document, another document doesn't suffer, too. I also
like to keep common material, such as data tables and figures, together.
I find that I tinker a lot as I'm writing and it helps me to have all
the code for figures, etc. in one place so my tinkering changes can be
systematic. 

* Book
** Chapter 1
** Chapter 2
* Handouts
** Handout 1
** Handout 2
* Common Material
** Figures
** Tables

All the best,
Tom

-- 
Thomas S. Dye
http://www.tsdye.com

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2013-11-04 16:35 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-11-03 16:54 Exporting book handouts Jarmo Hurri
2013-11-03 19:08 ` Thomas S. Dye
2013-11-04 13:01   ` Jarmo Hurri
2013-11-04 16:34     ` Thomas S. Dye
2013-11-03 19:15 ` Nicolas Goaziou
2013-11-04 13:19   ` Jarmo Hurri

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).