View Full Version : Annotations not in Sync with text
mdelmarter
09-06-2007, 07:52 AM
This is question addresses quite a major concern for me. I am creating my own Isilo files and making a lot of annotations. If however I change and regenerate the Isilo file then my annotations potentially no longer line up with the text, even if the actual pages with annotations have not changed (i.e. only earlier pages have been altered).
Is there any way of controlling or editing the annotations file itself to correct this? How do annotations actually work?
Am I correct in assuming that it is only changes in [U]displayed text that impacts on annotations? In other words changing HTML comments/styles/formatting etc will not affect the alignment of annotation highlights?
iSilo
09-06-2007, 10:46 AM
Internally, each annotation's position is stored as a linear offset into the document text, so if the document text changes with text added or deleted, then an annotation's positional offset may no longer point to the same text.
This means that annotations will not work for the use that you describe where you modify the document to which you add annotations.
mdelmarter
09-06-2007, 11:43 AM
OK thats kool. But in essence, if I understand it correctly, adding HTML that does not "move" items around the page but is simply adding more code in the background (eg CSS styling) - then everything is OK? It is only when text is moved around the page due to visible content being added/deleted that there is an issue?
Hope the question makes sense!
[update] I guess in essence I do not totally understand what a "linear offset" is
iSilo
09-06-2007, 02:59 PM
OK thats kool. But in essence, if I understand it correctly, adding HTML that does not "move" items around the page but is simply adding more code in the background (eg CSS styling) - then everything is OK? It is only when text is moved around the page due to visible content being added/deleted that there is an issue?Your understand is correct.
I guess in essence I do not totally understand what a "linear offset" isThink of all the text of the document as being on one very long line going from left to right. A linear offset is analogous to measuring the distance from the beginning of the document to some point in the document (e.g., the location of the text where you mark the beginning of the annotation).
mdelmarter
09-07-2007, 05:13 PM
Thanks for clearly explaining this for me. I have a quick question, as well as an idea on how I can work around this situation and still make minor changes to text.
Question 1:
Do images affect the linear offset of the annotations? i.e. if I add/remove images from the text is there an issue here?
Question 2:
Does the font size affect the linear offset? For example if I choose to resize a paragraph of text to a larger font, will this affect the alignment of annotations?
Potential Workaround:
I came up with the idea of adding a "Spacing" page to the start of the document. This essentially has lots of text that can be added/removed to realign annotations further on in the document.
Do you see any issues with the theory behind the workaround?
Thanks so much for your support...
iSilo
09-08-2007, 09:52 AM
Do images affect the linear offset of the annotations? i.e. if I add/remove images from the text is there an issue here?Yes, adding or removing images also affects the text.
Does the font size affect the linear offset? For example if I choose to resize a paragraph of text to a larger font, will this affect the alignment of annotations?Varying the font size does not affect the alignment of annotations.
I came up with the idea of adding a "Spacing" page to the start of the document. This essentially has lots of text that can be added/removed to realign annotations further on in the document.Theoretically this is possible, but in practice it will likely not be easy as it may require trial and error in some instances to determine how many spaces you need to add or remove. Note though that if you do try it, you should use non-breaking spaces or any non-space character rather than regular spaces, as a consecutive sequence of regular spaces is collapsed into a single space during conversion.
vBulletin® v3.7.4, Copyright ©2000-2008, Jelsoft Enterprises Ltd.