Results 1 to 12 of 12
  1. #1
    New Lounger
    Join Date
    Jan 2007
    Location
    Denmark
    Posts
    22
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Typographical spaces (Word 2003)

    I would like to insert in my Word document typographical spaces, such as a thin space and a hair space. Some of these only exist as Unicode characters, and donít exist in all fonts.

    Iím using Times New Roman. I can insert the characters either by typing ď200AĒ and then typing Alt + X, or by typing Alt + 8202 on the numbers keypad (both examples for the hair space). The space is entered, but it is in Arial Unicode MS, a font that, for various reasons, increases the line spacing for the line that itís in.

    Is there a way to enter these typographical spaces in text in Times New Roman? Or must I add them to the font itself? (Any suggestions on that one?)

    My goal is to write macros that find hyphens in number ranges and replace them with an n-dash with hair spaces on either side of the dash, or to find mathematical operators in formulas and replace the regular spaces (or no spaces) on either side with thin spaces.

    Is there an easy way? Or do I need to come up with a macro that determines the current point size and inserts a space that is one-fifth the point size, as for a thin space? That would be way out of my league. Here are some of the spaces Iíd like to be able to insert.

    SPACE, FOUR-PER-EM 2005
    SPACE, GRAPHIC FOR 2423
    SPACE, HAIR 200A
    SPACE, HILBERT 210C
    SPACE, IDEOGRAPHIC 3000
    SPACE, IDEOGRAPHIC HALF FILL 303F
    SPACE, MEDIUM MATHEMATICAL 205F
    SPACE, MID 2005
    SPACE, PUNCTUATION 2008
    SPACE, SIX-PER-EM 2006
    SPACE, THICK 2004
    SPACE, THIN 2009
    SPACE, THREE-PER-EM 2004
    SPACE, ZERO WIDTH 200B
    SPACE, ZERO WIDTH NO-BREAK FEFF

    Thanks for your help.

    Cheers, Bill

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Typographical spaces (Word 2003)

    Times New Roman doesn't have most of these characters, as you can check for yourself in the Insert | Symbol dialog. Why don't you use Arial Unicode MS throughout?

    Or you can use the ADVANCE field to insert a space of any width. The following instruction will insert a 1 point wide space at the current selection/insertion point:
    <code>
    ActiveDocument.Fields.Add Range:=Selection.Range, Type:=wdFieldAdvance, _
    Text:="r 1", PreserveFormatting:=False
    </code>
    You can, of course, use a Range object instead of Selection.Range.

  3. #3
    New Lounger
    Join Date
    Jan 2007
    Location
    Denmark
    Posts
    22
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Typographical spaces (Word 2003)

    Wow, Hans!

    So simple.

    The ADVANCE field seems very straightforward. Now I'll do a little studying and see how I can use a Range object. (I'm not that far along in my VBA.)

    Thanks, thanks, thanks,

    Bill

  4. #4
    2 Star Lounger
    Join Date
    Mar 2001
    Location
    California, USA
    Posts
    136
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Typographical spaces (Word 2003)

    Addressing the area of your post where Arial spaces cause different line spacing. You can specify an exact line spacing for your paragraph regardless of font or font size. This is Format...Paragraph....
    This might be a possibility for you. J. Till
    Attached Images Attached Images

  5. #5
    New Lounger
    Join Date
    Jan 2007
    Location
    Denmark
    Posts
    22
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Typographical spaces (Word 2003)

    Hey J. Till!

    Thanks for your answer.

    Unfortunately, the issue with Arial Unicode MS, and MS Mincho for that matter, is inherent in the font and canít be controlled by the paragraph settings. (I tried that first.) This is what I learned about Arial Unicode MS from Wikipedia:

    ďHorizontal text may also appear to have more inter-line spacing in Arial Unicode MS. This is due to larger bounding boxes (Arial Unicode MS needs more room for some of its extended glyphs) and the limitations of renderers, not changes in the glyph shapes."

    I also tried marking the inserted character and changing it to Times New Roman, but of course that doesnít work because the glyph doesnít exist in TNR.

    Another solution I discovered is to insert an em space, which TNR does have, then resize it. (An em dash is roughly equal in width to the size of the font. So, an em dash in 12 point TNR is about 12 points wide.) Figuring that a hair space is about one-eighth to one-ten the width of an em dash, I resize the em dash to, say, 1 point. Word font sizing allows half-point steps, i.e. 1 point, 1.5 point, etc.

    Iíve created auto text entries for 1, 1.5, 2, and 2.5 point spaces and attached keyboard shortcuts.

    So thatís as far as Iíve come with this.

    To answer Hansís earlier question why I donít just use Arial Unicode: unfortunately, we are creating long scientific reports that require a maximum ease of reading, which pretty much dictates a serif font. I wish it were that easy!

    Cheers, Bill

  6. #6
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Typographical spaces (Word 2003)

    If you want to create long scientific documents, consider using a form of TeX such as LaTeX Ė A document preparation system. It takes some time to get used to it, but it is extremely powerful and flexible.

  7. #7
    WS Lounge VIP
    Join Date
    Mar 2006
    Location
    Maryland, USA
    Posts
    690
    Thanks
    17
    Thanked 66 Times in 56 Posts

    Re: Typographical spaces (Word 2003)

    (Edited by HansV to make URL clickable - see <!help=19>Help 19<!/help>)

    You might want to look into Cambria Math. It's new for Office 2007 but also comes in Microsoft's free compatibility pack (or some such name) for use in older versions of Office. Cambria Math seems to have most of the spacing characters you want.

    BTW, the equation feature in Word 2007 is brand new and based on TeX. I wouldn't necessarily change to 2007 for your current project, but it may be worth checking out for future jobs: (Equations in Word 2007)

    Pam C
    Pam Caswell

  8. #8
    Super Moderator
    Join Date
    May 2002
    Location
    Canberra, Australian Capital Territory, Australia
    Posts
    5,055
    Thanks
    2
    Thanked 417 Times in 346 Posts

    Re: Typographical spaces (Word 2003)

    Hi Bill,

    Rather than using a plethora of ADVANCE fields (which you probably wouldn't want to litter your document with), I'd suggest something based on:
    Selection.Font.Spacing = -1
    which reduces the width of the selected character(s) by 1 point. You can go the other way to increase the spacing also. I'd also recommend coding this via a range object rather than via selection, for efficiency.
    Cheers,

    Paul Edstein
    [MS MVP - Word]

  9. #9
    Silver Lounger
    Join Date
    Jul 2001
    Location
    Ottawa, Ontario, Canada
    Posts
    1,609
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Typographical spaces (Word 2003)

    <hr>I'd also recommend coding this via a range object rather than via selection, for efficiency.
    <hr>
    Can you help me understand why the range option is more efficient?
    Regards
    Don

  10. #10
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Typographical spaces (Word 2003)

    The Selection object requires more work of Word, for example if you move through a document using Selection, Word has to scroll the window. This is not necessary when you use a range object. So in general, it is a good idea to avoid Selection if possible (there are exceptions, however). The same holds for Excel VBA.

  11. #11
    Silver Lounger
    Join Date
    Jul 2001
    Location
    Ottawa, Ontario, Canada
    Posts
    1,609
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Typographical spaces (Word 2003)

    Thank you Hans
    Regards
    Don

  12. #12
    New Lounger
    Join Date
    Jan 2007
    Location
    Denmark
    Posts
    22
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Typographical spaces (Word 2003)

    (Edited by HansV to make URL clickable - see <!help=19>Help 19<!/help>)

    Thanks to everyone for the helpful comments.

    The link to the TeX site is very interesting. Unfortunately, most of our staff has limited computer skills, so keeping things relatively simple worth Word is a must, although I am going to look into this for future development.

    I am considering changing to a type face called Gentium (available here http://scripts.sil.org/cms/scripts/page.ph...&id=gentium) from Times New Roman. It has all the spaces that I would like to use and is a good substitute for TNR. But these Clear type fonts sound intriguing.

    Iím definitely going to start playing with the ďSelection.Font.Spacing = -1Ē idea. This has interesting potential and might let me hang on to TNR after all.

    Again thanks for all the good advice.

    Bill

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •