emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Bug: Footnotes on Headers and LaTeX export [9.3 (release_9.3 @ /usr/share/emacs/27.1/lisp/org/)]
@ 2020-12-08 11:35 Charis Michelakis
  2020-12-09 15:06 ` Juan Manuel Macías
  0 siblings, 1 reply; 3+ messages in thread
From: Charis Michelakis @ 2020-12-08 11:35 UTC (permalink / raw)
  To: emacs-orgmode

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

There is a potential bug regarging how footnotes on headers are
converted to LaTeX.

Consider the following org file:
------start-of-file-----------
#+AUTHOR: Me
#+LATEX_HEADER: \usepackage{titlesec}
* Header1[fn:1]

* Footnotes

[fn:1]Lorem ipsum
------end-of-file--------------

When converting to LaTeX the header is exported as:
\section{Header1\footnote{Lorem ipsum}}

I believe the proper output should be:
\section{Header1}\footnote{Lorem ipsum}

Notice that the footnote is placed after the closing bracket segment
instead of being part of the header section. Excuse me for my ignorance of
LaTeX, for I cannot definitively say which one is correct(maybe they
both are) but the second output seems more logical.

Both versions get compiled correctly, however when adding the package
"titlesec" the first version results in failed compilation (the
following error message seems to signify some kind of infinite
recursion/loop):

-----error-message-during-compilation-----
Package hyperref Warning: Token not allowed in a PDF string 
(PDFDocEncoding):
(hyperref)                removing `\@ifnextchar' on input line 32.

! TeX capacity exceeded, sorry [input stack size=5000].
\reserved@a ->\def \reserved@a
                                *{\ttl@assign@i {\@tempskipb }}\reserved@a
l.32 \section{Header1\footnote{Lorem ipsum}}

!  ==> Fatal error occurred, no output PDF file produced!
------------------------------------------

If both versions are correct then the bug obviously lies in the
"titlesec" package. However, as I previously said, I don't know if that
is the case. It is possible that this happens with other packages too. I
have not tested any other packages that deal with headers.

I have also tested this on org version 9.4 and the same output is
produced.

I have attached the org file, the tex output file that leads to the bug
and the output log of the compilation process.

==========================================
Emacs  : GNU Emacs 27.1 (build 1, x86_64-redhat-linux-gnu, X toolkit, 
cairo version 1.16.0, Xaw3d scroll bars)
  of 2020-08-21
Package: Org mode version 9.3 (release_9.3 @ 
/usr/share/emacs/27.1/lisp/org/)

current state:
==============
(setq
  org-src-mode-hook '(org-src-babel-configure-edit-buffer 
org-src-mode-configure-edit-buffer)
  org-link-shell-confirm-function 'yes-or-no-p
  org-metadown-hook '(org-babel-pop-to-session-maybe)
  org-clock-out-hook '(org-clock-remove-empty-clock-drawer)
  org-html-format-inlinetask-function 
'org-html-format-inlinetask-default-function
  org-odt-format-headline-function 'org-odt-format-headline-default-function
  org-ascii-format-inlinetask-function 'org-ascii-format-inlinetask-default
  org-mode-hook '(#[0 "\300\301\302\303\304$\207" [add-hook 
change-major-mode-hook org-show-all append local] 5]
          #[0 "\300\301\302\303\304$\207" [add-hook 
change-major-mode-hook org-babel-show-result-all append local] 5]
          org-babel-result-hide-spec org-babel-hide-all-hashes)
  org-odt-format-drawer-function #[514 "\207" [] 3 "\n\n(fn NAME CONTENTS)"]
  org-archive-hook '(org-attach-archive-delete-maybe)
  org-confirm-elisp-link-function 'yes-or-no-p
  org-agenda-before-write-hook '(org-agenda-add-entry-text)
  org-metaup-hook '(org-babel-load-in-session-maybe)
  org-bibtex-headline-format-function #[257 "\300\x01\236A\207" [:title] 3 
"\n\n(fn ENTRY)"]
  org-latex-format-drawer-function #[514 "\207" [] 3 "\n\n(fn _ CONTENTS)"]
  org-babel-pre-tangle-hook '(save-buffer)
  org-tab-first-hook '(org-babel-hide-result-toggle-maybe 
org-babel-header-arg-expand)
  org-ascii-format-drawer-function #[771 "\x01\207" [] 4 "\n\n(fn NAME 
CONTENTS WIDTH)"]
  org-occur-hook '(org-first-headline-recenter)
  org-cycle-hook '(org-cycle-hide-archived-subtrees 
org-cycle-show-empty-lines org-optimize-window-after-visibility-change)
  org-speed-command-hook '(org-speed-command-activate 
org-babel-speed-command-activate)
  org-odt-format-inlinetask-function 
'org-odt-format-inlinetask-default-function
  org-confirm-shell-link-function 'yes-or-no-p
  org-link-parameters '(("attachment" :follow org-attach-open-link 
:export org-attach-export-link :complete org-attach-complete-link)
                ("id" :follow org-id-open) ("eww" :follow eww :store 
org-eww-store-link)
                ("rmail" :follow org-rmail-open :store org-rmail-store-link)
                ("mhe" :follow org-mhe-open :store org-mhe-store-link)
                ("irc" :follow org-irc-visit :store org-irc-store-link 
:export org-irc-export)
                ("info" :follow org-info-open :export org-info-export 
:store org-info-store-link)
                ("gnus" :follow org-gnus-open :store org-gnus-store-link)
                ("docview" :follow org-docview-open :export 
org-docview-export :store org-docview-store-link)
                ("bibtex" :follow org-bibtex-open :store 
org-bibtex-store-link)
                ("bbdb" :follow org-bbdb-open :export org-bbdb-export 
:complete org-bbdb-complete-link :store
             org-bbdb-store-link)
                ("w3m" :store org-w3m-store-link) ("file+sys") 
("file+emacs") ("shell" :follow org-link--open-shell)
                ("news" :follow #[257 "\301\300\302\x03Q!\207" ["news" 
browse-url ":"] 5 "\n\n(fn URL)"])
                ("mailto" :follow #[257 "\301\300\302\x03Q!\207" ["mailto" 
browse-url ":"] 5 "\n\n(fn URL)"])
                ("https" :follow #[257 "\301\300\302\x03Q!\207" ["https" 
browse-url ":"] 5 "\n\n(fn URL)"])
                ("http" :follow #[257 "\301\300\302\x03Q!\207" ["http" 
browse-url ":"] 5 "\n\n(fn URL)"])
                ("ftp" :follow #[257 "\301\300\302\x03Q!\207" ["ftp" 
browse-url ":"] 5 "\n\n(fn URL)"])
                ("help" :follow org-link--open-help) ("file" :complete 
org-link-complete-file)
                ("elisp" :follow org-link--open-elisp) ("doi" :follow 
org-link--open-doi))
  org-latex-format-headline-function 
'org-latex-format-headline-default-function
  org-link-elisp-confirm-function 'yes-or-no-p
  org-latex-format-inlinetask-function 
'org-latex-format-inlinetask-default-function
  org-html-format-drawer-function #[514 "\207" [] 3 "\n\n(fn NAME 
CONTENTS)"]
  org-html-format-headline-function 
'org-html-format-headline-default-function
  )


[-- Attachment #2: example.tex --]
[-- Type: text/x-tex, Size: 704 bytes --]

% Created 2020-12-08 Tue 12:57
% Intended LaTeX compiler: pdflatex
\documentclass[11pt]{article}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{graphicx}
\usepackage{grffile}
\usepackage{longtable}
\usepackage{wrapfig}
\usepackage{rotating}
\usepackage[normalem]{ulem}
\usepackage{amsmath}
\usepackage{textcomp}
\usepackage{amssymb}
\usepackage{capt-of}
\usepackage{hyperref}
\usepackage{titlesec}
\author{Me}
\date{\today}
\title{}
\hypersetup{
 pdfauthor={Me},
 pdftitle={},
 pdfkeywords={},
 pdfsubject={},
 pdfcreator={Emacs 27.1 (Org mode 9.3)}, 
 pdflang={English}}
\begin{document}

\tableofcontents

\section{Header1\footnote{Lorem ipsum}}
\label{sec:orgbc4c243}
\end{document}

[-- Attachment #3: example.org --]
[-- Type: application/vnd.lotus-organizer, Size: 100 bytes --]

[-- Attachment #4: example.log --]
[-- Type: text/x-log, Size: 15436 bytes --]

This is pdfTeX, Version 3.14159265-2.6-1.40.21 (TeX Live 2020) (preloaded format=pdflatex 2020.12.6)  8 DEC 2020 12:58
entering extended mode
 restricted \write18 enabled.
 %&-line parsing enabled.
**example.tex
(./example.tex
LaTeX2e <2020-02-02> patch level 5
L3 programming layer <2020-04-06>
(/usr/share/texlive/texmf-dist/tex/latex/base/article.cls
Document Class: article 2019/12/20 v1.4l Standard LaTeX document class
(/usr/share/texlive/texmf-dist/tex/latex/base/size11.clo
File: size11.clo 2019/12/20 v1.4l Standard LaTeX file (size option)
)
\c@part=\count167
\c@section=\count168
\c@subsection=\count169
\c@subsubsection=\count170
\c@paragraph=\count171
\c@subparagraph=\count172
\c@figure=\count173
\c@table=\count174
\abovecaptionskip=\skip47
\belowcaptionskip=\skip48
\bibindent=\dimen134
)
(/usr/share/texlive/texmf-dist/tex/latex/base/inputenc.sty
Package: inputenc 2018/08/11 v1.3c Input encoding file
\inpenc@prehook=\toks15
\inpenc@posthook=\toks16
)
(/usr/share/texlive/texmf-dist/tex/latex/base/fontenc.sty
Package: fontenc 2020/02/11 v2.0o Standard LaTeX package
)
(/usr/share/texlive/texmf-dist/tex/latex/graphics/graphicx.sty
Package: graphicx 2019/11/30 v1.2a Enhanced LaTeX Graphics (DPC,SPQR)

(/usr/share/texlive/texmf-dist/tex/latex/graphics/keyval.sty
Package: keyval 2014/10/28 v1.15 key=value parser (DPC)
\KV@toks@=\toks17
)
(/usr/share/texlive/texmf-dist/tex/latex/graphics/graphics.sty
Package: graphics 2019/11/30 v1.4a Standard LaTeX Graphics (DPC,SPQR)

(/usr/share/texlive/texmf-dist/tex/latex/graphics/trig.sty
Package: trig 2016/01/03 v1.10 sin cos tan (DPC)
)
(/usr/share/texlive/texmf-dist/tex/latex/graphics-cfg/graphics.cfg
File: graphics.cfg 2016/06/04 v1.11 sample graphics configuration
)
Package graphics Info: Driver file: pdftex.def on input line 105.

(/usr/share/texlive/texmf-dist/tex/latex/graphics-def/pdftex.def
File: pdftex.def 2018/01/08 v1.0l Graphics/color driver for pdftex
))
\Gin@req@height=\dimen135
\Gin@req@width=\dimen136
)
(/usr/share/texlive/texmf-dist/tex/latex/grffile/grffile.sty
Package: grffile 2019/11/11 v2.1 Extended file name support for graphics (legac
y)
Package grffile Info: This package is an empty stub for compatibility on input 
line 40.
)
(/usr/share/texlive/texmf-dist/tex/latex/tools/longtable.sty
Package: longtable 2020/01/07 v4.13 Multi-page Table package (DPC)
\LTleft=\skip49
\LTright=\skip50
\LTpre=\skip51
\LTpost=\skip52
\LTchunksize=\count175
\LTcapwidth=\dimen137
\LT@head=\box45
\LT@firsthead=\box46
\LT@foot=\box47
\LT@lastfoot=\box48
\LT@cols=\count176
\LT@rows=\count177
\c@LT@tables=\count178
\c@LT@chunks=\count179
\LT@p@ftn=\toks18
)
(/usr/share/texlive/texmf-dist/tex/latex/wrapfig/wrapfig.sty
\wrapoverhang=\dimen138
\WF@size=\dimen139
\c@WF@wrappedlines=\count180
\WF@box=\box49
\WF@everypar=\toks19
Package: wrapfig 2003/01/31  v 3.6
)
(/usr/share/texlive/texmf-dist/tex/latex/graphics/rotating.sty
Package: rotating 2016/08/11 v2.16d rotated objects in LaTeX

(/usr/share/texlive/texmf-dist/tex/latex/base/ifthen.sty
Package: ifthen 2014/09/29 v1.1c Standard LaTeX ifthen package (DPC)
)
\c@r@tfl@t=\count181
\rotFPtop=\skip53
\rotFPbot=\skip54
\rot@float@box=\box50
\rot@mess@toks=\toks20
)
(/usr/share/texlive/texmf-dist/tex/generic/ulem/ulem.sty
\UL@box=\box51
\UL@hyphenbox=\box52
\UL@skip=\skip55
\UL@hook=\toks21
\UL@height=\dimen140
\UL@pe=\count182
\UL@pixel=\dimen141
\ULC@box=\box53
Package: ulem 2019/11/18
\ULdepth=\dimen142
)
(/usr/share/texlive/texmf-dist/tex/latex/amsmath/amsmath.sty
Package: amsmath 2020/01/20 v2.17e AMS math features
\@mathmargin=\skip56

For additional information on amsmath, use the `?' option.
(/usr/share/texlive/texmf-dist/tex/latex/amsmath/amstext.sty
Package: amstext 2000/06/29 v2.01 AMS text

(/usr/share/texlive/texmf-dist/tex/latex/amsmath/amsgen.sty
File: amsgen.sty 1999/11/30 v2.0 generic functions
\@emptytoks=\toks22
\ex@=\dimen143
))
(/usr/share/texlive/texmf-dist/tex/latex/amsmath/amsbsy.sty
Package: amsbsy 1999/11/29 v1.2d Bold Symbols
\pmbraise@=\dimen144
)
(/usr/share/texlive/texmf-dist/tex/latex/amsmath/amsopn.sty
Package: amsopn 2016/03/08 v2.02 operator names
)
\inf@bad=\count183
LaTeX Info: Redefining \frac on input line 227.
\uproot@=\count184
\leftroot@=\count185
LaTeX Info: Redefining \overline on input line 389.
\classnum@=\count186
\DOTSCASE@=\count187
LaTeX Info: Redefining \ldots on input line 486.
LaTeX Info: Redefining \dots on input line 489.
LaTeX Info: Redefining \cdots on input line 610.
\Mathstrutbox@=\box54
\strutbox@=\box55
\big@size=\dimen145
LaTeX Font Info:    Redeclaring font encoding OML on input line 733.
LaTeX Font Info:    Redeclaring font encoding OMS on input line 734.
\macc@depth=\count188
\c@MaxMatrixCols=\count189
\dotsspace@=\muskip16
\c@parentequation=\count190
\dspbrk@lvl=\count191
\tag@help=\toks23
\row@=\count192
\column@=\count193
\maxfields@=\count194
\andhelp@=\toks24
\eqnshift@=\dimen146
\alignsep@=\dimen147
\tagshift@=\dimen148
\tagwidth@=\dimen149
\totwidth@=\dimen150
\lineht@=\dimen151
\@envbody=\toks25
\multlinegap=\skip57
\multlinetaggap=\skip58
\mathdisplay@stack=\toks26
LaTeX Info: Redefining \[ on input line 2859.
LaTeX Info: Redefining \] on input line 2860.
)
(/usr/share/texlive/texmf-dist/tex/latex/base/textcomp.sty
Package: textcomp 2020/02/02 v2.0n Standard LaTeX package
)
(/usr/share/texlive/texmf-dist/tex/latex/amsfonts/amssymb.sty
Package: amssymb 2013/01/14 v3.01 AMS font symbols

(/usr/share/texlive/texmf-dist/tex/latex/amsfonts/amsfonts.sty
Package: amsfonts 2013/01/14 v3.01 Basic AMSFonts support
\symAMSa=\mathgroup4
\symAMSb=\mathgroup5
LaTeX Font Info:    Redeclaring math symbol \hbar on input line 98.
LaTeX Font Info:    Overwriting math alphabet `\mathfrak' in version `bold'
(Font)                  U/euf/m/n --> U/euf/b/n on input line 106.
))
(/usr/share/texlive/texmf-dist/tex/latex/capt-of/capt-of.sty
Package: capt-of 2009/12/29 v0.2 standard captions outside of floats
)
(/usr/share/texlive/texmf-dist/tex/latex/hyperref/hyperref.sty
Package: hyperref 2020/01/14 v7.00d Hypertext links for LaTeX

(/usr/share/texlive/texmf-dist/tex/generic/ltxcmds/ltxcmds.sty
Package: ltxcmds 2019/12/15 v1.24 LaTeX kernel commands for general use (HO)
)
(/usr/share/texlive/texmf-dist/tex/generic/iftex/iftex.sty
Package: iftex 2020/03/06 v1.0d TeX engine tests
)
(/usr/share/texlive/texmf-dist/tex/latex/pdftexcmds/pdftexcmds.sty
Package: pdftexcmds 2019/11/24 v0.31 Utility functions of pdfTeX for LuaTeX (HO
)

(/usr/share/texlive/texmf-dist/tex/generic/infwarerr/infwarerr.sty
Package: infwarerr 2019/12/03 v1.5 Providing info/warning/error messages (HO)
)
Package pdftexcmds Info: \pdf@primitive is available.
Package pdftexcmds Info: \pdf@ifprimitive is available.
Package pdftexcmds Info: \pdfdraftmode found.
)
(/usr/share/texlive/texmf-dist/tex/generic/kvsetkeys/kvsetkeys.sty
Package: kvsetkeys 2019/12/15 v1.18 Key value parser (HO)
)
(/usr/share/texlive/texmf-dist/tex/generic/kvdefinekeys/kvdefinekeys.sty
Package: kvdefinekeys 2019-12-19 v1.6 Define keys (HO)
)
(/usr/share/texlive/texmf-dist/tex/generic/pdfescape/pdfescape.sty
Package: pdfescape 2019/12/09 v1.15 Implements pdfTeX's escape features (HO)
)
(/usr/share/texlive/texmf-dist/tex/latex/hycolor/hycolor.sty
Package: hycolor 2020-01-27 v1.10 Color options for hyperref/bookmark (HO)
)
(/usr/share/texlive/texmf-dist/tex/latex/letltxmacro/letltxmacro.sty
Package: letltxmacro 2019/12/03 v1.6 Let assignment for LaTeX macros (HO)
)
(/usr/share/texlive/texmf-dist/tex/latex/auxhook/auxhook.sty
Package: auxhook 2019-12-17 v1.6 Hooks for auxiliary files (HO)
)
(/usr/share/texlive/texmf-dist/tex/latex/kvoptions/kvoptions.sty
Package: kvoptions 2019/11/29 v3.13 Key value format for package options (HO)
)
\@linkdim=\dimen152
\Hy@linkcounter=\count195
\Hy@pagecounter=\count196

(/usr/share/texlive/texmf-dist/tex/latex/hyperref/pd1enc.def
File: pd1enc.def 2020/01/14 v7.00d Hyperref: PDFDocEncoding definition (HO)
Now handling font encoding PD1 ...
... no UTF-8 mapping file for font encoding PD1
)
(/usr/share/texlive/texmf-dist/tex/generic/intcalc/intcalc.sty
Package: intcalc 2019/12/15 v1.3 Expandable calculations with integers (HO)
)
(/usr/share/texlive/texmf-dist/tex/generic/etexcmds/etexcmds.sty
Package: etexcmds 2019/12/15 v1.7 Avoid name clashes with e-TeX commands (HO)
)
\Hy@SavedSpaceFactor=\count197
Package hyperref Info: Hyper figures OFF on input line 4547.
Package hyperref Info: Link nesting OFF on input line 4552.
Package hyperref Info: Hyper index ON on input line 4555.
Package hyperref Info: Plain pages OFF on input line 4562.
Package hyperref Info: Backreferencing OFF on input line 4567.
Package hyperref Info: Implicit mode ON; LaTeX internals redefined.
Package hyperref Info: Bookmarks ON on input line 4800.
\c@Hy@tempcnt=\count198

(/usr/share/texlive/texmf-dist/tex/latex/url/url.sty
\Urlmuskip=\muskip17
Package: url 2013/09/16  ver 3.4  Verb mode for urls, etc.
)
LaTeX Info: Redefining \url on input line 5159.
\XeTeXLinkMargin=\dimen153

(/usr/share/texlive/texmf-dist/tex/generic/bitset/bitset.sty
Package: bitset 2019/12/09 v1.3 Handle bit-vector datatype (HO)

(/usr/share/texlive/texmf-dist/tex/generic/bigintcalc/bigintcalc.sty
Package: bigintcalc 2019/12/15 v1.5 Expandable calculations on big integers (HO
)
))
\Fld@menulength=\count199
\Field@Width=\dimen154
\Fld@charsize=\dimen155
Package hyperref Info: Hyper figures OFF on input line 6430.
Package hyperref Info: Link nesting OFF on input line 6435.
Package hyperref Info: Hyper index ON on input line 6438.
Package hyperref Info: backreferencing OFF on input line 6445.
Package hyperref Info: Link coloring OFF on input line 6450.
Package hyperref Info: Link coloring with OCG OFF on input line 6455.
Package hyperref Info: PDF/A mode OFF on input line 6460.
LaTeX Info: Redefining \ref on input line 6500.
LaTeX Info: Redefining \pageref on input line 6504.

(/usr/share/texlive/texmf-dist/tex/generic/atbegshi/atbegshi.sty
Package: atbegshi 2019/12/05 v1.19 At begin shipout hook (HO)
)
\Hy@abspage=\count266
\c@Item=\count267
\c@Hfootnote=\count268
)
Package hyperref Info: Driver (autodetected): hpdftex.

(/usr/share/texlive/texmf-dist/tex/latex/hyperref/hpdftex.def
File: hpdftex.def 2020/01/14 v7.00d Hyperref driver for pdfTeX

(/usr/share/texlive/texmf-dist/tex/latex/atveryend/atveryend.sty
Package: atveryend 2019-12-11 v1.11 Hooks at the very end of document (HO)
Package atveryend Info: \enddocument detected (standard20110627).
)
\Fld@listcount=\count269
\c@bookmark@seq@number=\count270

(/usr/share/texlive/texmf-dist/tex/latex/rerunfilecheck/rerunfilecheck.sty
Package: rerunfilecheck 2019/12/05 v1.9 Rerun checks for auxiliary files (HO)

(/usr/share/texlive/texmf-dist/tex/generic/uniquecounter/uniquecounter.sty
Package: uniquecounter 2019/12/15 v1.4 Provide unlimited unique counter (HO)
)
Package uniquecounter Info: New unique counter `rerunfilecheck' on input line 2
86.
)
\Hy@SectionHShift=\skip59
)
(/usr/share/texlive/texmf-dist/tex/latex/titlesec/titlesec.sty
Package: titlesec 2019/10/16 v2.13 Sectioning titles
\ttl@box=\box56
\beforetitleunit=\skip60
\aftertitleunit=\skip61
\ttl@plus=\dimen156
\ttl@minus=\dimen157
\ttl@toksa=\toks27
\titlewidth=\dimen158
\titlewidthlast=\dimen159
\titlewidthfirst=\dimen160
)
(/usr/share/texlive/texmf-dist/tex/latex/l3backend/l3backend-pdfmode.def
File: l3backend-pdfmode.def 2020-03-12 L3 backend support: PDF mode
\l__kernel_color_stack_int=\count271
\l__pdf_internal_box=\box57
)
(texbuild/example.aux)
\openout1 = `example.aux'.

LaTeX Font Info:    Checking defaults for OML/cmm/m/it on input line 28.
LaTeX Font Info:    ... okay on input line 28.
LaTeX Font Info:    Checking defaults for OMS/cmsy/m/n on input line 28.
LaTeX Font Info:    ... okay on input line 28.
LaTeX Font Info:    Checking defaults for OT1/cmr/m/n on input line 28.
LaTeX Font Info:    ... okay on input line 28.
LaTeX Font Info:    Checking defaults for T1/cmr/m/n on input line 28.
LaTeX Font Info:    ... okay on input line 28.
LaTeX Font Info:    Checking defaults for TS1/cmr/m/n on input line 28.
LaTeX Font Info:    ... okay on input line 28.
LaTeX Font Info:    Checking defaults for OMX/cmex/m/n on input line 28.
LaTeX Font Info:    ... okay on input line 28.
LaTeX Font Info:    Checking defaults for U/cmr/m/n on input line 28.
LaTeX Font Info:    ... okay on input line 28.
LaTeX Font Info:    Checking defaults for PD1/pdf/m/n on input line 28.
LaTeX Font Info:    ... okay on input line 28.

(/usr/share/texlive/texmf-dist/tex/context/base/mkii/supp-pdf.mkii
[Loading MPS to PDF converter (version 2006.09.02).]
\scratchcounter=\count272
\scratchdimen=\dimen161
\scratchbox=\box58
\nofMPsegments=\count273
\nofMParguments=\count274
\everyMPshowfont=\toks28
\MPscratchCnt=\count275
\MPscratchDim=\dimen162
\MPnumerator=\count276
\makeMPintoPDFobject=\count277
\everyMPtoPDFconversion=\toks29
) (/usr/share/texlive/texmf-dist/tex/latex/epstopdf-pkg/epstopdf-base.sty
Package: epstopdf-base 2020-01-24 v2.11 Base part for package epstopdf
Package epstopdf-base Info: Redefining graphics rule for `.eps' on input line 4
85.

(/usr/share/texlive/texmf-dist/tex/latex/latexconfig/epstopdf-sys.cfg
File: epstopdf-sys.cfg 2010/07/13 v1.3 Configuration of (r)epstopdf for TeX Liv
e
))
\AtBeginShipoutBox=\box59
Package hyperref Info: Link coloring OFF on input line 28.

(/usr/share/texlive/texmf-dist/tex/latex/hyperref/nameref.sty
Package: nameref 2019/09/16 v2.46 Cross-referencing by name of section

(/usr/share/texlive/texmf-dist/tex/latex/refcount/refcount.sty
Package: refcount 2019/12/15 v3.6 Data extraction from label references (HO)
)
(/usr/share/texlive/texmf-dist/tex/generic/gettitlestring/gettitlestring.sty
Package: gettitlestring 2019/12/15 v1.6 Cleanup title references (HO)
)
\c@section@level=\count278
)
LaTeX Info: Redefining \ref on input line 28.
LaTeX Info: Redefining \pageref on input line 28.
LaTeX Info: Redefining \nameref on input line 28.

(texbuild/example.out) (texbuild/example.out)
\@outlinefile=\write3
\openout3 = `example.out'.

 (texbuild/example.toc)
\tf@toc=\write4
\openout4 = `example.toc'.

LaTeX Font Info:    Trying to load font information for U+msa on input line 32.


(/usr/share/texlive/texmf-dist/tex/latex/amsfonts/umsa.fd
File: umsa.fd 2013/01/14 v3.01 AMS symbols A
)
LaTeX Font Info:    Trying to load font information for U+msb on input line 32.


(/usr/share/texlive/texmf-dist/tex/latex/amsfonts/umsb.fd
File: umsb.fd 2013/01/14 v3.01 AMS symbols B
)

Package hyperref Warning: Token not allowed in a PDF string (PDFDocEncoding):
(hyperref)                removing `\@ifnextchar' on input line 32.

! TeX capacity exceeded, sorry [input stack size=5000].
\reserved@a ->\def \reserved@a 
                               *{\ttl@assign@i {\@tempskipb }}\reserved@a 
l.32 \section{Header1\footnote{Lorem ipsum}}
                                            
If you really absolutely need more capacity,
you can ask a wizard to enlarge me.

 
Here is how much of TeX's memory you used:
 7110 strings out of 482465
 102094 string characters out of 5950369
 358676 words of memory out of 5000000
 22622 multiletter control sequences out of 15000+600000
 538418 words of font info for 41 fonts, out of 8000000 for 9000
 75 hyphenation exceptions out of 8191
 5000i,5n,37p,224b,282s stack positions out of 5000i,500n,10000p,200000b,80000s
!  ==> Fatal error occurred, no output PDF file produced!

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

* Re: Bug: Footnotes on Headers and LaTeX export [9.3 (release_9.3 @ /usr/share/emacs/27.1/lisp/org/)]
  2020-12-08 11:35 Bug: Footnotes on Headers and LaTeX export [9.3 (release_9.3 @ /usr/share/emacs/27.1/lisp/org/)] Charis Michelakis
@ 2020-12-09 15:06 ` Juan Manuel Macías
       [not found]   ` <69288122-6dfb-4235-47bf-d38344c730b0@gmail.com>
  0 siblings, 1 reply; 3+ messages in thread
From: Juan Manuel Macías @ 2020-12-09 15:06 UTC (permalink / raw)
  To: Charis Michelakis; +Cc: orgmode

Hello,

Charis Michelakis <ch.p.mxs@gmail.com> writes:

> There is a potential bug regarging how footnotes on headers are
> converted to LaTeX.
>
> Consider the following org file:
> ------start-of-file-----------
>
> #+AUTHOR: Me
> #+LATEX_HEADER: \usepackage{titlesec}
>
> * Header1[fn:1]
>
> * Footnotes
>
> [fn:1]Lorem ipsum

It is a LaTeX problem, as the footnote command is a 'fragile' command and should not
be put in a section. Try this:

* Header1[fn:1]
  :PROPERTIES:
  :ALT_TITLE: Header1
  :END:

* Footnotes
[fn:1]Lorem ipsum

in latex it is exported as

\section[Header1]{Header1\footnote{Lorem ipsum}}

Regards,

Juan Manuel 


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

* Re: Bug: Footnotes on Headers and LaTeX export [9.3 (release_9.3 @ /usr/share/emacs/27.1/lisp/org/)]
       [not found]   ` <69288122-6dfb-4235-47bf-d38344c730b0@gmail.com>
@ 2020-12-09 15:31     ` Juan Manuel Macías
  0 siblings, 0 replies; 3+ messages in thread
From: Juan Manuel Macías @ 2020-12-09 15:31 UTC (permalink / raw)
  To: Charis Michelakis; +Cc: orgmode

You're welcome ;-)

Charis Michelakis <ch.p.mxs@gmail.com> writes:

> Thank you :)
>
> On 12/9/20 5:06 PM, Juan Manuel Macías wrote:
>> Hello,
>>
>> Charis Michelakis <ch.p.mxs@gmail.com> writes:
>>
>>> There is a potential bug regarging how footnotes on headers are
>>> converted to LaTeX.
>>>
>>> Consider the following org file:
>>> ------start-of-file-----------
>>>
>>> #+AUTHOR: Me
>>> #+LATEX_HEADER: \usepackage{titlesec}
>>>
>>> * Header1[fn:1]
>>>
>>> * Footnotes
>>>
>>> [fn:1]Lorem ipsum
>> It is a LaTeX problem, as the footnote command is a 'fragile' command and should not
>> be put in a section. Try this:
>>
>> * Header1[fn:1]
>>    :PROPERTIES:
>>    :ALT_TITLE: Header1
>>    :END:
>>
>> * Footnotes
>> [fn:1]Lorem ipsum
>>
>> in latex it is exported as
>>
>> \section[Header1]{Header1\footnote{Lorem ipsum}}
>>
>> Regards,
>>
>> Juan Manuel
>



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

end of thread, other threads:[~2020-12-09 15:32 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-12-08 11:35 Bug: Footnotes on Headers and LaTeX export [9.3 (release_9.3 @ /usr/share/emacs/27.1/lisp/org/)] Charis Michelakis
2020-12-09 15:06 ` Juan Manuel Macías
     [not found]   ` <69288122-6dfb-4235-47bf-d38344c730b0@gmail.com>
2020-12-09 15:31     ` Juan Manuel Macías

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