# Setting Text on a Path

Using LuaLaTeX, I want to create an effect where text begins as a footnote but curves upward and ends up in front of the body text.

Sort of hard to describe, but picture the body text ending prematurely on a page (with full pages of body text preceding and after it) and the footnote text tilting upward on a path to eventually "become" the rest of the body text.

Is this something that can only be achieved via something like TikZ, or could I hack the geometry settings for this particular page to achieve it?

Sorry, no MWE here because I don't know where to start.

-
I understand the value of a MWE in nearly all situations, but it would be a little silly here since I have no clue what to do. I need text to flow from the footnote frame to the body text frame, through the space in between, and haven't the foggiest idea how to do that. –  crai_n Jul 17 at 8:36
Can you please do a mockup using some graphic tool or even plain pencil and paper? I'm having problems picturing your description. –  JLDiaz Jul 17 at 8:51
You could at least provide the framework of the document, including some pseudo-text in the body and footnote so that people don't have to start from scratch. –  cfr Jul 18 at 21:38

Is this sort of what you want? I tweaked manually but should be doable if you know what you are doing with the text.

\documentclass{article}
\usepackage{tikz,kantlipsum}
\usetikzlibrary{tikzmark,decorations.text}
\begin{document}
\kant[1]
Then some more text finishing randomly on the sentence in the next line and I placed a tikzmark
right HERE\tikzmark{a}\footnote{Also one tikzmark HERE\protect\tikzmark{b}} \hspace{3.5em} and
continue here%
\tikz[remember picture,overlay]\draw[
decoration={text along path,
text={
Some long text along a long curve that
I'm hoping that it would be long enough to meet the line, merge
}
},decorate] (pic cs:b) to[in=180,out=0] ([xshift=5em]pic cs:a);
\end{document}


-
That's exactly it! Thank you, and for anyone confused by my description, this is exactly what I was going for. –  crai_n Jul 17 at 20:46
+1 Sir, your text is escaping! :) –  Paulo Cereda Jul 18 at 10:45

Oh, I was working in a solution using the same ideas than percusse, but he was faster. Nevertheless, I understood a different layout, so I'm posting here too.

As in percusse's solution, the "curved text" cannot be arbitrary. It has to have the precise length to fill the curve length.

\documentclass{article}
\usepackage{tikz}
\usepackage{lipsum}
\usetikzlibrary{decorations.text,calc}
\newcommand{\tikzmark}[1]{\tikz[overlay,remember picture] \node (#1) {};}

\begin{document}
\lipsum*[1-2]
\tikzmark{last paragraph}
\footnote{\lipsum*[3]\tikzmark{last footnote line}}
\begin{tikzpicture}[overlay, remember picture, decoration={text along path,
text={
Lorem ipsum dolor sit amet, consectetur adipiscing elit.
Vestibulum ultricies sollicitudin iaculis. Cum sociis natoque penatibus.
}}]
\footnotesize
\coordinate (right margin) at ($(current page.east)-(1in,0)$);
\draw[decorate, rounded corners=1cm]
(last footnote line) -- (last footnote line-|right margin) |- (last paragraph);
\end{tikzpicture}
\end{document}


-
Thank you, this is also a good solution. Commenting to confirm that this and percusse's answers are perfectly in line with what I was trying to describe. –  crai_n Jul 17 at 20:47