Open mhosken opened 2 years ago
Is this only going into the PDF outline? Or is it an extension to the tocline in #534 ? I'm suspicious of zoutline
being a character style. To me character styles should be producing text on the page.
@mhosken Has this need now been met by \zlabel? Or is there something else that this enhancement request will be able to do for us? Perhaps it is similar in behaviour, but has a different application which needs to be coded up to create the Outline elements of the PDF.
Would this also be like an ID/anchor. If so, using the USFM linking attribute 'link-id' might be an idea?
\jmp John the Baptist|link-id="article-john_the_baptist"\jmp*
Maybe then an additional attribute to indicate that this ID should appear as a bookmark?
(Or it could be a milestone.)
Getting a little off-topic: Might it be a good to ask the PT team what their current thinking is about improving linking support in PT? This is a topic of interest there while work on study Bible support is being done.
This sounds like a good concept, yes. In fact, if there is a good, unique, attribute name, then it could be treated as a reserved attribute, used on any character style (or milestone) to the same effect.
An idea I've just had was index-entry
, since something that's worthy of
putting into an outline is presumably worth adding to a printed index.
But maybe that would over-crowd the outline. Perhaps 'outline-entry' and 'index-entry' as 2 separate attributes, where an outline-entry (by default) also creates an index entry, but an index-entry?
Some more discussion is probably relevant. Has anyone had more thoughts on this?
My current thought is:
\jmp John the Baptist|link-id="article-john_the_baptist" outline-entry="John the Baptist" outline-level="2"\jmp*
Where the the link-id provides a unique identifier for the PDF internals, "John the Baptist" is what goes in the outline, and the outline-level has 0 for book-level, 1 for chapter-level, and hopefully 2 is within the PDF spec...
Hmmm,. thinking about it, I wonder if there's a case for outline-entry
as above to be link-title
?
Using link-title
makes sense to me.
OK... I have just extended the logic a little:
link-title
is supposed to generate hover text or similar if there's a supplied link-href
for the link to link to. The behaviour is undefined, as far as I know when there's no link-href
, or when a style with a link-href
also has a link-id
.
PTXprint now has the following logic:
If there's a link-id
, then the text is always a possible target for another jump.
Also, if there's a link-href
attribute to a character style:
outline-entry="something"
will also produce an entry (of something
) in the PDF outline, assuming there's a link-id
.link-title
may eventually control the hover text, if I ever work out how.If there's no link-href
attribute:
outline-entry="something"
will produce an entry (of something
) in the PDF outline, assuming there's a link-id
.link-title="something"
will behave like outline-entry
If there is no link-id
but outline-entry
is specified, a warning should appear in the log, and there will be no entry in the outline.
While not a character style (as it produces no characters, in and of itself), this has been implemented for a year, now. Can it be closed?
There are various situations where we want to add a PDF outline entry that isn't one of the automatically generated ones (chapter, etc.). I propose we use an attributed character style. For example:
The tricky part of this is coming up with an id. For example if we are in a strongs index, we don't have very good ids.