emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Latex Export Difficulties
@ 2014-02-06  9:20 Samuel Schaumburg
  2014-02-06 12:29 ` Eric S Fraga
  2014-02-06 16:00 ` Florian Beck
  0 siblings, 2 replies; 5+ messages in thread
From: Samuel Schaumburg @ 2014-02-06  9:20 UTC (permalink / raw)
  To: Org-mode


Hello,

I am facing difficulties during org-Latex Export

When I write outlines to scientific Texts I often have headlines, that
are followed by a footnote, providing easy reference to the Text I am
currently studying.

Example:


* Some Headline[fn:2]


When I want to export my notes for printing, the Texbuffer has something
like this:

\section{Some Headline\footnote{S. 45}}

Here comes the trouble: Auctex (with Texlive installed) normally does
not compile this and throws a bunch of errors at me.

What I learned from my research is that the line has to look like this,
so that I can compile:

\section{Some Headline \protect\footnote{S. 45}}

This case is quite typicall for me and leads to often manually reworking
the tex buffer for quite a while, which is not very convenient.

Is there any way I can set up the org latex export to do this
automatically. Would greatly help my workflow. I am quite a newbie to
emacs-lisp, so I cannot think of how to do this. Maybe someone can help
me here

Thanks in advance
Samuel

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Latex Export Difficulties
  2014-02-06  9:20 Latex Export Difficulties Samuel Schaumburg
@ 2014-02-06 12:29 ` Eric S Fraga
  2014-02-06 12:39   ` Rasmus
  2014-02-06 16:00 ` Florian Beck
  1 sibling, 1 reply; 5+ messages in thread
From: Eric S Fraga @ 2014-02-06 12:29 UTC (permalink / raw)
  To: Samuel Schaumburg; +Cc: Org-mode

[-- Attachment #1: Type: text/plain, Size: 780 bytes --]

Samuel Schaumburg <eagleeye777@hotmail.de> writes:

[...]

> What I learned from my research is that the line has to look like this,
> so that I can compile:
>
> \section{Some Headline \protect\footnote{S. 45}}
>
> This case is quite typicall for me and leads to often manually reworking
> the tex buffer for quite a while, which is not very convenient.
>
> Is there any way I can set up the org latex export to do this
> automatically. Would greatly help my workflow. I am quite a newbie to
> emacs-lisp, so I cannot think of how to do this. Maybe someone can help
> me here

Not an org solution per se but you could redefine \footnote to do what
you want.  The example below/attached seems to work.  I have no idea if
it breaks the usage of footnote in other places, mind you.


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: example redefining footnote in latex --]
[-- Type: text/x-org, Size: 274 bytes --]

* Testing redefinition of footnote
#+latex: \let\origfootnote\footnote
#+latex: \renewcommand{\footnote}{\protect\origfootnote}
** Subheading [fn:1: Which has a very interesting footnote]
This is some really boring text because all the interesting stuff is in the footnote.

[-- Attachment #3: Type: text/plain, Size: 92 bytes --]


HTH,
eric
-- 
: Eric S Fraga (0xFFFCF67D), Emacs 24.3.50.1, Org release_8.2.5h-585-g5f0ca0

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Latex Export Difficulties
  2014-02-06 12:29 ` Eric S Fraga
@ 2014-02-06 12:39   ` Rasmus
  2014-02-06 14:33     ` Eric S Fraga
  0 siblings, 1 reply; 5+ messages in thread
From: Rasmus @ 2014-02-06 12:39 UTC (permalink / raw)
  To: e.fraga, eagleeye777; +Cc: emacs-orgmode

Eric S Fraga <e.fraga@ucl.ac.uk> writes:

> Samuel Schaumburg <eagleeye777@hotmail.de> writes:
>
> [...]
>
>> What I learned from my research is that the line has to look like this,
>> so that I can compile:
>>
>> \section{Some Headline \protect\footnote{S. 45}}
>>
>> This case is quite typicall for me and leads to often manually reworking
>> the tex buffer for quite a while, which is not very convenient.
>>
>> Is there any way I can set up the org latex export to do this
>> automatically. Would greatly help my workflow. I am quite a newbie to
>> emacs-lisp, so I cannot think of how to do this. Maybe someone can help
>> me here
>
> Not an org solution per se but you could redefine \footnote to do what
> you want.  The example below/attached seems to work.  I have no idea if
> it breaks the usage of footnote in other places, mind you.
>
> * Testing redefinition of footnote
> #+latex: \let\origfootnote\footnote
> #+latex: \renewcommand{\footnote}{\protect\origfootnote}
> ** Subheading [fn:1: Which has a very interesting footnote]
> This is some really boring text because all the interesting stuff is in the footnote.

Try to add a TOC to this document.  It's probably not what you want. 

Another LaTeX hack would be to do something like:

   \def\myhead{My heading}
   \section[\myhead]{\myhead\footnote{My foot}}

This is such an awkward construct that it should probably just
relegated to a filter.

–Rasmus

-- 
May contains speling mistake

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Latex Export Difficulties
  2014-02-06 12:39   ` Rasmus
@ 2014-02-06 14:33     ` Eric S Fraga
  0 siblings, 0 replies; 5+ messages in thread
From: Eric S Fraga @ 2014-02-06 14:33 UTC (permalink / raw)
  To: Rasmus; +Cc: emacs-orgmode, eagleeye777

Rasmus <rasmus@gmx.us> writes:

[...]

> Try to add a TOC to this document.  It's probably not what you want. 

Indeed.  But some would argue that footnotes in headings is not what you
want in the first place... ;-)

-- 
: Eric S Fraga (0xFFFCF67D), Emacs 24.3.50.1, Org release_8.2.5h-585-g5f0ca0

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Latex Export Difficulties
  2014-02-06  9:20 Latex Export Difficulties Samuel Schaumburg
  2014-02-06 12:29 ` Eric S Fraga
@ 2014-02-06 16:00 ` Florian Beck
  1 sibling, 0 replies; 5+ messages in thread
From: Florian Beck @ 2014-02-06 16:00 UTC (permalink / raw)
  To: Org-mode

On 06.02.2014 10:20, Samuel Schaumburg wrote:
> \section{Some Headline\footnote{S. 45}}

This is what the footmisc package is for. So use

#+LaTeX_HEADER: \usepackage[stable]{footmisc}

or add it to your default packages.

> \section{Some Headline \protect\footnote{S. 45}}

If you really want this, have a look at
`org-export-filter-footnote-reference-functions'.

-- 
Florian Beck

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2014-02-06 16:00 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-02-06  9:20 Latex Export Difficulties Samuel Schaumburg
2014-02-06 12:29 ` Eric S Fraga
2014-02-06 12:39   ` Rasmus
2014-02-06 14:33     ` Eric S Fraga
2014-02-06 16:00 ` Florian Beck

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).