10-12-2013, 12:22 PM | #1 | |||
Member
Posts: 19
Karma: 55146
Join Date: Oct 2013
Location: UK
Device: Kobo Clara HD, Android Tablet
|
Losing paragraph format in txt to epub with block and markdown - REASON FOUND
I am using paragraph style block and formatting style markdown.
The markdown appears to work but the text paragraphs are being combined even though I am separating them with a blank line. What am I missing here? It seems calibre is ignoring the block paragraph style once the markdown preprocessing has been done. Thanks. Input: Quote:
Quote:
Quote:
Last edited by Tattvadarzin; 10-17-2013 at 08:22 AM. Reason: New information |
|||
10-12-2013, 03:33 PM | #2 | |
Member
Posts: 19
Karma: 55146
Join Date: Oct 2013
Location: UK
Device: Kobo Clara HD, Android Tablet
|
I changed this to paragraph style off and added in the markdown hard breaks. It looks to me as though the Python markdown processor is not doing the paragraphs properly. It is ignoring the markdown rule that a new paragraph is indicated after a blank line.
Quote:
|
|
Advert | |
|
10-17-2013, 08:21 AM | #3 |
Member
Posts: 19
Karma: 55146
Join Date: Oct 2013
Location: UK
Device: Kobo Clara HD, Android Tablet
|
I think I've found the problem.
I had "Remove indents at the beginning of lines" ticked. Unticking it gave me what I want. Now I don't understand why because I had no indents. It looks as though it affects the processing though. So the TXT settings that are working are: Paragraph Style: off Formatting Style: markdown Preserve spaces: unticked Remove indents at the beginning of lines: unticked |
10-18-2013, 08:59 AM | #4 |
Guru
Posts: 644
Karma: 1242364
Join Date: May 2009
Location: The Right Coast
Device: PC (Calibre), Nexus 7 2013 (Moon+ Pro), HTC HD2/Leo (Freda)
|
My guess would be the original text file had either a tab or series of spaces at the beginning of a line of text. However, with the Remove Indents option set (ticked) the text did not show them. Effectively, they were invisible.
As with many other kinds of media related text display, it is a good idea to have a capable editor which can display control characters and other inline markup for situations like you just encountered. This is especially true if any kind of Search & Replace (normal or regex) is done on the text -- which can accidentally break hidden commands/characters -- whether done by yourself or anyone previously. Lots of editors include this function although it's not always prominently shown -- you might have to hunt for it. I know MS Word has such an option as does Notepad++ (free) for Windows. |
10-25-2013, 02:49 AM | #5 |
Member
Posts: 19
Karma: 55146
Join Date: Oct 2013
Location: UK
Device: Kobo Clara HD, Android Tablet
|
Indeed - I use Notepad++ extensively (at home and work) and I had the option to display all control characters. It is good for showing whether you have \r, \r\n, or \n line endings.
However the test file above failed so any inherent problem in my book text must also be in that. So if you copy and paste that into Notepad++ you'll see that there are no hidden nasties :-) I'm afraid that I still suspect the code. However thanks for the reply - I felt I was talking to the breeze. Last edited by Tattvadarzin; 10-25-2013 at 03:03 AM. Reason: typo |
Advert | |
|
Tags |
block, epub, markdown, txt |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Convert from epub/mobi back to TXT or any format? | KDA1 | Calibre | 1 | 01-26-2012 04:19 PM |
Losing Indents and Paragraph spacing | videopope | ePub | 11 | 06-03-2011 07:47 PM |
Having trouble converting html to markdown txt | bfollowell | Conversion | 7 | 03-30-2011 11:17 AM |
->Txt+Markdown | Perkin | Calibre | 2 | 12-11-2010 04:04 AM |
TXT conversion to ePub or LRF - paragraph formatting | Zapped | Calibre | 6 | 10-23-2009 05:06 PM |