Paragraph spacing on FB2 files

Publicado por · Deja un comentario 

I recently bought a Papyre 5.1 device, which is the Spanish variant of the Hanlin v5 e-book reader. Although I don’t mind reading properly formatted PDF files, it is clear that an unstructured textual format works much better. The FB2 format is the better supported and the one with more options and choices.

I prefer using a 110% inter-line separation. Additionally I find that a little space between paragraphs makes reading much easier, but there is no option to automatically set this up. Fortunately, FB2 files are just an XML variant, and a plain text editor is enough to change little things. In particular, paragraphs are delimited by <p> tags, and a small embedded CSS section may be added at the beginning of the file.

Just after the second line of the file:

<FictionBook xmlns:xlink="http://www.w3.org/1999/xlink" xmlns="http://www.gribuser.ru/xml/fictionbook/2.0">

The following text should be added:

<stylesheet type="text/css">
p { margin-top: 10px; margin-bottom: 10px;}
</stylesheet>

If the stylesheet section already exists, only the following line should be added:

p { margin-top: 10px; margin-bottom: 10px;}

Now there will be a separation between paragraphs, which will make reading even more enjoyable.

Another option would be changing the style in the fb2.css file, which is stored inside the crengine folder of the SD card. Personally I prefer hand-editing each file, as formatting is not always set in the same way.

Acerca de Pablo
Un matemático-informático con demasiadas inquietudes y poco tiempo.

Comentarios

Los comentarios están cerrados.