Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
In Word, how can I place a bar above a letter to show a mean?
Typing a statistical formula, I want to show the mean of x as x with a bar
across the top. Is there a way to do that? Is there a way that does not require the Equation Editor? |
#2
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
In Word, how can I place a bar above a letter to show a mean?
See http://sbarnhill.mvps.org/WordFAQs/Overbar.htm
-- Graham Mayor - Word MVP My web site www.gmayor.com Word MVP web site http://word.mvps.org johnc1476 wrote: Typing a statistical formula, I want to show the mean of x as x with a bar across the top. Is there a way to do that? Is there a way that does not require the Equation Editor? |
#3
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
In Word, how can I place a bar above a letter to show a mean?
That article _still_ doesn't show the simplest way to do it, which is
to type the Combining Diacritic "Overline" character, which is Unicode 0305. Place the cursor after the letter you want to have the overbar on, and type 0305 Alt-X. You can also assign a keyboard shortcut to this character by locating it in the Insert Symbol panel (under "Combining Diacritical Marks"). Suzanne has posted a more recent version of that article that does include this information. On Aug 4, 7:01*am, "Graham Mayor" wrote: Seehttp://sbarnhill.mvps.org/WordFAQs/Overbar.htm -- Graham Mayor - *Word MVP My web sitewww.gmayor.com Word MVP web sitehttp://word.mvps.org johnc1476 wrote: Typing a statistical formula, I want to show the mean of x as x with a bar across the top. *Is there a way to do that? *Is there a way that does not require the Equation Editor?- |
#4
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
In Word, how can I place a bar above a letter to show a mean?
Suzanne is away on holiday - where did she post the more up to date version?
This one is on her web site. -- Graham Mayor - Word MVP My web site www.gmayor.com Word MVP web site http://word.mvps.org Peter T. Daniels wrote: That article _still_ doesn't show the simplest way to do it, which is to type the Combining Diacritic "Overline" character, which is Unicode 0305. Place the cursor after the letter you want to have the overbar on, and type 0305 Alt-X. You can also assign a keyboard shortcut to this character by locating it in the Insert Symbol panel (under "Combining Diacritical Marks"). Suzanne has posted a more recent version of that article that does include this information. On Aug 4, 7:01 am, "Graham Mayor" wrote: Seehttp://sbarnhill.mvps.org/WordFAQs/Overbar.htm -- Graham Mayor - Word MVP My web sitewww.gmayor.com Word MVP web sitehttp://word.mvps.org johnc1476 wrote: Typing a statistical formula, I want to show the mean of x as x with a bar across the top. Is there a way to do that? Is there a way that does not require the Equation Editor?- |
#5
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
In Word, how can I place a bar above a letter to show a mean?
I don't know -- two or three times ago that this question came up, she
added a posting to the thread with the new url. It may be Word2007- specific for the other methods. On Aug 4, 8:30*am, "Graham Mayor" wrote: Suzanne is away on holiday - where did she post the more up to date version? This one is on her web site. -- Graham Mayor - *Word MVP My web sitewww.gmayor.com Word MVP web sitehttp://word.mvps.org Peter T. Daniels wrote: That article _still_ doesn't show the simplest way to do it, which is to type the Combining Diacritic "Overline" character, which is Unicode 0305. Place the cursor after the letter you want to have the overbar on, and type 0305 Alt-X. You can also assign a keyboard shortcut to this character by locating it in the Insert Symbol panel (under "Combining Diacritical Marks"). Suzanne has posted a more recent version of that article that does include this information. On Aug 4, 7:01 am, "Graham Mayor" wrote: Seehttp://sbarnhill.mvps.org/WordFAQs/Overbar.htm -- Graham Mayor - Word MVP My web sitewww.gmayor.com Word MVP web sitehttp://word.mvps.org johnc1476 wrote: Typing a statistical formula, I want to show the mean of x as x with a bar across the top. Is there a way to do that? Is there a way that does not require the Equation Editor?-- |
#6
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
In Word, how can I place a bar above a letter to show a mean?
Hi,
I have had no success in my attempts to use Unicode 0305 to add an overbar to x, but I have been doing this successfully for some time according to Suzanne's method with an EQ field and Unicode AF. I have even written a macro to automate the process. To use it, simply type the letter that you want to have an overbar and run the following macro. Sub Overbar() Dim myField As Field Dim myChar As String With Selection .MoveStart Unit:=wdCharacter, Count:=-1 myChar = .Text .Delete Set myField = ActiveDocument.Fields.Add(Range:=.Range, _ Type:=wdFieldEmpty, PreserveFormatting:=False) myField.Code.Text = "EQ \o(" & myChar & "," & ChrW(&HAF) & ")" myField.ShowCodes = False .MoveRight Unit:=wdCharacter, Count:=1 End With End Sub The macro has another advantage. It does not introduce any extra spaces in the field code that can mess up the alignment. -- Hope this helps, Pesach Shelnitz "Graham Mayor" wrote: Suzanne is away on holiday - where did she post the more up to date version? This one is on her web site. -- Graham Mayor - Word MVP My web site www.gmayor.com Word MVP web site http://word.mvps.org Peter T. Daniels wrote: That article _still_ doesn't show the simplest way to do it, which is to type the Combining Diacritic "Overline" character, which is Unicode 0305. Place the cursor after the letter you want to have the overbar on, and type 0305 Alt-X. You can also assign a keyboard shortcut to this character by locating it in the Insert Symbol panel (under "Combining Diacritical Marks"). Suzanne has posted a more recent version of that article that does include this information. On Aug 4, 7:01 am, "Graham Mayor" wrote: Seehttp://sbarnhill.mvps.org/WordFAQs/Overbar.htm -- Graham Mayor - Word MVP My web sitewww.gmayor.com Word MVP web sitehttp://word.mvps.org johnc1476 wrote: Typing a statistical formula, I want to show the mean of x as x with a bar across the top. Is there a way to do that? Is there a way that does not require the Equation Editor?- |
#7
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
In Word, how can I place a bar above a letter to show a mean?
Peasach,
A similiar macro is available in my http://gregmaxey.mvps.org/Banner_Text.htm that can easily be adapted to overbar. Public Sub Overbarr() Dim Expr As String Expr = InputBox("Enter the text to overbarr:", "Apply overbar") If Expr "" Then ActiveDocument.Fields.Add Range:=Selection.Range, Type:=wdFieldEmpty, Text:="EQ \x\to(" & Expr & ")", PreserveFormatting:=False End If End Sub Pesach Shelnitz wrote: Hi, I have had no success in my attempts to use Unicode 0305 to add an overbar to x, but I have been doing this successfully for some time according to Suzanne's method with an EQ field and Unicode AF. I have even written a macro to automate the process. To use it, simply type the letter that you want to have an overbar and run the following macro. Sub Overbar() Dim myField As Field Dim myChar As String With Selection .MoveStart Unit:=wdCharacter, Count:=-1 myChar = .Text .Delete Set myField = ActiveDocument.Fields.Add(Range:=.Range, _ Type:=wdFieldEmpty, PreserveFormatting:=False) myField.Code.Text = "EQ \o(" & myChar & "," & ChrW(&HAF) & ")" myField.ShowCodes = False .MoveRight Unit:=wdCharacter, Count:=1 End With End Sub The macro has another advantage. It does not introduce any extra spaces in the field code that can mess up the alignment. Suzanne is away on holiday - where did she post the more up to date version? This one is on her web site. -- Graham Mayor - Word MVP My web site www.gmayor.com Word MVP web site http://word.mvps.org Peter T. Daniels wrote: That article _still_ doesn't show the simplest way to do it, which is to type the Combining Diacritic "Overline" character, which is Unicode 0305. Place the cursor after the letter you want to have the overbar on, and type 0305 Alt-X. You can also assign a keyboard shortcut to this character by locating it in the Insert Symbol panel (under "Combining Diacritical Marks"). Suzanne has posted a more recent version of that article that does include this information. On Aug 4, 7:01 am, "Graham Mayor" wrote: Seehttp://sbarnhill.mvps.org/WordFAQs/Overbar.htm -- Graham Mayor - Word MVP My web sitewww.gmayor.com Word MVP web sitehttp://word.mvps.org johnc1476 wrote: Typing a statistical formula, I want to show the mean of x as x with a bar across the top. Is there a way to do that? Is there a way that does not require the Equation Editor?- -- Greg Maxey - Word MVP My web site http://gregmaxey.mvps.org Word MVP web site http://word.mvps.org |
#8
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
In Word, how can I place a bar above a letter to show a mean?
On Aug 4, 9:51*am, Pesach Shelnitz pesach18(AT)hotmail.com wrote:
Hi, I have had no success in my attempts to use Unicode 0305 to add an overbar to x, What does that mean? What happens when you type 0305 Alt-X, or when you choose it from Insert Symbol? If you're in a font that doesn't have the character, Word will insert it from some font that does (such as TNR or Tahoma). |
#9
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
In Word, how can I place a bar above a letter to show a mean?
Hi Peter,
The OP referred to adding an overbar or macron to the letter x. When I type x and then 0305 as you suggested, I have x0305 with my cursor after the 5. In this case when I press Alt+X, nothing happens. If I insert a space after the x, Alt+X does convert the number into an overbar, but the two characters do not align properly even when I remove the space between them. Pesach "Peter T. Daniels" wrote: On Aug 4, 9:51 am, Pesach Shelnitz pesach18(AT)hotmail.com wrote: Hi, I have had no success in my attempts to use Unicode 0305 to add an overbar to x, What does that mean? What happens when you type 0305 Alt-X, or when you choose it from Insert Symbol? If you're in a font that doesn't have the character, Word will insert it from some font that does (such as TNR or Tahoma). |
#10
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
In Word, how can I place a bar above a letter to show a mean?
Pesach,
For what it is worth, I can't get it to work either and see the same behavior that you see. Even if I could, I would hardly classify it the "simplest" way. -- Greg Maxey - Word MVP My web site http://gregmaxey.mvps.org Word MVP web site http://word.mvps.org "Pesach Shelnitz" pesach18(AT)hotmail.com wrote in message ... Hi Peter, The OP referred to adding an overbar or macron to the letter x. When I type x and then 0305 as you suggested, I have x0305 with my cursor after the 5. In this case when I press Alt+X, nothing happens. If I insert a space after the x, Alt+X does convert the number into an overbar, but the two characters do not align properly even when I remove the space between them. Pesach "Peter T. Daniels" wrote: On Aug 4, 9:51 am, Pesach Shelnitz pesach18(AT)hotmail.com wrote: Hi, I have had no success in my attempts to use Unicode 0305 to add an overbar to x, What does that mean? What happens when you type 0305 Alt-X, or when you choose it from Insert Symbol? If you're in a font that doesn't have the character, Word will insert it from some font that does (such as TNR or Tahoma). |
#11
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
In Word, how can I place a bar above a letter to show a mean?
Typing is simpler than composing a macro. And assigning a keyboard
shortcut to a character you're going to use a lot is simpler than composing a macro. It's bizarre. It works with some letters -- S, V -- and not others. I've never before encountered a Combining Diacritical Mark that was picky that way. On Aug 4, 3:03*pm, "Greg Maxey" wrote: Pesach, For what it is worth, I can't get it to work either and see the same behavior that you see. *Even if I could, I would hardly classify it the "simplest" way. -- Greg Maxey - *Word MVP My web sitehttp://gregmaxey.mvps.org Word MVP web sitehttp://word.mvps.org "Pesach Shelnitz" pesach18(AT)hotmail.com wrote in message ... Hi Peter, The OP referred to adding an overbar or macron to the letter x. When I type x and then 0305 as you suggested, I have x0305 with my cursor after the 5. In this case when I press Alt+X, nothing happens. If I insert a space after the x, Alt+X does convert the number into an overbar, but the two characters do not align properly even when I remove the space between them. Pesach "Peter T. Daniels" wrote: On Aug 4, 9:51 am, Pesach Shelnitz pesach18(AT)hotmail.com wrote: Hi, I have had no success in my attempts to use Unicode 0305 to add an overbar to x, What does that mean? What happens when you type 0305 Alt-X, or when you choose it from Insert Symbol? If you're in a font that doesn't have the character, Word will insert it from some font that does (such as TNR or Tahoma).- |
#12
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
In Word, how can I place a bar above a letter to show a mean?
As it is now bizarre and it doesn't work I suppose you still thinks it's
simplier? Peter T. Daniels wrote: Typing is simpler than composing a macro. And assigning a keyboard shortcut to a character you're going to use a lot is simpler than composing a macro. It's bizarre. It works with some letters -- S, V -- and not others. I've never before encountered a Combining Diacritical Mark that was picky that way. On Aug 4, 3:03 pm, "Greg Maxey" wrote: Pesach, For what it is worth, I can't get it to work either and see the same behavior that you see. Even if I could, I would hardly classify it the "simplest" way. -- Greg Maxey - Word MVP My web sitehttp://gregmaxey.mvps.org Word MVP web sitehttp://word.mvps.org "Pesach Shelnitz" pesach18(AT)hotmail.com wrote in message ... Hi Peter, The OP referred to adding an overbar or macron to the letter x. When I type x and then 0305 as you suggested, I have x0305 with my cursor after the 5. In this case when I press Alt+X, nothing happens. If I insert a space after the x, Alt+X does convert the number into an overbar, but the two characters do not align properly even when I remove the space between them. Pesach "Peter T. Daniels" wrote: On Aug 4, 9:51 am, Pesach Shelnitz pesach18(AT)hotmail.com wrote: Hi, I have had no success in my attempts to use Unicode 0305 to add an overbar to x, What does that mean? What happens when you type 0305 Alt-X, or when you choose it from Insert Symbol? If you're in a font that doesn't have the character, Word will insert it from some font that does (such as TNR or Tahoma).- -- Greg Maxey - Word MVP My web site http://gregmaxey.mvps.org Word MVP web site http://word.mvps.org |
#13
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
In Word, how can I place a bar above a letter to show a mean?
Peter,
Conceding that it could be far more difficult if not impossible for you, the following macro took less than two minutes to compose and stick on the Quick Access Toolbar: Public Sub Overbar() Dim Expr As String Dim oFld As Field Expr = InputBox("Enter the text to overbar:", "Apply overbar") If Expr "" Then Set oFld = ActiveDocument.Fields.Add(Range:=Selection.Range, _ Type:=wdFieldEmpty, _ Text:="EQ \x\to(" & Expr & ")", PreserveFormatting:=False) With oFld .Code.Text = Trim(oFld.Code.Text) .ShowCodes = False End With Set oFld = Nothing End If End Sub I could spend the rest of the afternoon testing it, but so far it has worked every time and it hasn't shown any bizarre behaviour. Is typing out some arcane unicode character sequence and assigning a keyboard short cut for every possilble keyboard character, or phase in the English language for that matter, that you may use a lot really so much simplier? I think not. Peter T. Daniels wrote: Typing is simpler than composing a macro. And assigning a keyboard shortcut to a character you're going to use a lot is simpler than composing a macro. It's bizarre. It works with some letters -- S, V -- and not others. I've never before encountered a Combining Diacritical Mark that was picky that way. On Aug 4, 3:03 pm, "Greg Maxey" wrote: Pesach, For what it is worth, I can't get it to work either and see the same behavior that you see. Even if I could, I would hardly classify it the "simplest" way. -- Greg Maxey - Word MVP My web sitehttp://gregmaxey.mvps.org Word MVP web sitehttp://word.mvps.org "Pesach Shelnitz" pesach18(AT)hotmail.com wrote in message ... Hi Peter, The OP referred to adding an overbar or macron to the letter x. When I type x and then 0305 as you suggested, I have x0305 with my cursor after the 5. In this case when I press Alt+X, nothing happens. If I insert a space after the x, Alt+X does convert the number into an overbar, but the two characters do not align properly even when I remove the space between them. Pesach "Peter T. Daniels" wrote: On Aug 4, 9:51 am, Pesach Shelnitz pesach18(AT)hotmail.com wrote: Hi, I have had no success in my attempts to use Unicode 0305 to add an overbar to x, What does that mean? What happens when you type 0305 Alt-X, or when you choose it from Insert Symbol? If you're in a font that doesn't have the character, Word will insert it from some font that does (such as TNR or Tahoma).- -- Greg Maxey - Word MVP My web site http://gregmaxey.mvps.org Word MVP web site http://word.mvps.org |
#14
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
In Word, how can I place a bar above a letter to show a mean?
I never suggested there was anything wrong with using the Overstrike
field (that's what I did yesterday to put a tilde through the middle of several phonetic characters in transcribing Arabic, because the Combining Diacritic Tilde was not positioned properly); but where the combining diacritic exists, it certainly is easier to open Insert Symbol and click it. (I don't type the Unicod code myself, but some people are overwhelmed by the amount of choice provided by Insert Symbol.) I learned to use the Overstrike filed from the Appendix on Fields that was included in the MANUAL THAT CAME WITH WORD 5.0 FOR MAC. And since I use several score of letters with diacritics regularly, it most certainly is far more convenient to assign a keyboard shortcut to each one of them (using a rational system, of course). For instance, Ctrl-Alt-P is the trigger, and Hyphen gets me macrons or underbars; v gets me hacheks; u gets me breves; period gets me underdots; Ctrl-P and period gets me overdots (they're used much less commonly than underdots); etc. The four groups Latin and Extensions cover just about every variety of roman letter that's used in any language of the world, and my keyboard shortcuts cover everything I need. (For Vietnamese, I use the Vietnamese keyboard.) It is of course "impossible" for me to create a macro, because I don't have any idea how to find instructions in creating a macro. I once got a remaindered "Word2000 Developer's Handbook" that seems to cover the topic; it's even fatter than the accompanying aftermarket book on using Word that deals with every command Word has. For instance, I always wonder what "Dim" means, since it appears so often in macro codes. On Aug 4, 4:11*pm, "Greg Maxey" wrote: Peter, Conceding that it could be far more difficult if not impossible for you, the following macro took less than two minutes to compose and stick on the Quick Access Toolbar: Public Sub Overbar() Dim Expr As String Dim oFld As Field Expr = InputBox("Enter the text to overbar:", "Apply overbar") *If Expr "" Then * *Set oFld = ActiveDocument.Fields.Add(Range:=Selection.Range, _ * * * * Type:=wdFieldEmpty, _ * * * * Text:="EQ \x\to(" & Expr & ")", PreserveFormatting:=False) * *With oFld * * *.Code.Text = Trim(oFld.Code.Text) * * *.ShowCodes = False * *End With * *Set oFld = Nothing *End If End Sub I could spend the rest of the afternoon testing it, but so far it has worked every time and it hasn't shown any bizarre behaviour. Is typing out some arcane unicode character sequence and assigning a keyboard short cut for every possilble keyboard character, or phase in the English language for that matter, *that you may use a lot really so much simplier? I think not. Peter T. Daniels wrote: Typing is simpler than composing a macro. And assigning a keyboard shortcut to a character you're going to use a lot is simpler than composing a macro. It's bizarre. It works with some letters -- S, V -- and not others. I've never before encountered a Combining Diacritical Mark that was picky that way. On Aug 4, 3:03 pm, "Greg Maxey" wrote: Pesach, For what it is worth, I can't get it to work either and see the same behavior that you see. Even if I could, I would hardly classify it the "simplest" way. -- Greg Maxey - Word MVP My web sitehttp://gregmaxey.mvps.org Word MVP web sitehttp://word.mvps.org "Pesach Shelnitz" pesach18(AT)hotmail.com wrote in message ... Hi Peter, The OP referred to adding an overbar or macron to the letter x. When I type x and then 0305 as you suggested, I have x0305 with my cursor after the 5. In this case when I press Alt+X, nothing happens. If I insert a space after the x, Alt+X does convert the number into an overbar, but the two characters do not align properly even when I remove the space between them. Pesach "Peter T. Daniels" wrote: On Aug 4, 9:51 am, Pesach Shelnitz pesach18(AT)hotmail.com wrote: Hi, I have had no success in my attempts to use Unicode 0305 to add an overbar to x, What does that mean? What happens when you type 0305 Alt-X, or when you choose it from Insert Symbol? If you're in a font that doesn't have the character, Word will insert it from some font that does (such as TNR or Tahoma).- |
#15
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
In Word, how can I place a bar above a letter to show a mean?
Me, I use macron (for the few characters that don't have precomposed
macronned counterparts) and have had no difficulty. On Aug 4, 3:54*pm, "Greg Maxey" wrote: As it is now bizarre and it doesn't work I suppose you still thinks it's simplier? Peter T. Daniels wrote: Typing is simpler than composing a macro. And assigning a keyboard shortcut to a character you're going to use a lot is simpler than composing a macro. It's bizarre. It works with some letters -- S, V -- and not others. I've never before encountered a Combining Diacritical Mark that was picky that way. On Aug 4, 3:03 pm, "Greg Maxey" wrote: Pesach, For what it is worth, I can't get it to work either and see the same behavior that you see. Even if I could, I would hardly classify it the "simplest" way. -- Greg Maxey - Word MVP My web sitehttp://gregmaxey.mvps.org Word MVP web sitehttp://word.mvps.org "Pesach Shelnitz" pesach18(AT)hotmail.com wrote in message ... Hi Peter, The OP referred to adding an overbar or macron to the letter x. When I type x and then 0305 as you suggested, I have x0305 with my cursor after the 5. In this case when I press Alt+X, nothing happens. If I insert a space after the x, Alt+X does convert the number into an overbar, but the two characters do not align properly even when I remove the space between them. Pesach "Peter T. Daniels" wrote: On Aug 4, 9:51 am, Pesach Shelnitz pesach18(AT)hotmail.com wrote: Hi, I have had no success in my attempts to use Unicode 0305 to add an overbar to x, What does that mean? What happens when you type 0305 Alt-X, or when you choose it from Insert Symbol? If you're in a font that doesn't have the character, Word will insert it from some font that does (such as TNR or Tahoma).- |
#16
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
In Word, how can I place a bar above a letter to show a mean?
The macro I use does not use the overstrike field. Is uses the EQ field
with the \x "box" switch. What is an overstrike field anyway? Do you really always wonder what Dim means? Try: http://lmgtfy.com/?q=What+is+dim%3F Peter T. Daniels wrote: I never suggested there was anything wrong with using the Overstrike field (that's what I did yesterday to put a tilde through the middle of several phonetic characters in transcribing Arabic, because the Combining Diacritic Tilde was not positioned properly); but where the combining diacritic exists, it certainly is easier to open Insert Symbol and click it. (I don't type the Unicod code myself, but some people are overwhelmed by the amount of choice provided by Insert Symbol.) I learned to use the Overstrike filed from the Appendix on Fields that was included in the MANUAL THAT CAME WITH WORD 5.0 FOR MAC. And since I use several score of letters with diacritics regularly, it most certainly is far more convenient to assign a keyboard shortcut to each one of them (using a rational system, of course). For instance, Ctrl-Alt-P is the trigger, and Hyphen gets me macrons or underbars; v gets me hacheks; u gets me breves; period gets me underdots; Ctrl-P and period gets me overdots (they're used much less commonly than underdots); etc. The four groups Latin and Extensions cover just about every variety of roman letter that's used in any language of the world, and my keyboard shortcuts cover everything I need. (For Vietnamese, I use the Vietnamese keyboard.) It is of course "impossible" for me to create a macro, because I don't have any idea how to find instructions in creating a macro. I once got a remaindered "Word2000 Developer's Handbook" that seems to cover the topic; it's even fatter than the accompanying aftermarket book on using Word that deals with every command Word has. For instance, I always wonder what "Dim" means, since it appears so often in macro codes. On Aug 4, 4:11 pm, "Greg Maxey" wrote: Peter, Conceding that it could be far more difficult if not impossible for you, the following macro took less than two minutes to compose and stick on the Quick Access Toolbar: Public Sub Overbar() Dim Expr As String Dim oFld As Field Expr = InputBox("Enter the text to overbar:", "Apply overbar") If Expr "" Then Set oFld = ActiveDocument.Fields.Add(Range:=Selection.Range, _ Type:=wdFieldEmpty, _ Text:="EQ \x\to(" & Expr & ")", PreserveFormatting:=False) With oFld .Code.Text = Trim(oFld.Code.Text) .ShowCodes = False End With Set oFld = Nothing End If End Sub I could spend the rest of the afternoon testing it, but so far it has worked every time and it hasn't shown any bizarre behaviour. Is typing out some arcane unicode character sequence and assigning a keyboard short cut for every possilble keyboard character, or phase in the English language for that matter, that you may use a lot really so much simplier? I think not. Peter T. Daniels wrote: Typing is simpler than composing a macro. And assigning a keyboard shortcut to a character you're going to use a lot is simpler than composing a macro. It's bizarre. It works with some letters -- S, V -- and not others. I've never before encountered a Combining Diacritical Mark that was picky that way. On Aug 4, 3:03 pm, "Greg Maxey" wrote: Pesach, For what it is worth, I can't get it to work either and see the same behavior that you see. Even if I could, I would hardly classify it the "simplest" way. -- Greg Maxey - Word MVP My web sitehttp://gregmaxey.mvps.org Word MVP web sitehttp://word.mvps.org "Pesach Shelnitz" pesach18(AT)hotmail.com wrote in message ... Hi Peter, The OP referred to adding an overbar or macron to the letter x. When I type x and then 0305 as you suggested, I have x0305 with my cursor after the 5. In this case when I press Alt+X, nothing happens. If I insert a space after the x, Alt+X does convert the number into an overbar, but the two characters do not align properly even when I remove the space between them. Pesach "Peter T. Daniels" wrote: On Aug 4, 9:51 am, Pesach Shelnitz pesach18(AT)hotmail.com wrote: Hi, I have had no success in my attempts to use Unicode 0305 to add an overbar to x, What does that mean? What happens when you type 0305 Alt-X, or when you choose it from Insert Symbol? If you're in a font that doesn't have the character, Word will insert it from some font that does (such as TNR or Tahoma).- -- Greg Maxey - Word MVP My web site http://gregmaxey.mvps.org Word MVP web site http://word.mvps.org |
#17
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
In Word, how can I place a bar above a letter to show a mean?
On Aug 4, 7:15*pm, "Greg Maxey"
wrote: The macro I use does not use the overstrike field. *Is uses the EQ field with the \x "box" switch. *What is an overstrike field anyway? \O (Haven't you ever looked into the "Options" button in the Fields dialog?) It's rather simpler than the elaborate expression in your line "Text." Do you really always wonder what Dim means? Try:http://lmgtfy.com/?q=What+is+dim%3F Why? It won't make any sense without a whole congeries of other terminology. And presumably that would give me a large number of dictionary entries for the English word meaning 'not brightly lit'. Peter T. Daniels wrote: I never suggested there was anything wrong with using the Overstrike field (that's what I did yesterday to put a tilde through the middle of several phonetic characters in transcribing Arabic, because the Combining Diacritic Tilde was not positioned properly); but where the combining diacritic exists, it certainly is easier to open Insert Symbol and click it. (I don't type the Unicod code myself, but some people are overwhelmed by the amount of choice provided by Insert Symbol.) I learned to use the Overstrike filed from the Appendix on Fields that was included in the MANUAL THAT CAME WITH WORD 5.0 FOR MAC. And since I use several score of letters with diacritics regularly, it most certainly is far more convenient to assign a keyboard shortcut to each one of them (using a rational system, of course). For instance, Ctrl-Alt-P is the trigger, and Hyphen gets me macrons or underbars; v gets me hacheks; u gets me breves; period gets me underdots; Ctrl-P and period gets me overdots (they're used much less commonly than underdots); etc. The four groups Latin and Extensions cover just about every variety of roman letter that's used in any language of the world, and my keyboard shortcuts cover everything I need. (For Vietnamese, I use the Vietnamese keyboard.) It is of course "impossible" for me to create a macro, because I don't have any idea how to find instructions in creating a macro. I once got a remaindered "Word2000 Developer's Handbook" that seems to cover the topic; it's even fatter than the accompanying aftermarket book on using Word that deals with every command Word has. For instance, I always wonder what "Dim" *means, since it appears so often in macro codes. On Aug 4, 4:11 pm, "Greg Maxey" wrote: Peter, Conceding that it could be far more difficult if not impossible for you, the following macro took less than two minutes to compose and stick on the Quick Access Toolbar: Public Sub Overbar() Dim Expr As String Dim oFld As Field Expr = InputBox("Enter the text to overbar:", "Apply overbar") If Expr "" Then Set oFld = ActiveDocument.Fields.Add(Range:=Selection.Range, _ Type:=wdFieldEmpty, _ Text:="EQ \x\to(" & Expr & ")", PreserveFormatting:=False) With oFld .Code.Text = Trim(oFld.Code.Text) .ShowCodes = False End With Set oFld = Nothing End If End Sub I could spend the rest of the afternoon testing it, but so far it has worked every time and it hasn't shown any bizarre behaviour. Is typing out some arcane unicode character sequence and assigning a keyboard short cut for every possilble keyboard character, or phase in the English language for that matter, that you may use a lot really so much simplier? I think not. Peter T. Daniels wrote: Typing is simpler than composing a macro. And assigning a keyboard shortcut to a character you're going to use a lot is simpler than composing a macro. It's bizarre. It works with some letters -- S, V -- and not others. I've never before encountered a Combining Diacritical Mark that was picky that way. On Aug 4, 3:03 pm, "Greg Maxey" wrote: Pesach, For what it is worth, I can't get it to work either and see the same behavior that you see. Even if I could, I would hardly classify it the "simplest" way. -- Greg Maxey - Word MVP My web sitehttp://gregmaxey.mvps.org Word MVP web sitehttp://word.mvps.org "Pesach Shelnitz" pesach18(AT)hotmail.com wrote in message ... Hi Peter, The OP referred to adding an overbar or macron to the letter x. When I type x and then 0305 as you suggested, I have x0305 with my cursor after the 5. In this case when I press Alt+X, nothing happens. If I insert a space after the x, Alt+X does convert the number into an overbar, but the two characters do not align properly even when I remove the space between them. Pesach "Peter T. Daniels" wrote: On Aug 4, 9:51 am, Pesach Shelnitz pesach18(AT)hotmail.com wrote: Hi, I have had no success in my attempts to use Unicode 0305 to add an overbar to x, What does that mean? What happens when you type 0305 Alt-X, or when you choose it from Insert Symbol? If you're in a font that doesn't have the character, Word will insert it from some font that does (such as TNR or Tahoma).- -- Greg Maxey - *Word MVP My web sitehttp://gregmaxey.mvps.org Word MVP web sitehttp://word.mvps.org- |
#18
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
In Word, how can I place a bar above a letter to show a mean?
Pesach,
If I may suggest an alteration. This will overbar an entire string of text rather than just one character: Sub Overbar() Dim myField As Field Dim pStr As String Dim pStrBar Dim i As Long With Selection pStr = .Text For i = 1 To .Range.Characters.Count pStrBar = pStrBar & ChrW(&HAF) Next i .Delete Set myField = ActiveDocument.Fields.Add(Range:=.Range, _ Type:=wdFieldEmpty, PreserveFormatting:=False) myField.Code.Text = "EQ \o(" & pStr & "," & pStrBar & ")" myField.Code.Text = Trim(myField.Code.Text) myField.ShowCodes = False End With End Sub Pesach Shelnitz wrote: Hi, I have had no success in my attempts to use Unicode 0305 to add an overbar to x, but I have been doing this successfully for some time according to Suzanne's method with an EQ field and Unicode AF. I have even written a macro to automate the process. To use it, simply type the letter that you want to have an overbar and run the following macro. Sub Overbar() Dim myField As Field Dim myChar As String With Selection .MoveStart Unit:=wdCharacter, Count:=-1 myChar = .Text .Delete Set myField = ActiveDocument.Fields.Add(Range:=.Range, _ Type:=wdFieldEmpty, PreserveFormatting:=False) myField.Code.Text = "EQ \o(" & myChar & "," & ChrW(&HAF) & ")" myField.ShowCodes = False .MoveRight Unit:=wdCharacter, Count:=1 End With End Sub The macro has another advantage. It does not introduce any extra spaces in the field code that can mess up the alignment. Suzanne is away on holiday - where did she post the more up to date version? This one is on her web site. -- Graham Mayor - Word MVP My web site www.gmayor.com Word MVP web site http://word.mvps.org Peter T. Daniels wrote: That article _still_ doesn't show the simplest way to do it, which is to type the Combining Diacritic "Overline" character, which is Unicode 0305. Place the cursor after the letter you want to have the overbar on, and type 0305 Alt-X. You can also assign a keyboard shortcut to this character by locating it in the Insert Symbol panel (under "Combining Diacritical Marks"). Suzanne has posted a more recent version of that article that does include this information. On Aug 4, 7:01 am, "Graham Mayor" wrote: Seehttp://sbarnhill.mvps.org/WordFAQs/Overbar.htm -- Graham Mayor - Word MVP My web sitewww.gmayor.com Word MVP web sitehttp://word.mvps.org johnc1476 wrote: Typing a statistical formula, I want to show the mean of x as x with a bar across the top. Is there a way to do that? Is there a way that does not require the Equation Editor?- -- Greg Maxey - Word MVP My web site http://gregmaxey.mvps.org Word MVP web site http://word.mvps.org |
#19
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
In Word, how can I place a bar above a letter to show a mean?
In Word terminology, "\o" in this case is a switch.
-- Stefan Blom Microsoft Word MVP _____________________________ "Peter T. Daniels" wrote in message ... On Aug 4, 7:15 pm, "Greg Maxey" wrote: The macro I use does not use the overstrike field. Is uses the EQ field with the \x "box" switch. What is an overstrike field anyway? \O (Haven't you ever looked into the "Options" button in the Fields dialog?) |
#20
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
In Word, how can I place a bar above a letter to show a mean?
The article at http://sbarnhill.mvps.org/WordFAQs/C...Characters.htm does
mention combining diacritics, but, as the remainder of this thread shows, they can be unpredictable. Whenever I've tried them, it seems they don't combine very neatly. Note that http://sbarnhill.mvps.org/WordFAQs/C...Characters.htm is not meant to be a "more recent version" of the overbar article but a supplement to it. -- Suzanne S. Barnhill Microsoft MVP (Word) Words into Type Fairhope, Alabama USA http://word.mvps.org "Peter T. Daniels" wrote in message ... That article _still_ doesn't show the simplest way to do it, which is to type the Combining Diacritic "Overline" character, which is Unicode 0305. Place the cursor after the letter you want to have the overbar on, and type 0305 Alt-X. You can also assign a keyboard shortcut to this character by locating it in the Insert Symbol panel (under "Combining Diacritical Marks"). Suzanne has posted a more recent version of that article that does include this information. On Aug 4, 7:01 am, "Graham Mayor" wrote: Seehttp://sbarnhill.mvps.org/WordFAQs/Overbar.htm -- Graham Mayor - Word MVP My web sitewww.gmayor.com Word MVP web sitehttp://word.mvps.org johnc1476 wrote: Typing a statistical formula, I want to show the mean of x as x with a bar across the top. Is there a way to do that? Is there a way that does not require the Equation Editor?- |
#21
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
In Word, how can I place a bar above a letter to show a mean?
A very polite way to say what we have all (but one that is) has come to
accept. The method doesn't work. Suzanne S. Barnhill wrote: The article at http://sbarnhill.mvps.org/WordFAQs/C...Characters.htm does mention combining diacritics, but, as the remainder of this thread shows, they can be unpredictable. Whenever I've tried them, it seems they don't combine very neatly. Note that http://sbarnhill.mvps.org/WordFAQs/C...Characters.htm is not meant to be a "more recent version" of the overbar article but a supplement to it. On Aug 4, 7:01 am, "Graham Mayor" wrote: Seehttp://sbarnhill.mvps.org/WordFAQs/Overbar.htm -- Graham Mayor - Word MVP My web sitewww.gmayor.com Word MVP web sitehttp://word.mvps.org johnc1476 wrote: Typing a statistical formula, I want to show the mean of x as x with a bar across the top. Is there a way to do that? Is there a way that does not require the Equation Editor?- -- Greg Maxey - Word MVP My web site http://gregmaxey.mvps.org Word MVP web site http://word.mvps.org |
#22
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
In Word, how can I place a bar above a letter to show a mean?
It's about time you learned a lesson in politeness from Suzanne.
On Aug 6, 11:28*pm, "Greg Maxey" wrote: A very polite way to say what we have all (but one that is) has come to accept. *The method doesn't work. Suzanne S. Barnhill wrote: The article at http://sbarnhill.mvps.org/WordFAQs/C...acters.htmdoes mention combining diacritics, but, as the remainder of this thread shows, they can be unpredictable. Whenever I've tried them, it seems they don't combine very neatly. Note thathttp://sbarnhill.mvps.org/WordFAQs/CombineCharacters.htmis not meant to be a "more recent version" of the overbar article but a supplement to it. On Aug 4, 7:01 am, "Graham Mayor" wrote: Seehttp://sbarnhill.mvps.org/WordFAQs/Overbar.htm -- Graham Mayor - Word MVP My web sitewww.gmayor.com Word MVP web sitehttp://word.mvps.org johnc1476 wrote: Typing a statistical formula, I want to show the mean of x as x with a bar across the top. Is there a way to do that? Is there a way that does not require the Equation Editor?- -- Greg Maxey - *Word MVP My web sitehttp://gregmaxey.mvps.org Word MVP web sitehttp://word.mvps.org- Hide quoted text - - Show quoted text - |
#23
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
In Word, how can I place a bar above a letter to show a mean?
If you want to divert to lessons then I suggest you take and apply one on
humility. -- Greg Maxey - Word MVP My web site http://gregmaxey.mvps.org Word MVP web site http://word.mvps.org "Peter T. Daniels" wrote in message ... It's about time you learned a lesson in politeness from Suzanne. On Aug 6, 11:28 pm, "Greg Maxey" wrote: A very polite way to say what we have all (but one that is) has come to accept. The method doesn't work. Suzanne S. Barnhill wrote: The article at http://sbarnhill.mvps.org/WordFAQs/C...acters.htmdoes mention combining diacritics, but, as the remainder of this thread shows, they can be unpredictable. Whenever I've tried them, it seems they don't combine very neatly. Note thathttp://sbarnhill.mvps.org/WordFAQs/CombineCharacters.htmis not meant to be a "more recent version" of the overbar article but a supplement to it. On Aug 4, 7:01 am, "Graham Mayor" wrote: Seehttp://sbarnhill.mvps.org/WordFAQs/Overbar.htm -- Graham Mayor - Word MVP My web sitewww.gmayor.com Word MVP web sitehttp://word.mvps.org johnc1476 wrote: Typing a statistical formula, I want to show the mean of x as x with a bar across the top. Is there a way to do that? Is there a way that does not require the Equation Editor?- -- Greg Maxey - Word MVP My web sitehttp://gregmaxey.mvps.org Word MVP web sitehttp://word.mvps.org- Hide quoted text - - Show quoted text - |
Reply |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
How top place Trade Mark (TM) at last letter of the word? | Microsoft Word Help | |||
I want to place an X over/on top of letter like a strike through | New Users | |||
My edits/comments don't show up when I place my cursor over them i | Microsoft Word Help | |||
Show text or other when mouseover on some place ??? | Microsoft Word Help | |||
Place signature at end of letter ( Freehand) | New Users |