Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Software > Sigil

Notices

Reply
 
Thread Tools Search this Thread
Old 06-05-2013, 09:13 PM   #1
phossler
Wizard
phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.
 
Posts: 1,071
Karma: 412718
Join Date: Jan 2009
Location: Valley Forge, PA, USA
Device: Kindle Paperwhite
<blockquote> help, please

I'm trying to style a <blockquote> in my style sheet, but it looks fine but fails FlightCrew with "no character data allowed by content model". I'd really prefer a "No Errors" check just to avoid missing something important

CSS is basic:


Code:
html, body {
	height: 100%;
	margin: 0;
	padding:0;
	border-width: 0;
	font-family:"Charis SIL";
}

@page {
	margin: 5pt;
}

h1 {
	page-break-before: always;
	page-break-after: avoid;
	text-indent: 0;
	text-align: center;
	margin-top:0;
	margin-bottom: 2em;
	font-size: 2em;
	font-weight: bold;
	font-style: normal;
}

p {
	text-indent:2em;
	text-align: left;
	font-size: 1em;
	margin-top:0;
	margin-bottom: 1em;
	font-size: 1em;
	font-weight: normal;
	font-style: normal;
	line-height:120%;
}

.noindent {
	text-indent: 0;
}

h1 + p {
	text-indent:0;
}

blockquote {
	text-indent: 0em;
	text-align: left;
	font-size: 1em;
	margin-left:10%;
	margin-right:10%;
	margin-top:1em;
	margin-bottom: 1em;
	font-size: 1em;
	font-weight: normal;
	font-style: italic;
	line-height:120%;
}
and the epub:

Code:
<?xml version="1.0" encoding="utf-8" standalone="no"?>
<!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></title>
  <link href="../Styles/epub1.css" rel="stylesheet" type="text/css" />
</head>

<body>
  <h1>Title Here</h1>

  <p>1 -- Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla ac tellus nunc. Phasellus imperdiet leo metus, et gravida lacus. Donec metus ligula, elementum at pellentesque pellentesque, suscipit ac nunc. Etiam lobortis, massa ac aliquam auctor, augue nisl sagittis urna, at dapibus tellus erat ullamcorper ligula.</p>

  <blockquote>
    <p class="noindent">2 -- Praesent orci dui, pulvinar id convallis a, faucibus non mauris. Donec tellus augue, tempus sed facilisis sed, fringilla quis leo. Mauris vulputate, leo ac facilisis vulputate, enim orci interdum augue, in blandit quam turpis quis dui. Morbi dictum luctus velit nec faucibus.</p>
  </blockquote>

  <blockquote class="noindent">
    <p>3 -- Praesent orci dui, pulvinar id convallis a, faucibus non mauris. Donec tellus augue, tempus sed facilisis sed, fringilla quis leo. Mauris vulputate, leo ac facilisis vulputate, enim orci interdum augue, in blandit quam turpis quis dui. Morbi dictum luctus velit nec faucibus.</p>
  </blockquote>

  <blockquote>
    4 -- Praesent orci dui, pulvinar id convallis a, faucibus non mauris. Donec tellus augue, tempus sed facilisis sed, fringilla quis leo. Mauris vulputate, leo ac facilisis vulputate, enim orci interdum augue, in blandit quam turpis quis dui. Morbi dictum luctus velit nec faucibus. Cras vitae tortor purus, ut tincidunt mauris.
  </blockquote>

  <blockquote style="margin: 0 0 0 40px; border: none; padding: 0px;">
    <p>5 --- Sed at velit nisl. Donec eu mauris tortor, interdum condimentum erat. Nam egestas turpis eget nibh laoreet pharetra. Suspendisse a sem eros, ut pulvinar enim. In sed elit eu nulla accumsan tincidunt eget sit amet ipsum. Nullam ut massa rutrum dolor placerat tempor accumsan eget purus.</p>
  </blockquote>
</body>
</html>
para 1 - </h1><p> works fine, the h1+p works very nicely (learned it here)

para 2 -<blockquote><p class="noindent"> is indented correctly, but loses the italic from the blockquote

para 3 - <blockquote class="noindent"><p> no italic and wrong indent

para 4 - <blockquote> has italic and correct alignment, but fails FlightCrew

para 5 - <blockquote style="margin: 0 0 0 40px; border: none; padding: 0px;"><p> is from the Sigil [Increase Indent] button


So the question is ...

.... how can I style the stylesheet to get the intended result (para 4), but not give me FlightCrew errors (apparently since there are no <p> tags)???


Thanks

Paul

BTW, I wish the [Increase Indent] would only wrap <blockquote> tags. I have to use a Clip to do that
Attached Files
File Type: epub Sigil_Forum_Question.epub (2.8 KB, 249 views)
phossler is offline   Reply With Quote
Old 06-05-2013, 10:02 PM   #2
theducks
Well trained by Cats
theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.
 
theducks's Avatar
 
Posts: 29,689
Karma: 54369090
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
Quote:
Originally Posted by phossler View Post
I'm trying to style a <blockquote> in my style sheet, but it looks fine but fails FlightCrew with "no character data allowed by content model". I'd really prefer a "No Errors" check just to avoid missing something important

CSS is basic:



Paul

BTW, I wish the [Increase Indent] would only wrap <blockquote> tags. I have to use a Clip to do that
You must have something left naked inside the BQ

Why are you using a No Indent on the BQ. The No-indent should be on the P
I think you are trying to do too much at the wrong box (layer)
Style the text with its own class, control the overall margins in the BQ style

Last edited by theducks; 06-05-2013 at 10:08 PM. Reason: Viewed file,add comments
theducks is offline   Reply With Quote
Old 06-05-2013, 10:07 PM   #3
DaleDe
Grand Sorcerer
DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.
 
DaleDe's Avatar
 
Posts: 11,470
Karma: 13095790
Join Date: Aug 2007
Location: Grass Valley, CA
Device: EB 1150, EZ Reader, Literati, iPad 2 & Air 2, iPhone 7
This is a difference between html and xhtml. Blockquote is a semantic element and is used to enclose something that was quoted. (It allows citing the source for example) It is not intended to be used to style as block elements are but html based browser code will interpret it as if it were html and style based on it. In html blockquote was often under a parent paragraph and inherited css accordingly from a p element, not the other way around. This difference in semantic vs. block elements is why it is behaving the way it is. You might find a ePub 3 compatible engine that would use it the way it was designed.

Dale
DaleDe is offline   Reply With Quote
Old 06-05-2013, 10:43 PM   #4
Turtle91
A Hairy Wizard
Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.
 
Turtle91's Avatar
 
Posts: 3,069
Karma: 18727053
Join Date: Dec 2012
Location: Charleston, SC today
Device: iPhone 11/X/6/iPad 1,2,Air & Air Pro/Surface Pro/Kindle PW & Fire
One technique i use is to define the properties of a generic blockquote container itself, then use a complex selector to style all paragraphs within a BQ a certain way:

blockquote {margin:2em}

blockquote.write p {text-align:left; text-indent:1em; font-style:italic}
blockquote.print p {text-align:justify; text-indent:0; font-family:unicode}

<blockquote class="write">
<p>...</p>
<p>...</p>
<p>...</p>
</blockquote>

<blockquote class="print">
<p>...</p>
<p>...</p>
<p>...</p>
</blockquote>

Last edited by Turtle91; 06-05-2013 at 10:45 PM.
Turtle91 is offline   Reply With Quote
Old 06-06-2013, 02:44 AM   #5
Toxaris
Wizard
Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.
 
Toxaris's Avatar
 
Posts: 4,520
Karma: 121692313
Join Date: Oct 2009
Location: Heemskerk, NL
Device: PRS-T1, Kobo Touch, Kobo Aura
The reason you loose the italic is because you set it in the blockquote, but override it in your paragraph style (font-style: normal). Since the <p> is inside the <blockquote> it overtakes the font-style.
Toxaris is offline   Reply With Quote
Old 06-06-2013, 04:46 AM   #6
yucca
Member
yucca began at the beginning.
 
Posts: 15
Karma: 10
Join Date: Apr 2013
Location: Finland
Device: Bookeen Cybook Muse Frontlight
FlightCrew imposes XHTML 1.1 restrictions on HTML syntax; they are mostly the same as XHTML 1.0 Strict (just a little stricter). This includes the principle that the blockquote element must not directly contain text or text-level markup; everything inside it needs to be wrapped in block-level containers. A quick workaround is to use <blockquote><div>...</div></blockquote>.
yucca is offline   Reply With Quote
Old 06-06-2013, 06:29 AM   #7
Toxaris
Wizard
Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.
 
Toxaris's Avatar
 
Posts: 4,520
Karma: 121692313
Join Date: Oct 2009
Location: Heemskerk, NL
Device: PRS-T1, Kobo Touch, Kobo Aura
Quote:
Originally Posted by yucca View Post
FlightCrew imposes XHTML 1.1 restrictions on HTML syntax; they are mostly the same as XHTML 1.0 Strict (just a little stricter).
Actually it is not FlightCrew, but the specs that impose XHTML 1.1.
Toxaris is offline   Reply With Quote
Old 06-06-2013, 08:54 AM   #8
RbnJrg
Wizard
RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.
 
Posts: 1,528
Karma: 6613969
Join Date: Mar 2013
Location: Rosario - Santa Fe - Argentina
Device: Kindle 4 NT
Hi phossler;

You can fix your problem by adding the following style in you css stylesheet:

Code:
blockquote p {
    font-style: italic;
    text-indent: 0;
}
After that, you can use inside your blockquotes, the following formula:

Code:
<blockquote>
  <p>...something...</p>
</blockquote>
With that, your epub will pass the FlightCrew's test. I attach a new epub with the changes.

Regards
Rubén
Attached Files
File Type: epub Sigil_Forum_Question.epub (2.8 KB, 152 views)
RbnJrg is offline   Reply With Quote
Old 06-07-2013, 02:51 PM   #9
phossler
Wizard
phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.
 
Posts: 1,071
Karma: 412718
Join Date: Jan 2009
Location: Valley Forge, PA, USA
Device: Kindle Paperwhite
Thanks all --

I guess I misunderstood the CSS intended use of <blockquote>, thinking it was for formatting and not as a container.


@RbnJrg --

I had never seen the

Code:
blockquote p
before, only as something like

Code:
h1 + p
i.e. with the plus

Can you (or anyone) explain the difference or provide a link please? I use

http://www.w3schools.com/css/default.asp

and couldn't figure out what to search for

Thanks

Paul
phossler is offline   Reply With Quote
Old 06-07-2013, 03:10 PM   #10
theducks
Well trained by Cats
theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.
 
theducks's Avatar
 
Posts: 29,689
Karma: 54369090
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
Quote:
Originally Posted by phossler View Post
Thanks all --

I guess I misunderstood the CSS intended use of <blockquote>, thinking it was for formatting and not as a container.


@RbnJrg --

I had never seen the

Code:
blockquote p
Thanks

Paul
Look in section 5.1 of CSS2.:
Means decedent
theducks is offline   Reply With Quote
Old 06-07-2013, 07:30 PM   #11
RbnJrg
Wizard
RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.
 
Posts: 1,528
Karma: 6613969
Join Date: Mar 2013
Location: Rosario - Santa Fe - Argentina
Device: Kindle 4 NT
Quote:
Originally Posted by phossler View Post

@RbnJrg --

I had never seen the

Code:
blockquote p
...

Can you (or anyone) explain the difference or provide a link please?
Hi Paul;

I used a "descendant selector" With just typing in Google "css descendat selector" you'll find a lot of info about it. However you can read a clear (and synthetic) explanation here:

http://css.maxdesign.com.au/selectut...descendant.htm

With:

Code:
blockquote + p {.... }
the style is only applied at the first appearance of <p> after a blockquote tag. But with:

Code:
blockquote p {.... }
the style is applied to ALL appearance of <p> inside <blockquote>...</blockquote>.

Now you know another css resource

Regards
Rubén
RbnJrg is offline   Reply With Quote
Old 06-07-2013, 07:40 PM   #12
phossler
Wizard
phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.
 
Posts: 1,071
Karma: 412718
Join Date: Jan 2009
Location: Valley Forge, PA, USA
Device: Kindle Paperwhite
Quote:
Originally Posted by RbnJrg View Post
Hi Paul;
Now you know another css resource
Thanks. That looks like it will be very useful also

(I need all the help I can get)

Paul
phossler is offline   Reply With Quote
Old 06-08-2013, 03:57 AM   #13
Jellby
frumious Bandersnatch
Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.
 
Jellby's Avatar
 
Posts: 7,514
Karma: 18512745
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
Quote:
Originally Posted by RbnJrg View Post
With:

Code:
blockquote + p {.... }
the style is only applied at the first appearance of <p> after a blockquote tag.
And "after" means after the whole lot of it, i.e., after it is closed, not after the opening tag.
Jellby is offline   Reply With Quote
Old 06-08-2013, 07:48 AM   #14
RbnJrg
Wizard
RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.
 
Posts: 1,528
Karma: 6613969
Join Date: Mar 2013
Location: Rosario - Santa Fe - Argentina
Device: Kindle 4 NT
Quote:
Originally Posted by Jellby View Post
And "after" means after the whole lot of it, i.e., after it is closed, not after the opening tag.
Indeed. A very good aclaration. After re-reading my explanation I realized that was no so clear.
RbnJrg is offline   Reply With Quote
Old 06-08-2013, 09:43 AM   #15
Notjohn
mostly an observer
Notjohn ought to be getting tired of karma fortunes by now.Notjohn ought to be getting tired of karma fortunes by now.Notjohn ought to be getting tired of karma fortunes by now.Notjohn ought to be getting tired of karma fortunes by now.Notjohn ought to be getting tired of karma fortunes by now.Notjohn ought to be getting tired of karma fortunes by now.Notjohn ought to be getting tired of karma fortunes by now.Notjohn ought to be getting tired of karma fortunes by now.Notjohn ought to be getting tired of karma fortunes by now.Notjohn ought to be getting tired of karma fortunes by now.Notjohn ought to be getting tired of karma fortunes by now.
 
Posts: 1,515
Karma: 987654
Join Date: Dec 2012
Device: Kindle
Sometimes I wonder if I will ever understand this stuff!

(Evidently I was lucky when I changed my blockquote style to simply p. block { !)
Notjohn is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Does <blockquote> need <p> tags? phossler Sigil 3 05-11-2013 04:40 PM
Blockquote problem kamanza Conversion 2 01-20-2013 12:19 PM
blockquote grievance Kamikuza Amazon Kindle 4 11-04-2012 07:03 PM
blockquote over ride dicknskip Sigil 3 03-21-2011 04:44 PM
FBReader blockquote minigrrl PocketBook 3 03-09-2010 08:09 PM


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


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