Blog

Getting proper access to all the files on your PC

Microsoft thinks you’re an idiot. No wait. I could get into trouble for saying that. Microsoft doesn’t think you’re an idiot, they just treat you like one. Oh wait. That might get me into trouble too.

Ok. What should I say? Most Microsoft products seem to have this dual contrasting dynamic–often brilliant products dumbed-down to the lowest common denominator. A simple example is how Windows Explorer by default does not show you fie extensions. The simple fact of the matter is that file extensions are meaningful, and that not showing them is problematic and does nothing to help people learn about why they are important. Another classic example, of course, is the files that are stored on your PC that store all the program data, etc., that are needed for the PC to run and for programs to run on it. Microsoft seems to believe that most people don’t understand how these files work, and don’t seem to trust most people with these files, and so they purposefully hide them from the general public. Now that’s fine if you really are an idiot, but if you have a modicum of brain cells (and I will get into trouble if I say that you obviously do, if you’re reading this post!), and you need to copy system files (e.g., to add BibWord styles to your Word armoury), or change file extensions, for example, then that gets in the way. Windows Explorer, which is meant to give you access to your files, hides that kind of capability away.

Here’s some options for getting to that important information, despite Microsoft’s attempts to protect you from yourself.

First prize would be to ditch Windows Explorer completely, and to get a proper file manager, like Total Commander. I must add that I do not get paid for promoting Total Commander, but this must be one of my all-time favourite programs. I have owned a license for this program for close on two decades now, and it has never disappointed me.

And let me also add that in Total Commander, you also have to set a program option to get it to show you system files–here it’s considered a setting for experts only! Well, consider yourself about to become an expert…

But what if you need to change these kinds of settings, and you don’t have Total Commander on the PC in question?

Well, the simple answer is change your Windows Explorer options. Here’s how.

Step 1, of course, is open Windows Explorer (right click on the Start button and choose Explore, or press the Windows key and E on the keyboard). Notice that in newer version of Windows, the menu is hidden (this can also be activated in the options–second setting in the options window we will see below):

 Press Alt to reveal the menu, and then select Tools, Folder options… (Alt, T, O):

Now select the View tab, and choose the Show hidden files, folders, and drives option:

That will give you access to all those system files Microsoft was trying so desperately to hide.

Now, for the file extensions, deselect the Hide extensions for known file types option:

Click on OK, and you’re good to go!

This is what a folder looks like without the file extensions shown:

And this is what it looks like when they are shown:

And this is what my C:\ drive looks like when the system files are hidden:

And this is what it looks like when they are displayed. Note that the system folders are fainter than the ‘normal’ folders:

One last trick. If you don’t have Total Commander with its dual file browsing windows, you can get a poor (i.e., better than none) simulation by manipulating your Windows Explorer display. Firstly, open two Windows Explorer windows, and then size one to the left half of your screen, and one to the right half of your screen. With Windows 7, this is easily done by pressing the Windows key and the Left and Right arrows respectively. The end result looks like this:

Now you can easily drag and drop from one window to the other.

Good. Now, go copy those files!

Share

Numbered equations in Word

Microsoft boasts of its academic staff, but really, I often get the impression that no-one involved with Word has any idea of what academics do, need, or want. When the referencing tools in Word came out I got all excited, only to be severely disappointed (you can read about all my gripes in my book). Basically, after more than six years now (from Word 2007 to Word 2013), Microsoft is still more than two decades behind in the reference management field. Then again, is it fair to expect Word to do what is actually the domain of a whole difference class of software? Probably not, but then why did Microsoft even try?

One thing that Word should be able to do, and that you will find people regularly complaining about, is to neatly number equations. It seems that waaaaaaay back (I can’t even recall how far back, but I am certain that it was pre-Word 95), someone at Microsoft thought that being able to add a caption titled “Equation” with the Insert Caption tool was all that any academic would ever want (they probably have never worked through a statistics textbook).

The generally touted workaround (it remains a workaround until Microsoft actually addresses the problem, which seems as likely as Microsoft ever building true 3D capabilities into Excel) is this: Add an unbordered table consisting of one row and three columns, and then add the equation in the middle column, and the number in the right column. See, for example:

http://ist.uwaterloo.ca/ec/equations/equation2007.html

http://blogs.office.com/b/microsoft-word/archive/2006/10/20/equation-numbering.aspx

http://word.tips.net/T000273_Numbering_Equations.html

Here’s my suggested method. I admit that it still requires more manual labour than I feel should be necessary, but I do believe it presents a more robust solution than that presented by Microsoft’s employees. The first step is to add two blank paragraphs, position yourself in the first of these, and then add the equation. Then position yourself to the right of the equation (i.e., just before the first of the two paragraph marks), and press Ctrl + Alt + Enter to add a Style Separator. Now add a tab, and then insert an Equation caption (remembering to set the numbering so as to include the chapter number, and the caption itself so as to Exclude the label from the caption).

Adding an equation caption

The convention, again, is for the equations to be enclosed in parentheses, which can now be added.

This will leave your equations, properly centred on the page, with auto-numbering equation captions properly aligned, that can easily be used to generate a list of equations using the Insert Table of Figures tool.
Admittedly, this may not be an ideal list of equations, as the fact that the actual caption “Equation” is excluded from the caption, means that the list will not contain entries like “Equation 2.1                p.13,” but rather “(2.1)            p.13.”
However, using some bookmark-modification techniques, the parentheses can easily be removed from the reference, and with some creativity, the remaining list can be formatted quite effectively (this need only be done once). Also, very often the idea behind numbering is not to generate a list of the actual equations, but rather to have an auto-numbering list that can be cross-referenced. Because the Caption tool uses the SEQ field, it remains ideal for this purpose. This list will show the equations with the right numbers, in the right order, with the right page references.
By this stage, you should have something similar to this:

Equation separated from caption by Style Separator.

The last thing that needs to be done is to align the equation number. By some quirk, it seems that, while the Style separator does allow you to combine two paragraphs into one, only the first paragraph’s tab stops seem to apply—since Microsoft has totally neglected documenting the Style separator, we are left at a loss as to whether this is by design or by oversight. And yet, if you close and save the file, and re-open it, you may find Word wanting the tab stop for the second “paragraph.” Thus, the safest thing to do seems to be to add the same tab stop on both sides of the Style separator—you need to position the I-beam both to the right and the left of the Style separator, and then add a right tab stop (remember that the Tabs dialog can easily be opened with Alt, O, T) equal to the text width of your page (e.g., if the ruler width is 16 cm, then add a 16cm right tab stop), as is demonstrated below:

Adding a tab stop to align an equation caption

The end result should be something like this:

A properly aligned equation caption

 Of course, all that work can get quite tedious, which is why I have created a simple macro to automate the work for you. You could add this yourself, or you could install my Word uTIlities, which includes this macro where it can be run with a click on the ribbon.

Sub AddCaptionedEquation()
'Created by J. Raubenheimer, 2012
'Adds an empty equation box and a right-aligned equation caption
  With Selection
    .TypeParagraph
    .TypeParagraph
    .MoveUp Unit:=wdLine, Count:=2
    .OMaths.Add .Range
    .MoveRight Unit:=wdCharacter, Count:=1
    .InsertStyleSeparator
    .TypeText Text:=vbTab
    .TypeText Text:="("
    .InsertCaption Label:="Equation", ExcludeLabel:=1
    .TypeText Text:=")"
    .HomeKey Unit:=wdLine
    Dim intPos As Integer
    With .PageSetup
      intPos = .PageWidth - .LeftMargin _
      - .RightMargin - .Gutter
    End With
    .ParagraphFormat.TabStops.Add Position:=intPos, _
     Alignment:=wdAlignTabRight, Leader:=wdTabLeaderSpaces
    .HomeKey unit:=wdLine
    .ParagraphFormat.TabStops.Add Position:=intPos, _
     Alignment:=wdAlignTabRight, Leader:=wdTabLeaderSpaces
  End With
End Sub
 
Please note, though, that this macro must only be run in a document which already uses the Heading styles to divide and number the chapters.

One last thing about this method needs to be said. Because of the way Word handles cross-references, you will notice that a cross-reference in your text to the equation will include the parenthesis on the left of the equation number. This problem, is caused by the hidden bookmark Word adds around the caption number when you add the cross reference. Again, my uTIlities contain two tools (the Bookmark Manager or the Shrink bookmark tool) that fix this.

After all is said and done, I admit that this approach is still not ideal–the ideal would be a real fix from Microsoft–but it does, to me, present several advantages over other methods, and the fact that I have automated it means that this is not a bad solution to the student who needs numbered equations–it’s what I use.

Share

Using BibWord for extended referencing capabilities in Word

What options does a postgraduate student who wants to automate their referencing have? Should they buy an “expensive” RMS program? Should they consider an open source alternative? Or can Word’s citation tool  still make the grade for a thesis or dissertation despite it’s shortcomings?

Enter BibWord. BibWord was developed by Yves Dhondt of MIT in an attempt to overcome some of these limitations to the Word Citations & Bibliography tool. It is downloadable freely from the website (http://bibword.codeplex.com).

Essentially, BibWord allows you to “hotwire” Word’s citation styles and add styles of your own. The tool basically consists of two parts: Firstly, the “end user” tools are for students who just want to use the tools, you will find some extra styles which Yves created on the site. These can be copied to the Bibliography Styles folder on your PC  Also, there is the BibWord Extender which allows for the creation of numerically ordered in-text citations (e.g., when referencing according to the Vancouver referencing style). Secondly, there are the “developer” tools, the BibWord template and the BibType tool, for more advanced users, who wish to develop their own styles. I have, for example, used the BibWord template to develop a (relatively complete) South African Harvard style for Word.

If you want to use the developer set of tools, details can be found on the BibWord site. I will briefly show how to use the BibWord end user tools here.

The first thing to do is to copy the BibWord styles to the Style folder of your Word installation (typically, for Word 2010,
C:\Program Files\Microsoft Office\Office14\Bibliography\Style, and not
C:\Users\UserName\AppData\Roaming\Microsoft\Bibliography\Style)—you may need administrator access to do this. The figure below shows this folder on my PC (Windows 7, Office 2010, 32-bit), before the BibWord styles were added (i.e., these are the styles provided by Microsoft with Word 2010 SP1 or Word 2007 SP3).

Word-Citation-Styles-folder

Word Citation Styles folder

The styles that are available from the BibWord web page (as at September 2012) are listed in the table below. One more style—HarvardSA.XSL—which I created using the BibWord template, can be downloaded from the examples page.

Referencing Styles Available via BibWord

Style File names
Associação Brasileira de Normas Técnicas (ABNT) ABNT_Author.XSL
ABNT_Num.XSL
ABNT_Num_Alt.XSL
Association for Computing Machinery (ACM) ACMCitSeq.XSL
ACMNameSeq.XSL
American Medical Society (ACS) ACSCitSeq.xsl
ACSCitSeq2.xsl
American Medical Association (AMA) AMA.XSL
American Sociological Association (ASA) ASA.XSL
Chicago Footnotes (beta – not in zip) CMSFootnote.XSL
Council of Science Editors (CSE) CSECitSeq.XSL
CSENameSeq.XSL
Harvard – AGPS HarvardAGPS.XSL
Harvard – Anglia HarvardAnglia.XSL
Harvard – Exeter HarvardExeter.XSL
Harvard – Leeds HarvardLeeds.XSL
Humana Press Humana.XSL
IEEE IEEE_Alphabetical.XSL
IEEE_Reference.XSL
Lecture Notes in Computer Science (LNCS) LNCS.XSL
Modern Humanities Research Association (MHRA) MHRAFootnote.XSL
Nature Nature.XSL
Vancouver Vancouver.XSL

Once these styles have been copied to the Style folder, they will appear in the Style list of the Citations & Bibliography group of the References ribbon, and can be used as described before.

Citation-Style-list-showing-extra-BibWord-styles

Citation Style list showing extra BibWord styles

Note, though, that if the document is opened on another computer which does not have the styles loaded, the Style will display as Unknown, and any attempt to work with the citations or bibliography will result in Word changing the style to the default style for that computer.

BibWord style not found on computer

A last lifeline from Yves is the BibWord Extender, which overcomes two problems with Word’s own referencing system. Firstly, if multiple references are used from the same author(s) in the same year, the convention is to add a date suffix (e.g., 2012a, 2012b, etc.). Word cannot do this. Secondly, while Word can number references in the order they occur in the text (when using numerical referencing styles, of course), Word cannot order the bibliography alphabetically and then assign the numbers in the text accordingly. The BibWord Extender allows both of these possibilities, and it should be noted that the BibWord styles which are suffixed with an asterisk are styles which will benefit from the use of the Extender. Unfortunately, because of the way Word creates citations, making any changes to the references (e.g., adding new sources), may invalidate what has been done by the Extender, requiring it to be rerun. Thus, it is best to use it only when the document has been finalised, and no more changes to the sources will be made. Simply start the tool (it may as for confirmation or an indication of where the bibliography styles are located on your computer), then use the file browser button to load the file to the Word Document text box, and select Extend. Once it has completed, re-open Word, and re-select the same referencing style to force an update of the citation and bibliography fields.

BibWord Extender

A nice touch of this tool, which I recommend you use, is that it first creates a backup of the Word document. The backup is indicated with an “_orig” suffix before the file extension.

Conclusion

So can a thesis be done with this tool? In short, yes. I remain very disappointed by a generally substandard offering from Microsoft, but if you look at the thesis.docx file on the examples page, you will see an example of a thesis that used this for its referencing, and was submitted and accepted. If you’re planning a serious, long-term academic career, then I would say: Don’t waste your time. If you have to do a thesis or even a dissertation so that you can complete your degree and then venture out into the big wide world, then this tool will do the job for you with the minimum of fuss. Just don’t try to add hundreds of references–you will find it becoming unwieldy as you try to manage your references. I suspect that one or two hundred references will be fine, but the more you add, the worse it’s lack of serious sorting, searching and grouping tools will count against it.

Update:

Struggling to view those folders mentioned above to which you need top copy the files? Then read this post: Getting proper access to all the files on your PC

Share