emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* LaTeX export - customize own class
@ 2009-09-28 14:41 henry atting
  2009-09-29  3:02 ` Carsten Dominik
  0 siblings, 1 reply; 5+ messages in thread
From: henry atting @ 2009-09-28 14:41 UTC (permalink / raw)
  To: emacs-orgmode

I am trying to customize the orgmode export to the LaTeX class `play`
A first level heading will then become the LaTeX \speaker{}, the text
under this heading will become the text the speaker says. No problem so
far, but some questions remain:

- How can I prevent the export function from creating a titlepage and a
  table of contents?
- Most important: Every header is provided with a label. How can I
  supress this?
- Finally, is it possible to automatically insert something *after*
  \begin{document}, something like \begin..\end{play}?

henry



-- 
http://literaturlatenight.de

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

* Re: LaTeX export - customize own class
  2009-09-28 14:41 LaTeX export - customize own class henry atting
@ 2009-09-29  3:02 ` Carsten Dominik
  2009-09-29  5:32   ` henry atting
  0 siblings, 1 reply; 5+ messages in thread
From: Carsten Dominik @ 2009-09-29  3:02 UTC (permalink / raw)
  To: henry atting; +Cc: emacs-orgmode


On Sep 28, 2009, at 4:41 PM, henry atting wrote:

> I am trying to customize the orgmode export to the LaTeX class `play`
> A first level heading will then become the LaTeX \speaker{}, the text
> under this heading will become the text the speaker says. No problem  
> so
> far, but some questions remain:
>
> - How can I prevent the export function from creating a titlepage  
> and a
>  table of contents?

    #+TITLE:

with no title specified will turn off the title.

    #+OPTIONS: toc:nil

will turn off the table of contents.


> - Most important: Every header is provided with a label. How can I
>  supress this?

You cannot, really.
However, I have just added a new hook, org-export-latex-final-hook.
You could use it to test if the class is "play", and if yes, run through
the buffer and remove all labels.

> - Finally, is it possible to automatically insert something *after*
>  \begin{document}, something like \begin..\end{play}?

You could also use the hook to do this.

HTH

- Carsten

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

* Re: LaTeX export - customize own class
  2009-09-29  3:02 ` Carsten Dominik
@ 2009-09-29  5:32   ` henry atting
  2009-09-29  5:55     ` Nick Dokos
  0 siblings, 1 reply; 5+ messages in thread
From: henry atting @ 2009-09-29  5:32 UTC (permalink / raw)
  To: Carsten Dominik; +Cc: emacs-orgmode, henry atting

On Di, Sep 29 2009, Carsten Dominik wrote:

> On Sep 28, 2009, at 4:41 PM, henry atting wrote:
>
>> I am trying to customize the orgmode export to the LaTeX class `play`
>> A first level heading will then become the LaTeX \speaker{}, the text
>> under this heading will become the text the speaker says. No problem
>> so
>> far, but some questions remain:
>>
>> - How can I prevent the export function from creating a titlepage
>> and a
>>  table of contents?
>
>    #+TITLE:
>
> with no title specified will turn off the title.
>
>    #+OPTIONS: toc:nil
>
> will turn off the table of contents.

Ah, I did know it already but forgot it. I ordered `Improve Your Memory
in 600 Days' right away.
>
>> - Most important: Every header is provided with a label. How can I
>>  supress this?
>
> You cannot, really.
> However, I have just added a new hook, org-export-latex-final-hook.
> You could use it to test if the class is "play", and if yes, run through
> the buffer and remove all labels.
>
>> - Finally, is it possible to automatically insert something *after*
>>  \begin{document}, something like \begin..\end{play}?
>
> You could also use the hook to do this.

I pulled the newest git version, reloaded org.el  and tried to load the hook with

(add-hook 'org-mode-hook 'org-export-latex-final-hook)

but when I am trying to export an org file to LaTeX I get an error message:

run-hooks: Symbol's function definition is void:
org-export-latex-final-hook

henry

-- 
http://literaturlatenight.de

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

* Re: Re: LaTeX export - customize own class
  2009-09-29  5:32   ` henry atting
@ 2009-09-29  5:55     ` Nick Dokos
  2009-09-29  7:47       ` henry atting
  0 siblings, 1 reply; 5+ messages in thread
From: Nick Dokos @ 2009-09-29  5:55 UTC (permalink / raw)
  To: henry atting; +Cc: emacs-orgmode, Carsten Dominik

henry atting <nsmp_01@online.de> wrote:


> I pulled the newest git version, reloaded org.el  and tried to load the hook with
> 
> (add-hook 'org-mode-hook 'org-export-latex-final-hook)
> 
> but when I am trying to export an org file to LaTeX I get an error message:
> 
> run-hooks: Symbol's function definition is void:
> org-export-latex-final-hook
> 

org-export-latex-final-hook is just another hook, so you have to use it
like this:

(defun my-func ()
       <body>
       )

(add-hook 'org-export-latex-final-hook (function my-func))

Then your function will be called at the time that the hook is run:
after the latex export is done.

HTH,
Nick

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

* Re: LaTeX export - customize own class
  2009-09-29  5:55     ` Nick Dokos
@ 2009-09-29  7:47       ` henry atting
  0 siblings, 0 replies; 5+ messages in thread
From: henry atting @ 2009-09-29  7:47 UTC (permalink / raw)
  To: nicholas.dokos; +Cc: emacs-orgmode, henry atting, Carsten Dominik

On Di, Sep 29 2009, Nick Dokos wrote:

> henry atting <nsmp_01@online.de> wrote:
>
>
>> I pulled the newest git version, reloaded org.el  and tried to load the hook with
>> 
>> (add-hook 'org-mode-hook 'org-export-latex-final-hook)
>> 
>> but when I am trying to export an org file to LaTeX I get an error message:
>> 
>> run-hooks: Symbol's function definition is void:
>> org-export-latex-final-hook
>> 
>
> org-export-latex-final-hook is just another hook, so you have to use it
> like this:
>
> (defun my-func ()
>        <body>
>        )
>
> (add-hook 'org-export-latex-final-hook (function my-func))
>
> Then your function will be called at the time that the hook is run:
> after the latex export is done.

I see, many thanks

henry

-- 
http://literaturlatenight.de

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

end of thread, other threads:[~2009-09-29  7:47 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-09-28 14:41 LaTeX export - customize own class henry atting
2009-09-29  3:02 ` Carsten Dominik
2009-09-29  5:32   ` henry atting
2009-09-29  5:55     ` Nick Dokos
2009-09-29  7:47       ` henry atting

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