It doesn't matter if the text that is being pulled by the variable breaks across lines, as long as there are no actual break characters included. In other words, your heading might be 60 pt text in a frame that is only two inches wide, so four or five words would run several lines, but if the variable is formatted for 9 pt text, those same words would easily fit in a 2-inch width.
That said, I know you've used forced breaks in some of the headings in your book that you want to include in your footer, so repeating the text in a non-printing frame without breaks may turn out to be the only viable choice. I use that method from time to time, and when I do I like to make the non-printing text really obvious so I don't forget it's there. I usually make it red.
Have you tried "breaking" heading paragraphs with right indent or Balance Lines, and/or applying NoBreak to two or more words? These would not affect the paragraph style of the one-line footer.
Gerben Wierda wrote:
I currently have a running footer based on a text variable which is based on a paragraph style. But the heading itself is pretty big-fonted and will have line breaks. So, only the first word ends up in the running footer.
Is there a way around that? I was thinking about having a text frame especially for this variable on a hidden layer. But maybe there is a simpler way?
I did not need it so far. Just replacing the paragraph breaks that were in the multiline header (it's in a frame of its own) was enough.