emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Spelled out example of org-latex-format-headline-function customization?
@ 2013-03-19  2:56 John Hendy
  2013-03-19 15:51 ` Bastien
  0 siblings, 1 reply; 5+ messages in thread
From: John Hendy @ 2013-03-19  2:56 UTC (permalink / raw)
  To: emacs-orgmode

Like this post, I'm trying to transfer over my tag formatting for
LaTeX export into the new exporter:
- http://www.mail-archive.com/emacs-orgmode@gnu.org/msg65287.html

In that post, the following is suggested:

#+begin_quote Charles Berry

M-x customize-variable RET org-latex-format-headline-function RET

then copy and paste the last part of the docstring into the window - add a
closing parenthesis at the end - and then modify it to your taste.

#+end_quote

When I do that, however, I get this in the customize buffer:

#+begin_src customize buffer
Hide Org Latex Format Headline Function:
org-latex-format-headline-default-function
   State : STANDARD.
   Function for formatting the headline's text. Hide

   This function will be called with 5 arguments:
   TODO      the todo keyword (string or nil).
   TODO-TYPE the type of todo (symbol: `todo', `done', nil)
   PRIORITY  the priority of the headline (integer or nil)
   TEXT      the main headline text (string).
   TAGS      the tags as a list of strings (list of strings or nil).

   The function result will be used in the section format string.

   Use `org-latex-format-headline-default-function' by default,
   which format headlines like for Org version prior to 8.0.

#+end_src

Am I missing the "docstring" (not sure what that is). I think it would
be wonderful to simply spell out what
=org-latex-format-headline-default-function= *is* in plain language,
in the customize buffer.

ETA: perhaps the plain language docstring used to be there, but was
then replaced with a function?
- http://lists.gnu.org/archive/html/emacs-orgmode/2013-02/msg01306.html

In looking through ox-latex.el, I found this:

#+begin_src ox-latex.el

(concat
   (and todo (format "{\\bfseries\\sffamily %s} " todo))
   (and priority (format "\\framebox{\\#%c} " priority))
   text
   (and tags
        (format "\\hfill{}\\textsc{%s}" (mapconcat 'identity tags ":")))))

#+end_src

For myself, not being familiar with elisp, it's unclear how to
translate that to a variable setting. I'm thinking at least some of
that is unnecessary for actually setting the variable. If not, my best
guess was:

#+begin_src .emacs

(setq org-latex-format-headline-function (concat
   (and todo (format "{\\bfseries\\sffamily %s} " todo))
   (and priority (format "\\framebox{\\#%c} " priority))
   text
   (and tags
        (format "\\hfill{}\\textsc{%s}" (mapconcat 'identity tags ":")))))

#+end_src

That didn't work.


Thanks for enduring those of us with no elisp background knowledge.


Best regards,
John

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

end of thread, other threads:[~2013-03-19 16:37 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-03-19  2:56 Spelled out example of org-latex-format-headline-function customization? John Hendy
2013-03-19 15:51 ` Bastien
2013-03-19 16:18   ` John Hendy
2013-03-19 16:30     ` Charles Berry
2013-03-19 16:37     ` Bastien

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