On 2015-04-12, at 10:59, Vikas Rawal <vikasli...@agrarianresearch.org> wrote:

>>> How do I get a headline to be exported like this?
>>> 
>>> 
>>> \section[Effect on staff turnover]{An analysis of the
>>> effect of the revised recruitment policies on staff
>>> turnover at divisional headquarters}
>>> 
>>> 
>>> That is, with an extra short-title to be used in Table of Contents and
>>> other running heads?
>> 
>> See :ALT_TITLE: property.
>> 
>
> ALT_TITLE seems to work only for those headlines that appear in the Table of 
> Contents. While that is the main purpose, this does not have to be 
> necessarily the case. In the present case, I need it because LaTeX would not 
> accept a footnote to a heading without it.

True.  This is because org-latex-headline is written this way:

,----
| (if (and numberedp opt-title
| ;;   ^^^ ^^^^^^^^^ why this?  Maybe there's a good reason...
|                  (not (equal opt-title full-text))
|                  (string-match "\\`\\\\\\(.*?[^*]\\){" section-fmt))
|             (...)
|           ;; Impossible to add an alternative heading.  Fallback to
|           ;; regular sectioning format string.
|           (format section-fmt full-text
|                   (concat headline-label pre-blanks contents)))
`----

However, it need not be this way: LaTeX itself (or more precisely: the
default classes) seem to support the alt-title even for starred
sectioning commands.

Also, another way to circumvent this (/if/ there is some deep reason for
the above code which I don't see, which is quite probable) is to hack
into this part of the let form in org-latex-headline:

,----
| (section-back-end
|           (org-export-create-backend
|            :parent 'latex
|            :transcoders
|            '((underline . (lambda (o c i) (format "\\underline{%s}" c))))))
`----

and apply a (smart enough) filter in the (auxiliary) section-back-end,
something like removing a match for

\\footnote{.*?}

(this would be easy to break; in general, regexen are not a suitable
tool for this, because they can't "count" and match braces; however,
writing a suitable filter should not be extremely difficult).

> Vikas

Hth,

-- 
Marcin Borkowski
http://octd.wmi.amu.edu.pl/en/Marcin_Borkowski
Faculty of Mathematics and Computer Science
Adam Mickiewicz University

Reply via email to