emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Inline tasks and latex export
@ 2011-09-07 15:55 Christopher Witte
  2011-09-07 16:30 ` Jambunathan K
  0 siblings, 1 reply; 2+ messages in thread
From: Christopher Witte @ 2011-09-07 15:55 UTC (permalink / raw)
  To: Org Mode

Hi all,

I've been trying to get inline tasks to work with the todonotes 
package.  I found some information on getting the \todo{} command to 
work but I couldn't find any info on getting the \missingfigure{} 
command to work.  Here is the solution that I came up with (mostly 
stolen from org-inlinetask.el):

Add the follow 3 lines to the start of the document:
#+LATEX_HEADER: \usepackage{todonotes}
#+TODO: TODO | DONE
#+TODO: MISSINGFIGURE | FIGUREDONE

and put this in your .emacs file
;; This should give better export of inline tasks to latex
;; #+LATEX_HEADER: \usepackage{todonotes} at the start of the org file
(setq org-inlinetask-export-templates (cons '(latex "%s %s}%s}"
                             '((if (equal todo "MISSINGFIGURE")
                               (eval "\\missingfigure{")
                             (if (equal todo "") (eval 
"\\todo[inline]{\\textbf{") (format 
"\\todo[inline]{\\textbf{\\textsc\{%s}" todo))
                             )
                             heading content))
                         org-inlinetask-export-templates))

It works but seeing that I'm not very good with elisp, I suspect it 
could be improved on.  For instance this just adds an extra entry to 
org-inlinetask-export-templates instead of replacing the existing 
"latex" entry.  Any help on improving this would be greatly appreciated.

Cheers,
Chris Witte.

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

end of thread, other threads:[~2011-09-07 16:31 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-09-07 15:55 Inline tasks and latex export Christopher Witte
2011-09-07 16:30 ` Jambunathan K

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