contacara

How to join text lines while keeping paragraphs and lists

Replace breaks within sentences with spaces after separating them from paragraph boundaries. Deleting without a separator can merge words. Lists, addresses, verse and tables need separate rules; hyphenated fragments need individual checking.

Identify sentence-internal breaks

Copied printed lines may need joining for editing, while heading-to-paragraph breaks should remain. Identical stored controls can have different editorial roles.

Compare source and copy for a wrapped sentence, paragraph transition and list. Describe your rule, such as joining inside blocks while keeping blank-line boundaries. Blank and single breaks are clues rather than universal definitions.

Space versus deletion

Literal Alfa, LF, Beta has two words and eight site characters. Alfa Beta has two words and nine characters; AlfaBeta one word and eight. Newlines are excluded from site characters.

Equal length can conceal changed linguistic content. Complete words usually need a space; word fragments may not. Inspect joins instead of optimizing for the smallest total.

Joining two lines containing Alfa and Beta with a space gives Alfa Beta. Removing only the newline gives AlfaBeta, merging the words.
The original has 8 characters because the engine excludes the newline; inserting a space raises the count to 9. Open full-size JPG

Protect paragraphs

If blank lines separate blocks, join within each and preserve boundaries. Manual trials establish rules before automation, particularly among quotations and lists.

Define whether blanks include spaces-only rows. Do not use temporary markers already possible in source. If paragraph boundaries also use single breaks, reconstruct from the page or use a better export instead of assuming a safe signal.

Preserve lists

Lists and instructions need item boundaries. One-line destinations may need semicolons or another visible separator, a deliberate format rewrite.

Multiline items need internal joining but separate next-item boundaries. Check numbering, hyphens and indentation; punctuation alone is unreliable. Verify item totals and that no instruction was absorbed into another.

Respect nonprose structures

Postal layouts, verse endings and code breaks can carry required presentation, meaning or syntax. Equal words do not preserve every use.

Table lines may be records; quoted CSV fields may contain newlines. Parse CSV instead of inferring records from visible lines. Separate prose and structured areas, including bibliographies and technical attachments.

Check hyphenated joins separately

Line-final hyphens can be genuine or typographic. Spaces can leave fragments; deleting hyphen plus break can erase needed marks. Position alone cannot decide.

See hyphenation repair. Collect candidate joins, verify words, names and codes in context, and retain uncertainty or seek another export rather than guessing.

Fix order before joining

PDF columns can interleave unrelated text. Joining produces continuous nonsense. Abrupt topics, missing verbs and inserted captions signal order problems.

Re-extract or reconstruct using column checks first. Only then clean breaks. Equal word totals during rearrangement cannot certify correct sequence.

Verify joins before measuring

Inspect fused words, spaces before punctuation, repeats and absorbed headings. Paragraph totals should fit your rule. Word reductions among complete words suggest fusion.

Measure in the counter and compare a source sample. More characters may be normal as counted spaces replace excluded newlines. Faithful content and structure determine whether the copy is ready for revision, delivery or Italian cartelle.

Joins can preserve or merge words

SampleSite charactersWordsLines
Alfa\nBeta822
Alfa Beta921
AlfaBeta811
Measured with analyze(). Notation \n represents real LF. Character totals exclude newlines but include inserted spaces.

Sources and checks

Open the tool