> Converting a text file (to epub) which included many lines like
> "
> <name> = <rest of line>
> "
> resulted in just the character "=".
>
> As a workaround enscript will produce correct html, but the epub result
> looks fine in the calibre viewer, but produces odd underlined text on
> a nook ereader. But that is an aside, rather than the main point of this
> bug report.
>
> I attach a screen shot showing the display of the original text file and
> the calibre viewer showing the problem.


When converts from TXT format, Calibre tries to detect format type.
Your text file "/usr/share/doc/exim4-base/spec.txt.gz" seems to be
Markdown format,
so Calibre treats your text file as Markdown format.

Markdown format treats "<...>" as HTML tag. This is why "<...>"
disappears your text.

If you are familiar with Python code, check
"/usr/lib/calibre/calibre/ebooks/txt/processor.py" to view format
detection code.

If you want to disable these format detection and treat your file as
plain text file, use file converter from Calibre GUI.
Usage:
1. Push "Add books" button and import the text file to Calibre.
2. Push "Convert books" button to open converter.
3. Open "TXT input" section in converter dialog, and set "plain"
format type to disable format detection.
    > Structure:
    >    Formatting style: plain
4. Add more options to better output.
    > Structure:
    >    Paragraph style: off
    > Common:
    >    Paragraph spaces: enable
5. Push "OK" button to convert your text file to ePub.

--
YOKOTA

Reply via email to