[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Orgmode] Sectioning in LaTeX export

From: Mark Elston
Subject: Re: [Orgmode] Sectioning in LaTeX export
Date: Wed, 08 Apr 2009 07:57:08 -0700
User-agent: Thunderbird (Windows/20090302)

Nick Dokos wrote:

I tried (on Org-mode version 6.25b) the following simple test and it
seems to work OK (see attached tex.file) - note that (at least afaik)
there is a one-one correspondence between the heading level and the
LaTeX construct: that is controlled in a limited way by the variable
org-export-latex-classes (see below).

* main file book.org:

| #+TITLE:  My Tasks
| #+OPTIONS: H:5 num:t d:nil
| #+LaTeX_CLASS: book
| | | * Part 1
| #+INCLUDE: "ch1.org"
| | #+INCLUDE: "ch2.org"

It appears that the key is in this file.  This file *must* have
a headline of level 1 or nothing else works.  Who knew?  (Except
Carsten, of course)  :)

* Chapter 1 file:

| ** First chapter
| *** Introduction
| *** Elaboration
| *** Proof
| **** Subsection 3.1
| **** Subsection 3.2
| *** Summary

* Chapter 2 file:

| ** Chapter 2
| *** Section 1
| *** Section 2
| **** Subsection 2.1
| **** Subsection 2.2
| *** Section 3
| *** Section 4

But you'll have to compromise a bit:
o you'll have to make the chapters at least level 1 - but you can
  use M-S-<right> or M-S-<left> to demote/promote the whole tree,
  as long as the top level is >= 1.

Your example doesn't show this as both have level 2 trees, but, yes,
if the main file has a level 1 headline *before* including any further
files then the structure is honored.

This is a little awkward but not too bad.

o you can edit the book portion of org-export-latex-classes to change the
  correspondence of level to LaTeX construct:

Yeah, I am using a custom org-export-latex-classes so I can use memoir
and do some further customizations.

o Note also that the H:5 setting controls not only the tocdepth
in LaTeX but it also affects how levels >= (H value) correspond
to LaTeX constructs - what would become a subsection given a high
enough value for H, actually becomes an \itemize for a lower value.
I observer this experimentally and I have no idea if there is some
other way of getting around it.

I am going to play around with this.  I looked at the code for the latex
exporting and had trouble following it (I am not a lisp expert by any

Thanks for discovering this.  I would not have tried this as I am
keeping different kinds of information in different files and simply
using a 'main' file to group them for 'pretty-printing'.  It's not
really a book.  It is my notes of ongoing tasks for my team that I use
for my 'Management by Walking Around' style... :)  One chapter is for
ongoing tasks, one chapter for bugs, one chapter for project schedule
items, etc.  They are short chapters but having it all collected
simplifies my life when I go into meetings and need to report on the
progress of any particular item.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]