Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Footnote text overlays theme elements #8

Open
elcorto opened this issue Nov 14, 2024 · 3 comments
Open

Footnote text overlays theme elements #8

elcorto opened this issue Nov 14, 2024 · 3 comments

Comments

@elcorto
Copy link

elcorto commented Nov 14, 2024

When text in a footnote is long, this happens:

screenshot-2024-11-14T16:28:29Z

Is there a way to, say, shift the footnote up by the height of the bottom theme elements? Thanks.

@Markus-Goetz
Copy link
Member

It is not easy to specify different text width for different lines in the text. Hence I think there are three ways to go about it:

@elcorto
Copy link
Author

elcorto commented Nov 14, 2024

It is not easy to specify different text width for different lines in the text. Hence I think there are three ways to go about it:

* Raise the footnote position generally to be above the theme elements

This is what I had in mind. Please see below for details.

* Insert manual line breaks in the footnote

This should have the same effect as the first approach.

* Limit the width of the footnote generally to end where the theme elements start (e.g. https://tex.stackexchange.com/questions/95983/how-do-i-adjust-the-width-of-beamers-footnote-area)

I think this would prevent users from utilizing the full \textwidth.

Re. shifting to the top, I hacked something using a minipage (the \fbox is only for debugging).

% \myfootnote{foo}
% \myfootnote[2cm]{... long text here ...}
\newcommand{\myfootnote}[2][0.4cm]{\tiny
    \footnote{
        \fbox{
            \begin{minipage}[][][t]{0.9\textwidth}
                #2\\
                \vspace{#1}
            \end{minipage}
        }
    }
}

The default vspace of 0.4cm works well for one line text but there seems to be a max. footnote height when using long text

screenshot-2024-11-14T22:18:12Z

in which case one has to increase the vspace using e.g. \myfootnote[2cm]{...} to force the layout engine to shift things up

screenshot-2024-11-14T22:32:06Z

which is a hack. In both cases, the minipage is outside of the page already. There must be a better solution, i.e. a default length setting such as a min distance between page bottom and footnote.

@elcorto
Copy link
Author

elcorto commented Nov 22, 2024

The above doesn't work since the minipage will cause beamer to create new slides if shifted down.
While I still don't know what (latex/beamer/theme) default length to set, which would solve all this, I needed a solution for both \footnote and biblatex's \fullfootcite(). So leaving my current hack here in case anyone needs it.

% This solves the following problem: biblatex's \fullcite() is great.
% \fullfootcite() places the rendered bib entries in a footnote which is what
% we want. BUT it creates a text entry [1], [2] etc which we can't turn off.
% Using \footnote{\fullcite{}} does the same.
%
% https://tex.stackexchange.com/a/488624
\makeatletter
\def\@makefnmark{}
\makeatletter

% shift footnotes up by this much to be above the theme footer. What is the
% default LaTeX length to change here instead???
\newlength{\footenotesep}
\setlength{\footenotesep}{.3cm}

% \footnotesize is too big
\setbeamerfont{footnote}{size=\scriptsize}

% single footnote line
%   \myfootnote{...}
%
% multi line
%   \myfootnote[0pt]{1st line}
%   \myfootnote[0pt]{2nd line}
%   ...
%   \myfootnote{last line}
\newcommand{\myfootnote}[2][\footenotesep]{
    \footnote{
        \hspace{-0.5cm}
        #2\\
        \vspace{#1}
    }
}

% one line and multi line: same as \myfootnote
\newcommand{\myfootfullcite}[2][\footenotesep]{
    \footnote{
        \hspace{-0.5cm}
        \fullcite{#2}\\
        \vspace{#1}
    }
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants