CSS Override Code
Sep. 17th, 2010 08:30 pm![[personal profile]](https://www.dreamwidth.org/img/silk/identity/user.png)
![[community profile]](https://www.dreamwidth.org/img/silk/identity/community.png)
This post is to help anyone who'd like to modify the style or look of the epubs downloaded at the A03 Archive.
I made a new "Extra CSS" code to use in Calibre to convert the A03 epubs to epub. I also found out how to remove underlines on the Chapter links and turn the font back. The purpose of the reconverting is to remove the blank paragraph space and replace it a indent at the start of a new paragraph. During the tests I also found out how to remove the underline on the Chapters so it looks more like a heading and less like a link. That was something I found kind of neat because the links still work. :) But they don't look like links.
Here is the code:
body { margin: 0; }
a {text-decoration: none; color: black;}
a [href] {text-decoration: none; color: black;}
p {margin-top: 0pt; margin-bottom: 0pt; padding: 0pt; text-indent: 15pt; text-align: justify;}
h1 { text-align: center;}
h2 {text-align: center; }
h3 { text-align: center;}
h4 { text-align: center; }
h5 { text-align: center; }
h6 { text-align: center; }
And here's more information on the Look and Feel section of Calibre.
I've found that converting epub2epub gave me the best results.
I wasn't sure if I was the only one that preferred indents over the space but just in case I thought I should share.
I made a new "Extra CSS" code to use in Calibre to convert the A03 epubs to epub. I also found out how to remove underlines on the Chapter links and turn the font back. The purpose of the reconverting is to remove the blank paragraph space and replace it a indent at the start of a new paragraph. During the tests I also found out how to remove the underline on the Chapters so it looks more like a heading and less like a link. That was something I found kind of neat because the links still work. :) But they don't look like links.
Here is the code:
body { margin: 0; }
a {text-decoration: none; color: black;}
a [href] {text-decoration: none; color: black;}
p {margin-top: 0pt; margin-bottom: 0pt; padding: 0pt; text-indent: 15pt; text-align: justify;}
h1 { text-align: center;}
h2 {text-align: center; }
h3 { text-align: center;}
h4 { text-align: center; }
h5 { text-align: center; }
h6 { text-align: center; }
And here's more information on the Look and Feel section of Calibre.
I've found that converting epub2epub gave me the best results.
I wasn't sure if I was the only one that preferred indents over the space but just in case I thought I should share.
no subject
Date: 2010-09-18 10:11 am (UTC)Now if only more epic fic is reposted on AO3... =)
no subject
Date: 2010-09-18 06:54 pm (UTC)no subject
Date: 2010-09-18 10:44 am (UTC)no subject
Date: 2010-09-18 06:55 pm (UTC)But I can test this out. Because I love that archive!
no subject
Date: 2010-09-18 07:04 pm (UTC)All the files I've tested at A03 had paragraph tags. I'm not sure if every story uses them or if the site automatically translates the break tags to paragraph tags but for css stylesheets to work and skins you have to use proper html coding and well using break tags to create paragraphs isn't proper coding.
no subject
Date: 2011-02-19 11:58 am (UTC)no subject
Date: 2011-02-19 11:58 am (UTC)no subject
Date: 2011-02-19 09:14 pm (UTC)no subject
Date: 2011-02-20 03:09 pm (UTC)p {margin-top: 0pt; margin-bottom: 0pt; padding: 0pt; text-indent: 15pt; text-align: justify;}
br br {margin-top: 0pt; margin-bottom: 0pt; padding: 0pt; text-indent: 15pt; text-align: justify;}
The first to get any paragraph codes standing alone. The second to get the line breaks being used as paragraph codes (which is what most wordpad to html programs like to do -- the olders ones I used, at least, ten years ago; it's been that long since I've played with CSS, or nearly!!)
no subject
Date: 2011-02-20 03:11 pm (UTC)no subject
Date: 2011-02-20 03:12 pm (UTC)no subject
Date: 2011-02-20 08:17 pm (UTC)no subject
Date: 2011-02-20 08:18 pm (UTC)no subject
Date: 2011-02-22 01:39 am (UTC)no subject
Date: 2011-02-22 01:42 am (UTC)no subject
Date: 2011-02-22 01:44 am (UTC)no subject
Date: 2011-02-22 01:53 am (UTC)no subject
Date: 2010-09-18 04:20 pm (UTC)no subject
Date: 2010-09-18 06:56 pm (UTC)no subject
Date: 2010-10-30 01:15 am (UTC)-NOT put a blank line between *each* paragraph (eg I don't want internet/fanfic formatting where each paragraph starts not-indented with a blank line between)
-indent each paragraph (EXCEPT the first of a new chapter, or after a "double return" {ie blank line between one paragraph and the next}),
-be able to selectively "blockquote" sections (inset right and left, and control font size)
What it *actually* does:
-indent each paragraph, but remove spacing between *all* paragraphs including places where it 'changes scene/location' and needs a space
I haven't been able to effectively "blockquote".
And, of course, there's just some rather bad formatting of the original PDFs.
Any help would be SPECTACULARLY appreciated.
Thanks!
no subject
Date: 2010-10-30 02:57 am (UTC)I gave up on using Calibre to convert PDFs two years ago. Now if I have no other choice I open the PDF in Adobe Acrobat Professional and save as an html or RTF file. Once you have your paragraphs set in the html it's much easier to get the file to look the way you want.
If you can find the PDF in another format first that would be even better because I'm not going to lie that conversion is going probably not going to be easy to edit. There is a reason I wrote that super long post not too long ago about why I hate PDF and do not like that so many fan fiction authors are sharing fics in that format thinking it's an ebook format.
Blockquote and everything else is generally easier to create in the html file, though I haven't actually used blockquote myself but I know you can use css and create a paragraph tag with an even bigger indent compared to regular paragraphs.
The only person I know that's an expert with PDFs is
Sorry I couldn't be of more help.