Page 1 of 1

Customizing/changing Indent Styles

Posted: Fri Feb 15, 2002 1:15 am
by Ron Gee
How do I change or customize the block indent style for a document class?

For example, C programmers generally follow one of the following indenting styles:

/* style #1 */
if (a==1)
{
printf("Hello, world.");
}

/* style #2 */
if (a==1)
{
printf("Hello, world.");
}

/* style #3 */
if (a==1) {
printf("Hello, world.");
}

/* style #4 */
if (a==1) {
printf("Hello, world.");
}

The default behaviour of TextPad seems to be styles 1 and 3, but I prefer #2. Is there a way of changing the automatic indenting behavior?

Re: Customizing/changing Indent Styles

Posted: Fri Feb 15, 2002 1:20 am
by Ron Gee
Note:

For some reason, the leading spaces got stripped out of my code examples above when my message got posted. In style #1, the printf statement is indented 4 spaces. In style #2, the brackets and the printf statement are all indented 4 spaces. In style #3, only the printf statement is indented 4 spaces, and in style #4, the printf statement and the last bracket are indented 4 spaces.

Thanks.

Ron