View Single Post
Old 08-17-2017, 08:39 PM   #6
Tex2002ans
Wizard
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: 2,306
Karma: 13057279
Join Date: Jul 2012
Device: Kobo Forma, Nook
Any specific reason why you are not using a <pre> tag for this?

Quote:
Originally Posted by AlanHK View Post
One reason I used p tags first was I was going to make AZW, and according to Amazon:
https://kdp.amazon.com/en_US/help/topic/A1JPUWCSD6F59O
Kindle does not support either <pre> or <tt>

But when I tried it, actually it does.
If I use Kindlegen on the <pre> coded text, Looking at the result in Calibre's Inspect, the AZW is identical: <pre class="memo">, while the KF7 has become <tt>.
I would trust the Kindle Publishing Guidelines over a lot of the info on their website (which is typically outdated and/or geared more towards a Word->Kindle workflow).

I attached a test EPUB:

Spoiler:
Code:
<pre>AGENTS:
 Section Leader: Com Varlt, MW 69321
 Crew:           Horman Tilis MW 69345
                 Fal Korf AW 70958
                 Pague Lo Sig AW 70889 

PROGRESS TO DATE:
  Traced subject—Kmoat Vo Pranj—to Levels 415-426 inclusive.
</pre>

<p class="memo">
AGENTS:
 Section Leader: Com Varlt, MW 69321
 Crew:           Horman Tilis MW 69345
                 Fal Korf AW 70958
                 Pague Lo Sig AW 70889 

PROGRESS TO DATE:
  Traced subject—Kmoat Vo Pranj—to Levels 415-426 inclusive.
</p>


with this CSS:

Spoiler:
Code:
.memo {
margin-top: 2em;
margin-left: 2em;
text-indent: 0em;
font-family: monospace;
font-size: .9em;
white-space: pre-wrap;
}

pre {
margin-top: 2em;
margin-left: 2em;
text-indent: 0em;
font-size: .9em;
}


The <p class="memo"> you put together looks fine in KF8, but absolutely falls apart in KF7:

Click image for larger version

Name:	PreKF8.png
Views:	159
Size:	16.7 KB
ID:	158532 Click image for larger version

Name:	PreKF7.png
Views:	131
Size:	23.4 KB
ID:	158531

Side Note: If I am messing with code that must keep very specific whitespace, I typically edit using Calibre's Prettify. 99.9% of the time I prefer Sigil's whitespace cleanup though.
Attached Files
File Type: epub TestPre.epub (2.2 KB, 98 views)

Last edited by Tex2002ans; 08-17-2017 at 08:44 PM.
Tex2002ans is offline   Reply With Quote