Indenting The First Line In A Paragraph

General questions about using TextPad

Moderators: AmigoJack, bbadmin, helios, Bob Hansen, MudGuard

Post Reply
Grizzly
Posts: 14
Joined: Thu Aug 14, 2003 9:23 pm

Indenting The First Line In A Paragraph

Post by Grizzly »

Can anyone tell me how to indent only the first line in a document? What settings under "Preferences" must be set for this to happen. I've read past forum suggestions and they don't work. Invariably, the suggested procedure indents the entire paragraph or does nothing at all.
User avatar
Bob Hansen
Posts: 1516
Joined: Sun Mar 02, 2003 8:15 pm
Location: Salem, NH
Contact:

Post by Bob Hansen »

:idea: Is CTRL-HOME, TAB too much work? Could make a macro to do that, but typing CTRL-HOME, TAB is probably quicker than calling up the macro to run. Not much different if macro is a hot key.

Am I missing something. :?

Do you mean to indent first line in each paragraph vs. each document? :?:
Grizzly
Posts: 14
Joined: Thu Aug 14, 2003 9:23 pm

Indenting The First Line In A Paragraph

Post by Grizzly »

Nope, you're not missing anything -- I am! I need to proof what I write much better. I'm really concerned with formatting every paragraph in a given document. In other words, I want the first line in every paragraph to be indented. Sorry for my poor explanation. :oops:
User avatar
Bob Hansen
Posts: 1516
Joined: Sun Mar 02, 2003 8:15 pm
Location: Salem, NH
Contact:

Post by Bob Hansen »

Hello Grizzly............

You wrote:
I want the first line in every paragraph to be indented.
:idea: Try this:

Search: \(^.+\)
Replace: \t\1
=============================

Explanation of Search Regex String:
\( = start of first tagged expression
^ = start at the beginning of the line
. = any character, number, space, etc.
+ = one or more of previous character (.)
\) = end of first tagged expression
============================

Explanation of Replace Regex String:
\t = tab spacing
\1 = first tagged expression
============================

Common English explanation:
Locate any line that is not blank and put a TAB in front of the existing line.
===========================

Hope this helps...................good luck, :D
Bob
Grizzly
Posts: 14
Joined: Thu Aug 14, 2003 9:23 pm

Indenting The First Line In A Paragraph

Post by Grizzly »

Thanks for your suggestion, but that search routine indents every line in the entire document to be indented. I'm trying to find a method of formatting paragraphs so that the first line, and only the first line, in each paragraph is indented. :(
Grizzly
Posts: 14
Joined: Thu Aug 14, 2003 9:23 pm

Indenting The First Line In A Paragraph

Post by Grizzly »

Darn. Please ignore the poor grammer.
Grizzly
Posts: 14
Joined: Thu Aug 14, 2003 9:23 pm

Indenting The First Line In A Paragraph

Post by Grizzly »

My apologies. After more testing, Bob, that search string indents only the first line on some text documents but not on others. I'm trying to determine what setting makes the difference. :?:
Grizzly
Posts: 14
Joined: Thu Aug 14, 2003 9:23 pm

Indenting The First Line In A Paragraph

Post by Grizzly »

And again, I'm talking about the first line in each paragraph, not the first line in the document. :oops:
crassius
Posts: 24
Joined: Fri Jul 18, 2003 7:08 pm

indenting paragraphs

Post by crassius »

Sounds like a bit of confusion over what a paragraph is. The two most common forms of text file would be doable as follows:

If the file uses a long line of text followed by one or two hard returns to represent a paragraph (allowing word-wrap to break lines to fit the screen), then search & replace the return(s) with the same return(s) plus a tab char.

If the file uses screen-sized lines of text *each* followed by one hard return, then two hard returns to represent a paragraph, then search & replace the pair of returns with the same returns plus a tab char.

Note: there are other, less common forms of paragraphs also.
Grizzly
Posts: 14
Joined: Thu Aug 14, 2003 9:23 pm

Indenting The First Line In A Paragraph

Post by Grizzly »

Thanks for your suggestion, Crassius. I'm dealing with documents that are word-wrapped and without hard breaks at the end of each sentence. But searching on the string "\\n\([^\t]\)" and replacing with "\n\t\1" is the fix suggested back in May by Mudguard on the same question I have today. Unfortunately, that doesnt do the job. Regretefully, it indents entire paragraphs instead of just the first line. And I don't know why...it seems so logical to do exactly as you suggested.

I have a feeling I have something set in "Preferences" that is preventing an easy fix, but I don't know what it could be. I've unchecked "Maintain Indent" and "Automatically Indent..." in my permanent settings (text and default documents) as well as making sure the document I'm viewing is set that way. I'm about to give up and import everything in MS Word and be done with it. :(
User avatar
talleyrand
Posts: 624
Joined: Mon Jul 21, 2003 6:56 pm
Location: Kansas City, MO, USA
Contact:

Post by talleyrand »

It's probably not what you want but if you are looking for a plain typesetting package, you could go with LaTeX. A windows implementation exists at miktex.org. I use it extensively for my documentation and there are a few clip books and a syntax file for TeX on the TP site. It does word wrap and quite a few nice things for you like creates PDFs. Feel free to PM me if you want some example stuff or search the web, lots of people use it.


\documentclass[12pt]{article}
\usepackage{times}

%This is a comment

%Plain pagestyle does no numbering IIRC
\pagestyle{plain}

%This sets your margins out beyond the standard
%By default, margins are set for what are easily digestable lines by your eyes
\setlength{\topmargin}{-0.5in}
\setlength{\oddsidemargin}{-0.5in}
\setlength{\textwidth}{7in}
\setlength{\textheight}{10in}

\begin{document}
%put your stuff here


\end{document}
crassius
Posts: 24
Joined: Fri Jul 18, 2003 7:08 pm

Note to Grizzly

Post by crassius »

I tried it and you have it right - it just doesn't look that way.

While word-wrap is turned on, it looks (on the screen) like adding the tab char to the first line also adds it to all lines, but if you save the file there is just the one tab char at the start of the paragraph. I think the bizarre on-screen view is caused by textpad's feature of starting a new line where the last line began. For word-wrapped lines that don't *really* start there it just looks that way but is saved properly.

hope this helps
Post Reply