Skip to content

Instantly share code, notes, and snippets.

@marcelotournier
Created January 10, 2026 15:59
Show Gist options
  • Select an option

  • Save marcelotournier/ae5307656df8a4af9afa850a710595eb to your computer and use it in GitHub Desktop.

Select an option

Save marcelotournier/ae5307656df8a4af9afa850a710595eb to your computer and use it in GitHub Desktop.
E-READER FRIENDLY TXT FILE SPECIFICATIONS
E-READER FRIENDLY TXT FILE SPECIFICATIONS
Use these rules when creating plain text (.txt) files intended for e-readers, Kindle, or any device with text reflow.
CRITICAL RULES:
1. NO HARD LINE BREAKS WITHIN PARAGRAPHS
Write each paragraph as one continuous line. Let the device handle wrapping.
Wrong: "This is a sentence that\ncontinues on the next line."
Right: "This is a sentence that continues on the next line."
2. ONE BLANK LINE BETWEEN PARAGRAPHS
Separate paragraphs with a single empty line. This signals a new paragraph to the e-reader.
3. NO FIXED-WIDTH FORMATTING
Never try to create columns, tables, or aligned text using spaces. It will break on different screen sizes.
4. HEADINGS ON THEIR OWN LINE
Put section titles on a single line, followed by a blank line, then content.
5. LISTS AS SEPARATE PARAGRAPHS
Each list item should be its own paragraph (single line followed by blank line). Start with a simple marker like a dash or the word itself.
6. AVOID SPECIAL CHARACTERS
Stick to basic ASCII. Use -- instead of em-dash, use " instead of curly quotes.
7. USE ALL-CAPS OR === FOR EMPHASIS
Since bold/italic don't exist in txt, use CAPS for headers or === underlines for major sections.
STRUCTURE TEMPLATE:
DOCUMENT TITLE
Subtitle if needed
===
SECTION HEADING
===
First paragraph goes here as one continuous line no matter how long it is. The e-reader will wrap it appropriately for the screen size.
Second paragraph here. Again, one continuous line.
SUBSECTION HEADING
Content for subsection as flowing paragraphs.
Key point one
Key point two
Key point three
===
NEXT MAJOR SECTION
===
More content here.
===
END OF DOCUMENT
===
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment