Answers.Body: <p>I'm somewhat mystified that the reading system would put the footnote on the next line. Are you sure that in the HTML source  there is no random space (or extra character) between the last word of the sentence, the period, and the number reference in brackets?  One might expect these characters to run after another without spaces regardless of which line it appears on.  </p>
  
  <p>My preference would be not to hard code wrapping/justification defaults in the element (P? LI? etc)  and just let the reading system (and the reader) do it. Or maybe specify a default for body text? For one thing, this becomes less of an issue when displays are wider and reading systems become more powerful. You don't want your publisher css to depend on the user turning justification on or off.  If the user perceives that justification is impeding the ability to read the text, they can usually turn it off on settings. Handling of justification on reading systems will only improve over time. </p>
  
  <p>I'd be curious what screen dimensions this issue is happening in. This is an anomaly that I personally am fine with mobile phone users experiencing if width is 600 or less. </p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2018-01-31T23:57:54.450Z
Answers.Text: I'm not as much mystified as I am annoyed.  There are no spaces between the sentence period and the end of the linked text.  `blah.<a href="...">[17]</a>`  My assumption is that it allowed the roll due to the end-of-sentence period and the opening brace being a usually breakable construct in the world of HTML.  I can see your point about not wanting to hardcode the `nowrap` and just let the sleeping dog lie.  So far this issue has only happened once in my document, which has hundreds of footnotes.  Methinks the issue might be rare enough to ignore.
Answers.UserDisplayName: JBH
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2018-01-31T19:28:03.013Z
Answers.LastActivityDate: 2018-01-31T19:28:03.013Z
Answers.UserDisplayName: idiotprogrammer
Answers.Body: <p>I had the same problems with Google Play Books and ebooks with many footnotes and endnotes.
  By adding a Zero-width joiner character (‍ U+200D; ‍) before the anchor solved the problem;</p>
  <pre><code>This is some random text.&amp;#8205;&lt;a class=&quot;anc&quot; id=&quot;anc17&quot; href=&quot;ftns.xhtml#sym17&quot;&gt;[17]&lt;/a&gt;  After this is more.
  </code></pre>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2024-05-08T12:00:40.513Z
Answers.LastActivityDate: 2024-05-08T12:00:40.513Z
Answers.UserDisplayName: Lajos N
Answers.Body: <p>As per my thoughts you have to move all footnotes end of the chapter or book with label and create a link in paragraph doing this you can find: </p>
  
  <ol>
  <li>Contents after footnotes which are the part of the paragraph will
  continue, it will look pretty good.</li>
  <li>You all footnotes will wrap
  inside any block label element.</li>
  </ol>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2018-01-30T14:06:31.547Z
Answers.Text: It appears you're voting for the footnote link to wrap to the next line?
Answers.UserDisplayName: JBH
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2018-01-30T10:16:38.107Z
Answers.LastActivityDate: 2018-01-30T10:16:38.107Z
Answers.UserDisplayName: Amrendra Kumar
Body: <p>I'm preping an Epub file and found an example on my reader where a footnote link rolled to the next line.  E.G., </p>
  
  <pre><code>This is some random text.[17]  After this is more.
  </code></pre>
  
  <p>becomes in my reader...</p>
  
  <pre><code>This is some random text.
  [17]  After this is more.
  </code></pre>
  
  <p>I can add <code>...&lt;span style="white-space:nowrap;"&gt;text.[17]&lt;/span&gt;...</code> (link tag removed for convenience) to force the issue, creating...</p>
  
  <pre><code>This     is     some    random
  text.[17]  After this is more.
  </code></pre>
  
  <p><em>All that extra white space is because I'm using full justification.  It looks better generally, but I might remove it due to problems with smaller screens.</em></p>
  
  <p>My question is which solution is preferable?  Should I force the footnote link to remain with its referent text or let the link roll to the next line with the possibility that it looks odd and may even lose context to the uninitiated (if there are uninitiated)?</p>
  
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2018-01-31T19:32:18.920Z
Comments.Text: what display dimensions is this error happening in?
Comments.UserDisplayName: idiotprogrammer
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2018-01-31T23:53:18.603Z
Comments.Text: @idiotprogrammer, as fate would have it, massive.  I'm on my 1600x1200 screen viwing perhaps a 1280x1024 window, two columns.  The automatic kerning worked out to roll the footnote link under that condition.
Comments.UserDisplayName: JBH
Tags: <epub><footnotes>
Title: Is it better to let a footnote link wrap to the next line or force it to remain with the last word block it references?
UserDisplayName: JBH
ThreadText: # Is it better to let a footnote link wrap to the next line or force it to remain with the last word block it references?
  
  (Asked by: username_0 on 2018-01-30)
  
  I'm preping an Epub file and found an example on my reader where a footnote link rolled to the next line. E.G.,
  
  ```
  This is some random text.[17]  After this is more.
  
  ```
  
  becomes in my reader...
  
  ```
  This is some random text.
  [17]  After this is more.
  
  ```
  
  I can add `...<span style="white-space:nowrap;">text.[17]</span>...` (link tag removed for convenience) to force the issue, creating...
  
  ```
  This     is     some    random
  text.[17]  After this is more.
  
  ```
  
  *All that extra white space is because I'm using full justification. It looks better generally, but I might remove it due to problems with smaller screens.*
  
  My question is which solution is preferable? Should I force the footnote link to remain with its referent text or let the link roll to the next line with the possibility that it looks odd and may even lose context to the uninitiated (if there are uninitiated)?
  
  **Tags:** epub, footnotes
  
  > **Comments:**
  > **username_1**: what display dimensions is this error happening in?  
  > **username_0**: @username_1, as fate would have it, massive.  I'm on my 1600x1200 screen viwing perhaps a 1280x1024 window, two columns.  The automatic kerning worked out to roll the footnote link under that condition.  
  
  ---
  
  ## 3 answers
  
  ### Answer by username_1 on 2018-01-31. Score: 1
  
  I'm somewhat mystified that the reading system would put the footnote on the next line. Are you sure that in the HTML source there is no random space (or extra character) between the last word of the sentence, the period, and the number reference in brackets? One might expect these characters to run after another without spaces regardless of which line it appears on.
  
  My preference would be not to hard code wrapping/justification defaults in the element (P? LI? etc) and just let the reading system (and the reader) do it. Or maybe specify a default for body text? For one thing, this becomes less of an issue when displays are wider and reading systems become more powerful. You don't want your publisher css to depend on the user turning justification on or off. If the user perceives that justification is impeding the ability to read the text, they can usually turn it off on settings. Handling of justification on reading systems will only improve over time.
  
  I'd be curious what screen dimensions this issue is happening in. This is an anomaly that I personally am fine with mobile phone users experiencing if width is 600 or less.
  
  > **Comments:**
  > **username_0**: I'm not as much mystified as I am annoyed.  There are no spaces between the sentence period and the end of the linked text.  `blah.<a href="...">[17]</a>`  My assumption is that it allowed the roll due to the end-of-sentence period and the opening brace being a usually breakable construct in the world of HTML.  I can see your point about not wanting to hardcode the `nowrap` and just let the sleeping dog lie.  So far this issue has only happened once in my document, which has hundreds of footnotes.  Methinks the issue might be rare enough to ignore.  
  
  ---
  
  ### Answer by username_2 on 2024-05-08. Score: 1
  
  I had the same problems with Google Play Books and ebooks with many footnotes and endnotes.
  By adding a Zero-width joiner character (‍ U+200D; ‍) before the anchor solved the problem;
  
  ```
  This is some random text.&#8205;<a class="anc" id="anc17" href="ftns.xhtml#sym17">[17]</a>  After this is more.
  
  ```
  
  
  ---
  
  ### Answer by username_3 on 2018-01-30. Score: 0
  
  As per my thoughts you have to move all footnotes end of the chapter or book with label and create a link in paragraph doing this you can find:
  
  1. Contents after footnotes which are the part of the paragraph will
     continue, it will look pretty good.
  2. You all footnotes will wrap
     inside any block label element.
  
  > **Comments:**
  > **username_0**: It appears you're voting for the footnote link to wrap to the next line?  
  
  ---
  
  