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 01-27-2014, 08:23 PM   #1
tarisea
Connoisseur
tarisea got an A in P-Chem.tarisea got an A in P-Chem.tarisea got an A in P-Chem.tarisea got an A in P-Chem.tarisea got an A in P-Chem.tarisea got an A in P-Chem.tarisea got an A in P-Chem.tarisea got an A in P-Chem.tarisea got an A in P-Chem.tarisea got an A in P-Chem.tarisea got an A in P-Chem.
 
Posts: 85
Karma: 6288
Join Date: Dec 2012
Device: iphone
TOC Formating

Hi. I'm having fun with Sigil and am just amazed at what it can do. I have run into a problem with the TOC and of course with the html generated TOC.

I have 2 headings.

<h4> is the word "Book" and the book number e.g. Book 1 or Book 2 & 2.5
<h3> is the book title

The TOC to shows the two headings but they are on 2 different lines which makes the TOC very confusing.

Is there any way to get the TOC to show:

<h4> <h3>


Thank you in advance for your help.
tarisea is offline   Reply With Quote
Old 01-27-2014, 08:32 PM   #2
eschwartz
Irrational Optimist
eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.
 
eschwartz's Avatar
 
Posts: 8,312
Karma: 14762383
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
Put them together in one <h3>
eschwartz is offline   Reply With Quote
Old 01-27-2014, 08:48 PM   #3
RbnJrg
Evangelist
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: 483
Karma: 318996
Join Date: Mar 2013
Location: Rosario - Santa Fe - Argentina
Device: Kindle 4 NT
Quote:
Originally Posted by tarisea View Post
Hi. I'm having fun with Sigil and am just amazed at what it can do. I have run into a problem with the TOC and of course with the html generated TOC.

I have 2 headings.

<h4> is the word "Book" and the book number e.g. Book 1 or Book 2 & 2.5
<h3> is the book title

The TOC to shows the two headings but they are on 2 different lines which makes the TOC very confusing.

Is there any way to get the TOC to show:

<h4> <h3>


Thank you in advance for your help.
One way is to give the h3, h4 selectors the "display: inline" property. In your css stylesheet write the following:

Code:
h3, h4 {
   display: inline;
}
Of course, you could give to the h3, h4 selectors others properties to distinguish them. Below I attach a simpe epub with the two headers inlined.

Regards
Rubén
Attached Files
File Type: epub Inline headers.epub (2.0 KB, 17 views)
RbnJrg is offline   Reply With Quote
Old 01-27-2014, 08:55 PM   #4
eschwartz
Irrational Optimist
eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.
 
eschwartz's Avatar
 
Posts: 8,312
Karma: 14762383
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
Quote:
Originally Posted by RbnJrg View Post
One way is to give the h3, h4 selectors the "display: inline" property. In your css stylesheet write the following:

Code:
h3, h4 {
   display: inline;
}
Of course, you could give to the h3, h4 selectors others properties to distinguish them. Below I attach a simpe epub with the two headers inlined.

Regards
Rubén
I don't think Sigil will pay attention to that when it is simply trying to build a semantic metadata ToC.
eschwartz is offline   Reply With Quote
Old 01-27-2014, 09:27 PM   #5
theducks
Grand Sorcerer
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: 15,250
Karma: 6020307
Join Date: Aug 2009
Location: (The original) Silicon Valley, USA
Device: Galaxy Tab 2, Astak Pocket Pro, K4NT
I just use Spans insid a single H# to modify one line of text
Code:
<h3 class="chapno">Book<br class="chapspacer" /> <span class="chaptitle">Te Title</span></h3>
Results
Book
<spaceing>
Te Title


TOC: Book Th Title
theducks is offline   Reply With Quote
Old 01-28-2014, 07:02 AM   #6
RbnJrg
Evangelist
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: 483
Karma: 318996
Join Date: Mar 2013
Location: Rosario - Santa Fe - Argentina
Device: Kindle 4 NT
Quote:
Originally Posted by eschwartz View Post
I don't think Sigil will pay attention to that when it is simply trying to build a semantic metadata ToC.
Watch the epub I attach; watch the TOC.
Attached Files
File Type: epub Inline headers.epub (2.2 KB, 22 views)
RbnJrg is offline   Reply With Quote
Old 01-28-2014, 02:26 PM   #7
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: 9,781
Karma: 5072196
Join Date: Aug 2007
Location: Grass Valley, CA
Device: EB 1150, EZ Reader, Literati, iPad 2
Quote:
Originally Posted by eschwartz View Post
Put them together in one <h3>
You can easily embed a <br/> between the lines to force them to split in the document. A <br/> used this way in the text will be removed from the TOC entry which will put them on the same line.

Dale
DaleDe is offline   Reply With Quote
Old 01-28-2014, 03:18 PM   #8
eschwartz
Irrational Optimist
eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.
 
eschwartz's Avatar
 
Posts: 8,312
Karma: 14762383
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
Quote:
Originally Posted by RbnJrg View Post
Watch the epub I attach; watch the TOC.
That is precisely the OP's problem. The ToC is in two parts, since two headers are used.

The appropriate way to do this is with ONE h3/h4 tag, it doesn't matter really which one, but as theducks said, put in a <br/> to split it in the main view into two lines, but the ToC will read it as one header.

Styling it for inline takes the problem and makes it worse. Not only is the ToC in two parts (which the OP doesn't want) you have destroyed the whole point of having two header tags, by forcing them to appear on one line.
eschwartz is offline   Reply With Quote
Old 01-28-2014, 04:01 PM   #9
theducks
Grand Sorcerer
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: 15,250
Karma: 6020307
Join Date: Aug 2009
Location: (The original) Silicon Valley, USA
Device: Galaxy Tab 2, Astak Pocket Pro, K4NT
Quote:
Originally Posted by eschwartz View Post
That is precisely the OP's problem. The ToC is in two parts, since two headers are used.

The appropriate way to do this is with ONE h3/h4 tag, it doesn't matter really which one, but as theducks said, put in a <br/> to split it in the main view into two lines, but the ToC will read it as one header.

Styling it for inline takes the problem and makes it worse. Not only is the ToC in two parts (which the OP doesn't want) you have destroyed the whole point of having two header tags, by forcing them to appear on one line.
If you don't want 2 lines in the TOC, how is using BR with a span Destroying anything?

When I am done, the Books chapter head looks exactly the same.

There is another solution that can be accomplished with a 2 line REGEX capture:

<h4> is the word "Book" and the book number e.g. Book (.+?)</h4>
<h3>(.+?)</h3)
<h4 title="Book \1 - \2">Book \1</h4><h3>\2</h3>
theducks is offline   Reply With Quote
Old 01-28-2014, 04:53 PM   #10
eschwartz
Irrational Optimist
eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.
 
eschwartz's Avatar
 
Posts: 8,312
Karma: 14762383
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
Quote:
Originally Posted by theducks View Post
If you don't want 2 lines in the TOC, how is using BR with a span Destroying anything?

When I am done, the Books chapter head looks exactly the same.

There is another solution that can be accomplished with a 2 line REGEX capture:

<h4> is the word "Book" and the book number e.g. Book (.+?)</h4>
<h3>(.+?)</h3)
<h4 title="Book \1 - \2">Book \1</h4><h3>\2</h3>
On the contrary, using <br/> works perfectly. It is using css to style header tags as inline that does nothing constructive. Hence why my post was in response to RbnJrg, not you.

"Styling it for inline ... destroyed the whole point of having two header tags, by forcing them to appear on one line"

Sorry for the confusion... I was leaping to your defense, but may not have spoken clearly enough.

To clarify: <br/> within a single header tag is awesome, . two headers css'ed into appearing on one line solves nothing but adds a bonus problem.
eschwartz is offline   Reply With Quote
Old 02-01-2014, 04:31 PM   #11
tarisea
Connoisseur
tarisea got an A in P-Chem.tarisea got an A in P-Chem.tarisea got an A in P-Chem.tarisea got an A in P-Chem.tarisea got an A in P-Chem.tarisea got an A in P-Chem.tarisea got an A in P-Chem.tarisea got an A in P-Chem.tarisea got an A in P-Chem.tarisea got an A in P-Chem.tarisea got an A in P-Chem.
 
Posts: 85
Karma: 6288
Join Date: Dec 2012
Device: iphone
The problem with putting them in one header (which I hadn't thought of doing by the way) is that the format for them is completely different. So if it reads

Book 1
THE CAT IN THE HAT

Both lines are centered
Book 1 is in a significantly smaller font and in Proper Capitalization (first letter of every word).
The Cat in the Hat is in all caps and underlined.

I don't know how to put that in one header.

Also a question: if I use the inline method

h3, h4 {
display: inline;
}

Where does this go? The TOC Stylesheet? Cause it doesn't look like anything there.



Thanks for all of your help

Last edited by tarisea; 02-01-2014 at 04:38 PM. Reason: additional question
tarisea is offline   Reply With Quote
Old 02-01-2014, 04:36 PM   #12
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: 9,781
Karma: 5072196
Join Date: Aug 2007
Location: Grass Valley, CA
Device: EB 1150, EZ Reader, Literati, iPad 2
Actually you can easily do this with one header. You can center the text and both lines will be centered. A span can be used to change the formatting, even size of characters.

Dale
DaleDe is offline   Reply With Quote
Old 02-01-2014, 08:26 PM   #13
theducks
Grand Sorcerer
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: 15,250
Karma: 6020307
Join Date: Aug 2009
Location: (The original) Silicon Valley, USA
Device: Galaxy Tab 2, Astak Pocket Pro, K4NT
Quote:
Originally Posted by tarisea View Post
The problem with putting them in one header (which I hadn't thought of doing by the way) is that the format for them is completely different. So if it reads

Book 1
THE CAT IN THE HAT

Both lines are centered
Book 1 is in a significantly smaller font and in Proper Capitalization (first letter of every word).
The Cat in the Hat is in all caps and underlined.

I don't know how to put that in one header.

Also a question: if I use the inline method

h3, h4 {
display: inline;
}

Where does this go? The TOC Stylesheet? Cause it doesn't look like anything there.



Thanks for all of your help
see post 9

the style (class) selector goes on the sheet that is linked.

You are formatting the Chapter Head, which is a part of the Body of Work
NOT the TOC page, which for convenience in Sigil, has its own stylesheet
theducks is offline   Reply With Quote
Reply

Tags
headings, toc

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Index Formating tarisea Sigil 0 01-27-2014 01:24 PM
Changes in e-book formating pops1959 ePub 2 05-03-2011 12:46 PM
Formating The Terminator Amazon Kindle 11 04-01-2011 02:50 PM
Formating question crutledge Sigil 1 05-20-2010 04:11 PM
PDF Formating jessie102 Sony Reader 0 02-09-2010 06:41 PM


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


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