From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Thomas S. Dye" Subject: Re: Selective Export Question Date: Thu, 24 Dec 2009 09:10:43 -1000 Message-ID: <39BC524B-EB68-4B15-82E7-E14BC144C225@tsdye.com> References: <4B30662A.4010302@comcast.net> <4B33B65F.3080200@comcast.net> Mime-Version: 1.0 (Apple Message framework v936) Content-Type: multipart/mixed; boundary="===============0227420842==" Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NNt5L-0003qU-QC for emacs-orgmode@gnu.org; Thu, 24 Dec 2009 14:10:55 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NNt5H-0003lT-8Q for emacs-orgmode@gnu.org; Thu, 24 Dec 2009 14:10:55 -0500 Received: from [199.232.76.173] (port=55828 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NNt5G-0003lF-Uw for emacs-orgmode@gnu.org; Thu, 24 Dec 2009 14:10:51 -0500 Received: from outbound-mail-302.bluehost.com ([67.222.53.9]:40770) by monty-python.gnu.org with smtp (Exim 4.60) (envelope-from ) id 1NNt5G-0007M5-85 for emacs-orgmode@gnu.org; Thu, 24 Dec 2009 14:10:50 -0500 In-Reply-To: <4B33B65F.3080200@comcast.net> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Mark Elston Cc: org-mode emacs-orgmode --===============0227420842== Content-Type: multipart/alternative; boundary=Apple-Mail-21--93197602 --Apple-Mail-21--93197602 Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit 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] <> > \item[Email] <> > \end{description} > \end{document} > #+end_src > > #+begin_src latex :noweb :tangle file-form.tex > \documentclass[10pt]{article} > \begin{document} > \section{File Form} > <> can be reached at <>. > \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 --Apple-Mail-21--93197602 Content-Type: text/html; charset=US-ASCII Content-Transfer-Encoding: quoted-printable 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 = =3Dorg-babel-tangle=3D.

#+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 =             &n= bsp;  :handouts:
=      handout text
***** should be notes only =             &n= bsp;     :notes:
     notes = text
** Headline = 2-2
  Common text = 2.  Should be followed by handout or notes = text.
***** =             &n= bsp;           &nbs= p;            =   :handouts:
=      handout text = again
***** =             &n= bsp;           &nbs= p;            =   :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
<= br>= --Apple-Mail-21--93197602-- --===============0227420842== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ 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 --===============0227420842==--