emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Selective Export Question
@ 2009-12-22  6:24 Mark Elston
  2009-12-24 18:43 ` Mark Elston
  2010-01-03 13:20 ` Carsten Dominik
  0 siblings, 2 replies; 6+ messages in thread
From: Mark Elston @ 2009-12-22  6:24 UTC (permalink / raw)
  To: org-mode emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 2726 bytes --]

I have been making progress on my use of org-mode to manage both
my teaching notes and handouts in a single document.  However, there
is something I still have not been able to make happen.  That is
selective exporting of text *without* exporting a headline along with
it.

Here is a sample of what I would like.  In this example I have sections
with "common" text (should be in both teaching notes and handouts) and
sections that are specific to each individual output format.  What I
have below is set up to export the notes.  What I would like is to
have the text (only) of the non-excluded sections and not the headlines.

--------------------------------------------------------------
#+TITLE:     Test
#+LaTeX_CLASS: ClassNotes

#+OPTIONS: toc:nil H:8 tags:nil

#+EXPORT_EXCLUDE_TAGS: handouts

* Headline 1
   some text

** Headline 1-1
    even more text

* Headline 2
   some more text

** Headline 2-1
    Common text 1.  Should be followed by handout or notes text.

***** should be handouts only                :handouts:
       handout text

***** should be notes only                   :notes:
       notes text

** Headline 2-2
    Common text 2.  Should be followed by handout or notes text.

*****                                        :handouts:
       handout text again

*****                                        :notes:
       notes text again
--------------------------------------------------------------


The relevant material from my org-export-latex-classes is:

("ClassNotes" "\\documentclass[letter,twoside,openright]{memoir}
  ...
  ("\\chapter{%s}" . "\\chapter*{%s}")
  ("\\section{%s}" . "\\section*{%s}")
  ("\\subsection{%s}" . "\\subsection*{%s}")
  ("\\subsubsection{%s}" . "\\subsubsection*{%s}")
  ("%% Level 5" . "%% Level 5")
  ("%% Level 6" . "%% Level 6")
  ("%% Level 7" . "%% Level 7")
  ("%% Level 8" . "%% Level 8"))
  ...


I was hoping to allow all levels of heading to be exported but only
write comments for the levels below level 4.  It didn't work out that
way.

With the above I don't get *any* of the :notes: or :handouts:
sections written out.  However, if I include empty level three and four
headlines (the stars followed by a mandatory space) I get the :notes:
and :handouts: sections just fine.  Except now I also get empty
\subsection{} and \subsubsection{} blocks in my latex output.  I have
attached the resulting .tex file with comments pointing out the
extra heading lines I would like to *not* see...

The net result is a lot of blank space in the resulting .pdf file
between the 'common' text and the note- or handout-specific text.  This
is *definitely* not what I had in mind.

Is there any way of working around this or correcting this behavior?

Mark

[-- Attachment #2: test.tex --]
[-- Type: application/x-tex, Size: 1377 bytes --]

[-- Attachment #3: Type: text/plain, Size: 201 bytes --]

_______________________________________________
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode

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

* Re: Selective Export Question
  2009-12-22  6:24 Selective Export Question Mark Elston
@ 2009-12-24 18:43 ` Mark Elston
  2009-12-24 19:10   ` Thomas S. Dye
  2010-01-03 13:20 ` Carsten Dominik
  1 sibling, 1 reply; 6+ messages in thread
From: Mark Elston @ 2009-12-24 18:43 UTC (permalink / raw)
  To: org-mode emacs-orgmode

So, no Christmas present for me? :)

Merry Christmas everyone.  Thanks for all the hard work and
the help over the last year.  Congratulations for working
together to produce such a fantastic tool.

Mark

Mark Elston wrote:
> I have been making progress on my use of org-mode to manage both
> my teaching notes and handouts in a single document.  However, there
> is something I still have not been able to make happen.  That is
> selective exporting of text *without* exporting a headline along with
> it.
> 
> Here is a sample of what I would like.  In this example I have sections
> with "common" text (should be in both teaching notes and handouts) and
> sections that are specific to each individual output format.  What I
> have below is set up to export the notes.  What I would like is to
> have the text (only) of the non-excluded sections and not the headlines.
> 
> --------------------------------------------------------------
> #+TITLE:     Test
> #+LaTeX_CLASS: ClassNotes
> 
> #+OPTIONS: toc:nil H:8 tags:nil
> 
> #+EXPORT_EXCLUDE_TAGS: handouts
> 
> * Headline 1
>   some text
> 
> ** Headline 1-1
>    even more text
> 
> * Headline 2
>   some more text
> 
> ** Headline 2-1
>    Common text 1.  Should be followed by handout or notes text.
> 
> ***** should be handouts only                :handouts:
>       handout text
> 
> ***** should be notes only                   :notes:
>       notes text
> 
> ** Headline 2-2
>    Common text 2.  Should be followed by handout or notes text.
> 
> *****                                        :handouts:
>       handout text again
> 
> *****                                        :notes:
>       notes text again
> --------------------------------------------------------------
> 
> 
> The relevant material from my org-export-latex-classes is:
> 
> ("ClassNotes" "\\documentclass[letter,twoside,openright]{memoir}
>  ...
>  ("\\chapter{%s}" . "\\chapter*{%s}")
>  ("\\section{%s}" . "\\section*{%s}")
>  ("\\subsection{%s}" . "\\subsection*{%s}")
>  ("\\subsubsection{%s}" . "\\subsubsection*{%s}")
>  ("%% Level 5" . "%% Level 5")
>  ("%% Level 6" . "%% Level 6")
>  ("%% Level 7" . "%% Level 7")
>  ("%% Level 8" . "%% Level 8"))
>  ...
> 
> 
> I was hoping to allow all levels of heading to be exported but only
> write comments for the levels below level 4.  It didn't work out that
> way.
> 
> With the above I don't get *any* of the :notes: or :handouts:
> sections written out.  However, if I include empty level three and four
> headlines (the stars followed by a mandatory space) I get the :notes:
> and :handouts: sections just fine.  Except now I also get empty
> \subsection{} and \subsubsection{} blocks in my latex output.  I have
> attached the resulting .tex file with comments pointing out the
> extra heading lines I would like to *not* see...
> 
> The net result is a lot of blank space in the resulting .pdf file
> between the 'common' text and the note- or handout-specific text.  This
> is *definitely* not what I had in mind.
> 
> Is there any way of working around this or correcting this behavior?
> 
> Mark
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> Emacs-orgmode mailing list
> Please use `Reply All' to send replies to the list.
> Emacs-orgmode@gnu.org
> http://lists.gnu.org/mailman/listinfo/emacs-orgmode

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

* Re: Selective Export Question
  2009-12-24 18:43 ` Mark Elston
@ 2009-12-24 19:10   ` Thomas S. Dye
  0 siblings, 0 replies; 6+ messages in thread
From: Thomas S. Dye @ 2009-12-24 19:10 UTC (permalink / raw)
  To: Mark Elston; +Cc: org-mode emacs-orgmode


[-- Attachment #1.1: Type: text/plain, Size: 5350 bytes --]

Merry Christmas Mark,

One way to create two LaTeX documents in the same org file using  
common elements and keeping fine control over the LaTeX output is to  
use Org-babel.

Here's an example from the Uses section of the Org-babel documentation  
on Worg:

>
> ** Example
>
> *** TODO Your name
>     - Enter your full name on the open line below.
> #+srcname: your-name
> #+begin_src latex
> Tom Dye
> #+end_src
>
> *** TODO Your email address
>     - Enter your email address on the open line below.
> #+srcname: your-email
> #+begin_src latex
> tsd at tsdye dot com
> #+end_src
>
> *** No data entry below this line
>     - The two source blocks here each produce a LaTeX document after
>       they are tangled with a call to =org-babel-tangle=.
>
> #+begin_src latex :noweb :tangle dist-form.tex
>   \documentclass[12pt]{article}
>   \begin{document}
>   \section{Distribution Form}
>   \begin{description}
>   \item[Name] <<your-name>>
>   \item[Email] <<your-email>>
>   \end{description}
>   \end{document}
> #+end_src
>
> #+begin_src latex :noweb :tangle file-form.tex
>   \documentclass[10pt]{article}
>   \begin{document}
>   \section{File Form}
>   <<your-name>> can be reached at <<your-email>>.
>   \end{document}
> #+end_src

To my mind, using Org-babel this way is kind of like using the Org- 
mode Agenda.  It frees the organization of your org file from the  
organization of some external model, leaving you to organize it in the  
way that makes the most sense to you.

That said, I'm relatively confident that there is some way to do what  
you want in Org-mode using the built-in LaTeX exporter, but I don't  
know what it might be.

All the best,
Tom

On Dec 24, 2009, at 8:43 AM, Mark Elston wrote:

> So, no Christmas present for me? :)
>
> Merry Christmas everyone.  Thanks for all the hard work and
> the help over the last year.  Congratulations for working
> together to produce such a fantastic tool.
>
> Mark
>
> Mark Elston wrote:
>> I have been making progress on my use of org-mode to manage both
>> my teaching notes and handouts in a single document.  However, there
>> is something I still have not been able to make happen.  That is
>> selective exporting of text *without* exporting a headline along with
>> it.
>> Here is a sample of what I would like.  In this example I have  
>> sections
>> with "common" text (should be in both teaching notes and handouts)  
>> and
>> sections that are specific to each individual output format.  What I
>> have below is set up to export the notes.  What I would like is to
>> have the text (only) of the non-excluded sections and not the  
>> headlines.
>> --------------------------------------------------------------
>> #+TITLE:     Test
>> #+LaTeX_CLASS: ClassNotes
>> #+OPTIONS: toc:nil H:8 tags:nil
>> #+EXPORT_EXCLUDE_TAGS: handouts
>> * Headline 1
>>  some text
>> ** Headline 1-1
>>   even more text
>> * Headline 2
>>  some more text
>> ** Headline 2-1
>>   Common text 1.  Should be followed by handout or notes text.
>> ***** should be handouts only                :handouts:
>>      handout text
>> ***** should be notes only                   :notes:
>>      notes text
>> ** Headline 2-2
>>   Common text 2.  Should be followed by handout or notes text.
>> *****                                        :handouts:
>>      handout text again
>> *****                                        :notes:
>>      notes text again
>> --------------------------------------------------------------
>> The relevant material from my org-export-latex-classes is:
>> ("ClassNotes" "\\documentclass[letter,twoside,openright]{memoir}
>> ...
>> ("\\chapter{%s}" . "\\chapter*{%s}")
>> ("\\section{%s}" . "\\section*{%s}")
>> ("\\subsection{%s}" . "\\subsection*{%s}")
>> ("\\subsubsection{%s}" . "\\subsubsection*{%s}")
>> ("%% Level 5" . "%% Level 5")
>> ("%% Level 6" . "%% Level 6")
>> ("%% Level 7" . "%% Level 7")
>> ("%% Level 8" . "%% Level 8"))
>> ...
>> I was hoping to allow all levels of heading to be exported but only
>> write comments for the levels below level 4.  It didn't work out that
>> way.
>> With the above I don't get *any* of the :notes: or :handouts:
>> sections written out.  However, if I include empty level three and  
>> four
>> headlines (the stars followed by a mandatory space) I get the :notes:
>> and :handouts: sections just fine.  Except now I also get empty
>> \subsection{} and \subsubsection{} blocks in my latex output.  I have
>> attached the resulting .tex file with comments pointing out the
>> extra heading lines I would like to *not* see...
>> The net result is a lot of blank space in the resulting .pdf file
>> between the 'common' text and the note- or handout-specific text.   
>> This
>> is *definitely* not what I had in mind.
>> Is there any way of working around this or correcting this behavior?
>> Mark
>> ------------------------------------------------------------------------
>> _______________________________________________
>> Emacs-orgmode mailing list
>> Please use `Reply All' to send replies to the list.
>> Emacs-orgmode@gnu.org
>> http://lists.gnu.org/mailman/listinfo/emacs-orgmode
>
>
>
> _______________________________________________
> Emacs-orgmode mailing list
> Please use `Reply All' to send replies to the list.
> Emacs-orgmode@gnu.org
> http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[-- Attachment #1.2: Type: text/html, Size: 11966 bytes --]

[-- Attachment #2: Type: text/plain, Size: 201 bytes --]

_______________________________________________
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode

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

* Re: Selective Export Question
  2009-12-22  6:24 Selective Export Question Mark Elston
  2009-12-24 18:43 ` Mark Elston
@ 2010-01-03 13:20 ` Carsten Dominik
  2010-01-03 16:15   ` Mark Elston
  1 sibling, 1 reply; 6+ messages in thread
From: Carsten Dominik @ 2010-01-03 13:20 UTC (permalink / raw)
  To: Mark Elston; +Cc: org-mode emacs-orgmode


On Dec 22, 2009, at 7:24 AM, Mark Elston wrote:

> I have been making progress on my use of org-mode to manage both
> my teaching notes and handouts in a single document.  However, there
> is something I still have not been able to make happen.  That is
> selective exporting of text *without* exporting a headline along with
> it.
>
> Here is a sample of what I would like.  In this example I have  
> sections
> with "common" text (should be in both teaching notes and handouts) and
> sections that are specific to each individual output format.  What I
> have below is set up to export the notes.  What I would like is to
> have the text (only) of the non-excluded sections and not the  
> headlines.

Hi Mark,

I think the right path for this is a function that you write and install
in org-export-preprocess-hook.  Then you can set your own conditions and
remove those headlines before Org even tries to look at them.

HTH

- Carsten



>
> --------------------------------------------------------------
> #+TITLE:     Test
> #+LaTeX_CLASS: ClassNotes
>
> #+OPTIONS: toc:nil H:8 tags:nil
>
> #+EXPORT_EXCLUDE_TAGS: handouts
>
> * Headline 1
>  some text
>
> ** Headline 1-1
>   even more text
>
> * Headline 2
>  some more text
>
> ** Headline 2-1
>   Common text 1.  Should be followed by handout or notes text.
>
> ***** should be handouts only                :handouts:
>      handout text
>
> ***** should be notes only                   :notes:
>      notes text
>
> ** Headline 2-2
>   Common text 2.  Should be followed by handout or notes text.
>
> *****                                        :handouts:
>      handout text again
>
> *****                                        :notes:
>      notes text again
> --------------------------------------------------------------
>
>
> The relevant material from my org-export-latex-classes is:
>
> ("ClassNotes" "\\documentclass[letter,twoside,openright]{memoir}
> ...
> ("\\chapter{%s}" . "\\chapter*{%s}")
> ("\\section{%s}" . "\\section*{%s}")
> ("\\subsection{%s}" . "\\subsection*{%s}")
> ("\\subsubsection{%s}" . "\\subsubsection*{%s}")
> ("%% Level 5" . "%% Level 5")
> ("%% Level 6" . "%% Level 6")
> ("%% Level 7" . "%% Level 7")
> ("%% Level 8" . "%% Level 8"))
> ...
>
>
> I was hoping to allow all levels of heading to be exported but only
> write comments for the levels below level 4.  It didn't work out that
> way.
>
> With the above I don't get *any* of the :notes: or :handouts:
> sections written out.  However, if I include empty level three and  
> four
> headlines (the stars followed by a mandatory space) I get the :notes:
> and :handouts: sections just fine.  Except now I also get empty
> \subsection{} and \subsubsection{} blocks in my latex output.  I have
> attached the resulting .tex file with comments pointing out the
> extra heading lines I would like to *not* see...
>
> The net result is a lot of blank space in the resulting .pdf file
> between the 'common' text and the note- or handout-specific text.   
> This
> is *definitely* not what I had in mind.
>
> Is there any way of working around this or correcting this behavior?
>
> Mark
> <test.tex>_______________________________________________
> Emacs-orgmode mailing list
> Please use `Reply All' to send replies to the list.
> Emacs-orgmode@gnu.org
> http://lists.gnu.org/mailman/listinfo/emacs-orgmode

- Carsten

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

* Re: Selective Export Question
  2010-01-03 13:20 ` Carsten Dominik
@ 2010-01-03 16:15   ` Mark Elston
  2010-01-03 17:52     ` Carsten Dominik
  0 siblings, 1 reply; 6+ messages in thread
From: Mark Elston @ 2010-01-03 16:15 UTC (permalink / raw)
  To: Carsten Dominik; +Cc: org-mode emacs-orgmode

Carsten Dominik wrote:
> 
> On Dec 22, 2009, at 7:24 AM, Mark Elston wrote:
> 
>> I have been making progress on my use of org-mode to manage both
>> my teaching notes and handouts in a single document.  However, there
>> is something I still have not been able to make happen.  That is
>> selective exporting of text *without* exporting a headline along with
>> it.
>>
>> Here is a sample of what I would like.  In this example I have sections
>> with "common" text (should be in both teaching notes and handouts) and
>> sections that are specific to each individual output format.  What I
>> have below is set up to export the notes.  What I would like is to
>> have the text (only) of the non-excluded sections and not the headlines.
> 
> Hi Mark,
> 
> I think the right path for this is a function that you write and install
> in org-export-preprocess-hook.  Then you can set your own conditions and
> remove those headlines before Org even tries to look at them.
> 
> HTH
> 
> - Carsten
> 
> 
> 

Thanks, Carsten.

It is amazing how much infrastructure there is to support so many
features.  I wasn't aware of all the hooks available and this one
escaped my attention.  I will look into it.  My elisp isn't as good
as my C++ (or Python, or Perl...) but it is probably good enough to
make use of this.

Mark

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

* Re: Selective Export Question
  2010-01-03 16:15   ` Mark Elston
@ 2010-01-03 17:52     ` Carsten Dominik
  0 siblings, 0 replies; 6+ messages in thread
From: Carsten Dominik @ 2010-01-03 17:52 UTC (permalink / raw)
  To: Mark Elston; +Cc: org-mode emacs-orgmode

Hi Mark,

there are about 100 hooks, see

http://orgmode.org/worg/org-configs/org-hooks.php

And I am very happy to add more, wherever these is a use for it.

- Carsten

On Jan 3, 2010, at 5:15 PM, Mark Elston wrote:

> Carsten Dominik wrote:
>> On Dec 22, 2009, at 7:24 AM, Mark Elston wrote:
>>> I have been making progress on my use of org-mode to manage both
>>> my teaching notes and handouts in a single document.  However, there
>>> is something I still have not been able to make happen.  That is
>>> selective exporting of text *without* exporting a headline along  
>>> with
>>> it.
>>>
>>> Here is a sample of what I would like.  In this example I have  
>>> sections
>>> with "common" text (should be in both teaching notes and handouts)  
>>> and
>>> sections that are specific to each individual output format.  What I
>>> have below is set up to export the notes.  What I would like is to
>>> have the text (only) of the non-excluded sections and not the  
>>> headlines.
>> Hi Mark,
>> I think the right path for this is a function that you write and  
>> install
>> in org-export-preprocess-hook.  Then you can set your own  
>> conditions and
>> remove those headlines before Org even tries to look at them.
>> HTH
>> - Carsten
>
> Thanks, Carsten.
>
> It is amazing how much infrastructure there is to support so many
> features.  I wasn't aware of all the hooks available and this one
> escaped my attention.  I will look into it.  My elisp isn't as good
> as my C++ (or Python, or Perl...) but it is probably good enough to
> make use of this.
>
> Mark

- Carsten

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

end of thread, other threads:[~2010-01-03 17:52 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-12-22  6:24 Selective Export Question Mark Elston
2009-12-24 18:43 ` Mark Elston
2009-12-24 19:10   ` Thomas S. Dye
2010-01-03 13:20 ` Carsten Dominik
2010-01-03 16:15   ` Mark Elston
2010-01-03 17:52     ` Carsten Dominik

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