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

Go Back   MobileRead Forums > E-Book Software > Calibre > Conversion

Notices

Reply
 
Thread Tools Search this Thread
Old 02-22-2011, 06:29 AM   #1
Agama
Guru
Agama ought to be getting tired of karma fortunes by now.Agama ought to be getting tired of karma fortunes by now.Agama ought to be getting tired of karma fortunes by now.Agama ought to be getting tired of karma fortunes by now.Agama ought to be getting tired of karma fortunes by now.Agama ought to be getting tired of karma fortunes by now.Agama ought to be getting tired of karma fortunes by now.Agama ought to be getting tired of karma fortunes by now.Agama ought to be getting tired of karma fortunes by now.Agama ought to be getting tired of karma fortunes by now.Agama ought to be getting tired of karma fortunes by now.
 
Agama's Avatar
 
Posts: 776
Karma: 2751519
Join Date: Jul 2010
Location: UK
Device: PW2, Nexus7
Markdown / Blockquote conversion giving unexpected results

I am using blockquotes within some markdown text but getting unexpected results. Calibre's resultant html is different to that produced by the standard markdown processor, (see http://daringfireball.net/projects/markdown/dingus).

With sample source text of:

### Blockquote Test

> This is a blockquote
> section of markdown.
>
> Hardwrap with 2 trailing spaces.
> Use for quotations/poetry etc.


Markdown (Daring Fireball) produces:

<h3>Blockquote Test</h3>

<blockquote>
<p>This is a blockquote <br />
section of markdown. </p>

<p>Hardwrap with 2 trailing spaces. <br />
Use for quotations.</p>
</blockquote>


whereas calibre produces:

<h3 class="calibre1">Blockquote Test</h3>
<blockquote class="calibre2"><p class="calibre3">This is a blockquote &gt; section of markdown. &gt; &gt; Hardwrap with 2 trailing spaces. &gt; Use for quotations/poetry etc.
</p>
</blockquote>


These differences obviously display quite diffently in a eBook. Can I get calibre to produce the standard output?

I am using calibre 0.7.46 on Windows 7. In the TXT input conversion options I used Paragraph style: block and Formatting style: markdown.
Agama is offline   Reply With Quote
Old 02-22-2011, 06:53 AM   #2
Perkin
Guru
Perkin calls his or her ebook reader Vera.Perkin calls his or her ebook reader Vera.Perkin calls his or her ebook reader Vera.Perkin calls his or her ebook reader Vera.Perkin calls his or her ebook reader Vera.Perkin calls his or her ebook reader Vera.Perkin calls his or her ebook reader Vera.Perkin calls his or her ebook reader Vera.Perkin calls his or her ebook reader Vera.Perkin calls his or her ebook reader Vera.Perkin calls his or her ebook reader Vera.
 
Perkin's Avatar
 
Posts: 655
Karma: 64171
Join Date: Sep 2010
Location: Kent, England, Sol 3, ZZ9 plural Z Alpha
Device: Sony PRS-300, Kobo Aura HD, iPad (Marvin)
In conversion settings, Txt-Input - set the Paragraph style to 'off'
that should do it
Perkin is offline   Reply With Quote
Old 02-22-2011, 07:10 AM   #3
Agama
Guru
Agama ought to be getting tired of karma fortunes by now.Agama ought to be getting tired of karma fortunes by now.Agama ought to be getting tired of karma fortunes by now.Agama ought to be getting tired of karma fortunes by now.Agama ought to be getting tired of karma fortunes by now.Agama ought to be getting tired of karma fortunes by now.Agama ought to be getting tired of karma fortunes by now.Agama ought to be getting tired of karma fortunes by now.Agama ought to be getting tired of karma fortunes by now.Agama ought to be getting tired of karma fortunes by now.Agama ought to be getting tired of karma fortunes by now.
 
Agama's Avatar
 
Posts: 776
Karma: 2751519
Join Date: Jul 2010
Location: UK
Device: PW2, Nexus7
The available options are: auto, block, single, print, unformatted.

I tried unformatted and got:

<blockquote class="calibre2"><p class="calibre3">This is a blockquote &gt; section of markdown.
</p>
<p class="calibre3">Hardwrap with 2 trailing spaces.
</p>
<p class="calibre3">Use for quotations/poetry etc.
</p>
</blockquote>


This is closer but still has a spurious &gt; instead of a new line within the paragraph. I'll try all the other options and see what I get.
Agama is offline   Reply With Quote
Old 02-22-2011, 07:21 AM   #4
Agama
Guru
Agama ought to be getting tired of karma fortunes by now.Agama ought to be getting tired of karma fortunes by now.Agama ought to be getting tired of karma fortunes by now.Agama ought to be getting tired of karma fortunes by now.Agama ought to be getting tired of karma fortunes by now.Agama ought to be getting tired of karma fortunes by now.Agama ought to be getting tired of karma fortunes by now.Agama ought to be getting tired of karma fortunes by now.Agama ought to be getting tired of karma fortunes by now.Agama ought to be getting tired of karma fortunes by now.Agama ought to be getting tired of karma fortunes by now.
 
Agama's Avatar
 
Posts: 776
Karma: 2751519
Join Date: Jul 2010
Location: UK
Device: PW2, Nexus7
Single gives:

<blockquote class="calibre2"><p class="calibre3">This is a blockquote
</p>
<p class="calibre3">section of markdown.
</p>
<p class="calibre3">Hardwrap with 2 trailing spaces.
</p>
<p class="calibre3">Use for quotations/poetry etc.
</p>
</blockquote>


but this is not strictly correct and will cause every line in my source to be treated as a paragraph, which is not how markdown works.

(Print and Unformatted were even worse).
Agama is offline   Reply With Quote
Old 02-22-2011, 07:22 AM   #5
Perkin
Guru
Perkin calls his or her ebook reader Vera.Perkin calls his or her ebook reader Vera.Perkin calls his or her ebook reader Vera.Perkin calls his or her ebook reader Vera.Perkin calls his or her ebook reader Vera.Perkin calls his or her ebook reader Vera.Perkin calls his or her ebook reader Vera.Perkin calls his or her ebook reader Vera.Perkin calls his or her ebook reader Vera.Perkin calls his or her ebook reader Vera.Perkin calls his or her ebook reader Vera.
 
Perkin's Avatar
 
Posts: 655
Karma: 64171
Join Date: Sep 2010
Location: Kent, England, Sol 3, ZZ9 plural Z Alpha
Device: Sony PRS-300, Kobo Aura HD, iPad (Marvin)
Are you sure you're using calibre 0.7.46, as there was a new setting, especially for markdown/Textile, which is 'off'

I'm also using Win7, and I have auto, block, single, print, unformatted and off.
Perkin is offline   Reply With Quote
Old 02-22-2011, 07:24 AM   #6
Agama
Guru
Agama ought to be getting tired of karma fortunes by now.Agama ought to be getting tired of karma fortunes by now.Agama ought to be getting tired of karma fortunes by now.Agama ought to be getting tired of karma fortunes by now.Agama ought to be getting tired of karma fortunes by now.Agama ought to be getting tired of karma fortunes by now.Agama ought to be getting tired of karma fortunes by now.Agama ought to be getting tired of karma fortunes by now.Agama ought to be getting tired of karma fortunes by now.Agama ought to be getting tired of karma fortunes by now.Agama ought to be getting tired of karma fortunes by now.
 
Agama's Avatar
 
Posts: 776
Karma: 2751519
Join Date: Jul 2010
Location: UK
Device: PW2, Nexus7
Ah! my mistake, I'm still on 0.7.45. Thanks, I'll get updated and see what happens.
Agama is offline   Reply With Quote
Old 02-22-2011, 07:28 AM   #7
DoctorOhh
US Navy, Retired
DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.
 
DoctorOhh's Avatar
 
Posts: 9,864
Karma: 13806776
Join Date: Feb 2009
Location: North Carolina
Device: Icarus Illumina XL HD, Nexus 7
Quote:
Originally Posted by Agama View Post
The available options are: auto, block, single, print, unformatted.
Perkin said Paragraph Style not Formatting style. Paragraph style has a off option, Formatting style does not.

Update: Never mind, sometimes I'm too darn slow.
DoctorOhh is offline   Reply With Quote
Old 02-22-2011, 07:31 AM   #8
Perkin
Guru
Perkin calls his or her ebook reader Vera.Perkin calls his or her ebook reader Vera.Perkin calls his or her ebook reader Vera.Perkin calls his or her ebook reader Vera.Perkin calls his or her ebook reader Vera.Perkin calls his or her ebook reader Vera.Perkin calls his or her ebook reader Vera.Perkin calls his or her ebook reader Vera.Perkin calls his or her ebook reader Vera.Perkin calls his or her ebook reader Vera.Perkin calls his or her ebook reader Vera.
 
Perkin's Avatar
 
Posts: 655
Karma: 64171
Join Date: Sep 2010
Location: Kent, England, Sol 3, ZZ9 plural Z Alpha
Device: Sony PRS-300, Kobo Aura HD, iPad (Marvin)
Just done a test with your few lines, and there's a problem, the lines still get joined together.

I done a test with Textile styled text
Code:
h3. Blockquote Test

bq. This is a blockquote
section of markdown.
 
bq. Hardwrap with 2 trailing spaces.
Use for quotations/poetry
And with the 'off' paragraph setting this converts/works properly.
Code:
  <h3 class="calibre1" id="calibre_pb_0">Blockquote Test</h3>

  <blockquote class="calibre2">
    <p class="calibre3">This is a blockquote<br class="calibre4" />
    section of markdown.</p>
  </blockquote>

  <blockquote class="calibre2">
    <p class="calibre3">Hardwrap with 2 trailing spaces.<br class="calibre4" />
    Use for quotations/poetry etc.</p>
  </blockquote>
Perkin is offline   Reply With Quote
Old 02-22-2011, 07:36 AM   #9
Perkin
Guru
Perkin calls his or her ebook reader Vera.Perkin calls his or her ebook reader Vera.Perkin calls his or her ebook reader Vera.Perkin calls his or her ebook reader Vera.Perkin calls his or her ebook reader Vera.Perkin calls his or her ebook reader Vera.Perkin calls his or her ebook reader Vera.Perkin calls his or her ebook reader Vera.Perkin calls his or her ebook reader Vera.Perkin calls his or her ebook reader Vera.Perkin calls his or her ebook reader Vera.
 
Perkin's Avatar
 
Posts: 655
Karma: 64171
Join Date: Sep 2010
Location: Kent, England, Sol 3, ZZ9 plural Z Alpha
Device: Sony PRS-300, Kobo Aura HD, iPad (Marvin)
Again with Textile (I prefer it to markdown - more options)

Code:
h3. Blockquote Test

bq.. This is a blockquote
section of markdown.
 
Hardwrap with 2 trailing spaces.
Use for quotations/poetry etc.
(Any following paragraph that you wanted return to normal, you would just precede with 'p. ')

Converts to
Code:
  <h3 class="calibre1" id="calibre_pb_0">Blockquote Test</h3>

  <blockquote class="calibre2">
    <p class="calibre3">This is a blockquote<br class="calibre4" />
    section of markdown.</p>

    <p class="calibre3">Hardwrap with 2 trailing spaces.<br class="calibre4" />
    Use for quotations/poetry etc.</p>
  </blockquote>
Perkin is offline   Reply With Quote
Old 02-22-2011, 07:41 AM   #10
Perkin
Guru
Perkin calls his or her ebook reader Vera.Perkin calls his or her ebook reader Vera.Perkin calls his or her ebook reader Vera.Perkin calls his or her ebook reader Vera.Perkin calls his or her ebook reader Vera.Perkin calls his or her ebook reader Vera.Perkin calls his or her ebook reader Vera.Perkin calls his or her ebook reader Vera.Perkin calls his or her ebook reader Vera.Perkin calls his or her ebook reader Vera.Perkin calls his or her ebook reader Vera.
 
Perkin's Avatar
 
Posts: 655
Karma: 64171
Join Date: Sep 2010
Location: Kent, England, Sol 3, ZZ9 plural Z Alpha
Device: Sony PRS-300, Kobo Aura HD, iPad (Marvin)
No matter what options I try with markdown text, the lines still get wrapped.
You should probably send a small note to user_none (who maintains that code) to check if the 'off' also applies to markdown, as it does with Textile.
Perkin is offline   Reply With Quote
Old 02-22-2011, 07:43 AM   #11
Agama
Guru
Agama ought to be getting tired of karma fortunes by now.Agama ought to be getting tired of karma fortunes by now.Agama ought to be getting tired of karma fortunes by now.Agama ought to be getting tired of karma fortunes by now.Agama ought to be getting tired of karma fortunes by now.Agama ought to be getting tired of karma fortunes by now.Agama ought to be getting tired of karma fortunes by now.Agama ought to be getting tired of karma fortunes by now.Agama ought to be getting tired of karma fortunes by now.Agama ought to be getting tired of karma fortunes by now.Agama ought to be getting tired of karma fortunes by now.
 
Agama's Avatar
 
Posts: 776
Karma: 2751519
Join Date: Jul 2010
Location: UK
Device: PW2, Nexus7
Thanks Perkin, 0.7.46 has fixed it for me, with Paragraph style: Off I get:

<blockquote class="calibre2"><p class="calibre3">This is a blockquote<br class="calibre4"/>
section of markdown.
</p>
<p class="calibre3">Hardwrap with 2 trailing spaces.<br class="calibre4"/>
Use for quotations/poetry etc.
</p>
</blockquote>

I haven't come across Textile but I will look it up.
Agama is offline   Reply With Quote
Old 02-22-2011, 09:30 AM   #12
user_none
Sigil & calibre developer
user_none ought to be getting tired of karma fortunes by now.user_none ought to be getting tired of karma fortunes by now.user_none ought to be getting tired of karma fortunes by now.user_none ought to be getting tired of karma fortunes by now.user_none ought to be getting tired of karma fortunes by now.user_none ought to be getting tired of karma fortunes by now.user_none ought to be getting tired of karma fortunes by now.user_none ought to be getting tired of karma fortunes by now.user_none ought to be getting tired of karma fortunes by now.user_none ought to be getting tired of karma fortunes by now.user_none ought to be getting tired of karma fortunes by now.
 
user_none's Avatar
 
Posts: 2,488
Karma: 1063785
Join Date: Jan 2009
Location: Florida, USA
Device: Nook STR
I'll look into this issue either this or tomorrow evening.
user_none is offline   Reply With Quote
Old 02-22-2011, 09:42 AM   #13
Perkin
Guru
Perkin calls his or her ebook reader Vera.Perkin calls his or her ebook reader Vera.Perkin calls his or her ebook reader Vera.Perkin calls his or her ebook reader Vera.Perkin calls his or her ebook reader Vera.Perkin calls his or her ebook reader Vera.Perkin calls his or her ebook reader Vera.Perkin calls his or her ebook reader Vera.Perkin calls his or her ebook reader Vera.Perkin calls his or her ebook reader Vera.Perkin calls his or her ebook reader Vera.
 
Perkin's Avatar
 
Posts: 655
Karma: 64171
Join Date: Sep 2010
Location: Kent, England, Sol 3, ZZ9 plural Z Alpha
Device: Sony PRS-300, Kobo Aura HD, iPad (Marvin)
Quote:
Originally Posted by user_none View Post
I'll look into this issue either this or tomorrow evening.
Agama says it works properly for him.

I found the lines got combined, unless I added a couple of spaces at end of those lines.
They then worked properly, so with markdown, I can't remember if blockquote text needs the spaces on the end. (So it may be me)

I just copy & pasted his example in his post, which didn't have any extra spaces, which may explain why it didn't work properly for me. (at least until I added them)
Perkin is offline   Reply With Quote
Old 02-22-2011, 09:46 AM   #14
Perkin
Guru
Perkin calls his or her ebook reader Vera.Perkin calls his or her ebook reader Vera.Perkin calls his or her ebook reader Vera.Perkin calls his or her ebook reader Vera.Perkin calls his or her ebook reader Vera.Perkin calls his or her ebook reader Vera.Perkin calls his or her ebook reader Vera.Perkin calls his or her ebook reader Vera.Perkin calls his or her ebook reader Vera.Perkin calls his or her ebook reader Vera.Perkin calls his or her ebook reader Vera.
 
Perkin's Avatar
 
Posts: 655
Karma: 64171
Join Date: Sep 2010
Location: Kent, England, Sol 3, ZZ9 plural Z Alpha
Device: Sony PRS-300, Kobo Aura HD, iPad (Marvin)
Just checked http://daringfireball.net/projects/m...tax#blockquote and the lines should not be combined.
So we may have other settings which may be causing our differences.
Perkin is offline   Reply With Quote
Old 02-22-2011, 12:26 PM   #15
Agama
Guru
Agama ought to be getting tired of karma fortunes by now.Agama ought to be getting tired of karma fortunes by now.Agama ought to be getting tired of karma fortunes by now.Agama ought to be getting tired of karma fortunes by now.Agama ought to be getting tired of karma fortunes by now.Agama ought to be getting tired of karma fortunes by now.Agama ought to be getting tired of karma fortunes by now.Agama ought to be getting tired of karma fortunes by now.Agama ought to be getting tired of karma fortunes by now.Agama ought to be getting tired of karma fortunes by now.Agama ought to be getting tired of karma fortunes by now.
 
Agama's Avatar
 
Posts: 776
Karma: 2751519
Join Date: Jul 2010
Location: UK
Device: PW2, Nexus7
Quote:
Originally Posted by Perkin View Post
Agama says it works properly for him.

I found the lines got combined, unless I added a couple of spaces at end of those lines.
Yes, this is how markdown works. Two or more trailing spaces cause a <br> tag to be generated, which is exactly what calibre now correctly does to my markdown, (with Paragraph style: off). My trailing spaces were included in the post that I made but they (obviously!) cannot be seen.

So, I'm quite satisfied that calibre is performing exactly as required.

(I've had a look at Textile and it looks very useful: not as readable as markdown, but more flexible as a pre-cursor to book conversion, so I think I'll make the switch).
Agama 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
Conversion from which format gives best results? Valkrider Conversion 3 02-07-2011 07:20 AM
Unutterably Silly Unexpected results of the pumpkin pie kennyc Lounge 7 11-24-2010 12:14 PM
Unexpected conversion jusmee Calibre 4 11-05-2009 10:30 AM
Calibre comic conversion yields poor results when target is epub; looks fine on LRF acidzebra Calibre 2 08-17-2009 10:54 AM
Please show off your PDF conversion results! Staz Sony Reader 0 02-11-2009 03:44 AM


All times are GMT -4. The time now is 12:21 PM.


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