[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [O] org-latex question
From: |
Marcin Borkowski |
Subject: |
Re: [O] org-latex question |
Date: |
Sun, 12 Apr 2015 11:39:30 +0200 |
On 2015-04-12, at 10:59, Vikas Rawal <address@hidden> 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
- [O] org-latex question, Vikas Rawal, 2015/04/11
- Re: [O] org-latex question, Nicolas Goaziou, 2015/04/12
- Re: [O] org-latex question, Vikas Rawal, 2015/04/12
- Re: [O] org-latex question,
Marcin Borkowski <=
- Re: [O] org-latex question, Nicolas Goaziou, 2015/04/12
- Re: [O] org-latex question, Vikas Rawal, 2015/04/27
- Re: [O] org-latex question, Marcin Borkowski, 2015/04/27
- Re: [O] org-latex question, Vikas Rawal, 2015/04/27
- Re: [O] org-latex question, Nicolas Goaziou, 2015/04/27
- Re: [O] org-latex question, Vikas Rawal, 2015/04/28
- Re: [O] org-latex question, Nicolas Goaziou, 2015/04/28
- Re: [O] org-latex question, Vikas Rawal, 2015/04/28
- Re: [O] org-latex question, Vikas Rawal, 2015/04/28
- Re: [O] org-latex question, Nick Dokos, 2015/04/27