Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre > Viewer

Notices

Reply
 
Thread Tools Search this Thread
Old 01-21-2024, 12:19 AM   #1
chantsing
Member
chantsing began at the beginning.
 
Posts: 15
Karma: 10
Join Date: Jan 2024
Device: window
How to hide footnote in cablire ebook view

As we known, Epub 3.0 supports pop-up footnotes.

when we use Moonreader Plus and ibook to reade ebooks,it will autmatically hide the footnotes.

The Moonreader Plus developer appears to have modeled the rendering engine after the engine used by iBooks. Like iBooks it automatically hides aside footnotes; it even handles rearnotes without problems, which iBooks for iOS can't handle.

However, not all ePub3 apps behave in this way, because the ePub3 specs don't require reading apps to hide aside footnotes; they also don't require reading apps to display them as popups. I find the post in this link(https://www.mobileread.com/forums/sh...d.php?t=264394)

Some ebook's footnote are not builded at the bottom of chapter (Front of </body> in .xhtml file ), usually at the front of quotation. So,when i use calibre ebook view or other reader, rather than Moonreader Plus and ibook,The footnotes will appear in the body of page.

it is annoyed for me.

So, How to hide footnote in cablire ebook view?
I try to use CSS by hidding the <aside> element (display:none, it will hide footnote, but when i pop-up the footnote, it can not display too.



In EPUB 3 flowing and fixed-layout books, you can create pop-up footnotes by labeling footnotes with the appropriate epub:type values.
Because the <aside> element has an epub:type of footnote, the text is hidden in the main body of the book. The text will only be seen by the reader in the context of the popup.I find the post in this link(https://help.apple.com/itc/booksasse...cf8ecf5c8.html)
Attached Thumbnails
Click image for larger version

Name:	屏幕截图 2024-01-21 130950.png
Views:	61
Size:	521.6 KB
ID:	205943  
chantsing is offline   Reply With Quote
Old 01-21-2024, 01:42 AM   #2
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 43,863
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
You are relying on non-standard behavior. Dont do that. If you dont want your footnotes in the main body text put them in separate html files at the end of the book. That has the further advantage of allowing your users to browse through the footnotes as a group.
kovidgoyal is online now   Reply With Quote
Old 01-21-2024, 02:09 AM   #3
chantsing
Member
chantsing began at the beginning.
 
Posts: 15
Karma: 10
Join Date: Jan 2024
Device: window
Quote:
Originally Posted by kovidgoyal View Post
You are relying on non-standard behavior. Dont do that. If you dont want your footnotes in the main body text put them in separate html files at the end of the book. That has the further advantage of allowing your users to browse through the footnotes as a group.
Thank for your responses,I am not a Ebook maker, i just a reader, The ebook was downloaded from Webside, I known that we can put them in separate html files at the end of the book or put them into the end of it's html. But i think it is Tedious for me. I dont know how to extract footnotes in batches, Detele footnote and put them into the end of it's html. For me, i just can move it one by one.When a ebook have a lot of footnote,it is a huge workload for me.

Last edited by chantsing; 01-21-2024 at 02:14 AM.
chantsing is offline   Reply With Quote
Old 01-21-2024, 02:12 AM   #4
chantsing
Member
chantsing began at the beginning.
 
Posts: 15
Karma: 10
Join Date: Jan 2024
Device: window
Quote:
Originally Posted by kovidgoyal View Post
You are relying on non-standard behavior. Dont do that. If you dont want your footnotes in the main body text put them in separate html files at the end of the book. That has the further advantage of allowing your users to browse through the footnotes as a group.
Thank for your GREAT contribution for Ebook, i want to support you, but i dont have Paly Pay, Can you open Alipay donation channels
chantsing is offline   Reply With Quote
Old 01-21-2024, 02:30 AM   #5
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 43,863
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
There is no way to get the viewer to do that, I'm afraid. It might work with using the following CSS in the viewer settings, but Ihavent tested it

Code:
aside { display: none }
.calibre-footnote-container aside { display: block }
kovidgoyal is online now   Reply With Quote
Old 01-21-2024, 05:55 AM   #6
chantsing
Member
chantsing began at the beginning.
 
Posts: 15
Karma: 10
Join Date: Jan 2024
Device: window
Quote:
Originally Posted by kovidgoyal View Post
There is no way to get the viewer to do that, I'm afraid. It might work with using the following CSS in the viewer settings, but Ihavent tested it

Code:
aside { display: none }
.calibre-footnote-container aside { display: block }
I just test the CSS code, But it not works well. When i toggle it, it popups all contents of this chapter, instead of the footnote which it should be.

and i test the following CSS which discart aside,
.calibre-footnote-container { display: block }

The effect is same as the CSS you provide:
.calibre-footnote-container aside { display: block }

It is so closed to the answer,So, what's wrong?
Please help me, I will appreciate you so much
chantsing is offline   Reply With Quote
Old 01-21-2024, 05:58 AM   #7
chantsing
Member
chantsing began at the beginning.
 
Posts: 15
Karma: 10
Join Date: Jan 2024
Device: window
Post the Screenshot of the symptom
Attached Thumbnails
Click image for larger version

Name:	屏幕截图 2024-01-21 185502.png
Views:	46
Size:	862.6 KB
ID:	205944  
chantsing is offline   Reply With Quote
Old 01-21-2024, 06:41 AM   #8
chantsing
Member
chantsing began at the beginning.
 
Posts: 15
Karma: 10
Join Date: Jan 2024
Device: window
Quote:
Originally Posted by chantsing View Post
I just test the CSS code, But it not works well. When i toggle it, it popups all contents of this chapter, instead of the footnote which it should be.

and i test the following CSS which discart aside,
.calibre-footnote-container { display: block }

The effect is same as the CSS you provide:
.calibre-footnote-container aside { display: block }

It is so closed to the answer,So, what's wrong?
Please help me, I will appreciate you so much
There is an different between .calibre-footnote-container { display: block } and
.calibre-footnote-container aside { display: block }:

When i use CSS code—.calibre-footnote-container aside { display: block },
it will popups all contents of this chapter, including all footnote.

When i use CSS code—.calibre-footnote-container { display: block },
it will popups all contents of this chapter, excluding all footnote.
chantsing is offline   Reply With Quote
Old 01-21-2024, 09:30 AM   #9
thiago.eec
Guru
thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.
 
Posts: 929
Karma: 1177583
Join Date: Dec 2016
Location: Goiânia - Brazil
Device: iPad, Kindle Paperwhite
Quote:
Originally Posted by kovidgoyal View Post
There is no way to get the viewer to do that, I'm afraid. It might work with using the following CSS in the viewer settings, but Ihavent tested it

Code:
aside { display: none }
.calibre-footnote-container aside { display: block }
Quote:
Originally Posted by chantsing View Post
I just test the CSS code, But it not works well.
Are you sure you followed Kovid's instructions correctly? I tested here and it worked. Pay attention to the bold part: you don't need to edit the EPUB file; just open it with the Viewer > Press ESC to open the Preferences > Styles > Paste the CSS Kovid provided > Press OK.
thiago.eec is offline   Reply With Quote
Old 01-21-2024, 09:49 AM   #10
chantsing
Member
chantsing began at the beginning.
 
Posts: 15
Karma: 10
Join Date: Jan 2024
Device: window
Quote:
Originally Posted by thiago.eec View Post
Are you sure you followed Kovid's instructions correctly? I tested here and it worked. Pay attention to the bold part: you don't need to edit the EPUB file; just open it with the Viewer > Press ESC to open the Preferences > Styles > Paste the CSS Kovid provided > Press OK.
I am certainly sure. Just as you post, open it with the Viewer > Press ESC to open the Preferences > Styles > Paste the CSS Kovid provided > Press OK.

AfterPaste the CSS Kovid provided, The first Popup may be fine, But the rest of
popups dont works.

and, I imitates Kovid's CSS,
Code:
aside { display: none }

.calibre-footnote-container p { 

display: none

}

.calibre-footnote-container aside { 

display: block

}
the body of page will be hidden.

However, it will display all footnotes of this chapter.

But,i just hope it dispaly the corresponding footnote rather than all footnotes.
chantsing is offline   Reply With Quote
Old 01-25-2024, 11:32 PM   #11
nqk
Fanatic
nqk does all things with Zen-like beautynqk does all things with Zen-like beautynqk does all things with Zen-like beautynqk does all things with Zen-like beautynqk does all things with Zen-like beautynqk does all things with Zen-like beautynqk does all things with Zen-like beautynqk does all things with Zen-like beautynqk does all things with Zen-like beautynqk does all things with Zen-like beautynqk does all things with Zen-like beauty
 
Posts: 516
Karma: 32106
Join Date: Feb 2012
Device: Onyx Boox Leaf
Code:
body.calibre-viewer-paginated aside {
  display: none; 
  }
You can try this. It will hide the aside contents in the body but not in the popup window.
nqk is offline   Reply With Quote
Old 01-25-2024, 11:44 PM   #12
nqk
Fanatic
nqk does all things with Zen-like beautynqk does all things with Zen-like beautynqk does all things with Zen-like beautynqk does all things with Zen-like beautynqk does all things with Zen-like beautynqk does all things with Zen-like beautynqk does all things with Zen-like beautynqk does all things with Zen-like beautynqk does all things with Zen-like beautynqk does all things with Zen-like beautynqk does all things with Zen-like beauty
 
Posts: 516
Karma: 32106
Join Date: Feb 2012
Device: Onyx Boox Leaf
Quote:
Originally Posted by thiago.eec View Post
Are you sure you followed Kovid's instructions correctly? I tested here and it worked. Pay attention to the bold part: you don't need to edit the EPUB file; just open it with the Viewer > Press ESC to open the Preferences > Styles > Paste the CSS Kovid provided > Press OK.
I can confirm the OP's issue. It won't work. Even for the case where all the footnotes/endnotes are in a separate file, this css code forces the whole content of that html file to show in the popup window rather than only the intended aside.

Last edited by nqk; 01-25-2024 at 11:53 PM.
nqk is offline   Reply With Quote
Old 02-22-2024, 11:24 PM   #13
chantsing
Member
chantsing began at the beginning.
 
Posts: 15
Karma: 10
Join Date: Jan 2024
Device: window
Quote:
Originally Posted by nqk View Post
Code:
body.calibre-viewer-paginated aside {
  display: none; 
  }
You can try this. It will hide the aside contents in the body but not in the popup window.
Wow,it works fine, Thanks so so so much you.
chantsing is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
How to hide books from Library view that are already in collections? Snorkledorf Amazon Kindle 5 09-02-2019 10:37 AM
Cablire Companion 3.1.1 on Ipad Pro 12.5 running IOS 11.1 monkeybutler Calibre Companion 5 08-11-2018 03:14 PM
Modify panel-view ebook to generic comic-view? badbob001 Amazon Kindle 7 01-28-2016 05:54 AM
show hide button in ebook? user743 Kindle Formats 2 04-17-2014 04:55 AM
Glo hide the footnote / endnote text shown in note preview fxp33 Kobo Reader 3 05-04-2013 08:11 PM


All times are GMT -4. The time now is 12:49 AM.


MobileRead.com is a privately owned, operated and funded community.