I am authoring a Flare project that renditions into PDF as a classic book with an index.
I have an Index Link Set that contains a See also term:
In the index, the See also reference comes immediately after the main term, as shown:
I want the See also reference to be listed below the references to page numbers, as shown:.
I found a kludgy way to accomplish this, but it requires editing the PDF in Adobe Acrobat or a similar tool.
Is there a way to accomplish it within the Flare rules?
Index—sort order—"See also" references
Index—sort order—"See also" references
You do not have the required permissions to view the files attached to this post.
-
- Sr. Propeller Head
- Posts: 249
- Joined: Thu May 24, 2018 3:11 pm
- Location: Queensland, Australia
Re: Index—sort order—"See also" references
I can't figure out a way to do what you want either. The closest I can get is to add "display:block;" to the span.SeeAlsoIndex element. This puts the "See also" text on a new line, but also means that the term you are linking to is on its own separate line. These spans (SeeAlsoIndex and SeeAlsoIndexTerms) are where you style them to add italics or bold or whatever. You also can't put it anywhere but just below the original term. So it looks like:
If there were an overarching structure that encloses both "see also" text and terms then you could make that a block, but I can't find what that element might be if it exists. Looking at an HTML5 version of the index doesn't help as it creates different structures.
Sorry I couldn't help you that much.
Rob
Code: Select all
circulating
See also
flow
Other index terms under circulating page num
Sorry I couldn't help you that much.
Rob
-
- Sr. Propeller Head
- Posts: 249
- Joined: Thu May 24, 2018 3:11 pm
- Location: Queensland, Australia
Re: Index—sort order—"See also" references
I do love a challenge... The closest I could get is to use the ::before pseudo element to add in a line break before the "See also" span. Being a line break, it normally has the same indent as the element containing it, in this case the p.index1 tag. So you have to fudge some whitespace in there too to indent it. Try adding the following to your stylesheet:
Note there's a space after the \A linebreak.
I can't move the "See also" text to the end of the index entries, but then I suppose that would be wrong anyway. Say you had an index entry that had over a page of secondary entries. You wouldn't want the "see also" to be at the end of all those and on the next page.
And I'm struggling to change the width of the indent of the "see also".
Maybe there's other ways to do it.
Rob
Code: Select all
span.SeeAlsoIndex
{
font-style: italic;
}
span.SeeAlsoIndex::before
{
content: '\A ';
white-space: pre;
}
I can't move the "See also" text to the end of the index entries, but then I suppose that would be wrong anyway. Say you had an index entry that had over a page of secondary entries. You wouldn't want the "see also" to be at the end of all those and on the next page.
And I'm struggling to change the width of the indent of the "see also".
Maybe there's other ways to do it.
Rob
Re: Index—sort order—"See also" references
@robdocsmith: Thank you for the ideas.
I didn't know that your CSS in the stylesheet was even possible. I added the code that you suggested, and I got the result shown below. Note that the indentation of the See also line is greater than the indentation of the regular index subentries. This screen capture contains the actual dimensions in inches of the PDF output. The See also entry has a left margin or indent of 0.45 inches.
I played around with removing your white-space: pre; and removing the space after \A. I also added variations of margin-left, text-indent, and padding-left to the span.SeeAlsoIndex container.
I was only able to get the See also reference in two positions: As shown above, or aligned with the main entry (creating).
Your solution is acceptable if one is not a stickler about typography (which I'm not).
I didn't know that your CSS in the stylesheet was even possible. I added the code that you suggested, and I got the result shown below. Note that the indentation of the See also line is greater than the indentation of the regular index subentries. This screen capture contains the actual dimensions in inches of the PDF output. The See also entry has a left margin or indent of 0.45 inches.
I played around with removing your white-space: pre; and removing the space after \A. I also added variations of margin-left, text-indent, and padding-left to the span.SeeAlsoIndex container.
I was only able to get the See also reference in two positions: As shown above, or aligned with the main entry (creating).
Your solution is acceptable if one is not a stickler about typography (which I'm not).
You do not have the required permissions to view the files attached to this post.
Re: Index—sort order—"See also" references
I only want to add that putting See also immediately after the main entry is Microsoft style. Putting it after the subentries is University of Chicago style, which is commonly used by publishers of technical books.
It is also known informally as "the way that FrameMaker does it."
Here is how I got the See also to the end of the list: I added :Z to the main entries. This forced the See also references to the end, albeit with a Z at the beginning of the line. I then used a PDF editing program (Nuance PowerPDF) to remove the Z's.
This solution is workable as long as I have only a few See also references.
It is also known informally as "the way that FrameMaker does it."
Here is how I got the See also to the end of the list: I added :Z to the main entries. This forced the See also references to the end, albeit with a Z at the beginning of the line. I then used a PDF editing program (Nuance PowerPDF) to remove the Z's.
This solution is workable as long as I have only a few See also references.
-
- Sr. Propeller Head
- Posts: 249
- Joined: Thu May 24, 2018 3:11 pm
- Location: Queensland, Australia
Re: Index—sort order—"See also" references
Yes those were the results I saw too. The \A sequence is the equivalent of adding a <br /> to the line making it:
<p>Main term <br />
See also reference</p>
A <br /> makes the next line have the same indent as the containing <p> tag and I couldn't figure a way of adding a spacer to the start. It's not changing that the "See also" bit is still effectively an inline element. My other attempts to make it a block, meant that you get that annoying new line after the "See also" text.
The fixed space and white space set to pre added space but rather a lot of space. I don't know what the amount of space is based upon. I tried adding width statements or various other kludges but couldn't change it. A fixed width image inserted as a background in the before pseudo element doesn't work either. I'm fairly new to the delights of ::before and ::after but am finding them well supported in Flare and very useful.
Your workaround sounds workable too. You could perhaps script the removal of your reference Z in a post-processing script, avoiding the need to do it manually. I do editing of my PDFs to crop and add navigation elements. I use Python to do this using the PyMuPDF library.
Cheers,
Rob
<p>Main term <br />
See also reference</p>
A <br /> makes the next line have the same indent as the containing <p> tag and I couldn't figure a way of adding a spacer to the start. It's not changing that the "See also" bit is still effectively an inline element. My other attempts to make it a block, meant that you get that annoying new line after the "See also" text.
The fixed space and white space set to pre added space but rather a lot of space. I don't know what the amount of space is based upon. I tried adding width statements or various other kludges but couldn't change it. A fixed width image inserted as a background in the before pseudo element doesn't work either. I'm fairly new to the delights of ::before and ::after but am finding them well supported in Flare and very useful.
Your workaround sounds workable too. You could perhaps script the removal of your reference Z in a post-processing script, avoiding the need to do it manually. I do editing of my PDFs to crop and add navigation elements. I use Python to do this using the PyMuPDF library.
Cheers,
Rob
Re: Index—sort order—"See also" references
Thanks for the clarification.
P.S.: Here is the Index Link Set with the kludge:
P.S.: Here is the Index Link Set with the kludge:
You do not have the required permissions to view the files attached to this post.