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

Tables and Photos numeric captions #16

Open
rqpe opened this issue Aug 30, 2021 · 2 comments
Open

Tables and Photos numeric captions #16

rqpe opened this issue Aug 30, 2021 · 2 comments
Labels
bug Something isn't working

Comments

@rqpe
Copy link
Contributor

rqpe commented Aug 30, 2021

Works depending on which time of export, probably a css issue

@rqpe rqpe added the bug Something isn't working label Aug 30, 2021
@MurakamiShinyu
Copy link
Collaborator

MurakamiShinyu commented Aug 31, 2021

(An alternative way for numbering without using CSS counters)

If Fidus Writer can put data-* attributes for numbering when exporting HTML, the following HTML+CSS will work:

  <figure id="F74305891" data-category="figure"><img src="images/3664e5be-a2b9-4171-afee-fa6cd0086a2d.png">
    <figcaption><span class="label" data-cat-figure-num="51">Figure</span><span class="text">Components of management</span></figcaption>
  </figure>
figure[data-category='figure'] figcaption span.label[data-cat-figure-num]::after {
    content: ' ' attr(data-cat-figure-num);
}

Test JSBin: https://jsbin.com/zadedoc/edit?html,css,output
with Vivliostyle: https://vivliostyle.vercel.app/#src=https://jsbin.com/zadedoc

@mrchristian
Copy link
Contributor

Hi,
I was aware of the EPUB document size limitation issues, good to know Apple upper limit.
If I understand the Issue note - the data-* attribute would allow us to control numbering counting across a number of types of objects: references, footnotes, figures, tables, etc. 
I would also assume at a later date this would also allow for identifying the different objects and being able to add other features, like: lists of figures, lists of tables. Also possibly back links.
One note on reference lists - some citation styles have a style for showing if a reference is used in more that one place, this would need addressing. Although we could work around issue for the moment.
I will write up the issue of numbering and sorting objects and the options for solving the problem as we need a clear record for our purposes and this is also useful to share with the research community.
Last point. If we use data-* would we still want to output a single HTML file for use by Vivlio?
Thanks
Simon

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants