1

How can I reduce the right margin of the beamer footnotes, without changing the text margin too?

Ideally, the footnotes should end approximately where the page number ends, so that for the example below, the year would still be on the first line.

There would be enough space if there was a way for the footnotes to ignore the text margin, but I don't know how to achieve this and would appreciate any help.

enter image description here


MWE:

\documentclass{beamer}

\usepackage[hang,ragged]{footmisc}

\usepackage[backend=biber, maxnames=2, style=lncs]{biblatex} \addbibresource{biblatex-examples.bib}

% custom citations (only author, title, year, DOI / arxiv): \DeclareCiteCommand{\footcite}[\mkbibfootnote] {\usebibmacro{prenote}} {\usebibmacro{citeindex}% \printnames[given-family]{author}:% \setunit{\addspace}% \printfield{title}% \nobreak\setunit{\addspace}% discourage break here \printfield{year}% \iffieldundef{doi} {\iffieldundef{eprint} {} % no DOI or eprint, don't add the penalty {\penalty-300 \setunit{\addspace}% \printfield{eprint}}} {\penalty-300 \setunit{\addspace}% \printfield{doi}}} {\multicitedelim} {\usebibmacro{postnote}}

\setbeamertemplate{navigation symbols}{} \setbeamertemplate{footline}[frame number]{}

\usepackage{lipsum}

\begin{document}

\begin{frame} Hello World!\footcite{baez/article} \lipsum[1-1] \end{frame}

\end{document}

1 Answers1

1

Instead of using the footmisc package, you could adapt this answer https://tex.stackexchange.com/a/169775/36296 . The size of the footnote box can be calculated from the text width + the right margin (1cm) - the width of the footnote mark (1.8em) - the space right of the page number (approximately 1em, but a bit smaller in reality as the page numbers use a small font, fine tune this value if you like).

\documentclass{beamer}

%\usepackage[hang,ragged]{footmisc}

\usepackage[backend=biber, maxnames=2, style=lncs]{biblatex} \addbibresource{biblatex-examples.bib}

% custom citations (only author, title, year, DOI / arxiv): \DeclareCiteCommand{\footcite}[\mkbibfootnote] {\usebibmacro{prenote}} {\usebibmacro{citeindex}% \printnames[given-family]{author}:% \setunit{\addspace}% \printfield{title}% \nobreak\setunit{\addspace}% discourage break here \printfield{year}% \iffieldundef{doi} {\iffieldundef{eprint} {} % no DOI or eprint, don't add the penalty {\penalty-300 \setunit{\addspace}% \printfield{eprint}}} {\penalty-300 \setunit{\addspace}% \printfield{doi}}} {\multicitedelim} {\usebibmacro{postnote}}

\makeatletter \renewcommand<>\beamer@framefootnotetext[1]{% \global\setbox\beamer@footins\vbox{% \hsize\framewidth \textwidth\hsize \columnwidth\hsize \unvbox\beamer@footins \reset@font\footnotesize @parboxrestore \protected@edef@currentlabel {\csname p@footnote\endcsname@thefnmark}% \color@begingroup \uncover#2{@makefntext{% \rule\z@\footnotesep\ignorespaces\parbox[t]{\dimexpr\textwidth+1cm-1.8em-1em}{#1@finalstrut\strutbox}\vskip1sp}}% \color@endgroup}% } \makeatother

\setbeamertemplate{navigation symbols}{} \setbeamertemplate{footline}[frame number]{}

\usepackage{lipsum}

\setbeamertemplate{footnote} { \parindent 1em\noindent% \raggedright \hbox to 1.8em{\insertfootnotemark}\insertfootnotetext\par% }

\begin{document}

\begin{frame} Hello World!\footcite{baez/article} \lipsum[1-1] \end{frame}

\end{document}

enter image description here

If you would just like to keep the date on the same line, you could remove the \raggedright from the footnote template. IMHO this will look nicer than having the date stick out into the margin.

\documentclass{beamer}

%\usepackage[hang,ragged]{footmisc}

\usepackage[backend=biber, maxnames=2, style=lncs]{biblatex} \addbibresource{biblatex-examples.bib}

% custom citations (only author, title, year, DOI / arxiv): \DeclareCiteCommand{\footcite}[\mkbibfootnote] {\usebibmacro{prenote}} {\usebibmacro{citeindex}% \printnames[given-family]{author}:% \setunit{\addspace}% \printfield{title}% \nobreak\setunit{\addspace}% discourage break here \printfield{year}% \iffieldundef{doi} {\iffieldundef{eprint} {} % no DOI or eprint, don't add the penalty {\penalty-300 \setunit{\addspace}% \printfield{eprint}}} {\penalty-300 \setunit{\addspace}% \printfield{doi}}} {\multicitedelim} {\usebibmacro{postnote}}

\makeatletter \renewcommand<>\beamer@framefootnotetext[1]{% \global\setbox\beamer@footins\vbox{% \hsize\framewidth \textwidth\hsize \columnwidth\hsize \unvbox\beamer@footins \reset@font\footnotesize @parboxrestore \protected@edef@currentlabel {\csname p@footnote\endcsname@thefnmark}% \color@begingroup \uncover#2{@makefntext{% \rule\z@\footnotesep\ignorespaces\parbox[t]{\dimexpr\textwidth-1.8em}{#1@finalstrut\strutbox}\vskip1sp}}% \color@endgroup}% } \makeatother

\setbeamertemplate{navigation symbols}{} \setbeamertemplate{footline}[frame number]{}

\usepackage{lipsum}

\setbeamertemplate{footnote} { \parindent 1em\noindent% % \raggedright \hbox to 1.8em{\insertfootnotemark}\insertfootnotetext\par% }

\begin{document}

\begin{frame} Hello World!\footcite{baez/article} \lipsum[1-1] \end{frame}

\end{document}

enter image description here