.txt files: Source files.
.xhtml files: XHTML generated by command 'asciidoctor-epub3 -d book book.txt' 
where 'book.txt' simply includes the chapters (.txt files) of the book.

*THIS WORKS*

Create destination for xref 'step-06-going-nuclear-delete-your-gmail-account
'.

*step-06-going-nuclear-delete-your-gmail-account.txt*

[[step-06-going-nuclear-delete-your-gmail-account,Step 6]]
= Step 6: Going nuclear--Delete your Gmail account!
...


*step-06-going-nuclear-delete-your-gmail-account.xhtml*

...
<section class="chapter" title="Step 6: Going nuclear&#8212;&#8203;Delete 
your Gmail account!" epub:type="chapter" 
id="step-06-going-nuclear-delete-your-gmail-account">
...


All the above makes sense and seems OK.

Next xref the above from another file.

*step-04-directing-email-away-from-your-gmail-account.txt*

...
OK, so you now have a new and friendlier email address. How do you direct 
all the email you currently receive from others to that new address? For 
future email recipients who you don't yet know this isn't a problem because 
they will know only your new address. And, as we know, you may be using 
your Gmail in other ways and want to replace it with your new address. The 
strategy outlined here is one of gradually starving your Gmail account of 
email and activity so that, over time, it withers and eventually dies on 
the vine; only then can you kill it, see <<
step-06-going-nuclear-delete-your-gmail-account#step-06-going-nuclear-delete-your-gmail-account
>>.
...


*step-04-directing-email-away-from-your-gmail-account.xhtml*

...
<p>OK, so you now have a new and friendlier email address. How do you 
direct all the email you currently receive from others to that new address? 
For future email recipients who you don&#8217;t yet know this isn&#8217;t a 
problem because they will know only your new address. And, as we know, you 
may be using your Gmail in other ways and want to replace it with your new 
address. The strategy outlined here is one of gradually starving your Gmail 
account of email and activity so that, over time, it withers and eventually 
dies on the vine; only then can you kill it, see <a 
id="xref--step-06-going-nuclear-delete-your-gmail-account" 
href="step-06-going-nuclear-delete-your-gmail-account.xhtml" 
class="xref">Step 6: Going nuclear&#8212;&#8203;Delete your Gmail 
account!</a>.</p>
...


All the above makes sense and seems OK.

Now, that was xref from one file to a different file.

*THIS DOESN'T WORK*

However, problems occur when we try to xref IN THE SAME FILE.

*how-email-works.txt*

[[how-email-works]]
= How email works

...
>From a conceptual point of view emails seems to go from your computer (or 
mobile device) to another's, see <<how-email-works#HowEmailSeemsToWork>>.
...
[[HowEmailSeemsToWork,How email seems to work]]
.How email seems to work
image::{imagedir}/how-email-seems-to-work.png[How email seems to work]
...


*how-email-works.xhtml*

...
<p>From a conceptual point of view emails seems to go from your computer 
(or mobile device) to another&#8217;s, see <a id="xref-HowEmailSeemsToWork" 
href="#HowEmailSeemsToWork" class="xref">How email seems to work</a>.</p>
...
<figure class="image">
<div class="content">
<img src="../Images/how-email-seems-to-work.png" alt="How email seems to 
work"/>
</div>
<figcaption>Figure 1. How email seems to work</figcaption>
</figure>
...


The problem here is that the image doesn't seem to get tagged with '
#HowEmailSeemsToWork', and so when I pass book.epub through epubcheck I get 
this error:

ERROR(RSC-012): book.epub/OEBPS/how-email-works.xhtml(37,191): Fragment 
identifier is not defined.


Somehow, I think the xhtml directly above and generated by asciidoctor-epub3 
should look something like this:

...
<p>From a conceptual point of view emails seems to go from your computer 
(or mobile device) to another&#8217;s, see <a id="xref-HowEmailSeemsToWork" 
href="#HowEmailSeemsToWork" class="xref">How email seems to work</a>.</p>
...
<a name="HowEmailSeemsToWork"></a>
<figure class="image">
<div class="content">
<img src="../Images/how-email-seems-to-work.png" alt="How email seems to 
work"/>
</div>
<figcaption>Figure 1. How email seems to work</figcaption>
</figure>
...


Asciidoctor fails to include <a name="HowEmailSeemsToWork"></a>?

Any ideas how to fix?

-- 
You received this message because you are subscribed to the Google Groups 
"asciidoc" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/asciidoc.
For more options, visit https://groups.google.com/d/optout.

Reply via email to