Thread: Need Help
View Single Post
Old 12-16-2018, 07:08 AM   #20
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,355
Karma: 20171571
Join Date: Dec 2012
Location: Charleston, SC today
Device: iPhone 15/11/X/6/iPad 1,2,Air & Air Pro/Surface Pro/Kindle PW & Fire
I agree that this is probably an issue with aldiko and not with the book. Honestly, the code/css snippet you showed is one of the cleaner examples I've seen. I would listen to Hitch and BR and either rotate your screen or use a different reader.

If you are intent on deleting all references to a <table> then it will take a few find/replace steps. I've outlined the procedure below, however I would NOT do this with my books. For the example code you showed above, I would change the <table> to a <div> and transfer the CSS styling so that it looks the way the author intended...and also so you can differentiate what kinds of communication are being portrayed. Simply deleting the <table>s will make all the paragraphs look the same - you won't be able to easily tell what is a system message and what is a character talking.

Here is an example of how I would code the <div>s (screenshot attached):
Spoiler:

HTML:
Code:
<p>This was the first time I had heard about the residential area. I never expected something like that to exist in the dungeon either. It seemed I could just stay there without ever going back to my own world. Although, I would never do so as a college student and Yua's older brother. The residential area also seemed like the place where I could use the Special Mansion Free Purchase Ticket. Special Mansion… I was curious, but I had no way of going there as of yet.</p>
<p class="spc">In summary, there were four benefits I gained from becoming an official explorer.</p>
<div class="msg">
<p>1. Authority to appoint one person to be a First Dungeon Explorer.</p>
<p>2. Ability to find and join Event Dungeons.</p>
<p>3. Ability to participate in Event Raids.</p>
<p>4. Right to enter the residential area.</p>
</div>
<p>After I organized the info, it did not seem so complicated anymore. With that, I finally checked the Divine Speed skill I received.</p>
CSS:
Code:
p	{
	margin: 0;
	text-indent: 1.2em;
	text-align: left
}

p.spc	{
	margin-top: 2em;
	text-indent: 0
}

div.msg {
	border: 3px double rgb(116, 153,  196);
	background-color: rgb(210, 228, 242);
	color: rgb(64, 64, 64);
	width: 80%;
	margin: 2em auto;
	padding: 15px
}

div.msg p {
	text-indent: -1.5em;
	padding-left: 1.5em
}



WARNING: Using this procedure may will have some unintended consequences...make a backup of your file before doing this...


Open the "Find & Replace" tool (Ctrl-F if it isn't visible). Check "DotAll" and "Wrap" in the options. Select Regex and "All HTML Files" in the Mode. Enter each of the following searches, one at a time, into the find and replace fields. Click the "Find" button, then click the "Replace" button. If you are happy with the results then repeat, or you could use the "Replace/Find" to automatically go to the next instance after making the replace. OR, you could use the "Replace All" button to do it all at one go...but you cannot Undo the Replace All...again, make a backup...

Search 1:
Find: <td>\s*(.*?)\s*</td>
Replace: \1

Search 2:
Find: <tr>\s*(.*?)\s*</tr>
Replace: \1

Search 3:
Find: <table.*?>\s*(.*?)\s*</table>
Replace: \1

If you want to try replacing the <table> with a <div> then use this as the 3rd search:

Search 3:
Find: <table.*?>\s*(.*?)\s*</table>
Replace: <div class="msg">\n\1\n</div>

EDIT:
This procedure is based on your example...it assumes that all the information inside of the table is already wrapped with <p> tags.
Attached Thumbnails
Click image for larger version

Name:	Capture.JPG
Views:	103
Size:	134.2 KB
ID:	168394  

Last edited by Turtle91; 12-16-2018 at 07:17 AM.
Turtle91 is offline   Reply With Quote