|
| |||
| Editor which will justify plain text. OK, stupid question time. I would like to "justify" some plain text so that the left and right edges of paragraphs are all nice and neat. Normal word processors appear to achieve this by shifting words at pixel level, but then it has to be saved as a formatted document. For plain text, I'm looking for something which will automatically insert space characters to pad the words out, so the result can be saved as ".txt". Ideally it should be possible to do dynamically (or triggered manually), so frequent editing can allow tidying up of the text as often as required. Is there an editor which will do this under linux? My text can be up to hundreds of lines long. Sorry if this has been discussed before ad infinitum (or nauseum). Some editors will happily word-wrap on the fly, e.g. this Pan newsreader ("Rewrap" button), but haven't found one with the magic justify. Anyway, recently new to linux. Currently running SimplyMEPIS and enjoying the "breath of fresh air" it is compared to MS. Regards to all, Ian (Clydebank, Scotland). |
| |||
| Re: Editor which will justify plain text. On 2007-06-08, Ian Smith wrote: > OK, stupid question time. I would like to "justify" some plain text so > that the left and right edges of paragraphs are all nice and neat. Normal > word processors appear to achieve this by shifting words at pixel level, > but then it has to be saved as a formatted document. For plain text, I'm > looking for something which will automatically insert space characters to > pad the words out, so the result can be saved as ".txt". I'm sure there is one (if there isn't that capability in the basic emacs, for example, I'm sure someone has written a module to do it). However, I strongly recommend against doing that; it makes text much harder to read in a monospaced font. If you are not using a monospaced font, the result will not be justified. -- Chris F.A. Johnson, author | <http://cfaj.freeshell.org> Shell Scripting Recipes: | My code in this post, if any, A Problem-Solution Approach | is released under the 2005, Apress | GNU General Public Licence |
| |||
| Re: Editor which will justify plain text. Ian Smith said: > OK, stupid question time. I would like to "justify" some plain text so > that the left and right edges of paragraphs are all nice and neat. Normal > word processors appear to achieve this by shifting words at pixel level, > but then it has to be saved as a formatted document. For plain text, I'm > looking for something which will automatically insert space characters to > pad the words out, so the result can be saved as ".txt". <snip> vi, vim , cream (which easier on a noob) all do so. I L/R justified your text above using cream. For vi, vim there's more here http://tinyurl.com/kvp7n Quote:
sk8r-365 http://goodbye-microsoft.com/ |
| |||
| Re: Editor which will justify plain text. After takin' a swig o' grog, sk8r-365 belched out this bit o' wisdom: > Ian Smith said: >> OK, stupid question time. I would like to "justify" some plain text so >> that the left and right edges of paragraphs are all nice and neat. Normal >> word processors appear to achieve this by shifting words at pixel level, >> but then it has to be saved as a formatted document. For plain text, I'm >> looking for something which will automatically insert space characters to >> pad the words out, so the result can be saved as ".txt". > <snip> > > vi, vim , cream (which easier on a noob) all do so. > I L/R justified your text above using cream. > > For vi, vim there's more here http://tinyurl.com/kvp7n > > # Example: ":'t,'b !nroff" Thanks! Also for hex editing in vim: :%!xxd and :%!xxd -r Pipes rock! -- Tux rox! |
| |||
| Re: Editor which will justify plain text. Jun 9: Responding to Linonut... [...] > Pipes rock! Mine don't. They just stay right where I type them. Is there a flag for this "rock" function? Or is the "!" there to cancel any "rocking"? -- Yellow Submarine? Nah. Its a TeaPot! www.tinyurl.com/382gmp |
| |||
| Re: Editor which will justify plain text. On Fri, 08 Jun 2007 16:47:09 -0400, Chris F.A. Johnson wrote: > On 2007-06-08, Ian Smith wrote: >> OK, stupid question time. I would like to "justify" some plain text so >> that the left and right edges of paragraphs are all nice and neat. >> Normal word processors appear to achieve this by shifting words at >> pixel level, but then it has to be saved as a formatted document. For >> plain text, I'm looking for something which will automatically insert >> space characters to pad the words out, so the result can be saved as >> ".txt". > > I'm sure there is one (if there isn't that capability in the basic > emacs, for example, I'm sure someone has written a module to do it). > > However, I strongly recommend against doing that; it makes text much > harder to read in a monospaced font. If you are not using a > monospaced font, the result will not be justified. Thank you for that advice. Perhaps I will leave the text as is, but if going down the justification route, would check readability with friends anyway. |
| |||
| Re: Editor which will justify plain text. On Fri, 08 Jun 2007 17:39:10 -0600, sk8r-365 wrote: > Ian Smith said: >> OK, stupid question time. I would like to "justify" some plain >> text so that the left and right edges of paragraphs are all nice >> and >> neat. Normal word processors appear to achieve this by shifting >> words at pixel level, but then it has to be saved as a formatted >> document. For plain text, I'm looking for something which will >> automatically insert space characters to >> pad the words out, so the result can be saved as >> ".txt". > <snip> > > vi, vim , cream (which easier on a noob) all do so. I L/R justified your > text above using cream. > > For vi, vim there's more here http://tinyurl.com/kvp7n > > Quote:
Thank you for all that information. I have used vim before to edit some startup options in Knoppix (USB flash install), but didn't realise it has this justify function. Will give it a try anyway. |
| |||
| Re: Editor which will justify plain text. Ian Smith said: > > Thank you for all that information. I have used vim before to edit some > startup options in Knoppix (USB flash install), but didn't realise it has > this justify function. Will give it a try anyway. Good. You're welcome. BTW, cream is super easy and has spell check built-in. -- sk8r-365 http://goodbye-microsoft.com/ |
| |||
| Re: Editor which will justify plain text. Ian Smith wrote: > On Fri, 08 Jun 2007 17:39:10 -0600, sk8r-365 wrote: .... >>For vi, vim there's more here http://tinyurl.com/kvp7n >> >>[quote] >> >>Formatting: >> >> # Mark a block of text at the top line and bottom line of the >> block. i.e. "mt" and "mb" on two separate lines. >> >> # Example: ":'t,'b !nroff" .... > Thank you for all that information. I have used vim before to edit some > startup options in Knoppix (USB flash install), but didn't realise it has > this justify function. Will give it a try anyway. Technically vim doesn't! What's you've actually done is supplied the marked lines as the input to another (*nix) command and then replaced those lines with the output of that command. This is what the shriek (!) command does. If you use a double shriek (!!) when editing a file, vi[m] takes the current input line and then supplies it as input (stdin) to whatever command you then type (visible on the status line at the bottom of the screen) and then uses the output (stdout) from this command to replace that input line. Using the colon (:) (ex(?) command prefix) you can specify a range of lines to be specified for the shriek (!) command, as in :<start>,<finish>!<*nix_command> |
| |||
| Re: Editor which will justify plain text. Robert Newson said: > > Technically vim doesn't! > > What's you've actually done is supplied the marked lines as the input to > another (*nix) command and then replaced those lines with the output of that > command. > <snip> You're right, Robert. I was pointing him to a page, which I included some text for the purpose of showing OP where it is there, to get him started. Thank you for expanding on it. -- sk8r-365 http://goodbye-microsoft.com/ |
| |||
| Re: Editor which will justify plain text. Ian Smith <ianinhoose@btinternet.naespam.com> writes: Although you seem to be happy doing it in Vim, and that's fine, be aware that Emacs also will justify. The command is [alt]-x set-justification-full. Just for the record. --Rod ______________________ Author of "Linux for Non-Geeks--Clear-eyed Answers for Practical Consumers" and "Boring Stories from Uncle Rod." To reply by e-mail take the second "o" out of the e-mail address. |
| |||
| Re: Editor which will justify plain text. roodwriter@ureach.com writes: > Although you seem to be happy doing it in Vim, and that's fine, be aware > that Emacs also will justify. The command is [alt]-x > set-justification-full. Or, to justify the current paragraph (i.e. holding point) use C-u M-q. -- HASM |
| |||
| Re: Editor which will justify plain text. On 2007-06-08 22:04, Ian Smith wrote: >OK, stupid question time. I would like to "justify" some >plain text so that the left and right edges of paragraphs >are all nice and neat. Normal word processors appear to >achieve this by shifting words at pixel level, but then it >has to be saved as a formatted document. For plain text, I'm >looking for something which will automatically insert space >characters to pad the words out, so the result can be saved >as ".txt". >Ideally it should be possible to do dynamically (or trig- >gered manually), so frequent editing can allow tidying up of >the text as often as required. Is there an editor which >will do this under linux? My text can be up to hundreds of >lines long. Sorry if this has been discussed before ad >infinitum (or nauseum). Some editors will happily word-wrap >on the fly, e.g. this Pan newsreader ("Rewrap" button), but >haven't found one with the magic justify. >Anyway, recently new to linux. Currently running SimplyMEPIS >and enjoying the "breath of fresh air" it is compared to MS. >Regards to all, >Ian (Clydebank, Scotland). I use the editor vi , or vim when using linux. Ok, the editor don't have all features, but that is the unix way, since no program can have ALL features anyway. The command :%!nroff will send the contents to nroff, that do the work, and send it back to the editor, just as you can use any other software that can filter text. If you later learn nroff, you can add commands to your text, so you get the format yop like. /birre |
| |||
| Re: Editor which will justify plain text. On Fri, 08 Jun 2007 21:04:41 +0100, Ian Smith wrote: > OK, stupid question time. I would like to "justify" some plain text so > that the left and right edges of paragraphs are all nice and neat. Normal > word processors appear to achieve this by shifting words at pixel level, > but then it has to be saved as a formatted document. For plain text, I'm > looking for something which will automatically insert space characters to > pad the words out, so the result can be saved as ".txt". > > Ideally it should be possible to do dynamically (or triggered manually), > so frequent editing can allow tidying up of the text as often as required. > Is there an editor which will do this under linux? My text can be up to > hundreds of lines long. Sorry if this has been discussed before ad > infinitum (or nauseum). Some editors will happily word-wrap on the fly, > e.g. this Pan newsreader ("Rewrap" button), but haven't found one with the > magic justify. > > Anyway, recently new to linux. Currently running SimplyMEPIS and enjoying > the "breath of fresh air" it is compared to MS. > > Regards to all, > > Ian (Clydebank, Scotland). Many thanks to all who responded. I'm trying out "Cream" at the moment. Seems quite a user-friendly package. Cheers, Ian |
| Bookmarks |
| Thread Tools | |
| |
| | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Displaying PDF as plain/text | Bach Le | Internet Explorer | 5 | 11-21-2007 08:40 AM |
| Signatures in html, plain text? | nikj_dk | Microsoft Office | 0 | 10-31-2007 04:50 AM |
| How do I justify text from a clipping dropped into OneNote? | C. A. Gueits | Microsoft OneNote | 1 | 09-23-2007 06:30 AM |
| Re: justify text in One Note | DaComboMan | Microsoft OneNote | 1 | 09-09-2007 12:00 PM |
| How do you get text to justify right? | DP | Microsoft OneNote | 3 | 01-07-2007 12:17 AM |
| New To Technology Questions? | Do You Need Help with Your Computer or Device? | Do You Need Help with this site? |