A nota de rodapé da minipágina está dentro do nó tikZ

A nota de rodapé da minipágina está dentro do nó tikZ

Eu tenho uma minipágina e dentro dela uma nota de rodapé e uma imagem tikZ. Agora, meu problema é que o texto da nota de rodapé fica dentro do último nó da minha imagem tikZ. Não é isso que eu quero – e é muito estranho, na verdade.

Código e saída

\documentclass{article}

\usepackage{tikz,lipsum}

\begin{document}

\begin{minipage}{\textwidth}
\lipsum[1]\footnote{a footnote}% I cannot use \footnotemark etc
    \begin{tikzpicture}[overlay, remember picture]% I need these two options
        \draw[ultra thick, black] (0,0) -- node[sloped,below,text width=12cm,text centered]
{\lipsum[4]} (11,-3);% the text has to have a maximal width
    \end{tikzpicture}
\end{minipage}

\end{document}

Captura de tela

Primeira solução alternativa

Quando eu removo text width = 12cmcompletamente, a nota de rodapé volta para o final do texto:

Captura de tela após solução alternativa

Mas preciso que o texto tenha uma largura máxima. Então isso não é muito satisfatório. Alguma ideia?

Responder1

onde aprendemos que o tikz usa minipágina internamente :-)

isso salva e restaura as notas de rodapé para impedir que o tikz as veja, então a nota de rodapé vem no lugar certo, a imagem girada do tikz é sobreposta, mas acho que alguém que conhece o tikz pode consertar isso ...

insira a descrição da imagem aqui

\documentclass{article}

\usepackage{tikz,lipsum}

\begin{document}

\begin{minipage}{\textwidth}
\lipsum[1]\footnote{a footnote}% I cannot use \footnotemark etc
    \setbox0\box\csname@mpfootins\endcsname
    \begin{tikzpicture}[overlay, remember picture]% I need these two options
        \draw[ultra thick, black] (0,0) -- node[sloped,below,text width=12cm,text centered]
{\lipsum[4]} (11,-3);% the text has to have a maximal width
    \end{tikzpicture}\global\setbox\csname@mpfootins\endcsname\box0
\end{minipage}

\end{document}

Responder2

É por isso que o LaTeX é lindo... Outra solução :)

\documentclass{article}

\usepackage{tikz,lipsum}
\usepackage{footnote}

\begin{document}

\begin{minipage}{\textwidth}
\savenotes
\lipsum[1]\footnote{a footnote}% I cannot use \footnotemark etc
    \begin{tikzpicture}[overlay, remember picture]% I need these two options
        \draw[ultra thick, black] (0,0) -- node[sloped,below,text width=12cm,text centered]
{\lipsum[4]} (11,-3);% the text has to have a maximal width
    \end{tikzpicture}
\spewnotes
\end{minipage}

\end{document}

Responder3

Uma solução possível (que não é uma solução real) é fazer algo como:

\documentclass{article}

\usepackage{tikz,lipsum}
\usepackage{tabu}

\begin{document}

\begin{minipage}{\textwidth}
\lipsum[1]\footnote{a footnote}% I cannot use \footnotemark etc
    \begin{tikzpicture}[overlay, remember picture]% I need these two options
        \draw[ultra thick, black] (0,0) -- node[sloped,below]
{
    \begin{tabu}to 12cm {X[c]}
    \lipsum[4]
    \end{tabu}
} (11,-3);% the text has to have a maximal width
    \end{tikzpicture}
\end{minipage}

\end{document}

informação relacionada