• Typographical spaces (Word 2003)

    Author
    Topic
    #445902

    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

    Viewing 1 reply thread
    Author
    Replies
    • #1082476

      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:

      ActiveDocument.Fields.Add Range:=Selection.Range, Type:=wdFieldAdvance, _
      Text:="r 1", PreserveFormatting:=False

      You can, of course, use a Range object instead of Selection.Range.

      • #1082480

        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

        • #1082892

          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
          [Fmr MS MVP - Word]

          • #1082915

            [indent]


            I’d also recommend coding this via a range object rather than via selection, for efficiency.


            [/indent] Can you help me understand why the range option is more efficient?

            • #1082940

              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.

            • #1082949

              Thank you Hans

            • #1082991

              (Edited by HansV to make URL clickable – see Help 19)

              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%5B/url%5D) 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

    • #1082516

      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

      • #1082533

        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

        • #1082535

          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.

        • #1082598

          (Edited by HansV to make URL clickable – see Help 19)

          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

    Viewing 1 reply thread
    Reply To: Typographical spaces (Word 2003)

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: