Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Pgf reference in Header/Footer

New Here ,
May 28, 2008 May 28, 2008
I'd like to present the scope of paragraphs on a page in the Header (much like it's done in many Bibles). I have two levels of paragraphs; when the higher level gets a higher number, the lower level starts over on number 1.<br />But I'm presented with two problems:<br />1) If I use <$paranum[Level1]>:<$paranum[Level2]> I get the number of the first paragraph Level1 that appears on the page (be it the first line or the last line, it doesn't matter), or, in the case that there is no such, the last from the previous page. When the first new paragraph on the page is a Level1, or when there is no Level1 paragraph on the page, all turns out well, but that's very rarely the case. What I want, is the Level1 number that is valid when the first new Level2 paragraph appears on the page. The Autonumber format for Level1 is: K:<n+>< =0>\t, and for Level2: K:< n><n+>\t. <br />(Idea: Is it possible to have a two-level numbering on a paragraph? (I'm not asking about two different numberings on ONE paragraph; that's addressed above.) <br />2) To present the scope, I'd also like to get the numbers for the last Level1 and Level2 paragraphs on the page. Is that possible? <br /><br />Best regards, Mikael Persson
446
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
May 28, 2008 May 28, 2008
Mikael,

1. FM's running headers/footers work by searching backward from the
current page to match the criteria specified for the h/f variable.
Such a variable can only find one condition that satisfies it, so you
can't be looking for two different paratags simultaneously. You would
need to break this into two separate variables.

2. Have you looked at the information for creating dictionary-style
running headers/footers in the Help files or manual?

To get the last matching tag on a page you need use the "+" plus sign
notation as per this example:

<$paratext[+,paratag]>

To get the range on a page, again, use separate variables.
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
May 28, 2008 May 28, 2008
Thank you Arnis!

Using the "+" sign will help me get the last paratags. (I think I saw this many years ago, in FM5 (?), but I didn't remember.)
I'm not certain if I understand you correctly, but I already was aware that I need to have one Running H/F for the presentation of the first paratag, and another for the last. I guess I was a bit unclear. (The second thus looks like this: <$paranum[+,Level1]>:<$paranum[+,Level2]>.)

In my test document, I have paragraphs Level1 (no 1), Level2 (nos 1 to 72), Level 1 (no 2), and Level2 (nos 1 to 23) on page 1, Level2 (nos 24 to 119), Level1 (no 3), and Level2 (no 1) on page 2, and Level2 (nos 2 to 25) on page 3. This is presented in the header as 1:1 2:23 on page 1, 3:24 3:1 on page 2, and 3:2 3:25 on page 3.
As you can understand, it's the "3:24" part that I'm not very happy with -- it should be "2:24".

As you indicated, I hadn't looked at the 'dictionary-style' in the help files; otherwise I would already had found the 'plus sign'. But I don't seem to find a solution to the remaining problem there.
Any more ideas?

Best regards, Mikael Persson
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
May 28, 2008 May 28, 2008
Mikael,

Remember, FM searches for the match on the current page first and only
then backwards when fulfilling a request for a variable. So even if
you have a section that is in Level 1 of 2 and a Level 2 of 24 at the
top of your page, and there is another Level 1 (value of 3) introduced
on that page, FM will use the newer Level 1 (value of 3) from the page
first. If it's the only one on the page, the "+" doesn't make any
difference.

Nothing that you can do about it. It's simply looking at tag content,
not context.

You could consider using the <$marker1> and <$marker2> variables for
the running h/f variables and manually inserting and clearing the
counter values at the start and end of each Level 1 entry, e.g.
{<$marker1 content>}Level 1 content{<$marker2 content>}, where the
marker1 content is the old Level 1 value and the marker2 content is
the new Level1 content. But this is totally manual and a maintenance
nightmare.

An alternative solution is to have a Framescript that determines the
values and manually inserts the correct content in a "pseudo" header
text frame (i.e. another flow on the body page that mimics the header
content).
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
May 28, 2008 May 28, 2008
Thank you for your input, Arnis!

My idea with putting both levels of numbers in the Autonumber Format was that I should have them both accessible. The problem is that I get the same visibility in the Running variable as in the text. I want both levels visible in the header, but just the Level2 number in the paragraphs. Obviously that's not possible, and it wouldn't be very logical, either.
Then I got the idea to make part of the Autonumber Format for the Level2 paragraphs white (and hence invisible) with a Character format, and all of the header visible with Default Font. But as far as I have found out, that's not possible; I have to have the same Character Format for all of the Autonumber Format.
As I can see it, my best bet is a variant of the latter: I set all of the Autonumber Format to white, and then I enter the paragraph number manually. Or even better: I use a dummy paragraph with zero vertical and line spacing, and with minimal font size (to avoid horizontal size), setting the Autonumbers with it, and then I use the Level2 number in the 'real' paragraph where I will enter the actual text.

How does that sound? (It does work.)

Best regards, Mikael Persson
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
May 28, 2008 May 28, 2008
LATEST
Mikael,

Sometimes one has to make complex kludges to get things to look the
way you want.

One other possibility might be to use run-in paragraphs with your
autonumbering in white (i.e. invisible) for those. Note: you can also
use a different colour and set it to "Invisible" in the Color Views
(View > Color > Views...). Then you could easily toggle between seeing
the autonumber and not for maintenance purposes.
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines