Re: [O] org-latex question

2015-04-29 Thread Vikas Rawal
 
You have num:2, so subsubsections are not TOC'ed, so they don't get
the alternative. If you set it to 3, all should work.
 
 That is what we have been discussing. There are situations where you
 do not want a headline to appear in TOC, but still want the ALT_TITLE
 used. It is now possible in org-mode, but there was some bug because
 of which it did not always work.
 
 
 I figured I was missing something, but I have a question (which means
 I'm still missing something :-) : what are ALT_TITLEs good for if not
 for the TOC?
 
 I think some styles put them in the header, regardless of TOC.


Also needed if you need to add a footnote to a section heading.

Vikas

Re: [O] org-latex question

2015-04-28 Thread Nick Dokos
Vikas Rawal vikasli...@agrarianresearch.org writes:

 You have num:2, so subsubsections are not TOC'ed, so they don't get
 the alternative. If you set it to 3, all should work.

 That is what we have been discussing. There are situations where you
 do not want a headline to appear in TOC, but still want the ALT_TITLE
 used. It is now possible in org-mode, but there was some bug because
 of which it did not always work.


I figured I was missing something, but I have a question (which means
I'm still missing something :-) : what are ALT_TITLEs good for if not
for the TOC?

Thanks,
Nick




Re: [O] org-latex question

2015-04-28 Thread Thomas S. Dye
Nick Dokos ndo...@gmail.com writes:

 Vikas Rawal vikasli...@agrarianresearch.org writes:

 You have num:2, so subsubsections are not TOC'ed, so they don't get
 the alternative. If you set it to 3, all should work.

 That is what we have been discussing. There are situations where you
 do not want a headline to appear in TOC, but still want the ALT_TITLE
 used. It is now possible in org-mode, but there was some bug because
 of which it did not always work.


 I figured I was missing something, but I have a question (which means
 I'm still missing something :-) : what are ALT_TITLEs good for if not
 for the TOC?

I think some styles put them in the header, regardless of TOC.

All the best,
Tom

-- 
Thomas S. Dye
http://www.tsdye.com



Re: [O] org-latex question

2015-04-28 Thread Nicolas Goaziou
Vikas Rawal vikasli...@agrarianresearch.org writes:

  [fn:3] aksjd kajshd kahsd

 Fixed in 88ea2ced0e38646d393e038bc81d6a0d45b8dcd6. Thank you.



 The second and third headings are getting exported as:

 \subsection*[Heading 2]{Heading 2\footnote{aksjdlkjaslkjd}}

 I do not think the * should be there.

I don't follow you. You want an unnumbered subsection (per H:2 option),
which, according to `org-latex-classes' translates into
\subsection*{%s}. So, what the expected output, then?

Regards,



Re: [O] org-latex question

2015-04-28 Thread Vikas Rawal

 On 28-Apr-2015, at 1:16 pm, Nicolas Goaziou m...@nicolasgoaziou.fr wrote:
 
 Vikas Rawal vikasli...@agrarianresearch.org writes:
 
 [fn:3] aksjd kajshd kahsd
 
 Fixed in 88ea2ced0e38646d393e038bc81d6a0d45b8dcd6. Thank you.
 
 
 
 The second and third headings are getting exported as:
 
 \subsection*[Heading 2]{Heading 2\footnote{aksjdlkjaslkjd}}
 
 I do not think the * should be there.
 
 I don't follow you. You want an unnumbered subsection (per H:2 option),
 which, according to `org-latex-classes' translates into
 \subsection*{%s}. So, what the expected output, then?
 

\subsection*[Heading 2]{Heading 2\footnote{aksjdlkjaslkjd}}

should be

\subsection[Heading 2]{Heading 2\footnote{aksjdlkjaslkjd}}

In the example file, the first heading with ALT_TITLE is corrected exported.

Vikas




Re: [O] org-latex question

2015-04-28 Thread Vikas Rawal

 On 28-Apr-2015, at 1:17 pm, Vikas Rawal vikasli...@agrarianresearch.org 
 wrote:
 
 
 On 28-Apr-2015, at 1:16 pm, Nicolas Goaziou m...@nicolasgoaziou.fr wrote:
 
 Vikas Rawal vikasli...@agrarianresearch.org writes:
 
 [fn:3] aksjd kajshd kahsd
 
 Fixed in 88ea2ced0e38646d393e038bc81d6a0d45b8dcd6. Thank you.
 
 
 
 The second and third headings are getting exported as:
 
 \subsection*[Heading 2]{Heading 2\footnote{aksjdlkjaslkjd}}
 
 I do not think the * should be there.
 
 I don't follow you. You want an unnumbered subsection (per H:2 option),
 which, according to `org-latex-classes' translates into
 \subsection*{%s}. So, what the expected output, then?
 
 
 \subsection*[Heading 2]{Heading 2\footnote{aksjdlkjaslkjd}}
 
 should be
 
 \subsection[Heading 2]{Heading 2\footnote{aksjdlkjaslkjd}}
 
 In the example file, the first heading with ALT_TITLE is corrected exported.
 

My apologies. What you have done is right. Took me a moment to understand.

Now let me figure out how to use it in my case.

Sorry, please ignore the previous email.

Vikas








Re: [O] org-latex question

2015-04-27 Thread Marcin Borkowski

On 2015-04-27, at 06:05, Vikas Rawal vikasli...@agrarianresearch.org wrote:

 In the document (manuscript of a book) that I am working, ALT_TITLE now works 
 in most cases. However, ALT_TITLE does not work for headlines in Appendices, 
 which come after 

 \begin{appendices} 

Are you sure the problem isn't on the LaTeX side?  Where does the
appendices environment come from?  It appears not to be defined in
LaTeX2e nor in the standard classes.

 Vikas

Best,

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



Re: [O] org-latex question

2015-04-27 Thread Vikas Rawal

 
 In the document (manuscript of a book) that I am working, ALT_TITLE now 
 works in most cases. However, ALT_TITLE does not work for headlines in 
 Appendices, which come after 
 
 \begin{appendices} 
 
 Are you sure the problem isn't on the LaTeX side?  Where does the
 appendices environment come from?  It appears not to be defined in
 LaTeX2e nor in the standard classes.
 

I am sorry, it has nothing to do with appendices. Although I am not able to 
exactly figure out where the problem is, I have an example file where ALT_TITLE 
gets exported only for one headline and not for the others. Please see the 
attached org and and latex files.

Vikas


temp.org
Description: Binary data


temp.tex
Description: Binary data






Re: [O] org-latex question

2015-04-27 Thread Nicolas Goaziou
Hello,

Vikas Rawal vikasli...@agrarianresearch.org writes:

 I am sorry, it has nothing to do with appendices. Although I am not
 able to exactly figure out where the problem is, I have an example
 file where ALT_TITLE gets exported only for one headline and not for
 the others. Please see the attached org and and latex files.

 Vikas

 #+STARTUP: hidestars
 #+TITLE: Test title
 #+AUTHOR: Draft: Do not Cite
 #+OPTIONS: toc:nil num:2 H:4
 #+LATEX_CLASS: article

 * Chap 1
 ** Heading 1[fn:1]
 :PROPERTIES:
 :ALT_TITLE: Heading 1
 :END:

 * Chapter 2
 ** Heading 1
 *** Heading 2[fn:2]
 :PROPERTIES:
 :ALT_TITLE: Heading 2
 :END:

 * Chapter 3
 *** Heading 3[fn:3]
 :PROPERTIES:
 :ALT_TITLE: Heading 3
 :END:

 * Footnotes

 [fn:1] a,skdj akjd aksjd 

 [fn:2] aksjdlkjaslkjd

 [fn:3] aksjd kajshd kahsd

Fixed in 88ea2ced0e38646d393e038bc81d6a0d45b8dcd6. Thank you.


Regards,

-- 
Nicolas Goaziou



Re: [O] org-latex question

2015-04-27 Thread Nick Dokos
Vikas Rawal vikasli...@agrarianresearch.org writes:

 
 In the document (manuscript of a book) that I am working, ALT_TITLE
 now works in most cases. However, ALT_TITLE does not work for
 headlines in Appendices, which come after
 
 \begin{appendices} 
 
 Are you sure the problem isn't on the LaTeX side?  Where does the
 appendices environment come from?  It appears not to be defined in
 LaTeX2e nor in the standard classes.
 

 I am sorry, it has nothing to do with appendices. Although I am not
 able to exactly figure out where the problem is, I have an example
 file where ALT_TITLE gets exported only for one headline and not for
 the others. Please see the attached org and and latex files.


You have num:2, so subsubsections are not TOC'ed, so they don't get
the alternative. If you set it to 3, all should work.

Nick




Re: [O] org-latex question

2015-04-27 Thread Vikas Rawal
  [fn:3] aksjd kajshd kahsd

 Fixed in 88ea2ced0e38646d393e038bc81d6a0d45b8dcd6. Thank you.



The second and third headings are getting exported as:

\subsection*[Heading 2]{Heading 2\footnote{aksjdlkjaslkjd}}

I do not think the * should be there.

Vikas


Re: [O] org-latex question

2015-04-27 Thread Vikas Rawal
 You have num:2, so subsubsections are not TOC'ed, so they don't get
 the alternative. If you set it to 3, all should work.


That is what we have been discussing. There are situations where you do not
want a headline to appear in TOC, but still want the ALT_TITLE used. It is
now possible in org-mode, but there was some bug because of which it did
not always work.

Nicholas has just fixed it, but, I think, there is still an extra *
appearing.

Vikas


Re: [O] org-latex question

2015-04-26 Thread Vikas Rawal

 
 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.
 
 I removed NUMBEREDP, since I cannot remember the reason for its
 presence.
 

Sorry, it took me some time before I could get back to figure this out. 

In the document (manuscript of a book) that I am working, ALT_TITLE now works 
in most cases. However, ALT_TITLE does not work for headlines in Appendices, 
which come after 

\begin{appendices} 

Just as a reminder (since these emails are several days old), we are trying to 
enable ALT_TITLE in all headlines irrespective of whether they appear in TOC or 
not.

So there is perhaps still a problem somewhere.

Vikas


Re: [O] org-latex question

2015-04-12 Thread Nicolas Goaziou
Hello,

Vikas Rawal vikasli...@agrarianresearch.org writes:

 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.


Regards,

-- 
Nicolas Goaziou



Re: [O] org-latex question

2015-04-12 Thread Vikas Rawal

 
 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.

Vikas


Re: [O] org-latex question

2015-04-12 Thread Rasmus
Hi,

 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.

It seems that the bug is either

   1. That the footnote that is written out at all.  If you call
  org-footnote-action (or whatever C-c C-x f is) you are told that
  footnotes are not supported in headings

   2. The optional argument of the \section-like command should
  automatically be set either :ALT_TITLE or :title sans the footnote
  if a footnote is present.

—Rasmus

-- 
Vote for proprietary math!




Re: [O] org-latex question

2015-04-12 Thread Marcin Borkowski

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



Re: [O] org-latex question

2015-04-12 Thread Vikas Rawal

 
 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.
 
 It seems that the bug is either
 
   1. That the footnote that is written out at all.  If you call
  org-footnote-action (or whatever C-c C-x f is) you are told that
  footnotes are not supported in headings
 
This has been fixed today by Nicolas. There is another thread on the mailing 
list discussing this. So if you update orgmode, this would go.

   2. The optional argument of the \section-like command should
  automatically be set either :ALT_TITLE or :title sans the footnote
  if a footnote is present.
 
Yes, this needs to be implemented, it seems.


Vikas





Re: [O] org-latex question

2015-04-12 Thread Nicolas Goaziou
Hello,

Marcin Borkowski mb...@wmi.amu.edu.pl writes:

 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.

I removed NUMBEREDP, since I cannot remember the reason for its
presence.

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

Or ignore completely footnotes-references in the anonymous back-end.
However, is it needed since :ALT_TITLE: is now supported for all
headlines? I'm not sure.


Regards,

-- 
Nicolas Goaziou



[O] org-latex question

2015-04-11 Thread Vikas Rawal
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?

Vikas