Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exclude backlinks for notes in epub3-to-daisy202 conversion #18

Open
martinpub opened this issue May 4, 2021 · 15 comments
Open

Exclude backlinks for notes in epub3-to-daisy202 conversion #18

martinpub opened this issue May 4, 2021 · 15 comments

Comments

@martinpub
Copy link
Collaborator

EPUB 3 footnotes/endnotes will contain backlinks, e.g. <a href="#ref" role="doc-backlink">Go to the note reference.</a>. Navigation to and from notes in DAISY 2.02 is handled by SMIL markup, so the backlinks will be redundant in a DAISY 2.02 setting.

I suggest that backlinks, identified with @role="doc-backlink", be omitted in the epub3-to-daisy202 conversion script.

@bertfrees
Copy link
Collaborator

Navigation to and from notes in DAISY 2.02 is handled by SMIL markup

How do you know this? Is this what your experience with DAISY 2.02 readers shows?

@martinpub
Copy link
Collaborator Author

martinpub commented May 4, 2021

How do you know this? Is this what your experience with DAISY 2.02 readers shows?

This was an assumption based on how our native DAISY 2.02 files work. It is also along the lines we discussed earlier regarding skippability/footnote linking.

Sample content file HTML:

<span class="sentence">
  <span class="normalized" id="rgn_cnt_0230">
    <a href="a7e6_0010.smil#rgn_txt_0010_0036">Sedan 1990-talet har detta medborgarideal etablerats som en norm inom en rad olika politikområden</a>
  </span>
  <a class="noteref" id="rgn_cnt_0231">1</a>
  <span class="normalized" id="rgn_cnt_0232">
    <a href="a7e6_0010.smil#rgn_txt_0010_0039">.</a>
  </span>
</span>

[...]

<div class="notebody" id="rgn_cnt_3857">
  <p id="rgn_cnt_3858">1 Bland de studier som har pekat på genomslaget av denna vilja till aktivering inom olika områden kan följande nämnas: utbildning (Carlbaum 2012; Harling 2017), arbetsmarknad (Larsson 2015; Vesterberg 2016) och socialt arbete (Ekholm 2016; Lauri 2016).</p>
</div>

Sample SMIL file:

         <par endsync="last" id="rgn_par_0010_0036">
            <text id="rgn_txt_0010_0036" src="content.html#rgn_cnt_0230" />
            <audio clip-begin="npt=405.914s" clip-end="npt=414.180s" src="a7e6_0010.mp3" id="rgn_aud_0010_0036" />
         </par>
         <seq><!--Note reference--><par endsync="last" id="rgn_par_0010_0037">
               <text id="rgn_txt_0010_0037" src="content.html#rgn_cnt_0231" />
               <audio clip-begin="npt=414.180s" clip-end="npt=416.617s" src="a7e6_0010.mp3" id="rgn_aud_0010_0037" />
            </par>
            <!--Note body--><par endsync="last" system-required="footnote-on" id="rgn_par_0010_0038">
               <text id="rgn_txt_0010_0038" src="content.html#rgn_cnt_3857" />
               <audio clip-begin="npt=2.017s" clip-end="npt=34.285s" src="a7e6_0011.mp3" id="rgn_aud_0010_0038" />
            </par>
         </seq>
         <par endsync="last" id="rgn_par_0010_0039">
            <text id="rgn_txt_0010_0039" src="content.html#rgn_cnt_0232" />
            <audio clip-begin="npt=416.617s" clip-end="npt=417.257s" src="a7e6_0010.mp3" id="rgn_aud_0010_0039" />
         </par>

@bertfrees
Copy link
Collaborator

bertfrees commented May 18, 2021

@martinpub Forward links (from noteref to note) currently also have an href after the EPUB 3 to DAISY 2.02 conversion. For instance:

<a epub:type="noteref" href="notes.xhtml#note_1">1</a>

becomes:

<a href="notes.html#note_1">
   <span>
      <a href="content.smil#noteref_1">1</a>
   </span>
</a>

If backlinks are a problem, aren't forward links a problem as well?

@martinpub
Copy link
Collaborator Author

martinpub commented May 19, 2021

Hi @bertfrees,

Indeed, you are right, forward links will face a similar problem. Do you think this is related to MTM's implementation of DAISY 2.02? As you see in my example, the noterefs only have anchors with ids, not full links, in my sample content file. I guess testing will reveal what to do next. I will run another test with conversion.

The difference between the forward link (noteref) text and the backlink text is we want the former to be narrated, not the latter. And the latter is artificially created for EPUB 3 navigation, whereas the former is a part of the original text.

@bertfrees
Copy link
Collaborator

I have no idea what the appropriate way to do it is. It needs to be tested. But I guess both the forward and backward links are not needed, so if they are problematic I'll remove them.

The difference between the forward link (noteref) text and the backlink text is we want the former to be narrated, not the latter.

Thinking about it now, I'm not sure if that makes sense. The way I was thinking to implement this is to just drop the noteref elements when moving the notes to the noteref position. Why exactly does the noteref need to be spoken?

@martinpub
Copy link
Collaborator Author

Thanks for your reply @bertfrees. The very pragmatic answer is: we need the output DAISY 2.02 not to be very different from what we currently have. New productions need to be aligned with those natively produced in DAISY 2.02.

The narration of note references is important for the reader of the talking book to know what/which notereference is being followed. Since note texts should be skippable, the narration will announce a note reference even if the user has set up the reading system to not automatically follow notes. The reader will then know there was a note for that word/sentence.

I can test more tomorrow, and see which variants would be acceptable in our local DAISY 2.02 validation, but I think we should get as close as possible as to what we currently have.

@bertfrees
Copy link
Collaborator

we need the output DAISY 2.02 not to be very different from what we currently have. New productions need to be aligned with those natively produced in DAISY 2.02.

Yes I figured :-) But as you can guess that is not quite a good enough reason for me. I mean of course I'm willing to follow existing conventions, but I'd also like to understand the reasoning behind them.

The narration of note references is important for the reader of the talking book to know what/which notereference is being followed.

Is it? Is it relevant to know the number of the note?

Since note texts should be skippable, the narration will announce a note reference even if the user has set up the reading system to not automatically follow notes. The reader will then know there was a note for that word/sentence.

But the same is true for e.g. sidebars, which have a similar function to notes. If a sidebar is skipped, how does the reader now something is skipped? I would think this is the responsibility of the reading system.

@martinpub
Copy link
Collaborator Author

Yes I figured :-) But as you can guess that is not quite a good enough reason for me. I mean of course I'm willing to follow existing conventions, but I'd also like to understand the reasoning behind them.

Sure!

The narration of note references is important for the reader of the talking book to know what/which notereference is being followed.

Is it? Is it relevant to know the number of the note?

Since note texts should be skippable, the narration will announce a note reference even if the user has set up the reading system to not automatically follow notes. The reader will then know there was a note for that word/sentence.

But the same is true for e.g. sidebars, which have a similar function to notes. If a sidebar is skipped, how does the reader now something is skipped? I would think this is the responsibility of the reading system.

In a study setting, where a student reading our talking book next to sighted course mates reading the print copy, I would say yes. Notes have a referencing status which is important I think.

@bertfrees
Copy link
Collaborator

bertfrees commented May 21, 2021

href has been removed from noterefs (in upstream). Nothing special is done to doc-linkback yet.

@bertfrees
Copy link
Collaborator

bertfrees commented Jun 1, 2021

"doc-backlink" elements are now dropped (in upstream).

@bertfrees bertfrees self-assigned this Jun 1, 2021
@martinpub
Copy link
Collaborator Author

Hi @kalaspuffar, can you verify whether this fork has merged this feature from upstream yet, or if it is not in the fork yet? If yes, I will test it .

@martinpub
Copy link
Collaborator Author

Thanks @bertfrees!

@bertfrees
Copy link
Collaborator

@martinpub No, this has not been actually pushed to upstream yet, it's still local to my machine. Sorry for the confusion.

@martinpub
Copy link
Collaborator Author

OK. Let us know when it's up @bertfrees.

@martinpub martinpub removed the testing label Jun 14, 2021
bertfrees added a commit to daisy/pipeline-modules that referenced this issue Jun 21, 2021
because navigation to and from notes is handled through SMIL.

see mtmse/pipeline#18
@bertfrees
Copy link
Collaborator

I have now committed it to daisy/pipeline-modules: daisy/pipeline-modules@3e3ad09.

@bertfrees bertfrees removed their assignment Sep 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants