View Single Post
Old 02-21-2014, 08:54 AM   #6
Tex2002ans
Evangelist
Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.
 
Posts: 457
Karma: 360271
Join Date: Jul 2012
Device: Nook
Quote:
Originally Posted by mrmikel View Post
I have never liked tables. It is so hard to keep from blowing them up.
I don't see it being any different for these Tables made completely out of CSS. Probably even LESS support for it on devices, when compared to basic HTML Tables.

And, for example, you wanted to copy/paste the book to a website (which often happens with a chapter I create in my EPUBs), relying on specific CSS to function/display something as basic as a table would break.

If the basic HTML tags exist, I would probably opt for those over emulating the same thing via CSS.

For example: Using "<blockquote></blockquote>" instead of "<div class="blockquote"></div>" with margins on top/bottom/left/right.

Quote:
Originally Posted by mrmikel View Post
My bigger bugbear is when some moron decides to use ordered lists when transcribing a document. Why not just copy the number or letter? They are not going to add to it or subtract from it.
I actually see this both ways. Using the <ol> WOULD be a correct way to handle it (IF ADE/RMSDK WOULD HANDLE GODS DAMN start="" and type="")... but the support on most ereaders is just completely buggy/broken.

Future Formats

<ol> COULD have some advantages such as not breaking across pages and/or being floatable to another page, if you were going backwards from ebook to print.

You could also use more advanced CSS Counters to do the same sort of thing (again, left for a format BEYOND EPUB/MOBI):

http://www.w3schools.com/cssref/pr_g...nter-reset.asp

Now

Indeed, the best way to tackle it CURRENTLY is to probably just transfer the number over as text (which is what I do). Much less chance of breakage across devices... BUT, keep in mind, that while the text may not change directly, let us say you DID want to create a second edition of the book with lots of edits. You may go in and change some text around, and this is where auto-numbering would see an advantage.

Let us say you had a list of 30 objects, you added one in between, this will mean editing code it only ONE position, instead of ~30.

Or let us say you wanted to swap from "number" format into "lowercase letters" or "roman numeral" format. Or let us say you had a nested list, and wanted to swap the inner list from "lowercase letters" to "roman numerals". It would just require a simple type change, instead of manually replacing all 30 "plain text" numbers.

Side Note: Another advantage of automation is that it is less prone to human error.

Another Side Note: I am noticing a lot of stuff I haven't noticed before, when trying to create a LaTeX version of a few of these books. Lots of places (especially chapters, sections, footnotes) are WAY better automated, than in plaintext form.

Quote:
Originally Posted by mrmikel View Post
Now how do I get my Sony Reader to center the mess?
Maybe something along the lines of:

Code:
.divtable {
	width: 80%;
	margin-left: 10%;
	margin-right: 10%;
}
HTML:

Code:
  <div class="div-table">
    <div class="div-table-row">
      <span class="div-table-col">
        Ordnance and ordnance stores
      </span>

      <span class="div-table-col-num">
        $45,000,000
      </span>
    </div>

    <div class="div-table-row">
      <span class="div-table-col">
        Aircraft and aeronautical material
      </span>

      <span class="div-table-col-num">
        29,775,000
      </span>
    </div>

    <div class="div-table-row">
      <span class="div-table-col">
        Tanks and other vehicles
      </span>

      <span class="div-table-col-num">
        15,000,000
      </span>
    </div>

    <div class="div-table-row">
      <span class="div-table-col">
        Miscellaneous military equipment
      </span>

      <span class="div-table-col-num">
        10,225,000
      </span>
    </div>

    <div class="div-table-caption">
      This is a test caption
    </div>
  </div>
Here is the CSS I used (changes in Red):

Code:
.div-table {
    display: table;
    border: 1px solid black;
    width: 80%;
    margin-left: 10%;
    margin-right: 10%;
}

.div-table-caption {
    display: table-caption;
    caption-side: bottom;
    background: gray;
}

.div-table-row {
    display: table-row;
    border: 1px solid black;
}

.div-table-col {
    display: table-cell;
    padding: 5px;
    border: 1px solid black;
    font-size: 85%;
    text-align: left;
}

.div-table-col-num {
    display: table-cell;
    padding: 5px;
    border: 1px solid black;
    font-size: 85%;
    text-align: right;
}
Although it seems like ADE did not like the "caption-side: bottom" that I added.. and it looks to have broken the width of the caption:

Click image for larger version

Name:	SigilCSSTable.png
Views:	34
Size:	23.7 KB
ID:	119354 Click image for larger version

Name:	ADECSSTable.png
Views:	35
Size:	12.5 KB
ID:	119353

Anyway, this stuff brings a tear to my eye... I guess I should seriously look into beautifying my Table CSS.
Attached Files
File Type: epub CSSTable.epub (2.4 KB, 19 views)

Last edited by Tex2002ans; 02-21-2014 at 08:58 AM.
Tex2002ans is offline   Reply With Quote