A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Word » Formatting Long Documents
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Setting up Tabs and Indentation to write programs in Word.



 
 
Thread Tools Display Modes
  #1  
Old December 10th, 2005, 03:33 AM posted to microsoft.public.word.formatting.longdocs
external usenet poster
 
Posts: n/a
Default Setting up Tabs and Indentation to write programs in Word.

Hi,

Is it possible to set up a style that is convenient for writing programs in
MS Word ? In particular, I have two requirements not satisfied by the "Plain
Text" style:
1) I want the tab key to correspond to 4 spaces
2) When say enter from a given line, the cursor should position itself where
the previous line started, with spaces upto that point. To understand my
context, the code I want to type out is going to look like this:
FunctionName() {
Line1();
Line2();
}

Any help or pointers most appreciated.

Thanks,
Anand.
  #2  
Old December 10th, 2005, 09:10 AM posted to microsoft.public.word.formatting.longdocs
external usenet poster
 
Posts: n/a
Default Setting up Tabs and Indentation to write programs in Word.

Create a style in which you have the paragraph formatted with tabs and
indents that meet your requirements. You will also need to define the font
used by the style to a non-proportional spaced font (such as Courier New)

--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP

"Anand" aanandgAThotmail.nospam.com wrote in message
...
Hi,

Is it possible to set up a style that is convenient for writing programs
in
MS Word ? In particular, I have two requirements not satisfied by the
"Plain
Text" style:
1) I want the tab key to correspond to 4 spaces
2) When say enter from a given line, the cursor should position itself
where
the previous line started, with spaces upto that point. To understand my
context, the code I want to type out is going to look like this:
FunctionName() {
Line1();
Line2();
}

Any help or pointers most appreciated.

Thanks,
Anand.



  #3  
Old December 12th, 2005, 07:50 PM posted to microsoft.public.word.formatting.longdocs
external usenet poster
 
Posts: n/a
Default Setting up Tabs and Indentation to write programs in Word.

Hi Doug,

Actually my question was about how to setup such a Style - the options under
"Modify Style" dont let me set up the two parameters I have indicated below.
For example, I cannot seem to replace tabs with spaces. And when I hit
"enter" I would like for the cursor to not go to the left margin as it does
now (say in Plain Text).

Thanks,
Anand.

"Doug Robbins - Word MVP" wrote:

Create a style in which you have the paragraph formatted with tabs and
indents that meet your requirements. You will also need to define the font
used by the style to a non-proportional spaced font (such as Courier New)

--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP

"Anand" aanandgAThotmail.nospam.com wrote in message
...
Hi,

Is it possible to set up a style that is convenient for writing programs
in
MS Word ? In particular, I have two requirements not satisfied by the
"Plain
Text" style:
1) I want the tab key to correspond to 4 spaces
2) When say enter from a given line, the cursor should position itself
where
the previous line started, with spaces upto that point. To understand my
context, the code I want to type out is going to look like this:
FunctionName() {
Line1();
Line2();
}

Any help or pointers most appreciated.

Thanks,
Anand.




  #4  
Old December 12th, 2005, 08:51 PM posted to microsoft.public.word.formatting.longdocs
external usenet poster
 
Posts: n/a
Default Setting up Tabs and Indentation to write programs in Word.

I think Doug's point is that if you use a monospaced font, you can set a tab
stop equivalent to a certain number of spaces. For example, 12 pt Courier
New is equivalent to 10 pitch, so half an inch equals five spaces. But
instead of using spaces OR tabs to indent the text, use an indent or hanging
indent. For the example you gave

FunctionName() {
Line1();
Line2();

you an use a style with a hanging indent at the position where you want
Line1 and Line2. Instead of pressing Enter, press Shift+Enter to insert a
line break.

--
Suzanne S. Barnhill
Microsoft MVP (Word)
Words into Type
Fairhope, Alabama USA
Word MVP FAQ site: http://word.mvps.org
Email cannot be acknowledged; please post all follow-ups to the newsgroup so
all may benefit.

"Anand" aanandgAThotmail.nospam.com wrote in message
...
Hi Doug,

Actually my question was about how to setup such a Style - the options

under
"Modify Style" dont let me set up the two parameters I have indicated

below.
For example, I cannot seem to replace tabs with spaces. And when I hit
"enter" I would like for the cursor to not go to the left margin as it

does
now (say in Plain Text).

Thanks,
Anand.

"Doug Robbins - Word MVP" wrote:

Create a style in which you have the paragraph formatted with tabs and
indents that meet your requirements. You will also need to define the

font
used by the style to a non-proportional spaced font (such as Courier

New)

--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP

"Anand" aanandgAThotmail.nospam.com wrote in message
...
Hi,

Is it possible to set up a style that is convenient for writing

programs
in
MS Word ? In particular, I have two requirements not satisfied by the
"Plain
Text" style:
1) I want the tab key to correspond to 4 spaces
2) When say enter from a given line, the cursor should position itself
where
the previous line started, with spaces upto that point. To understand

my
context, the code I want to type out is going to look like this:
FunctionName() {
Line1();
Line2();
}

Any help or pointers most appreciated.

Thanks,
Anand.





 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 05:02 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.