From mboxrd@z Thu Jan 1 00:00:00 1970 From: Carsten Dominik Subject: Re: Unnumbered sections in LaTeX export Date: Fri, 18 Sep 2009 18:29:32 +0100 Message-ID: References: <871046FB-9139-42CE-A996-15EA1A6B635D@tsdye.com> <871vm9z38k.fsf@gmx.de> <1CCB79D7-DB7A-4274-B6E8-F53EE2B69638@tsdye.com> <87ocpcvq2t.fsf@gmx.de> <70DA6B2C-D450-4679-AF11-C35EBCA21743@tsdye.com> <87iqfkayuc.fsf@gmx.de> <401F602E-41B3-480B-8097-6A8C7CEF90CF@tsdye.com> Mime-Version: 1.0 (Apple Message framework v936) Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MohHC-0000Yc-5J for emacs-orgmode@gnu.org; Fri, 18 Sep 2009 13:29:42 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MohH7-0000XZ-Gs for emacs-orgmode@gnu.org; Fri, 18 Sep 2009 13:29:41 -0400 Received: from [199.232.76.173] (port=55485 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MohH7-0000XW-7c for emacs-orgmode@gnu.org; Fri, 18 Sep 2009 13:29:37 -0400 Received: from ey-out-1920.google.com ([74.125.78.145]:9075) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MohH6-0001Ji-LE for emacs-orgmode@gnu.org; Fri, 18 Sep 2009 13:29:36 -0400 Received: by ey-out-1920.google.com with SMTP id 3so576723eyh.34 for ; Fri, 18 Sep 2009 10:29:35 -0700 (PDT) In-Reply-To: <401F602E-41B3-480B-8097-6A8C7CEF90CF@tsdye.com> 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: "Thomas S. Dye" Cc: emacs-orgmode@gnu.org Hi Thomas, I have not really looks at this problem, but would it help to use a clever combination of org-export-latex-low-levels and org- export=headline-levels? - Carsten On Sep 15, 2009, at 11:04 PM, Thomas S. Dye wrote: > > On Sep 15, 2009, at 7:42 AM, Sebastian Rose wrote: > >> "Thomas S. Dye" writes: >> >>> Thanks Sebastian. I appreciate the expert assistance. I have a >>> simple export >>> to Beamer working and was trying to implement automatic export of >>> columns, too. >>> The starred sections were going to be placeholders for the >>> columns heading >>> level when it wasn't used. I've found that skipping a headline >>> level in the >>> source causes the latex exporter to skip over subsequent inferior >>> levels, so it >>> isn't possible to assign a heading level to columns and then use >>> them or not as >>> the case requires. >> >> You could try to add a class to `org-export-latex-classes'. For >> such a >> class, you can define a mapping for each headline level: >> >> >> ("my-beamer-class" "\\documentclass...\\usepackage{beamer}" >> ("\\chapter{%s}" . "\\my-chapter*{%s}") >> ("\\section{%s}" . "\\my-section*{%s}") >> ("\\subsection{%s}" . "\\my-subsection*{%s}") >> ("\\subsubsection{%s}" . "\\my-subsubsection*{%s}"))) >> >> I don't know if this is an easy thing to do, since I only did this >> once >> a long time ago. >> But it seems it's worth a try. >> >> >> See: >> http://orgmode.org/manual/Sectioning-structure.html#Sectioning-structure >> http://127.0.0.1/devel/org-notes/org-search.php?speedbar=1&main=/devel/org-notes/org-search.php >> >> >> >> >> Sebastian > > Yes, that is what I'm playing around with. I have a useful, but > simple export to beamer working. I've been trying without success > to implement beamer's \begin{columns} ... \end{columns} > environment. This is a fairly common construct in beamer that > occurs inside some frames but not in others. It seems natural to > put it like this: > > ("\\section{%s}" . "\\section{%s}") > ("\\subsection{%s}" . "\\subsection{%s}") > ("\\begin{frame}\\frametitle{%s}" "\\end{frame}" "\\begin{frame}\ > \frametitle{%s}" "\\end{frame}") > ("\\begin{columns}\\label{%s}" "\\end{columns}" "\\begin{columns}\ > \label{%s}" "\\end{columns}") > > where the \label{%s} puts the mandatory use of %s somewhere it won't > affect the LaTeX compilation. > > The problem with this is that for frames where columns aren't > wanted, simply leaving out the fourth level in org means that > everything below it won't be exported. > > This example results in an empty frame (Item 1 and Item 2 are > dropped from the export): > > * Section head > ** Subsection head > *** Frame title > ***** Item 1 > ***** Item 2 > > It seems that a placeholder of some kind is needed if the columns > environment isn't wanted. > > Initially, I explored using the definition for the unnumbered > sections, like this: > > ("\\begin{columns}\\label{%s}" "\\end{columns}" "%%\\begin{columns}\ > \label{%s}" "%%\\end{columns}") > > which would use a LaTeX comment as a placeholder. This won't work > because the switch for numbered/unnumbered sections is set at the > file level and not for individual instances. > > Then, I thought to define a do-nothing environment in LaTeX > > \newenvironment{nocolumns}{}{} > > set it up in .emacs like this: > > ("\\begin{%s}" "\\end{%s}" "\\begin{%s}" "\\end{%s}") > > and then put this in my .org file: > > * Section head > ** Subsection head > *** Frame title > **** nocolumns > ***** Item 1 > ***** Item 2 > > But this doesn't work because %s doesn't expand in \\end{%s}. I get > \begin{nocolumns} ... \end{%s}, which LaTeX doesn't like. > > So, I'm stumped for now, but still pleased to have a simple export > from org to beamer working, albeit one that produces frames without > columns. > > All the best, > Tom > > > > > > _______________________________________________ > Emacs-orgmode mailing list > Remember: use `Reply All' to send replies to the list. > Emacs-orgmode@gnu.org > http://lists.gnu.org/mailman/listinfo/emacs-orgmode