# Rotatebox on footnotes

I am trying to create hints to exercises, and would like a footnote with the text appearing upsidedown. I've created the following command, however this doesn't produce any line breaks so the text goes out of the page boundaries (on the right hand side). What do I need to add to have automatic line breaks.

\newcommand{\hint}[1]{\footnote{\rotatebox{180}{Hint: #1}}}

I've looked at this answer, but they're trying to do something much more specific.

• Please post your code as full MWE, i.e., from \documentclass to \end{document} Jan 26 at 4:37

The tricky bit was to keep from overlapping the number.

\documentclass[letterpaper]{article}
\usepackage{graphicx}
\usepackage{blindtext}% MWE only
\usepackage{showframe}% MWE only

\newcommand{\hint}[1]{\footnote{\hspace{-1.8em}% from \@makefntext
\rotatebox[origin=c]{180}{\parbox[t]{\linewidth}%
\vskip\ht\strutbox}}

\begin{document}
How high us up? \hint{\blindtext plus some more \rule{1.5in}{1pt} text}

Why is there air? \hint{\blindtext plus some more \rule{1.6in}{1pt} text}
\end{document}


In order to also flip the hint number, one has to emulate the \footnote command itself. However, using \insert\footins will not reverse the order in which the hints appear.

\documentclass{article}
\usepackage{graphicx}
\usepackage{blindtext}% MWE only
\usepackage{showframe}% MWE only

\makeatletter
\newcommand{\hint}[1]{\footnotemark\setbox\footins=\vbox{%
\normalfont\footnotesize
\interlinepenalty\interfootnotelinepenalty
\splittopskip\footnotesep
%\splitmaxdepth \dp\strutbox \floatingpenalty \@MM% no apparent effect
\hsize\columnwidth \@parboxrestore
\rotatebox[origin=c]{180}{\parbox[t]{\columnwidth}%
{\parindent=1em \noindent
\makebox[1.8em][r]{\textsuperscript{\thefootnote}}#1}}%
\vskip\dp\strutbox
\unvbox\footins}}
\makeatother

\begin{document}
How high us up? \hint{\blindtext}

Why is there air? \hint{\blindtext}
\end{document}