Why Does Code Look Horrible in Books?
I’ll say it. Code looks like shit in books. Publishers strip out all the color, they seldom add line numbers, they wrap code at weird spots, trim it even, and programming books look terrible.
I have always used PDF for tech books. It’s for a simple reason, really. Code blocks look ugly in EPUB.

Not that they look great in PDF either. It depends on the publisher, and there are a lot of variations in how they choose to render code blocks, honestly. Most just choose to render them indentically. I never understood why though, at least in PDF, they should render with color. In EPUB, you know that there’s a lot of the styling that happens at the client-side.

I wanted my code blocks to look like the image above, like it would in an editor.
That’s an editor, right? Right?
No.

Merrilin, now with support for coding books
I can now proudly say that Merrilin.ai supports tech books across 67 themes. It renders code blocks beautifully, extracting them even out of PDFs and shows them in an editor-style dialog. Or, copy directly to your clipboard!
Inline Code Rendering in PDFs
Merrilin extracts code blocks from PDFs and renders them with full syntax highlighting. Tap any code block to open an editor-style dialog, or use the copy button to grab the code directly.


Copy Code with One Tap
Open any code block in the editor dialog to see it with line numbers and full syntax highlighting. The Copy Code button lets you paste it straight into your editor.

But wait, in EPUBs, you don’t even need to open a dialog to see the code in color. Merrilin renders codeblocks directly in the EPUBs, supporting all known languages directly.
EPUB Code Blocks — No Dialog Needed
In EPUBs, code blocks are rendered directly in the reading view with full syntax highlighting. No need to open a separate dialog — just read the code in color as part of the text.

This works across themes, so if you’re reading books on software programming, Merrilin now lets you read them and see the code beautifully, like you would in an editor.
67 Themes, All with Code Support
Every theme in Merrilin supports syntax highlighting for code blocks. Whether you prefer a dark or light reading experience, your code will always be rendered beautifully.
