For some paragraphs I use several levels of numbering from "Lists and numbering" option. Is it possible to create a text variable that would get the last paragraph number on a page so that I could use it in a page header? I know how to insert cross reference that would point to paragraph number, but can't find how to access paragraph number in text variables.
I've found a workaround for the problem. It's rather clumsy, but it's working.
For every numbered paragraph p which I want to be included in referencing with text variables I create an anchored nonprinting text box and insert cross-reference to p's number in it formating it with my predefined paragraph style. In header I use "Running Header (paragraph style)" text variable using that style to insert paragraph number. That's it.
It may seem that there is a better way -- format paragraph number with a certain character style, and use that style in "Running Header (Character Style)" text variable. Unfortunately, it doesn't work. So it seems there is no direct way of referencing paragraph numbers with text variables.