5

I am typesetting an article with a lot of quotes from poems, and I have defined a command that puts the poem information at the end of the line

\newcommand\poemcite[1]{\hfill{\small #1}}

But if I want to use this command in the footnote, I need to change the font size otherwise it will be too large compared with other text in the footnote. I know that I can define another command that uses \scriptsize instead of \small, but I wonder if there is a way to automatically determine if it is used in main text or footnote, so I can just use the same \poemcite command both in main text and footnotes.

A MWE

\documentclass[12pt]{article}
\usepackage{lipsum}
\usepackage[norule]{footmisc}
\newcommand\poemcite[1]{\hfill{\small #1}}

\begin{document}
\lipsum[2]
\begin{quote}
April is the cruellest month \poemcite{\emph{T.S. Eliot}}
\end{quote}
A footnote is here.\footnote{
\begin{quote}
April is the cruellest month \poemcite{\emph{T.S. Eliot}}
\end{quote}
But I want the command to achieve something like this
\begin{quote}
April is the cruellest month \hfill{\scriptsize\emph{T.S. Eliot}}
\end{quote}
}
\end{document}
2

1 Answer 1

4

Use the relsize package's \smaller (or \larger) macro to step to a font size relative to the current font size:

enter image description here

\documentclass[12pt]{article}
\usepackage{lipsum,relsize}
\usepackage[norule]{footmisc}
\newcommand\poemcite[1]{\hfill{\smaller\emph{#1}}}

\begin{document}
\lipsum[2]
\begin{quote}
  April is the cruellest month \poemcite{T.S. Eliot}
\end{quote}
A footnote is here.\footnote{
  \begin{quote}
    April is the cruellest month \poemcite{T.S. Eliot}
  \end{quote}
  But I want the command to achieve something like this
  \begin{quote}
    April is the cruellest month \hfill{\emph{\scriptsize T.S. Eliot}}
  \end{quote}
}
\end{document}
0

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .