Tool to Auto-Format text and paragraphs?
April 29, 2010 6:29 AM   Subscribe

I need a tool to auto-format text according to my rules, such as 2 spaces between every sentence.

The tool can be software or web-based. Any ideas?
posted by dvrcthewrld to Computers & Internet (8 answers total)
 
The tool will be a macro, most likely. What you need to think about is how to help the macro work - i.e. how you want it to ensure that it puts in two spaces after every sentence.

Because the macro will be rule based, it will only be as good as the rules you create for it to work under. So the more consistently you work and the more consistently your documetns are formatted etc, the better it will work.
posted by MuffinMan at 6:38 AM on April 29, 2010


Maybe par could do what you want?
posted by DarkForest at 6:46 AM on April 29, 2010


Is this for Word, plain text, web ... ? Regular expressions can do it, but what's the platform and intent?

Proper typesetting should put in some additional whitespace after a period. Two spaces is a hangover from typewriters. It gets ignored on the web.
posted by scruss at 6:49 AM on April 29, 2010


fmt, available on any unix type machine, can reformat text in various simple ways including the two spaces between sentences.

MuffinMan assumes you're using a word processor, I'm assuming you have a unix type machine and are working with plain text - you really need to tell us more about the situation if you expect a relevant answer.

Can you follow up and say what OSes you have available, what format your text is in, and what specifically your formatting rules are? Otherwise there's going to be a lot of guessing going on.
posted by fritley at 6:52 AM on April 29, 2010


This is the sort of thing word processor macros were made for. However, as MuffinMan implies, it will only work as well as the logic you use to program it. There's some VBScript here that you might be able to use (I haven't tried it though).

Incientally, there was another AskMe a while back about undoing the double-space thing.
posted by le morte de bea arthur at 6:53 AM on April 29, 2010


First of all, I'm using a windows machine, and I'm sorry for leaving that out; I know better. As it turns out, though, Word 2007 is actually capable of being set up to do what I've asked about. It is mentioned in the last post linked to, so I'll mark that as best answer.
Thank you everyone.
posted by dvrcthewrld at 7:05 AM on April 29, 2010


I'm not sure exactly what you're using this for, but you may want to look into LaTeX. It's a markup language that defines formatting rules.

Specifically, Lyx. It is a document processor, which operates a little differently than Word. You type, and it automatically formats the document based on templates. There is a little bit of a learning curve to making templates, but there are many available. It produces documents that look really good. As in, professionally typeset.
posted by Adamsmasher at 7:41 AM on April 29, 2010


if it is as simple as 2 spaces after sentences end. just do a find and replace find ". " and replace with ".  " (without quotation marks)
posted by notnathan at 3:10 PM on April 29, 2010


« Older Tennis Targets   |   Multiple Tenants on a Lease Newer »
This thread is closed to new comments.