emacs-orgmode
[Top][All Lists]
Advanced

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

[O] Spelled out example of org-latex-format-headline-function customizat


From: John Hendy
Subject: [O] Spelled out example of org-latex-format-headline-function customization?
Date: Mon, 18 Mar 2013 21:56:06 -0500

Like this post, I'm trying to transfer over my tag formatting for
LaTeX export into the new exporter:
- http://www.mail-archive.com/address@hidden/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



reply via email to

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