Showing posts with label msword. Show all posts
Showing posts with label msword. Show all posts

Friday, September 30, 2016

MS Word Series: Bold Caption Label & Number But Not The Caption Text

This macro is intended to BOLD the CAPTION LABEL & NUMBER but not the caption title.

Sub CaptionBoldNot()
'
' CaptionBoldNot Macro
'
'
Application.ScreenUpdating = False
With ActiveDocument.Range
  With .Find
    .ClearFormatting
    .Text = ""
    .Style = "Caption"
    .Replacement.Text = ""
    .Forward = True
    .Wrap = wdFindStop
    .Format = True
    .MatchCase = False
    .MatchWholeWord = False
    .MatchWildcards = False
    .MatchSoundsLike = False
    .MatchAllWordForms = False
    .Execute
  End With
  Do While .Find.Found
    With .Paragraphs.Last.Range.Duplicate
      .End = .Start + Len(Split(.Text, " ")(0)) + 1
      .MoveEndUntil " ", wdForward
      .Style = "Strong"
    End With
    .Collapse wdCollapseEnd
    .Find.Execute
  Loop
End With
Application.ScreenUpdating = True
End Sub


Thanks to the original author. 

Thursday, January 22, 2015

LaTeX Series: How to Convert From LaTeX to MS Word

There will be times when you have to use MS Word format of your LaTeX documents. As far as I'm concern, there is no perfect software or workaround currently available to produce 100% LaTeX-MS Word compatible conversion.

However, there are currently a few methods with some pro and cons here and there.

My choice for now is TeX4ht.

Here's explanation of the command needed for the conversion [link] and some workaround for the known problems [link 1, link 2, link 3]

Tuesday, January 13, 2015

MS Word Series: Preserve Document Map When Converting the Document to PDF

Hi guys,

Referring to the title of this post, I found a very simple solution here.

The steps are as follows:

  1. Click Save as...PDF or XPS.
  2. Select PDF as the save type, then click Options (above the Publish button).
  3. Midway down, select Create bookmarks using: and select Headings.
Taraaa!!! Your document maps should now be on the left side of the PDF (Bookmark tab) when you publish.



Wednesday, December 17, 2014

MS Word Series: EQ field

Sometimes we want to put a large bracket spanning of a few lines. The is no direct approach to address this matter. But with a few tricks, you can "easily" do this.

Method 1

Use a equation editor. Personally I like Microsoft Equation Editor 3.
1) Insert a bracket.
2) Put matrices inside the bracket. The number of row depends on how many lines you want.
3) Insert text
4) Adjust font size and spacing

Method 2

Use field codes
1) Alt+F9 then Ctrl+F9
2) Type the following: EQ \b\bc\[(\a\ac(+round,+hi,+nasal))
3) Press Alt+F9
4) Refer to this link for the result & this link for the EQ field documentation.





Monday, September 29, 2014

MS Word Series: Texsword

In the previous article, I have introduced an add in called texsword. Besides using latex style to generate equation, you can also use its functionality to number your typed equation using MS Word.

The [square root button] in the texsword [add-ins] tab will produce a three columns table. The first column is for the equation, the second column is for the bookmark name and the third column for equation number.

Reset Equation Numbering


1) Press [Shift+F9] to show the field
2) Add [\r 1] in the field to reset the number to 1 or any intended number. For example {SEQ Eq \r 1} where SEQ is for sequence number and Eq is a variable used by texsword to name the equation.
3) Press [F9] to update

Add Heading To The Equation Number


1) Open texsword via open command in MS Word.
2) Press [Alt+F11] to bring up the VB Editor.
3) On the left side, double click on [Module -> texsword_equation] to bring up the codes.
4) Go to TeXsword_bookmark() subroutine and you will see codes

' Draw ()
    Selection.TypeText Text:="("
    Selection.Fields.Add Range:=Selection.Range, Type:=wdFieldEmpty, Text:= _
        "SEQ Eq", PreserveFormatting:=True
    Selection.TypeText Text:=")"
    Selection.MoveLeft Unit:=wdCharacter, Count:=1
    Selection.MoveLeft Unit:=wdCharacter, Count:=3, Extend:=wdExtend

5) Change the codes as follows

' Draw ()
    Selection.TypeText Text:="("
    Selection.Fields.Add Range:=Selection.Range, Type:=wdFieldEmpty, Text:= _
        "STYLEREF \s ""Heading 1""", PreserveFormatting:=False
    Selection.TypeText Text:="."
    Selection.Fields.Add Range:=Selection.Range, Type:=wdFieldEmpty, Text:= _
        "SEQ Eq", PreserveFormatting:=True
    Selection.TypeText Text:=")"
    Selection.MoveLeft Unit:=wdCharacter, Count:=1
    Selection.MoveLeft Unit:=wdCharacter, Count:=3, Extend:=wdExtend

The "Heading 1" can be changed to other headings when necessary.




MS Word Series: Working Smart With Alternative Equation Editor

Equation in MS Word


It is possible to transfer the equation created with TeXaide (refer to previous article) to MS Word or other word processor (I guess) by copy and paste special as picture. It is not possible to double click the picture to edit the equation. You have to edit the equation independently using TeXaide.

Alternatively, there are other "cool" tools out there to export LaTeX equation to MS Word such as:

  1. Texsword (my favorite)
  2. TexMaths
Texsword is targeted for MS Word user while TexMaths is for LibreOffice user. The functionality for both tools are equal in performance (based on my experience). The installation is easy and well explained in the documentation. The equation generated in the word processor is the same as TeXaide, an image.  However, for these tools, editing the equation can be easily done by double clicking the image and equation editor will appear. 

Now, choose the tool that best meet your expectation.

Texsword Installation For Windows 7


1) Go to [C:\Users\username\AppData\Roaming\Microsoft\Word\STARTUP], and put the texsword.dotm there.
2) Restart MS Word
3) You can see a new [add-ins] tab has been added. 


Happy "Equationing~"

MS Word Series: Editing Bookmark

It is easy to create or delete bookmark as explained in detail here.

It is however, possible to edit the created bookmark.

Steps:


1) Highlight new text/area
2) Go to Insert Tab -> Bookmark
3) Select the intended bookmark name
4) Click Add

Done!!

Friday, July 18, 2014

MS Word Series: Cross-reference with MS Word 2007

Preliminary article

Let say you want to cross-reference your fig. 1 in the body text.
But your inserted caption written as Figure 1.
MS Word 2007 does not allow you to insert only the number, so will get exactly Figure 1.

One way to work around this is by following steps.


  1. Press Alt+F9 to toggle the field codes.
  2. Insert \# "0" at the end of the codes.
  3. Do step 1 again.
  4. Press F9 to update.
and you're done!!

[Ref]

Tuesday, July 15, 2014

MS Word Series: Useful MS Word Shortcut You Wish To Know Earlier

Ctrl + Shift + Spacebar

Prevent words from being separated at the end of a line

Ctrl+Shift+Hyphen (Backslash, if JP keyboard) 

Hyphenated compound you don't want to break at the end of a line

Ctrl + Hyphen 

A conditional hyphen (one that is printed only if it falls at a line break)

Shift + Enter

Line break

Ctrl + Alt + V

Paste special

Alt + Ctrl + minus sign

An em dash

Ctrl + minus sign

An en dash

Ctrl + Spacebar

Remove character formatting

Ctrl + Alt + Home

Browse selection by Ctrl + Page Up/Down 

Ctrl + Shift + N

Apply normal style to the current paragraph 


Friday, April 18, 2014

MS Word Series: Microsoft Equation Editor 3.0 - How To Effectively Write Equation

Previously, I've wrote an entry about MS Equation Editor 3.0 here and a workaround in case of your equation do not display correctly. There was also an entry to reuse your LaTeX equation in MS Word here. However, some publication require the use of MS built in Equation Editor.

Luckily enough, the latest Equation Editor, MS Word 2007 and later allow the use of LaTeX syntax. The scope of this topic however, will be covered in another entry (if I have some interest to do so :p)...

Today, I would like to make some notes on how to save yourself time and hassle when typing using Equation Editor 3.0.

The answer is very simple....

Read and apply shortcut when writing the equation. Ask Dr. Google!!

The most handy shortcut would be:

  1. ctrl + L; subscript
  2. ctrl + H; superscript
  3. ctrl + J; sub & superscript
  4. ctrl + F; fraction
  5. ctrl + shift + 9; paranthesis
  6. ctrl + [; bracket
  7. ctrl + shift + {; curly bracket
  8. ctrl + R; square root
  9. ctrl + Shift + E; Text style
  10. ctrl + + / ctrl + shift + =; Math style
  11. ctrl + K, then A; Arrow 
  12. ctrl + K, then I; Infinity 
  13. ctrl + K, then T; times symbol
  14. ctrl + K, then < or >; less/greater than or equal to
  15. ctrl + G, then letter; insert Greek symbol
These shortcut made my life easy. How did I missed this simple thing??? ooowhhhh my...
More shortcuts here


Friday, April 11, 2014

MS Word Series: Creating a Quick Access Toolbar button in Word 2007 to open Equation Editor

Inserting equation using Microsoft equation 3.0 could be annoying since you need to click a few buttons before you can actually use the editor.

Luckily the MathType has done excellent job explaining the shortcut to do this task [go to MathType].


MS Word Series: Equations Are Displayed as Empty or Shaded Boxes in Microsoft Word

Very simple problem but extremely annoying!!!!

I assume this problem happened after I had installed MS Office updates.

I could write and edit the equation written with texsword & MS equation editor 3, but the image displayed was plain gray shaded empty box.

Turns out, the workaround was very easy as explained in MathType TechNote 74. In my case (MS Office 2007), navigate to:

  1. Ribbon -> Word Options -> Advanced -> Show document content
  2. Click on the third option: Show picture placeholders
Done!!!