|
|
#1 |
|
Junior Member
![]() Posts: 7
Karma: 20
Join Date: Apr 2011
Device: Kindle
|
Preserving Indentation
To Whom it may concern!
I've been trying to convert "The C Programming Language Ritchie & kernighan" from PDF to mobi and all the time I get the code blocks stripped of the indentation - really ugly. Finaly I came up with some sort of solution ![]() Settings->Conversion->Common Options->Search and replace Search: [\s]{2} Replace: It may not be very elegant but it works ))Now this: Code:
main()
21
{
int c, nl;
nl = 0;
while ((c = getchar()) != EOF)
if (c == '\n')
++nl;
printf("%d\n", nl);
}
Code:
main()
21
{
int c, nl;
nl = 0;
while ((c = getchar()) != EOF)
if (c == '\n')
++nl;
printf("%d\n", nl);
}
Table of contents in pdf files turns to something like this: 1.5.2 Character Counting.......................................... ........................................19 1.5.3 Line Counting.......................................... .......................................20 1.5.4 Word Counting.......................................... ..................................21 which gets carried over 2 lines.. very ugly So, put another replacement: Search: \.\.\.\.\.\.\.\.\.\.\.\.\.\.\. Repace: <EMPTY> Cheerz zaph0d |
|
|
|
|
|
#2 |
|
Junior Member
![]() Posts: 7
Karma: 20
Join Date: Apr 2011
Device: Kindle
|
Okay, PDF->EPUB(calibre), Sigil, than calibre again EPUB->MOBI seems to be a bit better, I cleared page numbers and generated proper TOC in Sigil, but its kinda too exhaustive for a personal conversion... and Im not publisher/writer
![]() I hope, the new PDF engine is coming soon, are there alpha/beta builds I can download for personal use? |
|
|
|
|
|
#3 |
|
Sigil & calibre developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 2,487
Karma: 1063785
Join Date: Jan 2009
Location: Florida, USA
Device: Nook STR
|
No. It is stalled. Meaning no one is currently working on it.
No, it is not yet in a usable state. With a little work it can be used to produce XML output but the code to turn that into something usable is missing. |
|
|
|
|
|
#4 |
|
Junior Member
![]() Posts: 7
Karma: 20
Join Date: Apr 2011
Device: Kindle
|
Can I help?
|
|
|
|
|
|
#5 |
|
Sigil & calibre developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 2,487
Karma: 1063785
Join Date: Jan 2009
Location: Florida, USA
Device: Nook STR
|
Of course. Take a look at http://bazaar.launchpad.net/~kovid/c...re/ebooks/pdf/ Post on the https://launchpad.net/~calibre-devs mailing list for help. Kovid is the one working on the C code so he's the most knowledgable about it.
|
|
|
|
|
|
#6 |
|
Junior Member
![]() Posts: 1
Karma: 10
Join Date: Jul 2010
Device: Android
|
Thanks for the tip Zaph0d, worked like a charm.
|
|
|
|
![]() |
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Convert epub that has hard margin / indentation? | planetthoughtful | Conversion | 5 | 02-08-2011 06:37 AM |
| PDF to epub convertion grief; keeping indentation | Aia | Calibre | 2 | 10-31-2010 06:09 PM |
| Preserving Formatting through conversion? | Ham88 | 16 | 08-31-2009 03:22 AM | |
| Epub and negative indentation | Nate the great | ePub | 6 | 04-27-2009 12:48 PM |
| PDF conversion & indentation | Shiren | Calibre | 5 | 12-11-2008 03:09 PM |