SamCogan.com

Archive for March, 2009

Removing blank lines in Visual Studio

Wednesday, March 4th, 2009


Michael Freidgeim points out a clever way to remove blank lines in visual studio, which is very useful when VS decides to add them in when you import:

http://geekswithblogs.net/mnf/archive/2008/03/04/remove-empty-lines-in–text-using-visual-studio.aspx

It needs a slight modification to work with VS 2008, this will do it:
1.Click Ctrl-H
2. Tick “Use” then select ” Regular Expressions”
3. In Find specify ^$\n
4. In Replace box delete everything.
5 Click “Replace All”
All empty lines will be deleted.

Tags: ,
Posted in Uncategorized | 1 Comment »


Adding Citation/Bibliography Styles in Word 2008 (Mac)

Sunday, March 1st, 2009


I’m currently writing my University dissertation, which requires the use of the Harvard referencing system. I like words referencing system (at least in windows), but it doesn’t include the style for Harvard referencing, but I have a XSL file for doing it. Not a problem in Windows, it’s just a case of dropping it in the Bibliographies folder in the office directory and its available. However Word 2008 for Mac is a different matter.

The first issue is finding the folder to put the XSL file in. It’s hidden and looks like a nice simple word icon, it’s not it’s a package. To get to the folder for bibliography styles do this:

Go to Applications/Microsoft Office 2008/. Select the Word app, right-click it (or control-click) and select Show Package Contents. Navigate to Contents/Resources/Style/. You’ll see a bunch of XSL files in the Style folder; drop your XSL file in here.

You’d think that would be it, restart word and done. Unfortunately not, Word 2008 doesn’t like the style of the XSL file, so you need to change the following parts in a text editor:
1. On the first line: <?xml version=”1.0″ encoding=”ISO-8859-1″?>
change this to: <?xml version=”1.0″ encoding=”utf-8″?>
2. Line 13: <xsl:output method=”html” encoding=”us-ascii”/>
Change this to: <xsl:output method=”html” encoding=”UTF-8″/>

Tags: , ,
Posted in Uncategorized | 18 Comments »