From c66cc23142c1cbd204849122d2f939eccb8b232f Mon Sep 17 00:00:00 2001 From: Brandon Rozek Date: Fri, 23 Sep 2022 15:41:46 -0400 Subject: [PATCH] New Post --- content/blog/latex-footnote-no-count.md | 55 +++++++++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100644 content/blog/latex-footnote-no-count.md diff --git a/content/blog/latex-footnote-no-count.md b/content/blog/latex-footnote-no-count.md new file mode 100644 index 0000000..fb1d730 --- /dev/null +++ b/content/blog/latex-footnote-no-count.md @@ -0,0 +1,55 @@ +--- +title: "Quick LaTex: Footnotes with no Counter" +date: 2022-09-23T15:34:28-04:00 +draft: false +tags: ["LaTex"] +math: false +--- + +Let's say there's a scenario where you want to have a footnote, but you don't want a counter associated with it. In order to stay consistent with the document style, the solution should use `\footnote` within its implementation. + +The solution: Define `\blfootnote{text}` in the preamble. + +```latex +\newcommand\blfootnote[1]{ + \begingroup + \renewcommand\thefootnote{}\footnote{#1} + \addtocounter{footnote}{-1} + \endgroup +} +``` + +This makes use of the footnote command while also re-adjusting the footnote counts so that our variant doesn't increase it. We can then use this command within the document. Here's a beamer example: + +```latex +\begin{frame}{Some Topic} + This is where I explain some topic. + \blfootnote{Numberless Footnote} +\end{frame} +``` + +Complete Minimal Example: + +```latex +\documentclass[aspectratio=169]{beamer} +\usepackage[utf8]{inputenc} +\usetheme{Copenhagen} + +\newcommand\blfootnote[1]{ + \begingroup + \renewcommand\thefootnote{}\footnote{#1} + \addtocounter{footnote}{-1} + \endgroup +} + +\begin{document} + +\begin{frame}{Some Topic} + This is where I explain some topic. + \blfootnote{Numberless Footnote} +\end{frame} + +\end{document} + +``` +