TransWikia.com

beamer: Footnote in columns Environment | Indention Too Short

TeX - LaTeX Asked on June 10, 2021

  • I often use the columns environment in beamer frames.
  • When I have a long footnote within a column then the indention after the line break is very short.
  • Am I doing it right?
  • How can I enlarge the indention?

documentclass[t]{beamer}

begin{document}

begin{frame}
%
frametitle{Title of Frame}
    begin{columns}[t]
        %
        begin{column}{.50textwidth}
        begin{itemize}
        item Text Textfootnote{Long Footnote Text Long Footnote Text Long Footnote Text Long Footnote Text Long Footnote Text} Text.
        item Text Text Text.
        end{itemize}
        end{column}
        %
        begin{column}{.50textwidth}
        end{column}
        %
    end{columns}
%
Another Textfootnote{Long Footnote Text Long Footnote Text Long Footnote Text Long Footnote Text Long Footnote Text} Outside The texttt{columns} Environment.
%
end{frame}

end{document}

enter image description here

2 Answers

Playing with your MWE, I discovered that columns doesn't really handle footnotes (doesn't force them to keep the column size and also causes the problem of your question)

This is the way I found that it works better:

documentclass[t]{beamer}

begin{document}

begin{frame}
%
frametitle{Title of Frame}

    begin{columns}[t]
        %
        begin{column}{.50textwidth}
        begin{itemize}
        item Text Text Text.footnotemark[1]
        end{itemize}
        end{column}
        %
        begin{column}{.50textwidth}
        begin{itemize}
        item Text Text Text.
        item Text Textfootnotemark[2]
        end{itemize}
        end{column}

    end{columns}
        %
footnotetext[1]{This is one: Long Footnote Text Long Footnote Text Long Footnote Text Long Footnote Text Long Footnote Text}
footnotetext[2]{This is Two: Long Footnote Text Long Footnote Text Long Footnote Text Long Footnote Text Long Footnote Text}
end{frame}
end{document}

If you want separate footnote place for each column, this answer doesn't help you... And may be I can try for another way... But it is ok for my taste.

Output:

enter image description here

PS: may be we have to reduce a little bit from 0.5 (but I am not sure if columns use a inner or outer sep... so didn't do it yet)

Edit A fix but with not original indent of footnote:

I created the footcolumn to be used when footnotes are included instead of the original:

documentclass[t]{beamer}
usepackage{adjustbox}
letoldfootnotetextfootnotetext
newsavebox{mybox}
deffootnote#1{footnotemark[1]oldfootnotetext[1]{adjustbox{valign=t}{begin{minipage}[b]{0.9textwidth}#1end{minipage}}}}

newenvironment{footcolumn}
{begin{column}}{end{column}hspace{-0.5textwidth}}

begin{document}

begin{frame}
%
frametitle{Title of Frame}

    begin{columns}[t]
        %
        begin{footcolumn}{.50textwidth}
        begin{itemize}
        item Text TextText.footnote{This is one: Long Footnote Text Long Footnote Text Long Footnote Text Long Footnote Text Long Footnote Text}
        end{itemize}
        end{footcolumn}
        %
        begin{footcolumn}{.50textwidth}
        begin{itemize}
        item Text Text Text.
        item Text Textfootnote{This is two: Long Footnote Text Long Footnote Text Long Footnote Text Long Footnote Text Long Footnote Text}
        end{itemize}
        end{footcolumn}

    end{columns}
        %
end{frame}
begin{frame}
%
frametitle{Title of Frame}

    begin{columns}[t]
        %
        begin{footcolumn}{.50textwidth}
        begin{itemize}
        item Test
        item Text TextText.footnote{This is one: Long Footnote Text Long Footnote Text Long Footnote Text Long Footnote Text Long Footnote Text}
        end{itemize}
        end{footcolumn}
        %
        begin{column}{.50textwidth}
        begin{itemize}
        item Text Text Text.
        item Text Text
        end{itemize}
        end{column}

    end{columns}
        %
end{frame}
end{document}

Output:

enter image description here

You can combine it with the original without problems (even as last column will work ok!). It is not perfect, because of the non indented start.. But Closer I think.

Last Edit before remove previous:

(Fixed some indent)

documentclass[t]{beamer}
usepackage{adjustbox}
letoldfootnotetextfootnotetext
newdimenmyindent
myindent=2mm
newcounter{myfootnote}
makeatletter
deffootnote{stepcounter{myfootnote}xdefthemyfootnote{arabic{myfootnote}}@ifnextchar[{readFootnoteNum}{readFootnote}}
defreadFootnoteNum[#1]{footnotemark[#1]xdefthemyfootnote{#1}addtocounter{myfootnote}{-1}readFootnote}
defreadFootnote#1{oldfootnotetext{adjustbox{valign=t}{begin{minipage}[b]{0.86textwidth}hspace{myindent}$^{themyfootnote}$#1end{minipage}}}}
makeatother

newenvironment{footcolumn}
{begin{column}}{end{column}hspace{dimexpr-0.5textwidth+myindent}}

begin{document}

begin{frame}
%
frametitle{Title of Frame}

    begin{columns}[t]
        %
        begin{footcolumn}{.50textwidth}
        begin{itemize}
        item Text TextText.footnote{This is one: Long Footnote Text Long Footnote Text Long Footnote Text Long Footnote Text Long Footnote Text}
        end{itemize}
        end{footcolumn}
        %
        begin{footcolumn}{.50textwidth}
        begin{itemize}
        item Text Text Text.
        item Text Textfootnote{This is two: Long Footnote Text Long Footnote Text Long Footnote Text Long Footnote Text Long Footnote Text}
        end{itemize}
        end{footcolumn}

    end{columns}
        %
end{frame}
begin{frame}
%
frametitle{Title of Frame}

    begin{columns}[t]
        %
        begin{footcolumn}{.50textwidth}
        begin{itemize}
        item Test
        item Text TextText.footnote[90]{This is one: Long Footnote Text Long Footnote Text Long Footnote Text Long Footnote Text Long Footnote Text}
        end{itemize}
        end{footcolumn}
        %
        begin{column}{.50textwidth}
        begin{itemize}
         item Text Text Text.
        item Text Text
        end{itemize}
        end{column}

    end{columns}
        %
end{frame}

begin{frame}
%
frametitle{Title of Frame}

    begin{columns}[t]
        %
        begin{footcolumn}{.50textwidth}
        begin{itemize}
        item Testfootnote{Test here}
        item Text TextText.
        end{itemize}
        end{footcolumn}
        %
        begin{footcolumn}{.50textwidth}
        begin{itemize}
        item Text Text Textfootnote{This is one: Long Footnote Text Long Footnote Text Long Footnote Text Long Footnote Text Long Footnote Text}
        item Text Text
        end{itemize}
        end{footcolumn}

    end{columns}
        %
end{frame}
end{document}

enter image description here

Correct answer by koleygr on June 10, 2021

If you are only concerned about the indention, then this can simply be cured by using onlytextwidth, otherwise also your two columns with each .5textwidth are too big to fit on the frame without extending into the margin.

documentclass[t]{beamer}

begin{document}

begin{frame}
%
frametitle{Title of Frame}
    begin{columns}[t,onlytextwidth]
        %
        begin{column}{.5textwidth}
        begin{itemize}
        item Text Textfootnote{Long Footnote Text Long Footnote Text Long Footnote Text Long Footnote Text Long Footnote Text} Text.
        item Text Text Text.
        end{itemize}
        end{column}
        %
        begin{column}{.5textwidth}
        end{column}
        %
    end{columns}
%
Another Textfootnote{Long Footnote Text Long Footnote Text Long Footnote Text Long Footnote Text Long Footnote Text} Outside The texttt{columns} Environment.
%
end{frame}

end{document}

In general I'd prefer the footnotemark, footnotetext solution from the begin of koleygr's answer.

Answered by samcarter_is_at_topanswers.xyz on June 10, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP