Comment by ๐Ÿ‘พ fab

=> Re: "Is there a tool that can take a text file, wrap it at a..." | In: u/jsreed5

Yes there is "par" (in the AUR):

$ cat file | par jw60

Also works in vim:

:%!par jw

=> ๐Ÿ‘พ fab

2024-07-23 ยท 6 months ago

3 Later Comments โ†“

=> ๐Ÿ‘พ fab ยท 2024-07-23 at 08:38:

Forgot to mention that to my knowledge it doesn't hyphenate words. It just adds spaces to justify.

=> ๐Ÿš€ jsreed5 [OP] ยท 2024-07-23 at 12:37:

@fab Thanks, I'll give that a try!

=> ๐ŸŽฒ dozens ยท Jul 25 at 23:59:

groff! i used it to format my .project file which you can see at finger dozens@tilde.town. if you just have paragraphs, you should be able to cat file.txt | nroff -ms -Tascii

Original Post

=> ๐Ÿš€ jsreed5

Is there a tool that can take a text file, wrap it at a given maximum width, add spaces to justify the text, and hyphenate words if it has to add too many spaces, ร  la LaTeX? I'm sure there are tools that will wrap and even justify, but I'm not sure about hyphenation.

=> ๐Ÿ’ฌ 4 comments ยท 2024-07-23 ยท 6 months ago

Proxy Information
Original URL
gemini://bbs.geminispace.org/u/fab/18792
Status Code
Success (20)
Meta
text/gemini; charset=utf-8
Capsule Response Time
74.569293 milliseconds
Gemini-to-HTML Time
0.479823 milliseconds

This content has been proxied by September (ba2dc).