emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Brady Trainor <algebrat@uw.edu>
To: emacs-orgmode@gnu.org
Subject: Re: No title in org-export-as-odt
Date: Mon, 27 Jan 2014 06:31:48 +0000 (UTC)	[thread overview]
Message-ID: <loom.20140127T072132-351@post.gmane.org> (raw)
In-Reply-To: 1348466593.45471.YahooMailClassic@web133101.mail.ir2.yahoo.com

Miguel Ruiz <rbenit68 <at> yahoo.es> writes:

> > > Any hint to get rid of the title in a org-export-as-odt
> > session?

I had the same problem. I noticed a lot of new lines, `\n', so I tried to
remove more than "just title". For my solution, I changed insert to ignore. 


      ;; Preamble - Title, Author, Date etc.
      (ignore 
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
changed insert to ignore
       (let* ((title (org-export-data (plist-get info :title) info))
	      (author (and (plist-get info :with-author)
			   (let ((auth (plist-get info :author)))
			     (and auth (org-export-data auth info)))))
	      (email (plist-get info :email))
	      ;; Switch on or off above vars based on user settings
	      (author (and (plist-get info :with-author) (or author email)))
	      (email (and (plist-get info :with-email) email)))
	 (concat
	  ;; Title.
	  (when title
	    (concat
	     (format "\n<text:p text:style-name=\"%s\">%s</text:p>"
		     "OrgTitle" (format "\n<text:title>%s</text:title>" title))
	     ;; Separator.
	     "\n<text:p text:style-name=\"OrgTitle\"/>"))



This was in .emacs.d/elpa/org-[...]/ox-odt.el, that is, org export to odt.
Also, not sure if it was necessary, but I deleted ox-odt.elc, the compiled
version. 


Brady 


> 
> org-odt-format-preamble function says:
> 
> ...
> (when title
>        (concat
>     (org-odt-format-stylized-paragraph
>      'title (org-odt-format-tags
>          '("<text:title>" . "</text:title>") title))
>     ;; separator
>     "<text:p text:style-name=\"OrgTitle\"/>"))
> ...
> 
> So I only need to find a way to assign nil to title variable inside the
document.
> 
> Also I might define a new option with org-export-inbuffer-options-extra,
but the elaboration of the
> function is beyond my knowledge.
> 
> I would appreciate any idea.
> 

  parent reply	other threads:[~2014-01-27  6:32 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-09-24  6:03 No title in org-export-as-odt Miguel Ruiz
2012-09-24  6:42 ` Nick Dokos
2012-09-24 12:10 ` Giovanni Ridolfi
2014-01-27  6:31 ` Brady Trainor [this message]
2014-01-27 10:35   ` Bastien
2014-03-28  6:05     ` [PATCH] " Brady Trainor
2014-04-16 14:38       ` Bastien
2014-01-27 14:23   ` Jambunathan K
  -- strict thread matches above, loose matches on Subject: below --
2012-09-23 16:56 Miguel Ruiz
2012-09-23 18:09 ` Bastien
2014-03-28  9:11 ` Nicolas Goaziou

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=loom.20140127T072132-351@post.gmane.org \
    --to=algebrat@uw.edu \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).