View Single Post
Old 10-31-2015, 12:05 PM   #691
MerlinMama
Evangelist
MerlinMama does all things with Zen-like beautyMerlinMama does all things with Zen-like beautyMerlinMama does all things with Zen-like beautyMerlinMama does all things with Zen-like beautyMerlinMama does all things with Zen-like beautyMerlinMama does all things with Zen-like beautyMerlinMama does all things with Zen-like beautyMerlinMama does all things with Zen-like beautyMerlinMama does all things with Zen-like beautyMerlinMama does all things with Zen-like beautyMerlinMama does all things with Zen-like beauty
 
MerlinMama's Avatar
 
Posts: 498
Karma: 32554
Join Date: May 2014
Location: Canada
Device: Kobo Sage
When I add a fic, I have a blank space at the top of each file. This translates into an error for the book. I implemented a general regex in calibre editor to fix this, but is there something I can do to remove this? It started when I added my personalized Titlepage_Start/Chapter_Start/output_css in the personal.ini

Spoiler:
output_css:
body { background-color: #%(background_color)s;
text-align: justify;
margin: 2%%; }
pre { font-size: x-small; }
sml { font-size: small; }
h1 { text-align: center; }
h2 { text-align: center; }
h3 { text-align: center; }
h4 { text-align: center;
font-size: 120%% }
h5 { text-align: center; }
h6 { text-align: center; }
a { text-decoration: none; }
font1 { font-family: 'Segoe Print';
font-size: 90%% }
font2 { font-family: 'Dion';
font-size: 130%% }
news { font-family: 'Kirsty';
font-style: italic; }
flash { font-weight: bold; }
dream { font-style: italic; }
.CI {
text-align:center;
margin-top:0px;
margin-bottom:0px;
padding:0px;
}
.center {text-align: center;}
.centered {text-align: center;
font-weight: bold;}
.cover {text-align: center;}
.full {width: 100%%; }
.quarter {width: 25%%; }
.smcap {font-variant: small-caps;}
.u {text-decoration: underline;}
.bold {font-weight: bold;}
.lini {margin-left:25px;
margin-right:35px;}

# make sure to keep a single space on the line after this--it's
# one, empty newline for inclusion below.
newline:

# You can't see it, but there's a space on the line above.

chapter_start:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>${chapter}</title>
<link href="stylesheet.css" type="text/css" charset="UTF-8" rel="stylesheet"/>
</head>
<body>
<h3>${chapter}</h3>
%(newline)s
%(newline)s

titlepage_start:
<?xml version="1.0" encoding="UTF-8"?>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>${title} by ${author}</title>
<link href="stylesheet.css" type="text/css" charset="UTF-8" rel="stylesheet"/>
</head>
<body>
<h2><a href="${storyUrl}">${title}</a><br/> by <br/>${authorHTML}</h2>
<div><br/>
%(newline)s
MerlinMama is offline   Reply With Quote