* Re: type setting Ada code in MS Word
[not found] <01bd1fca$5c249c80$24326489@Westley-PC.calspan.com>
@ 1998-01-15 0:00 ` Nick Roberts
1998-01-16 0:00 ` Terry J. Westley
1998-01-15 0:00 ` TConiam
1 sibling, 1 reply; 6+ messages in thread
From: Nick Roberts @ 1998-01-15 0:00 UTC (permalink / raw)
The simple trick I use to is to define a named style, with the requisite
font (usu Courier New), paragraph spacing (usu 10), indentation, etc. I
also set the language to 'none' to switch off spell checking. I also
define a 'spacing' paragraph style, with a small font size, to go just
before and after program code, to get nice spacing. I then simply set
program code paragraphs to the above named style.
Bold is easy to get: Ctrl+B to switch it on/off when typing; highlight text
then Ctrl+B to do it retroactively.
HTIU
--
Nick Roberts
Croydon, UK
Proprietor, ThoughtWing Software; Independent Software Development
Consultant
* Nick.Roberts@dial.pipex.com * Voicemail & Fax +44 181-405 1124 *
*** Eats three shredded spams every morning for breakfast ***
Terry J. Westley <westley@calspan.com> wrote in article
<01bd1fca$5c249c80$24326489@Westley-PC.calspan.com>...
> You've probably noticed the common use of Courier font
> for Ada code embedded in written documents. In addition,
> Ada keywords are often bold-faced.
>
> Does anyone know of an MS Word macro (or VB program) that
> will do this? Sort of like vgrind in TeX.
>
> --
> Terry J. Westley, Principal Engineer
> Calspan SRL Corp, P.O. Box 400, Buffalo, NY 14225
> westley@calspan.com http://www.calspansrl.com/
>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: type setting Ada code in MS Word
[not found] <01bd1fca$5c249c80$24326489@Westley-PC.calspan.com>
1998-01-15 0:00 ` type setting Ada code in MS Word Nick Roberts
@ 1998-01-15 0:00 ` TConiam
[not found] ` <01bd2288$9de0e460$24326489@Westley-PC.calspan.com>
1 sibling, 1 reply; 6+ messages in thread
From: TConiam @ 1998-01-15 0:00 UTC (permalink / raw)
>You've probably noticed the common use of Courier font
>for Ada code embedded in written documents. In addition,
>Ada keywords are often bold-faced.
>
>Does anyone know of an MS Word macro (or VB program) that
>will do this? Sort of like vgrind in TeX.
I just set up a paragraph style called "code" that uses courier new, etc. Then
I apply it to the code text in the document. Works reasonbly well.
Of course if your looking to bold-face keywords you could write a macro or VBA
module to do a search and replace based on style and affecting only text with
the "code" style.
In that case I would suggest also creating character styles for keywords,
comments, etc. that only affect the font and style (bold, italic, etc.)
I may just try this myself...hmm
-------------------------------------------------------------------------
Todd Coniam tconiam@aol.com
Ada 95 - The international standard in OO languages
-------------------------------------------------------------------------
Check: http://lglwww.epfl.ch/Ada/ Free compiler: http://www.gnat.com/
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: type setting Ada code in MS Word
1998-01-15 0:00 ` type setting Ada code in MS Word Nick Roberts
@ 1998-01-16 0:00 ` Terry J. Westley
0 siblings, 0 replies; 6+ messages in thread
From: Terry J. Westley @ 1998-01-16 0:00 UTC (permalink / raw)
Nick Roberts <Nick.Roberts@dial.pipex.com> wrote in article
<01bd2200$4005aca0$95fc82c1@xhv46.dial.pipex.com>...
> The simple trick I use to is to define a named style, with the requisite
> font (usu Courier New), paragraph spacing (usu 10), indentation, etc. I
> also set the language to 'none' to switch off spell checking. I also
> define a 'spacing' paragraph style, with a small font size, to go just
> before and after program code, to get nice spacing. I then simply set
> program code paragraphs to the above named style.
Agreed. This is the easy part.
> Bold is easy to get: Ctrl+B to switch it on/off when typing; highlight
text
> then Ctrl+B to do it retroactively.
This is the hard part. I don't have the patience (or accuracy) to
select several hundred keywords in a hundred lines of code and press
Ctrl+B for each one. That's what I'd like a macro or VB script to
do for me.
--
Terry J. Westley, Principal Engineer
Calspan SRL Corp, P.O. Box 400, Buffalo, NY 14225
westley@calspan.com http://www.calspan.com/
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: type setting Ada code in MS Word
[not found] ` <01bd2288$9de0e460$24326489@Westley-PC.calspan.com>
@ 1998-01-21 0:00 ` Mats Weber
1998-01-23 0:00 ` TConiam
1998-01-26 0:00 ` Georg Bauhaus
0 siblings, 2 replies; 6+ messages in thread
From: Mats Weber @ 1998-01-21 0:00 UTC (permalink / raw)
> Writing this macro or VB script is what I don't know how to do and
> was asking if anyone already had one. If you do write it, please
> share it with us.
I have an Ada program that translates Ada code into RTF and puts reserved
words in bold and comments in italic. The RTF can then be imported into word.
I can post it if there is interest. Mail me.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: type setting Ada code in MS Word
1998-01-21 0:00 ` Mats Weber
@ 1998-01-23 0:00 ` TConiam
1998-01-26 0:00 ` Georg Bauhaus
1 sibling, 0 replies; 6+ messages in thread
From: TConiam @ 1998-01-23 0:00 UTC (permalink / raw)
>I have an Ada program that translates Ada code into RTF and puts reserved
>words in bold and comments in italic. The RTF can then be imported into word.
>
>I can post it if there is interest. Mail me.
I'm interested. Would you reply with/post the source?
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: type setting Ada code in MS Word
1998-01-21 0:00 ` Mats Weber
1998-01-23 0:00 ` TConiam
@ 1998-01-26 0:00 ` Georg Bauhaus
1 sibling, 0 replies; 6+ messages in thread
From: Georg Bauhaus @ 1998-01-26 0:00 UTC (permalink / raw)
Mats Weber (Mats.Weber@elca-matrix.ch) wrote:
: > Writing this macro or VB script is what I don't know how to do and
: > was asking if anyone already had one. If you do write it, please
: > share it with us.
Maybe you will like these wordBasic Macros:
ftp://some.CTAN.mirror/tex-archive/web/wordweb/
- georg
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~1998-01-26 0:00 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <01bd1fca$5c249c80$24326489@Westley-PC.calspan.com>
1998-01-15 0:00 ` type setting Ada code in MS Word Nick Roberts
1998-01-16 0:00 ` Terry J. Westley
1998-01-15 0:00 ` TConiam
[not found] ` <01bd2288$9de0e460$24326489@Westley-PC.calspan.com>
1998-01-21 0:00 ` Mats Weber
1998-01-23 0:00 ` TConiam
1998-01-26 0:00 ` Georg Bauhaus
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox