From: John Hendy <jw.hendy@gmail.com>
To: emacs-orgmode <emacs-orgmode@gnu.org>
Subject: Spelled out example of org-latex-format-headline-function customization?
Date: Mon, 18 Mar 2013 21:56:06 -0500 [thread overview]
Message-ID: <CA+M2ft8c9FHiy2Qvcf3XaAFTKSnLK-UoAkXcsiK8Xi5ji0xMhw@mail.gmail.com> (raw)
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
next reply other threads:[~2013-03-19 2:56 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-03-19 2:56 John Hendy [this message]
2013-03-19 15:51 ` Spelled out example of org-latex-format-headline-function customization? Bastien
2013-03-19 16:18 ` John Hendy
2013-03-19 16:30 ` Charles Berry
2013-03-19 16:37 ` Bastien
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CA+M2ft8c9FHiy2Qvcf3XaAFTKSnLK-UoAkXcsiK8Xi5ji0xMhw@mail.gmail.com \
--to=jw.hendy@gmail.com \
--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 external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.