<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-6702157757260886111</id><updated>2011-10-02T20:19:30.704+01:00</updated><category term='install'/><category term='washing machines'/><category term='gfortran'/><category term='lilypond'/><category term='funny'/><category term='compilers'/><category term='C'/><category term='smb'/><category term='latex'/><category term='last.fm'/><category term='Inf'/><category term='.cab'/><category term='midi'/><category term='C++'/><category term='rosegarden'/><category term='excel2007'/><category term='povray'/><category term='excel'/><category term='NaN'/><category term='sound'/><category term='bibtex'/><category term='lewis'/><category term='NAG'/><category term='file I/O'/><category term='inkscape'/><category term='ps2pdf'/><category term='hardware'/><category term='linux'/><category term='scanner'/><category term='KDE'/><category term='mandriva'/><category term='kubuntu'/><category term='fortran'/><category term='micro$oft'/><category term='fortran 95'/><category term='exp'/><category term='pdf'/><category term='pascal'/><category term='revtex'/><category term='welcome'/><category term='jabref'/><category term='xubuntu'/><category term='xfce'/><category term='gcc'/><category term='kwrite'/><category term='mp3'/><category term='kile'/><category term='fail'/><category term='ubuntu'/><category term='dvips'/><category term='hyperref'/><category term='word2007'/><title type='text'>The Splendid Fishpaste Auditorium</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://morecakelessfish.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6702157757260886111/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://morecakelessfish.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Ali</name><uri>http://www.blogger.com/profile/02072011122363335523</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='31' height='32' src='http://4.bp.blogspot.com/_io7__azysYY/SkjGw-geKaI/AAAAAAAAAAM/tsf3VDwNlWs/S220/starguy.png'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>53</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-6702157757260886111.post-5545163337820762154</id><published>2011-10-02T19:43:00.004+01:00</published><updated>2011-10-02T20:19:30.768+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='fail'/><category scheme='http://www.blogger.com/atom/ns#' term='washing machines'/><title type='text'>Broken Beko washing machine spins really fast</title><content type='html'>I know this is a tedious blog about fixing my computer problems, but since I feel duty bound to give information back to the interwebs after it's helped me, I hope a post about washing machine fixes will be acceptable.&lt;br /&gt;&lt;br /&gt;So, here's hoping this post will turn up for people google-ing for the same problems as me this morning.&lt;br /&gt;&lt;br /&gt;My Beko WMA520W washing machine broke last night.  Half way through a wash there was a "wheeee!" noise and the drum stopped.  We turned it off and took the laundry out.  Thereafter, every time I turned it on, it pumped water out, then spun really fast, then stopped.  Even turning it off at the wall or holding down the cancel button would not re-set it, as it was convinced it was mid-cycle.&lt;br /&gt;&lt;br /&gt;I bring you a two-part solution.  First, according to &lt;a href="http://www.fixya.com/support/t1148348-beko_aa"&gt;this post&lt;/a&gt;, there is a magic raindance on the front control panel to re-set the machine:&lt;br /&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Turn the power button off but leave the machine on at the wall&lt;/li&gt;&lt;li&gt;Select a 90 degree wash&lt;/li&gt;&lt;li&gt;Hold the start/cancel button down for 3 seconds and turn the power button on whilst still holding buttons down.  The start light will flash.&lt;/li&gt;&lt;li&gt;Select any spin position.&lt;/li&gt;&lt;li&gt;Hold down the start/cancel button again for 3 seconds.  If other buttons start to flash, press start/cancel again for 3 seconds.&lt;/li&gt;&lt;/ul&gt;Now the machine is happy to accept instruction.  We tried a nice rinse cycle, with the machine empty.  It filled with water okay, but when it got to tumble-time, the drum just span up to warp speed again, then stopped.&lt;br /&gt;&lt;br /&gt;After checking various things, we removed the motor and the issue turned out to be a shattered tachometer magnet.  The magnet pieces no longer rotated with the motor shaft, so there was no induced current in the tacho coil.  The control unit therefore assumed the motor was not rotating, so increased the speed until it reached some safety cut-off.&lt;br /&gt;&lt;br /&gt;In this model, the magnet appears to have been formed around a textured brass ring, so even if spares were available (and &lt;a href="http://www.ukwhitegoods.co.uk/forumsphpbb3/viewtopic.php?f=34&amp;amp;t=65169"&gt;the internet&lt;/a&gt; doesn't seem to have any) it seems unlikely you could get a replacement on without shattering it.  We opted for some Araldite Rapid Steel epoxy and have tried to glue the two pieces back together.  This may not last us very long, and we don't intend to leave the washer on when we're not around, just in case!  It we want a longer-term fix, it seems the only option is to buy a whole new motor which seems a bit stupid just for a magnet, but hey ho.  We'll try the £5 fix over the £80 one any day.  Of course, the third option is to obtain the new motor less expensively by cannibalising other Beko machines at the skip or otherwise obtaining a broken one for spares.&lt;br /&gt;&lt;br /&gt;Other news from my fascinating journey round the Beko's guts:&lt;br /&gt;&lt;br /&gt;We've always had to pour another 20 litres of water through the tray on a wash cycle as the machine doesn't put anywhere near enough water in.  However, it looks like we can make adjustments on the fill pressure sensor (top front right corner) in the future, but let's break one thing at a time for now.&lt;br /&gt;&lt;br /&gt;Some corners of the web mention timing wheels and other such nonsense.  I didn't see any of those inside our beastie, so I conclude most of the control goes on inside the processor (an Atmega32).  When that gets toasted, it'll be £50 for a new board :-(&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6702157757260886111-5545163337820762154?l=morecakelessfish.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://morecakelessfish.blogspot.com/feeds/5545163337820762154/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6702157757260886111&amp;postID=5545163337820762154' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6702157757260886111/posts/default/5545163337820762154'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6702157757260886111/posts/default/5545163337820762154'/><link rel='alternate' type='text/html' href='http://morecakelessfish.blogspot.com/2011/10/broken-beko-washing-machine-spins.html' title='Broken Beko washing machine spins really fast'/><author><name>Ali</name><uri>http://www.blogger.com/profile/02072011122363335523</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='31' height='32' src='http://4.bp.blogspot.com/_io7__azysYY/SkjGw-geKaI/AAAAAAAAAAM/tsf3VDwNlWs/S220/starguy.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6702157757260886111.post-2146400353082030392</id><published>2011-09-05T21:02:00.002+01:00</published><updated>2011-09-05T21:07:28.677+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='mandriva'/><category scheme='http://www.blogger.com/atom/ns#' term='linux'/><category scheme='http://www.blogger.com/atom/ns#' term='lewis'/><title type='text'>Linux hostname</title><content type='html'>This shouldn't have taken me so long.  My husband wouldn't name his new laptop after a popular British F1 driver, until I managed to change the desktop hostname to that of his team-mate.  The desktop was previously so named because it was so fast (ha ha oh).&lt;br /&gt;&lt;br /&gt;Anyway, the answer was to add&lt;br /&gt;&lt;div style="text-align: center; color: rgb(204, 204, 255);"&gt;HOSTNAME="F1driver"&lt;br /&gt;&lt;/div&gt;to &lt;span style="color: rgb(153, 153, 255);"&gt;/etc/sysconfig/network&lt;/span&gt; (since it wasn't already there for me to change).  Alternatively, I could have done&lt;br /&gt;&lt;div style="text-align: center; color: rgb(153, 153, 255);"&gt;sysctl kernel.hostname=F1driver&lt;br /&gt;&lt;/div&gt;as superuser.&lt;br /&gt;&lt;br /&gt;It's a win.&lt;br /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6702157757260886111-2146400353082030392?l=morecakelessfish.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://morecakelessfish.blogspot.com/feeds/2146400353082030392/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6702157757260886111&amp;postID=2146400353082030392' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6702157757260886111/posts/default/2146400353082030392'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6702157757260886111/posts/default/2146400353082030392'/><link rel='alternate' type='text/html' href='http://morecakelessfish.blogspot.com/2011/09/linux-hostname.html' title='Linux hostname'/><author><name>Ali</name><uri>http://www.blogger.com/profile/02072011122363335523</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='31' height='32' src='http://4.bp.blogspot.com/_io7__azysYY/SkjGw-geKaI/AAAAAAAAAAM/tsf3VDwNlWs/S220/starguy.png'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6702157757260886111.post-418679448052786341</id><published>2010-11-16T08:09:00.003Z</published><updated>2010-11-16T08:26:19.116Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='fail'/><category scheme='http://www.blogger.com/atom/ns#' term='word2007'/><category scheme='http://www.blogger.com/atom/ns#' term='micro$oft'/><title type='text'>Equation referencing in Word 2007</title><content type='html'>It baffles me that something so essential is not simple with micro$oft word.  If you are going to want to put equations in your document, &lt;span style="font-style: italic;"&gt;of course&lt;/span&gt; you will want to talk about them!  (Otherwise, why bother?)  To talk about them, &lt;span style="font-style: italic;"&gt;of course&lt;/span&gt; you will need to reference them and the best way of doing that is with numbers.  Why then is there no simple way to do this?  Why give an equation tool but no easy numbering method?&lt;br /&gt;&lt;br /&gt;So: how to insert a numbered equation in Word 2007 and reference it in the text.  For the first part, I follow &lt;a href="http://blogs.msdn.com/b/microsoft_office_word/archive/2006/10/20/equation-numbering.aspx"&gt;this blog post&lt;/a&gt;.&lt;br /&gt;&lt;ol&gt;&lt;li&gt;Insert a 3 column, 1 row table.&lt;/li&gt;&lt;li&gt;Format the table to fill 100% of the page width, with the column widths in percent as 15:70:15.&lt;/li&gt;&lt;li&gt;Centre the text in the middle column and remove all table borders.  Make the spacing below the table the same as other paragraphs.&lt;/li&gt;&lt;li&gt;Insert your equation in the middle column.  (I use insert&gt;object&gt;M$ equation 3.0 since the new equation package won't work on my machine).&lt;/li&gt;&lt;li&gt;Insert a number in the right-hand column by insert&gt;multilevel list.  You can define your own so that the numbers are formatted like (x).&lt;br /&gt;&lt;/li&gt;&lt;/ol&gt;&lt;p&gt;Here is the nice part (ha ha).  Since my "equation gallery" is broken too, I can't save these shenanigans for easy re-use.  To insert a new equation later, I simply copy the whole table and paste it elsewhere and change the equation!  The numbers automatically sort themselves out (hallelujah).&lt;br /&gt;&lt;/p&gt;&lt;p&gt;To reference the numbered equation in the text:&lt;/p&gt;&lt;ol&gt;&lt;li&gt;Highlight the equation number and insert&gt;bookmark.  Give it a nice name.&lt;/li&gt;&lt;li&gt;Put the cursor at the place where you want your reference inserted and insert&gt;cross-reference.  Insert a reference of type "bookmark", select the name of your equation and insert the reference to the paragraph number (full context).&lt;br /&gt;&lt;/li&gt;&lt;/ol&gt; &lt;p&gt;There.  That was a complete pain, wasn't it?  And it took about 40 mouse-clicks!  Doesn't your equation look horridly rendered too?  Oh, I love LaTeX and I want it back.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6702157757260886111-418679448052786341?l=morecakelessfish.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://morecakelessfish.blogspot.com/feeds/418679448052786341/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6702157757260886111&amp;postID=418679448052786341' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6702157757260886111/posts/default/418679448052786341'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6702157757260886111/posts/default/418679448052786341'/><link rel='alternate' type='text/html' href='http://morecakelessfish.blogspot.com/2010/11/equation-referencing-in-word-2007.html' title='Equation referencing in Word 2007'/><author><name>Ali</name><uri>http://www.blogger.com/profile/02072011122363335523</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='31' height='32' src='http://4.bp.blogspot.com/_io7__azysYY/SkjGw-geKaI/AAAAAAAAAAM/tsf3VDwNlWs/S220/starguy.png'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6702157757260886111.post-385244353556265432</id><published>2010-10-29T18:45:00.003+01:00</published><updated>2010-10-29T18:51:46.695+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='inkscape'/><category scheme='http://www.blogger.com/atom/ns#' term='excel'/><category scheme='http://www.blogger.com/atom/ns#' term='excel2007'/><category scheme='http://www.blogger.com/atom/ns#' term='micro$oft'/><title type='text'>Save excel graphs as vector images</title><content type='html'>This is a lame workaround to get excel plots as vector images.&lt;br /&gt;&lt;br /&gt;Select your Micro$oft Excel plots.  Copy.  Open Micro$oft PowerPoint.  Paste-special as enhanced metafile (emf) into an otherwise empty slide.  Save your PowerPoint slide as an "other format" file (on the 2007 menu), and choose "emf" (an enhanced &lt;span style="font-style: italic;"&gt;windows&lt;/span&gt; metafile!  wow!).  Import your emf file into &lt;a href="http://inkscape.org/"&gt;inkscape&lt;/a&gt; and ungroup the object.  Delect all the a4-sized crappy blank space from the image and enjoy.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6702157757260886111-385244353556265432?l=morecakelessfish.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://morecakelessfish.blogspot.com/feeds/385244353556265432/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6702157757260886111&amp;postID=385244353556265432' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6702157757260886111/posts/default/385244353556265432'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6702157757260886111/posts/default/385244353556265432'/><link rel='alternate' type='text/html' href='http://morecakelessfish.blogspot.com/2010/10/save-excel-graphs-as-vector-images.html' title='Save excel graphs as vector images'/><author><name>Ali</name><uri>http://www.blogger.com/profile/02072011122363335523</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='31' height='32' src='http://4.bp.blogspot.com/_io7__azysYY/SkjGw-geKaI/AAAAAAAAAAM/tsf3VDwNlWs/S220/starguy.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6702157757260886111.post-8021046891402578232</id><published>2010-10-29T18:35:00.003+01:00</published><updated>2010-10-29T18:44:54.617+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='fail'/><category scheme='http://www.blogger.com/atom/ns#' term='excel'/><category scheme='http://www.blogger.com/atom/ns#' term='excel2007'/><category scheme='http://www.blogger.com/atom/ns#' term='micro$oft'/><title type='text'>Excel axis labels workaround</title><content type='html'>&lt;span style="color: rgb(153, 153, 255); font-weight: bold;"&gt;Problem:&lt;/span&gt;&lt;br /&gt;When making an x-y scatter plot in Micro$oft Excel 2007, there appears to be a bug which prevents the x-axis tick labels displaying correctly (at least on my machine).  When you set the x-axis tick labels to text, e.g. "apple", "banana", "pear"..., the chart just displays the labels as 1, 2, 3... even when you are careful to select the cells containing the text labels as your x-data, and despite them showing up correctly in the "select data" dialogue box.  This only appears to be an issue for the x-y scatter plot type.&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(153, 153, 255); font-weight: bold;"&gt;Workaround 1:&lt;/span&gt;&lt;br /&gt;Install linux boot disc...&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(153, 153, 255); font-weight: bold;"&gt;Workaround 2:&lt;/span&gt;&lt;br /&gt;Add a new dummy data series to your graph with x = {"apple", "banana", "pear"...} and y = {0, 0, 0...}, or some other value below the y-axis minimum.  Select only this series, and set the chart type to area.  The x-axis tick labels should now display correctly for the whole chart.  Obviously delete the dummy data label from your legend, if you have one.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6702157757260886111-8021046891402578232?l=morecakelessfish.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://morecakelessfish.blogspot.com/feeds/8021046891402578232/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6702157757260886111&amp;postID=8021046891402578232' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6702157757260886111/posts/default/8021046891402578232'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6702157757260886111/posts/default/8021046891402578232'/><link rel='alternate' type='text/html' href='http://morecakelessfish.blogspot.com/2010/10/excel-axis-labels-workaround.html' title='Excel axis labels workaround'/><author><name>Ali</name><uri>http://www.blogger.com/profile/02072011122363335523</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='31' height='32' src='http://4.bp.blogspot.com/_io7__azysYY/SkjGw-geKaI/AAAAAAAAAAM/tsf3VDwNlWs/S220/starguy.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6702157757260886111.post-2152566498241505205</id><published>2010-10-01T19:21:00.002+01:00</published><updated>2010-10-01T19:40:06.169+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='latex'/><category scheme='http://www.blogger.com/atom/ns#' term='ps2pdf'/><category scheme='http://www.blogger.com/atom/ns#' term='pdf'/><title type='text'>Stupid papersize stupid stupid</title><content type='html'>After finally getting to the stage where my thesis would compile on a different computer (see last post to install the extra .sty files), I then discover my page headers have disappeared on my pdf output.  It turns out that this is due to the default ps2pdf setting being US letter paper, rather than the A4 size that the rest of my document is on.  The answer (for the moment, anyway) is this:&lt;br /&gt;&lt;span style="color: rgb(153, 153, 255);"&gt;ps2pdf -sPAPERSIZE=a4 thesis.ps&lt;/span&gt;&lt;br /&gt;I'm forced to go a-latexin' followed by dvipsin' then ps2pdf because of some bounding box issues with my images with pdflatex that I can't be bothered to solve.&lt;br /&gt;That will serve me right for having a typo in my thesis.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6702157757260886111-2152566498241505205?l=morecakelessfish.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://morecakelessfish.blogspot.com/feeds/2152566498241505205/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6702157757260886111&amp;postID=2152566498241505205' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6702157757260886111/posts/default/2152566498241505205'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6702157757260886111/posts/default/2152566498241505205'/><link rel='alternate' type='text/html' href='http://morecakelessfish.blogspot.com/2010/10/stupid-papersize-stupid-stupid.html' title='Stupid papersize stupid stupid'/><author><name>Ali</name><uri>http://www.blogger.com/profile/02072011122363335523</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='31' height='32' src='http://4.bp.blogspot.com/_io7__azysYY/SkjGw-geKaI/AAAAAAAAAAM/tsf3VDwNlWs/S220/starguy.png'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6702157757260886111.post-3089248086840175760</id><published>2010-09-30T07:27:00.004+01:00</published><updated>2010-09-30T07:33:53.896+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='latex'/><category scheme='http://www.blogger.com/atom/ns#' term='install'/><category scheme='http://www.blogger.com/atom/ns#' term='mandriva'/><category scheme='http://www.blogger.com/atom/ns#' term='linux'/><title type='text'>Installing a latex .sty file</title><content type='html'>I've never managed to successfully do this until now.  Here's the deal:&lt;br /&gt;1) download &amp;amp; unzip the package from CTAN&lt;br /&gt;2) run latex on the .ins file so that it creates a .sty file&lt;br /&gt;3) find out what your computer thinks your TDS tree should be:&lt;br /&gt;&lt;span style="color: rgb(153, 153, 255);"&gt;kpsewhich -var-value TEXMFLOCAL&lt;/span&gt;&lt;br /&gt;(mine says "&lt;span style="color: rgb(204, 204, 255);"&gt;/usr/local/share/texmf&lt;/span&gt;")&lt;br /&gt;4) create the tree &lt;span style="color: rgb(204, 204, 255);"&gt;/usr/local/share/texmf/tex/latex/&lt;package&gt;&lt;/span&gt; if it isn't already there (where &lt;package&gt; is the name of your sty file)&lt;br /&gt;5) paste in your .sty file&lt;br /&gt;6) run &lt;span style="color: rgb(153, 153, 255);"&gt;mktexlsr /usr/local/share/texmf/&lt;/span&gt;&lt;br /&gt;7) profit.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6702157757260886111-3089248086840175760?l=morecakelessfish.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://morecakelessfish.blogspot.com/feeds/3089248086840175760/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6702157757260886111&amp;postID=3089248086840175760' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6702157757260886111/posts/default/3089248086840175760'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6702157757260886111/posts/default/3089248086840175760'/><link rel='alternate' type='text/html' href='http://morecakelessfish.blogspot.com/2010/09/installing-latex-sty-file.html' title='Installing a latex .sty file'/><author><name>Ali</name><uri>http://www.blogger.com/profile/02072011122363335523</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='31' height='32' src='http://4.bp.blogspot.com/_io7__azysYY/SkjGw-geKaI/AAAAAAAAAAM/tsf3VDwNlWs/S220/starguy.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6702157757260886111.post-6068941875793585068</id><published>2010-08-16T17:35:00.002+01:00</published><updated>2010-08-16T17:49:43.136+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='latex'/><category scheme='http://www.blogger.com/atom/ns#' term='pdf'/><title type='text'>Including pdf files into latex</title><content type='html'>Further to my &lt;a href="http://morecakelessfish.blogspot.com/2010/08/latex-coloured-text-and-blank-page-fun.html"&gt;earlier post&lt;/a&gt; today, this post is the story of how I managed to get my research papers into my thesis as appendices.  The earlier post tells a fascinating tale of how I sorted the page counters out and forced some blank pages.  I then compiled up to pdf (via ps2pdf, to include my eps diagrams).  To insert my other pdf pages I wrote a new latex file to stitch stuff together using pdfpages.  Sadly this makes my hyperlinks go away, but nevermind.  The object here is to be able to have a file which can be printed and bound by people who don't care to re-arrange pages for me.  Behold:&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(153, 153, 255);"&gt;\documentclass[a4paper,portrait]{article}&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(153, 153, 255);"&gt;\usepackage{pdfpages}&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(153, 153, 255);"&gt;\begin{document}&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(153, 153, 255);"&gt;\includepdf[pages={1-32}]{thesis.pdf}&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(153, 153, 255);"&gt;\includepdf[pages={33-34}, landscape, turn=false]{thesis.pdf} % some landscape pages&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(153, 153, 255);"&gt;\includepdf[pages={35-202}]{thesis.pdf}&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(153, 153, 255);"&gt;\includepdf[pages={1-5,{},{},{}}, landscape, nup=1x2, turn=false]{Appendices/specs.pdf}&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(153, 153, 255);"&gt;\includepdf[pages={203-204}]{thesis.pdf}&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(153, 153, 255);"&gt;\includepdf[pages={1-4}]{Appendices/prl.pdf}&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(153, 153, 255);"&gt;\includepdf[pages={205-206}]{thesis.pdf}&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(153, 153, 255);"&gt;\includepdf[pages={1-4}]{Appendices/pra.pdf}&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(153, 153, 255);"&gt;\includepdf[pages={207-220}]{thesis.pdf}&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(153, 153, 255);"&gt;\end{document}&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Chunks of my thesis are included (I guess you can spot them), including some landscape pages as a special case.  The "turn = false" means that any pdf viewers still display them as portrait.  This was important to me, as I want to be able to check they're not going to print upside down!  The last two appendices are four pages each and on American letter ("freedom") paper, but that's okay: they'll be scaled for A4.  The "specs.pdf" file is 5 pages long and I have included it as 2-up printing on landscape pages which show as portrait in the viewer.  Since I needed ensure that they occupy 4 sides of A4 in total, I included 3 blank pages denoted by the empty braces {}.  So, the first two-and-a-half sides of A4 have the 5 pages of specs.pdf, and then there are one-and-a-half blank sides following.&lt;br /&gt;&lt;br /&gt;I compile with pdflatex.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6702157757260886111-6068941875793585068?l=morecakelessfish.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://morecakelessfish.blogspot.com/feeds/6068941875793585068/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6702157757260886111&amp;postID=6068941875793585068' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6702157757260886111/posts/default/6068941875793585068'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6702157757260886111/posts/default/6068941875793585068'/><link rel='alternate' type='text/html' href='http://morecakelessfish.blogspot.com/2010/08/including-pdf-files-into-latex.html' title='Including pdf files into latex'/><author><name>Ali</name><uri>http://www.blogger.com/profile/02072011122363335523</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='31' height='32' src='http://4.bp.blogspot.com/_io7__azysYY/SkjGw-geKaI/AAAAAAAAAAM/tsf3VDwNlWs/S220/starguy.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6702157757260886111.post-1217850197773405131</id><published>2010-08-16T15:35:00.003+01:00</published><updated>2010-08-16T15:49:58.578+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='latex'/><category scheme='http://www.blogger.com/atom/ns#' term='pdf'/><title type='text'>LaTeX: coloured text and blank page fun.</title><content type='html'>I want to insert some research papers into my thesis.  These are in separate pdf files which I don't yet know how I will insert.  (pdfpages isn't my friend because I'm banned from using pdflatex due to having eps graphics which I can't be bothered to convert.)&lt;br /&gt;&lt;br /&gt;I'll figure out that bit in a minute, but right now I want to force a blank page (&lt;span style="font-style: italic;"&gt;with&lt;/span&gt; a header and footer) which will be printed on the reverse of an appendix section page.  This has to come before the place where I will insert the pdf pages.  Actually, latex adds this page automatically at the moment, because it wants my "Appendix" section pages to be on the right-hand sides of my document.  The issue is that if I then start to add to my page counter, the reverse-side blank page has the wrong page number for where it will be printed!&lt;br /&gt;&lt;br /&gt;Here's my work-around.  Each introductory page for an appendix goes like this:&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(153, 153, 255);"&gt;\chapter{An included paper}&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(153, 153, 255);"&gt;Following is a copy of an amazing paper from our research group.&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(153, 153, 255);"&gt;\newpage&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(153, 153, 255);"&gt;\mbox{}&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;The mbox ensures the new page actually happens.  Then, before the next \include{} in the master file, I add four pages (the research paper length!) to my counter.&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(153, 153, 255);"&gt;\addtocounter{page}{4}&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;So far, so awesome.  Now I'll fight to include the papers in the file.  I'm thinking psutils...&lt;br /&gt;&lt;br /&gt;OH!  I forgot to tell you about coloured text!  Before I found the mbox doo-dah I was going to just write "cheese" in white on the blank page.  I'd do the following in my preamble:&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(153, 153, 255);"&gt;\usepackage{color}&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(153, 153, 255);"&gt;\definecolor{orange}{rgb}{1,0.5,0}&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;and then on my "blank" page, I'd do:&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(153, 153, 255);"&gt;\newpage&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(153, 153, 255);"&gt;\textcolor{orange}{cheese}&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Ok, that's orange, but you get the picture.  You can define white.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6702157757260886111-1217850197773405131?l=morecakelessfish.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://morecakelessfish.blogspot.com/feeds/1217850197773405131/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6702157757260886111&amp;postID=1217850197773405131' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6702157757260886111/posts/default/1217850197773405131'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6702157757260886111/posts/default/1217850197773405131'/><link rel='alternate' type='text/html' href='http://morecakelessfish.blogspot.com/2010/08/latex-coloured-text-and-blank-page-fun.html' title='LaTeX: coloured text and blank page fun.'/><author><name>Ali</name><uri>http://www.blogger.com/profile/02072011122363335523</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='31' height='32' src='http://4.bp.blogspot.com/_io7__azysYY/SkjGw-geKaI/AAAAAAAAAAM/tsf3VDwNlWs/S220/starguy.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6702157757260886111.post-8800313469041586847</id><published>2010-06-07T18:43:00.002+01:00</published><updated>2010-06-07T18:48:04.398+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='latex'/><category scheme='http://www.blogger.com/atom/ns#' term='hyperref'/><title type='text'>Non-coloured hyperrefs in latex</title><content type='html'>So, I love to leap around my thesis like superman using the "hyperref" package.  However, I do not like increased printing costs by having pretty pink references on every page (our printer selects the cheaper b/w printing intelligently).  I was colouring my links black using this clunky bit of code:&lt;br /&gt;&lt;span style="color: rgb(153, 153, 255);"&gt;\hypersetup{&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(153, 153, 255);"&gt;     colorlinks,%&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(153, 153, 255);"&gt;     citecolor=black,%&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(153, 153, 255);"&gt;    filecolor=black,%&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(153, 153, 255);"&gt;     linkcolor=black,%&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(153, 153, 255);"&gt;     urlcolor=black&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(153, 153, 255);"&gt;}&lt;/span&gt;&lt;br /&gt;...but this resulted in the printer choosing to mix colours to achieve black text on pages with a hyperlink!  Argh!  It looked stupid, it was stupid!  Hopefully this more elegant bit of code might fix whatever oddity is occuring:&lt;br /&gt;&lt;span style="color: rgb(153, 153, 255);"&gt;\hypersetup{pdfborder={0 0 0},colorlinks = false}&lt;/span&gt;&lt;br /&gt;The pdf certainly looks no different... fingers crossed for printing time.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6702157757260886111-8800313469041586847?l=morecakelessfish.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://morecakelessfish.blogspot.com/feeds/8800313469041586847/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6702157757260886111&amp;postID=8800313469041586847' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6702157757260886111/posts/default/8800313469041586847'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6702157757260886111/posts/default/8800313469041586847'/><link rel='alternate' type='text/html' href='http://morecakelessfish.blogspot.com/2010/06/non-coloured-hyperrefs-in-latex.html' title='Non-coloured hyperrefs in latex'/><author><name>Ali</name><uri>http://www.blogger.com/profile/02072011122363335523</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='31' height='32' src='http://4.bp.blogspot.com/_io7__azysYY/SkjGw-geKaI/AAAAAAAAAAM/tsf3VDwNlWs/S220/starguy.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6702157757260886111.post-2922644454793566504</id><published>2010-06-04T15:46:00.002+01:00</published><updated>2010-06-04T15:55:34.001+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='latex'/><category scheme='http://www.blogger.com/atom/ns#' term='fail'/><category scheme='http://www.blogger.com/atom/ns#' term='pdf'/><title type='text'>Sidewaystable prints upside down</title><content type='html'>I have two consecutive landscape tables in my thesis using the "sidewaystable" package.  The package rotates them so that the top of the table is closest to the spine of the book, however this manifests itself in the pdf as the page headers and footers appearing to the right of one landscape page, and to the left of the next.  When I print double sided, one page has a header which is upside down.  My preamble is thusly:&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(153, 153, 255);"&gt;\documentclass[a4paper,11pt,twoside]{book}&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(153, 153, 255);"&gt;\usepackage{rotating}&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;... the solution was to choose:&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(153, 153, 255);"&gt;\usepackage[figuresright]{rotating}&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;So that the figures are always in one direction.  Now my headers are always to the right of the landscape page.  Hopefully this will now force them to be the right-way-up!  If they both print upside down, I suppose I must choose [figuresleft] instead.  I've no idea if this is just a symptom of my particular combination of pdf reader and printer, but hey-ho.&lt;br /&gt;&lt;br /&gt;Thanks to the Szwer for solving this one for me.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6702157757260886111-2922644454793566504?l=morecakelessfish.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://morecakelessfish.blogspot.com/feeds/2922644454793566504/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6702157757260886111&amp;postID=2922644454793566504' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6702157757260886111/posts/default/2922644454793566504'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6702157757260886111/posts/default/2922644454793566504'/><link rel='alternate' type='text/html' href='http://morecakelessfish.blogspot.com/2010/06/sidewaystable-prints-upside-down.html' title='Sidewaystable prints upside down'/><author><name>Ali</name><uri>http://www.blogger.com/profile/02072011122363335523</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='31' height='32' src='http://4.bp.blogspot.com/_io7__azysYY/SkjGw-geKaI/AAAAAAAAAAM/tsf3VDwNlWs/S220/starguy.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6702157757260886111.post-3926148482058732486</id><published>2010-03-24T20:25:00.003Z</published><updated>2010-03-24T20:41:15.481Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='dvips'/><category scheme='http://www.blogger.com/atom/ns#' term='latex'/><category scheme='http://www.blogger.com/atom/ns#' term='bibtex'/><title type='text'>Breaking URLs in BibTeX</title><content type='html'>Here's a work-around for a sticky problem when citing URLs in LaTeX documents.&lt;br /&gt;&lt;br /&gt;My problem manifested itself in ugly URLs in my bibliography which did not break over multiple lines, causing underfull hboxes all over the shop: the line of text preceding the URLs had 5 words spread horridly across the page.&lt;br /&gt;&lt;br /&gt;I tried various work-arounds found via google but the one that eventually solved my problem was found &lt;a href="http://www.scribd.com/doc/6328690/BibTeX-Tips-and-FAQ"&gt;here&lt;/a&gt; in "BibTeX tips and FAQ" by M. Shell and D. Hoadley.&lt;br /&gt;&lt;br /&gt;My preamble contains the following:&lt;br /&gt;&lt;span style="color: rgb(153, 153, 255);"&gt;\usepackage{url}&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(153, 153, 255);"&gt;\usepackage[ps2pdf, pagebackref]{hyperref}&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;And I cite all my URLs in BibTeX like this:&lt;br /&gt;&lt;span style="color: rgb(153, 153, 255);"&gt;\url{http://morecakelessfish.blogspot.com/}&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;I like to compile into pdf by using dvi2ps then ps2pdf otherwise I seem to have some issues with offset bounding boxes in my pyxplot .eps graphics.  Despite calling the url package in my references (see example above), my URLs &lt;span style="font-style: italic;"&gt;still&lt;/span&gt; weren't breaking.    Apparently this is a problem when going via dvi after including the hyperref package.  The problem was solved by including &lt;a href="http://www.ctan.org/tex-archive/help/Catalogue/entries/breakurl.html"&gt;breakurl.sty&lt;/a&gt; AFTER the hyperref package in my preamble thusly:&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(153, 153, 255);"&gt;\usepackage{url}&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(153, 153, 255);"&gt; \usepackage[ps2pdf, pagebackref]{hyperref}&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(153, 153, 255);"&gt;\usepackage{breakurl}&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Jobs a good'un.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6702157757260886111-3926148482058732486?l=morecakelessfish.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://morecakelessfish.blogspot.com/feeds/3926148482058732486/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6702157757260886111&amp;postID=3926148482058732486' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6702157757260886111/posts/default/3926148482058732486'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6702157757260886111/posts/default/3926148482058732486'/><link rel='alternate' type='text/html' href='http://morecakelessfish.blogspot.com/2010/03/breaking-urls-in-bibtex.html' title='Breaking URLs in BibTeX'/><author><name>Ali</name><uri>http://www.blogger.com/profile/02072011122363335523</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='31' height='32' src='http://4.bp.blogspot.com/_io7__azysYY/SkjGw-geKaI/AAAAAAAAAAM/tsf3VDwNlWs/S220/starguy.png'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6702157757260886111.post-5878652432974694029</id><published>2009-07-23T17:00:00.003+01:00</published><updated>2009-07-23T17:11:32.408+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='xubuntu'/><category scheme='http://www.blogger.com/atom/ns#' term='linux'/><category scheme='http://www.blogger.com/atom/ns#' term='xfce'/><category scheme='http://www.blogger.com/atom/ns#' term='ubuntu'/><category scheme='http://www.blogger.com/atom/ns#' term='smb'/><title type='text'>Battles won against my laptop</title><content type='html'>My 7 year old laptop is now too geriatric to run anything too meaty.  Windows is definitely out of the question, so I have Xubuntu.&lt;br /&gt;Today, I bring you:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 153, 255);"&gt;How to add a terminal launcher to the xfce panel&lt;/span&gt;&lt;span style="font-weight: bold; color: rgb(153, 153, 255);"&gt;:&lt;/span&gt;&lt;br /&gt;right-click&gt;add new item&gt;launcher&lt;br /&gt;Then find the terminal program in /usr/bin/xfce4-terminal and drag it into the launcher.  Or, just set command to "&lt;span style="font-style: italic; color: rgb(204, 204, 255);"&gt;/usr/bin/xfce4-terminal&lt;/span&gt;" and uncheck the "run in terminal" box.  Give it a nice name and picture of a terminal window.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 153, 255);"&gt;How to connect to a windows shared area when smb4k is acting up:&lt;/span&gt;&lt;br /&gt;If you can see the various windows computers in smb4k (eg ACOMPUTER) but it won't let you mount ACOMPUTER/afile, then try this on the command line...&lt;br /&gt;&lt;div style="text-align: center;"&gt;&lt;span style="color: rgb(204, 204, 255); font-style: italic;"&gt;sudo mount -t smbfs //ACOMPUTER/afile/ -o username=myname /home/myfile/MyMount/&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;...where you have provided your username to access the shared area.  When prompted, give the corresponding password.&lt;br /&gt;To unmount:&lt;br /&gt;&lt;div style="text-align: center;"&gt;&lt;span style="font-style: italic; color: rgb(204, 204, 255);"&gt;sudo umount /home/myfile/MyMount/&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6702157757260886111-5878652432974694029?l=morecakelessfish.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://morecakelessfish.blogspot.com/feeds/5878652432974694029/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6702157757260886111&amp;postID=5878652432974694029' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6702157757260886111/posts/default/5878652432974694029'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6702157757260886111/posts/default/5878652432974694029'/><link rel='alternate' type='text/html' href='http://morecakelessfish.blogspot.com/2009/07/battles-won-against-my-laptop.html' title='Battles won against my laptop'/><author><name>Ali</name><uri>http://www.blogger.com/profile/02072011122363335523</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='31' height='32' src='http://4.bp.blogspot.com/_io7__azysYY/SkjGw-geKaI/AAAAAAAAAAM/tsf3VDwNlWs/S220/starguy.png'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6702157757260886111.post-1580492997473414697</id><published>2009-07-17T13:57:00.003+01:00</published><updated>2009-07-22T17:10:54.912+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='inkscape'/><title type='text'>Greek letters in Inkscape</title><content type='html'>To get greek letters, press &lt;span style="color: rgb(204, 204, 255); font-style: italic;"&gt;Ctrl+u&lt;/span&gt;.  You'll see "&lt;span style="color: rgb(153, 153, 255);"&gt;Unicode (Enter to finish)&lt;/span&gt;" come up in the status bar.  Let go of &lt;span style="font-style: italic; color: rgb(204, 204, 255);"&gt;Ctrl+u&lt;/span&gt; and type in your &lt;a href="http://unicode.org/charts/PDF/U0370.pdf"&gt;unicode number&lt;/a&gt; followed by the return key.&lt;br /&gt;&lt;br /&gt;w00.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6702157757260886111-1580492997473414697?l=morecakelessfish.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://morecakelessfish.blogspot.com/feeds/1580492997473414697/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6702157757260886111&amp;postID=1580492997473414697' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6702157757260886111/posts/default/1580492997473414697'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6702157757260886111/posts/default/1580492997473414697'/><link rel='alternate' type='text/html' href='http://morecakelessfish.blogspot.com/2009/07/greek-letters-in-inkscape.html' title='Greek letters in Inkscape'/><author><name>Ali</name><uri>http://www.blogger.com/profile/02072011122363335523</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='31' height='32' src='http://4.bp.blogspot.com/_io7__azysYY/SkjGw-geKaI/AAAAAAAAAAM/tsf3VDwNlWs/S220/starguy.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6702157757260886111.post-1541851954385103587</id><published>2009-07-03T13:29:00.003+01:00</published><updated>2009-07-03T13:38:54.904+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='fortran'/><category scheme='http://www.blogger.com/atom/ns#' term='fortran 95'/><category scheme='http://www.blogger.com/atom/ns#' term='file I/O'/><category scheme='http://www.blogger.com/atom/ns#' term='gfortran'/><title type='text'>Formatted Read Statements yet again.</title><content type='html'>Further to my last post, I want to add a code snippet for reading in large arrays with many columns.  It has some nice implicit do-loops.  "myfile.ans" contains 1 column of integers, followed by Ncols of data that I want to read into "Blam" and Ncols that I want to read into "Dlam".&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(153, 153, 255);"&gt;    integer :: i, Nrows, Ncols&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(153, 153, 255);"&gt;    real :: Blam(Nrows, Ncols), Dlam(Nrows, Ncols)&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(153, 153, 255);"&gt;    integer :: pixies(Nrows)&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(153, 153, 255);"&gt;    character(1) :: tmp&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(153, 153, 255);"&gt;    open(unit=2,file='myfile.ans',status='OLD',action='READ')&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(153, 153, 255);"&gt;    do i = 1,Nrows,&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(153, 153, 255);"&gt;        read(2,20) pixies(i), (tmp,Blam(i,j), j=1,Ncols), (tmp,Dlam(i,j), j=1,Ncols)&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(153, 153, 255);"&gt;    enddo&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(153, 153, 255);"&gt;    close(2)&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(153, 153, 255);"&gt;    20 format(I3, 36(A1,F6.4))&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Annoyingly, I can't seem to replace 36 (=2*Ncols) with a variable name or my compiler shouts.  A mystery for another time I think.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6702157757260886111-1541851954385103587?l=morecakelessfish.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://morecakelessfish.blogspot.com/feeds/1541851954385103587/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6702157757260886111&amp;postID=1541851954385103587' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6702157757260886111/posts/default/1541851954385103587'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6702157757260886111/posts/default/1541851954385103587'/><link rel='alternate' type='text/html' href='http://morecakelessfish.blogspot.com/2009/07/formatted-read-statements-yet-again.html' title='Formatted Read Statements yet again.'/><author><name>Ali</name><uri>http://www.blogger.com/profile/02072011122363335523</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='31' height='32' src='http://4.bp.blogspot.com/_io7__azysYY/SkjGw-geKaI/AAAAAAAAAAM/tsf3VDwNlWs/S220/starguy.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6702157757260886111.post-3668472231655009748</id><published>2009-06-22T12:57:00.002+01:00</published><updated>2009-06-22T13:04:22.860+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='fortran'/><category scheme='http://www.blogger.com/atom/ns#' term='fortran 95'/><category scheme='http://www.blogger.com/atom/ns#' term='file I/O'/><title type='text'>Formatted Read Statements again.</title><content type='html'>Grrr.  I'm trying to read in a formatted file of integers such as:&lt;br /&gt;&lt;span style="color: rgb(153, 153, 255);"&gt;  1   1   1&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(153, 153, 255);"&gt; 10  10  10&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(153, 153, 255);"&gt;100 100 100&lt;/span&gt;&lt;br /&gt;(... three characters wide, one space between each column)&lt;br /&gt;Fortran is giving me junk unless I format my read statement with&lt;br /&gt;&lt;span style="font-style: italic; color: rgb(204, 204, 255);"&gt;10 format(I3,A1,I3,A1,I3)&lt;/span&gt;&lt;br /&gt;where I read the single space into a temporary variable declared as:&lt;br /&gt;&lt;span style="color: rgb(204, 204, 255); font-style: italic;"&gt;character(1) :: tmp&lt;/span&gt;&lt;br /&gt;This is why I am in a bad mood with Fortran today.  I put faith in it, and this is how it repays me.  Plus, the fridge has frozen my tomatoes.  I wonder if they are in league.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6702157757260886111-3668472231655009748?l=morecakelessfish.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://morecakelessfish.blogspot.com/feeds/3668472231655009748/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6702157757260886111&amp;postID=3668472231655009748' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6702157757260886111/posts/default/3668472231655009748'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6702157757260886111/posts/default/3668472231655009748'/><link rel='alternate' type='text/html' href='http://morecakelessfish.blogspot.com/2009/06/formatted-read-statements-again.html' title='Formatted Read Statements again.'/><author><name>Ali</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='31' height='32' src='http://i96.photobucket.com/albums/l163/tea_and_cakey/random/starguy.png'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6702157757260886111.post-5137114536329079450</id><published>2009-06-19T20:15:00.002+01:00</published><updated>2009-06-19T20:18:31.613+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='fortran'/><category scheme='http://www.blogger.com/atom/ns#' term='fortran 95'/><category scheme='http://www.blogger.com/atom/ns#' term='gfortran'/><title type='text'>Compiling modules separately</title><content type='html'>When I have a module declared in mymodule.f90, I can compile it like so:&lt;br /&gt;&lt;div style="text-align: center;"&gt;&lt;span style="color: rgb(153, 153, 255);"&gt;gfortran -m32 -c  mymodule.f90&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;... I can also compile the main file this way:&lt;br /&gt;&lt;div style="text-align: center;"&gt;&lt;span style="color: rgb(153, 153, 255);"&gt;gfortran -m32 -c  mainfile.f90&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;Finally I must link it, possibly also with the NAG library:&lt;br /&gt;&lt;div style="text-align: center;"&gt;&lt;span style="color: rgb(153, 153, 255);"&gt;gfortran -m32 mymodule.o mainfile.o /opt/NAG/fll3a21dfl/lib/libnag_nag.a -o mainfile&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6702157757260886111-5137114536329079450?l=morecakelessfish.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://morecakelessfish.blogspot.com/feeds/5137114536329079450/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6702157757260886111&amp;postID=5137114536329079450' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6702157757260886111/posts/default/5137114536329079450'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6702157757260886111/posts/default/5137114536329079450'/><link rel='alternate' type='text/html' href='http://morecakelessfish.blogspot.com/2009/06/compiling-modules-separately.html' title='Compiling modules separately'/><author><name>Ali</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='31' height='32' src='http://i96.photobucket.com/albums/l163/tea_and_cakey/random/starguy.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6702157757260886111.post-3871992913199536036</id><published>2009-06-18T14:30:00.004+01:00</published><updated>2009-06-18T14:34:31.542+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='fortran'/><category scheme='http://www.blogger.com/atom/ns#' term='fortran 95'/><title type='text'>Fortran array initialization</title><content type='html'>This webpage &lt;a href="http://www.pcc.qub.ac.uk/tec/courses/f77tof90/stu-notes/f90studentMIF_5.html"&gt;here&lt;/a&gt; is very helpful for fortran arrays.&lt;br /&gt;&lt;br /&gt;I'd forgotten that you can initialize vectors like this:&lt;br /&gt;&lt;div style="text-align: left;"&gt;&lt;span style="color: rgb(153, 153, 255);"&gt;x = (/(i,i=0,maxx-1)/)&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;Instead of:&lt;br /&gt;&lt;div style="text-align: left;"&gt;&lt;span style="color: rgb(153, 153, 255);"&gt;do i=1,maxx&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(153, 153, 255);"&gt;    x(i) = i-1&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(153, 153, 255);"&gt;enddo&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6702157757260886111-3871992913199536036?l=morecakelessfish.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://morecakelessfish.blogspot.com/feeds/3871992913199536036/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6702157757260886111&amp;postID=3871992913199536036' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6702157757260886111/posts/default/3871992913199536036'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6702157757260886111/posts/default/3871992913199536036'/><link rel='alternate' type='text/html' href='http://morecakelessfish.blogspot.com/2009/06/fortran-array-initialization.html' title='Fortran array initialization'/><author><name>Ali</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='31' height='32' src='http://i96.photobucket.com/albums/l163/tea_and_cakey/random/starguy.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6702157757260886111.post-2052602289228034101</id><published>2009-05-13T17:47:00.003+01:00</published><updated>2009-05-13T18:06:13.280+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='compilers'/><category scheme='http://www.blogger.com/atom/ns#' term='C'/><category scheme='http://www.blogger.com/atom/ns#' term='gcc'/><category scheme='http://www.blogger.com/atom/ns#' term='C++'/><title type='text'>gcc fails to find header files</title><content type='html'>Because I have clearly been neglecting the guts of my gcc installation too much recently (oh happy respite from commandline errors!), my computer decided to throw a wobbly about compiling a C program that included (amongst other friends) io.h, conio.h and dir.h.&lt;br /&gt;A simple "hello world" program would compile when including stdio.h but not when I added io.h, screaming:&lt;br /&gt;&lt;div style="text-align: center;"&gt;&lt;span style="color: rgb(153, 153, 255);"&gt;error: io.h: No such file or directory&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;I thought gcc would search /usr/include/sys automatically, but it appears not.  I have to tell it on the command line:&lt;br /&gt;&lt;div style="text-align: center;"&gt;&lt;span style="font-style: italic; color: rgb(204, 204, 255);"&gt;gcc -o andorsif andorsif.c -I /usr/include/sys -L /usr/include/sys&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;After I cleared up that heap of doodoo then I still get errors from the program that look like:&lt;br /&gt;&lt;div style="text-align: center;"&gt;&lt;span style="color: rgb(153, 153, 255);"&gt;error: ‘MAXPATH’ was not declared in this scope&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;but replacing incidences of MAXPATH with FILENAME_MAX seems to clear up that one.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6702157757260886111-2052602289228034101?l=morecakelessfish.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://morecakelessfish.blogspot.com/feeds/2052602289228034101/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6702157757260886111&amp;postID=2052602289228034101' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6702157757260886111/posts/default/2052602289228034101'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6702157757260886111/posts/default/2052602289228034101'/><link rel='alternate' type='text/html' href='http://morecakelessfish.blogspot.com/2009/05/gcc-fails-to-find-header-files.html' title='gcc fails to find header files'/><author><name>Ali</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='31' height='32' src='http://i96.photobucket.com/albums/l163/tea_and_cakey/random/starguy.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6702157757260886111.post-2877845915240247642</id><published>2008-12-10T12:02:00.004Z</published><updated>2008-12-10T12:25:20.326Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='fortran'/><category scheme='http://www.blogger.com/atom/ns#' term='fortran 95'/><category scheme='http://www.blogger.com/atom/ns#' term='gfortran'/><title type='text'>Addressing integer bits in Fortran</title><content type='html'>I want to find out about 8-bit integers (kind = 1) in gfortran.&lt;br /&gt;Apparently they seem to be signed and stored as "&lt;a href="http://en.wikipedia.org/wiki/Signed_number_representations"&gt;two's complement&lt;/a&gt;".  When you give the integer a value, you can view the bits like so:&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(204, 204, 255);"&gt;integer(kind = 1) I&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(204, 204, 255);"&gt;integer numbit(8) ! stores the bit values as 0 or 1's&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(204, 204, 255);"&gt;I = 5&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(204, 204, 255);"&gt;do j= 1,8&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(204, 204, 255);"&gt;   numbit(i) = ibits(I,j-1,1)&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(204, 204, 255);"&gt;enddo&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(204, 204, 255);"&gt;write(*,*)  'bits: ', numbit&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;...where here IBITS is extracting 1 bit from I at position j-1 and returning it as an integer with the bit value right-justified and the rest of the bits 0.  So "1" at position j-1 is returned by ibits(I,j-1,1) as "00000001" which has integer value 1.&lt;br /&gt;&lt;br /&gt;Alternatively, I could do this:&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(204, 204, 255);"&gt;integer(kind = 1) I&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(204, 204, 255);"&gt; integer numbit(8) ! stores the bit values as 0 or 1's&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(204, 204, 255);"&gt;I = 5&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(204, 204, 255);"&gt; do j= 1,8&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(204, 204, 255);"&gt;    numbit(i) = btest(I,j-1)&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(204, 204, 255);"&gt; enddo&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(204, 204, 255);"&gt; write(*,*)  'bits: ', numbit&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;...where BTEST returns .true. if the bit in position j-1 is "1", and .false. otherwise.  This is implicitly converted to an integer by the gfortran compiler (but not without warnings at compile time), where .true. =&gt; 1 and .false. =&gt; 0.&lt;br /&gt;&lt;br /&gt;Both of these return:&lt;br /&gt;&lt;span style="color: rgb(153, 153, 255);"&gt;bits:            1           0           1           0           0           0           0           0&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;I guess the take-home message is that when you write out a bit-string, eg.&lt;br /&gt;5 = [0101]&lt;br /&gt;then the right-most bit is addressed as bit 0, and in general, bit number 1 is the second bit as you move left, etc.&lt;br /&gt;&lt;br /&gt;So if you start with all bits set to zero, you can use IBSET to set certain bits to 1 and get whatever number you fancy...&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(204, 204, 255);"&gt;I = 0 ! [00000000]&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(204, 204, 255);"&gt;I = ibset(I,0) ! [00000001]&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(204, 204, 255);"&gt;I = ibset(I,2) ! [00000101]&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(204, 204, 255);"&gt;write(*,*) 'I  = ', I&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;... and we get &lt;span style="color: rgb(153, 153, 255);"&gt;I = 5&lt;/span&gt;, as intended.&lt;br /&gt;&lt;br /&gt;I guess this is a stupid post, but it wasn't obvious to me that the bit string would be numbered from the right starting at index 0.  The default index for matrices in Fortran 95 starts at 1.  Ho hum.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6702157757260886111-2877845915240247642?l=morecakelessfish.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://morecakelessfish.blogspot.com/feeds/2877845915240247642/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6702157757260886111&amp;postID=2877845915240247642' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6702157757260886111/posts/default/2877845915240247642'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6702157757260886111/posts/default/2877845915240247642'/><link rel='alternate' type='text/html' href='http://morecakelessfish.blogspot.com/2008/12/addressing-integer-bits-in-fortran.html' title='Addressing integer bits in Fortran'/><author><name>Ali</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='31' height='32' src='http://i96.photobucket.com/albums/l163/tea_and_cakey/random/starguy.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6702157757260886111.post-4120398931911775796</id><published>2008-12-09T12:04:00.004Z</published><updated>2008-12-09T12:14:42.891Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='fail'/><category scheme='http://www.blogger.com/atom/ns#' term='fortran'/><category scheme='http://www.blogger.com/atom/ns#' term='fortran 95'/><category scheme='http://www.blogger.com/atom/ns#' term='gfortran'/><title type='text'>Incompatible ranks?!</title><content type='html'>Here's a fun problem that I have encountered.  It might be a bug, or it might not (I've run out of patience with google-ing it now I have my program working).&lt;br /&gt;&lt;br /&gt;I have a two dimensional matrix.  I sum it down one dimension and then find the position of the maximum entry.&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(204, 204, 255);"&gt;subroutine ionfinder(subframe,x_dim,y_dim, irow, icol)&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(204, 204, 255);"&gt;    ! define imputs, and function type itself&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(204, 204, 255);"&gt;    integer, intent(in) ::  x_dim, y_dim&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(204, 204, 255);"&gt;    integer, intent(in) ::  subframe(x_dim,y_dim)&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(204, 204, 255);"&gt;    integer, intent(out) ::  irow, icol(4) !ion positions&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(204, 204, 255);"&gt;    ! the code follows...*********************&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(204, 204, 255);"&gt;    irow = maxloc(sum(subframe,1))&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(204, 204, 255);"&gt;    write(*,*) 'ions in row (y): ', irow&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(204, 204, 255);"&gt;end subroutine ionfinder&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;...but this causes my compiler (gfortran) to shriek:&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(153, 153, 255);"&gt; irow = maxloc(sum(subframe,1))&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(153, 153, 255);"&gt;    1&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(153, 153, 255);"&gt;Error: Incompatible ranks 0 and 1 in assignment at (1)&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Huuuurrrmmm.  Seems a bit silly, but the following kludge fixes things:&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(204, 204, 255);"&gt; subroutine ionfinder(subframe,x_dim,y_dim, irow, icol)&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(204, 204, 255);"&gt;     ! define imputs, and function type itself&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(204, 204, 255);"&gt;     integer, intent(in) ::  x_dim, y_dim&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(204, 204, 255);"&gt;     integer, intent(in) ::  subframe(x_dim,y_dim)&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(204, 204, 255);"&gt;     integer, intent(out) ::  irow, icol(4) !ion positions&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(204, 204, 255);"&gt;     ! define other datum within function&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(204, 204, 255);"&gt;     integer tmp(1)&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(204, 204, 255);"&gt;    ! the code follows...*********************&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(204, 204, 255);"&gt;     tmp = maxloc(sum(subframe,1))&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(204, 204, 255);"&gt;     irow = tmp(1)&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(204, 204, 255);"&gt;     write(*,*) 'ions in row (y): ', irow&lt;br /&gt;&lt;br /&gt;&lt;/span&gt; &lt;span style="color: rgb(204, 204, 255);"&gt;end subroutine ionfinder&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Well well well.  I should probably investigate the cause further but I'm not going to because I have physics to do, not Fortran to fix.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6702157757260886111-4120398931911775796?l=morecakelessfish.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://morecakelessfish.blogspot.com/feeds/4120398931911775796/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6702157757260886111&amp;postID=4120398931911775796' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6702157757260886111/posts/default/4120398931911775796'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6702157757260886111/posts/default/4120398931911775796'/><link rel='alternate' type='text/html' href='http://morecakelessfish.blogspot.com/2008/12/incompatible-ranks.html' title='Incompatible ranks?!'/><author><name>Ali</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='31' height='32' src='http://i96.photobucket.com/albums/l163/tea_and_cakey/random/starguy.png'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6702157757260886111.post-4341831071210602576</id><published>2008-09-16T09:58:00.001+01:00</published><updated>2008-09-16T10:08:47.972+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='fortran'/><category scheme='http://www.blogger.com/atom/ns#' term='fortran 95'/><category scheme='http://www.blogger.com/atom/ns#' term='file I/O'/><title type='text'>Formatted Read Statements</title><content type='html'>This is not a very exciting problem or solution, but I shall post it anyway.&lt;br /&gt;I was trying to read formatted data from a file like this:&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(153, 153, 255);"&gt;     0  9.99929445e-01&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(153, 153, 255);"&gt;     1  6.46409406e-05&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(153, 153, 255);"&gt;     2  3.80249651e-06&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(153, 153, 255);"&gt;     3  1.03999904e-06&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(153, 153, 255);"&gt;     4  4.24499610e-07&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(153, 153, 255);"&gt;     5  2.23999794e-07&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;I first tried the following:&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(204, 204, 255); font-style: italic;"&gt;integer :: myint(5)&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(204, 204, 255); font-style: italic;"&gt;real(kind = 10) :: myreal(5)&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(204, 204, 255); font-style: italic;"&gt;open(unit=2,file=filepath,status='OLD',action='READ')&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(204, 204, 255); font-style: italic;"&gt;do i = 1,5&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(204, 204, 255); font-style: italic;"&gt;    read(2,20) myint(i),myreal(i)&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(204, 204, 255); font-style: italic;"&gt;end do&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(204, 204, 255); font-style: italic;"&gt;close(2)&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(204, 204, 255); font-style: italic;"&gt;20 format(I6,E15.8E3)&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;The I6 refers to the field width of the integer column.  But alas, the output was this:&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(153, 153, 255);"&gt;     0  0.99992944E+001&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(153, 153, 255);"&gt;     1  0.64640941E+001&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(153, 153, 255);"&gt;     2  0.38024965E+001&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(153, 153, 255);"&gt;     3  0.10399990E+001&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(153, 153, 255);"&gt;     4  0.42449961E+001&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(153, 153, 255);"&gt;     5  0.22399979E+001&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Oddly enough, everything was in order except that it would round powers from e-01 to e-09 up to E+001, and e-10 to e-19 became E+000 etc.  Most odd.  The solution was to change the format statement to skip the 2 blank spaces between the columns, which I had forgotten to do:&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(204, 204, 255); font-style: italic;"&gt;20 format(I6,2X,E15.8E3)&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Simple really, but I don't know why it gives such a strange behaviour.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6702157757260886111-4341831071210602576?l=morecakelessfish.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://morecakelessfish.blogspot.com/feeds/4341831071210602576/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6702157757260886111&amp;postID=4341831071210602576' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6702157757260886111/posts/default/4341831071210602576'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6702157757260886111/posts/default/4341831071210602576'/><link rel='alternate' type='text/html' href='http://morecakelessfish.blogspot.com/2008/09/formatted-read-statements.html' title='Formatted Read Statements'/><author><name>Ali</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='31' height='32' src='http://i96.photobucket.com/albums/l163/tea_and_cakey/random/starguy.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6702157757260886111.post-2201545617409552810</id><published>2008-09-08T18:16:00.000+01:00</published><updated>2008-09-08T18:43:48.397+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='fail'/><category scheme='http://www.blogger.com/atom/ns#' term='fortran'/><category scheme='http://www.blogger.com/atom/ns#' term='fortran 95'/><title type='text'>Oh Fortran, how I love thee.</title><content type='html'>Fortran's logical operators that operate on integers happen to be bitwise.  I didn't care about this until now.  Here's a summary for two integers, a and b, which can take values 0 or 1.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;logical AND:&lt;/span&gt;&lt;br /&gt;&lt;table border="0" cellspacing="0"&gt;&lt;br /&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td style="text-align: center; font-weight: bold;"&gt;(ab)&lt;/td&gt;&lt;td style="text-align: center; font-weight: bold;"&gt;iand(a,b)&lt;/td&gt;&lt;/tr&gt;&lt;br /&gt;&lt;tr&gt;&lt;td style="text-align: center;"&gt;00&lt;/td&gt;&lt;td style="text-align: center;"&gt;0&lt;/td&gt;&lt;/tr&gt;&lt;br /&gt;&lt;tr&gt;&lt;td style="text-align: center;"&gt;01&lt;/td&gt;&lt;td style="text-align: center;"&gt;0&lt;/td&gt;&lt;/tr&gt;&lt;br /&gt;&lt;tr&gt;&lt;td style="text-align: center;"&gt;10&lt;/td&gt;&lt;td style="text-align: center;"&gt;0&lt;/td&gt;&lt;/tr&gt;&lt;br /&gt;&lt;tr&gt;&lt;td style="text-align: center;"&gt;11&lt;/td&gt;&lt;td style="text-align: center;"&gt;1&lt;/td&gt;&lt;/tr&gt;&lt;br /&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;logical OR:&lt;/span&gt;&lt;br /&gt;&lt;table border="0" cellspacing="0"&gt;&lt;br /&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td style="text-align: center; font-weight: bold;"&gt;(ab)&lt;/td&gt;&lt;td style="text-align: center; font-weight: bold;"&gt;ior(a,b)&lt;/td&gt;&lt;/tr&gt;&lt;br /&gt;&lt;tr&gt;&lt;td style="text-align: center;"&gt;00&lt;/td&gt;&lt;td style="text-align: center;"&gt;0&lt;/td&gt;&lt;/tr&gt;&lt;br /&gt;&lt;tr&gt;&lt;td style="text-align: center;"&gt;01&lt;/td&gt;&lt;td style="text-align: center;"&gt;1&lt;/td&gt;&lt;/tr&gt;&lt;br /&gt;&lt;tr&gt;&lt;td style="text-align: center;"&gt;10&lt;/td&gt;&lt;td style="text-align: center;"&gt;1&lt;/td&gt;&lt;/tr&gt;&lt;br /&gt;&lt;tr&gt;&lt;td style="text-align: center;"&gt;11&lt;/td&gt;&lt;td style="text-align: center;"&gt;1&lt;/td&gt;&lt;/tr&gt;&lt;br /&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;logical XOR:&lt;/span&gt;&lt;br /&gt;&lt;table border="0" cellspacing="0"&gt;&lt;br /&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td style="text-align: center; font-weight: bold;"&gt;(ab)&lt;/td&gt;&lt;td style="text-align: center; font-weight: bold;"&gt;ieor(a,b)&lt;/td&gt;&lt;/tr&gt;&lt;br /&gt;&lt;tr&gt;&lt;td style="text-align: center;"&gt;00&lt;/td&gt;&lt;td style="text-align: center;"&gt;0&lt;/td&gt;&lt;/tr&gt;&lt;br /&gt;&lt;tr&gt;&lt;td style="text-align: center;"&gt;01&lt;/td&gt;&lt;td style="text-align: center;"&gt;1&lt;/td&gt;&lt;/tr&gt;&lt;br /&gt;&lt;tr&gt;&lt;td style="text-align: center;"&gt;10&lt;/td&gt;&lt;td style="text-align: center;"&gt;1&lt;/td&gt;&lt;/tr&gt;&lt;br /&gt;&lt;tr&gt;&lt;td style="text-align: center;"&gt;11&lt;/td&gt;&lt;td style="text-align: center;"&gt;0&lt;/td&gt;&lt;/tr&gt;&lt;br /&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;logical NOT:&lt;/span&gt;&lt;br /&gt;&lt;table border="0" cellspacing="0"&gt;&lt;br /&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td style="text-align: center; font-weight: bold;"&gt;(a)&lt;/td&gt;&lt;td style="text-align: center; font-weight: bold;"&gt;not(a)&lt;/td&gt;&lt;/tr&gt;&lt;br /&gt;&lt;tr&gt;&lt;td style="text-align: center;"&gt;0&lt;/td&gt;&lt;td style="text-align: center;"&gt;-1&lt;/td&gt;&lt;/tr&gt;&lt;br /&gt;&lt;tr&gt;&lt;td style="text-align: center;"&gt;1&lt;/td&gt;&lt;td style="text-align: center;"&gt;-2&lt;/td&gt;&lt;/tr&gt;&lt;br /&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;WTF?  I have been bitten by the bitwise bear!  In order to get zeros and ones, I must use &lt;span style="font-style: italic; color: rgb(204, 204, 255);"&gt;ieor(1,a)&lt;/span&gt; instead of &lt;span style="font-style: italic; color: rgb(204, 204, 255);"&gt;not(a)&lt;/span&gt;.  Pah.&lt;br /&gt;&lt;br /&gt;Also, the tables in this post look all shit in my browser but I can't be bothered to fix them when I have Fortran to do instead.&lt;br /&gt;&lt;br /&gt;Today's post was brought to you by the numbers 0 and 1 and the letter F.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6702157757260886111-2201545617409552810?l=morecakelessfish.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://morecakelessfish.blogspot.com/feeds/2201545617409552810/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6702157757260886111&amp;postID=2201545617409552810' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6702157757260886111/posts/default/2201545617409552810'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6702157757260886111/posts/default/2201545617409552810'/><link rel='alternate' type='text/html' href='http://morecakelessfish.blogspot.com/2008/09/oh-fortran-how-i-love-thee.html' title='Oh Fortran, how I love thee.'/><author><name>Ali</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='31' height='32' src='http://i96.photobucket.com/albums/l163/tea_and_cakey/random/starguy.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6702157757260886111.post-8703060383089115175</id><published>2008-05-19T09:42:00.000+01:00</published><updated>2008-05-19T09:49:11.615+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='scanner'/><category scheme='http://www.blogger.com/atom/ns#' term='mandriva'/><category scheme='http://www.blogger.com/atom/ns#' term='linux'/><category scheme='http://www.blogger.com/atom/ns#' term='hardware'/><category scheme='http://www.blogger.com/atom/ns#' term='lewis'/><title type='text'>Installing an Epson scanner under Mandriva</title><content type='html'>Another how-to, brought to you by Mr B.:&lt;br /&gt;&lt;br /&gt;To install and use the Epson Perfection 2480 scanner under Mandriva:&lt;br /&gt;&lt;br /&gt;1) install "&lt;span style="color: rgb(153, 153, 255);"&gt;sane&lt;/span&gt;" (in package manager, install "&lt;span style="color: rgb(153, 153, 255);"&gt;libsane&lt;/span&gt;", "&lt;span style="color: rgb(153, 153, 255);"&gt;sane-backends&lt;/span&gt;" and  perhaps "&lt;span style="color: rgb(153, 153, 255);"&gt;sane-frontends&lt;/span&gt;").&lt;br /&gt;&lt;br /&gt;2) login as root, go to &lt;span style="color: rgb(153, 153, 255);"&gt;/etc/sane.d/&lt;/span&gt; and edit the file "&lt;span style="color: rgb(153, 153, 255);"&gt;dll.conf&lt;/span&gt;" and ensure the line "&lt;span style="color: rgb(153, 153, 255);"&gt;snapscan&lt;/span&gt;" is uncommented (without a # at the beginning of the line).&lt;br /&gt;&lt;br /&gt;3) from the CD supplied with the scanner, find the file "&lt;span style="color: rgb(153, 153, 255);"&gt;ESCAN/ModUsd.cab&lt;/span&gt;" and copy to your desktop (or elsewhere!).&lt;br /&gt;&lt;br /&gt;4) go to the directory on your hard drive containing "&lt;span style="color: rgb(153, 153, 255);"&gt;ModUsd.cab&lt;/span&gt;" and run&lt;br /&gt;&lt;br /&gt;&lt;div style="text-align: center;"&gt;&lt;span style="font-style: italic; color: rgb(204, 204, 255);"&gt;$ cabextract ModUsd.cab&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;cabextract is a program to extract files from a micro$oft .cab format, which I have described in a previous post.&lt;br /&gt;&lt;br /&gt;5) login as root and copy the firmware file "&lt;span style="color: rgb(153, 153, 255);"&gt;Esfw41.bin&lt;/span&gt;" to &lt;span style="color: rgb(153, 153, 255);"&gt;/etc/sane.d/esfw41.bin&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;6) run the following (as root):&lt;br /&gt;&lt;br /&gt;&lt;div style="text-align: center;"&gt;&lt;span style="color: rgb(204, 204, 255); font-style: italic;"&gt;$ scanimage -L&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;...and the scanner should be detected!&lt;br /&gt;&lt;br /&gt;7) use  "Kooka" or "Xscanimage" to use scanner (Xscanimage is from the package "&lt;span style="color: rgb(153, 153, 255);"&gt;sane-frontends&lt;/span&gt;")&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6702157757260886111-8703060383089115175?l=morecakelessfish.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://morecakelessfish.blogspot.com/feeds/8703060383089115175/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6702157757260886111&amp;postID=8703060383089115175' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6702157757260886111/posts/default/8703060383089115175'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6702157757260886111/posts/default/8703060383089115175'/><link rel='alternate' type='text/html' href='http://morecakelessfish.blogspot.com/2008/05/installing-epson-scanner-under-mandriva.html' title='Installing an Epson scanner under Mandriva'/><author><name>Ali</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='31' height='32' src='http://i96.photobucket.com/albums/l163/tea_and_cakey/random/starguy.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6702157757260886111.post-6745342538019088787</id><published>2008-05-19T09:39:00.000+01:00</published><updated>2008-05-19T09:41:48.349+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='linux'/><category scheme='http://www.blogger.com/atom/ns#' term='.cab'/><title type='text'>Extracting Micro$oft .cab files</title><content type='html'>&lt;span style="font-style: italic;"&gt;Here it is, courtesy of Mr B.:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;To extract Microshite .cab files, install "cabextract" (from package manager).&lt;br /&gt;Copy blah.cab into a directory and:&lt;br /&gt;&lt;br /&gt;&lt;div style="text-align: center;"&gt;&lt;span style="color: rgb(204, 204, 255); font-style: italic;"&gt;$ cabextract blah.cab&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;OR&lt;br /&gt;&lt;br /&gt;&lt;div style="text-align: center;"&gt;&lt;span style="font-style: italic; color: rgb(204, 204, 255);"&gt;$ cabextract -l blah.cab&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;to list the files in the .cab.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6702157757260886111-6745342538019088787?l=morecakelessfish.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://morecakelessfish.blogspot.com/feeds/6745342538019088787/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6702157757260886111&amp;postID=6745342538019088787' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6702157757260886111/posts/default/6745342538019088787'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6702157757260886111/posts/default/6745342538019088787'/><link rel='alternate' type='text/html' href='http://morecakelessfish.blogspot.com/2008/05/extracting-microoft-cab-files.html' title='Extracting Micro$oft .cab files'/><author><name>Ali</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='31' height='32' src='http://i96.photobucket.com/albums/l163/tea_and_cakey/random/starguy.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6702157757260886111.post-2600779417288504137</id><published>2008-05-16T20:55:00.000+01:00</published><updated>2008-05-16T21:10:45.387+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='dvips'/><category scheme='http://www.blogger.com/atom/ns#' term='latex'/><category scheme='http://www.blogger.com/atom/ns#' term='mandriva'/><category scheme='http://www.blogger.com/atom/ns#' term='lewis'/><category scheme='http://www.blogger.com/atom/ns#' term='kile'/><title type='text'>Fixing dvips</title><content type='html'>We have a lovely shiney (the case really is!) new computer named Lewis.  (This is after Lewis Hamilton, because he is so fast).&lt;br /&gt;&lt;br /&gt;Anyway, it was super fast to build and amazingly the whole kit works, even the processor fan started so our new core2duo didn't melt.  Mandriva 2008.1 installed quicker than it takes our old laptops to boot up.  Now I have to iron out all the little problems getting things to work.  (Like why Firefox is thinking every word in the english language that I'm typing is spelt wrong!!!).&lt;br /&gt;&lt;br /&gt;First up, I can't seem to convert dvi to ps in Kile.  Actually, it doesn't work on the command line either- it says:&lt;br /&gt;&lt;div style="text-align: center;"&gt;&lt;span style="color: rgb(153, 153, 255);"&gt;dvips: ! Couldn't find header file cm-super-t1.enc.&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(153, 153, 255);"&gt;Note that an absolute path or a relative path with .. are denied in -R2 mode.&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;R2 is some sort of secure mode.  I am using texlive.  Part of the problem is that dvips is correct- I really didn't have this file.  I installed the following package:&lt;br /&gt;&lt;br /&gt;&lt;div style="text-align: center;"&gt;&lt;span style="color: rgb(153, 153, 255);"&gt;texlive-texmf-cmsuper&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;But dvips still couldn't see it where it was hiding (which was in /usr/share/texmf-texlive/fonts/enc/dvips/cm-super).  It seems that dvips uses the same search-y doo-dah as TeX, so all I needed to do was update the lists by running&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic; color: rgb(204, 204, 255);"&gt;texhash&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;as a superuser.  It's happy now.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6702157757260886111-2600779417288504137?l=morecakelessfish.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://morecakelessfish.blogspot.com/feeds/2600779417288504137/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6702157757260886111&amp;postID=2600779417288504137' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6702157757260886111/posts/default/2600779417288504137'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6702157757260886111/posts/default/2600779417288504137'/><link rel='alternate' type='text/html' href='http://morecakelessfish.blogspot.com/2008/05/fixing-dvips.html' title='Fixing dvips'/><author><name>Ali</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='31' height='32' src='http://i96.photobucket.com/albums/l163/tea_and_cakey/random/starguy.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6702157757260886111.post-3341491614910357939</id><published>2008-05-15T15:40:00.000+01:00</published><updated>2008-05-15T15:43:00.809+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='povray'/><category scheme='http://www.blogger.com/atom/ns#' term='linux'/><title type='text'>Povray</title><content type='html'>&lt;a href="http://www.povray.org/"&gt;Povray&lt;/a&gt; is &lt;a href="http://hof.povray.org/mouille.html"&gt;amazing&lt;/a&gt;.  This post is really just to remind myself of how to render an image with anti-aliasing from the command line:&lt;br /&gt;&lt;div style="text-align: center;"&gt;&lt;span style="color: rgb(204, 204, 255); font-style: italic;"&gt;povray myimage.pov -geometry 640x480 +A0.1&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;Hoorah!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6702157757260886111-3341491614910357939?l=morecakelessfish.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://morecakelessfish.blogspot.com/feeds/3341491614910357939/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6702157757260886111&amp;postID=3341491614910357939' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6702157757260886111/posts/default/3341491614910357939'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6702157757260886111/posts/default/3341491614910357939'/><link rel='alternate' type='text/html' href='http://morecakelessfish.blogspot.com/2008/05/povray.html' title='Povray'/><author><name>Ali</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='31' height='32' src='http://i96.photobucket.com/albums/l163/tea_and_cakey/random/starguy.png'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6702157757260886111.post-9028403670188078594</id><published>2008-03-12T15:36:00.000Z</published><updated>2008-03-12T15:48:25.716Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='fortran'/><category scheme='http://www.blogger.com/atom/ns#' term='exp'/><category scheme='http://www.blogger.com/atom/ns#' term='fortran 95'/><title type='text'>Another Fortran idiosyncracy bites me on the bum</title><content type='html'>I thought I'd have this program done by the end of the afternoon.  So I start to write a function to calculate a nice simple Gaussian function.  No NaNs and +Infs to contend with here, I thought.  How wrong I was.&lt;br /&gt;This time, I was finding that the intrinsic function &lt;span style="font-style: italic; color: rgb(204, 204, 255);"&gt;exp(x)&lt;/span&gt; returned zero for x less than around -0.1E3.  After some bashing, my compiler was sweet enough to tell me:&lt;br /&gt;&lt;div style="text-align: center;"&gt;&lt;span style="color: rgb(153, 153, 255);"&gt;Result of EXP underflows its kind&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;a href="http://www.nsc.liu.se/%7Eboein/f77to90/a5.html#section2"&gt;Apparently&lt;/a&gt;, Fortran is not content with just "exp".  It also has "dexp" and "cexp" for double-precision and complex floating point numbers respectively.  So, &lt;span style="font-style: italic; color: rgb(204, 204, 255);"&gt;dexp(x)&lt;/span&gt; it is then.  But be careful how you define x, or you will get a shouty like this:&lt;br /&gt;&lt;div style="text-align: center;"&gt;&lt;span style="color: rgb(153, 153, 255);"&gt;Type of argument 'x' in call to 'dexp' at (1) should be REAL(8), not REAL(4)&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;So one should try dexp(-0.1D3) (note the letter D!) rather than exp(-0.1E3), which will return zero, possibly grumbling in the process.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6702157757260886111-9028403670188078594?l=morecakelessfish.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://morecakelessfish.blogspot.com/feeds/9028403670188078594/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6702157757260886111&amp;postID=9028403670188078594' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6702157757260886111/posts/default/9028403670188078594'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6702157757260886111/posts/default/9028403670188078594'/><link rel='alternate' type='text/html' href='http://morecakelessfish.blogspot.com/2008/03/another-fortran-idiosyncracy-bites-me.html' title='Another Fortran idiosyncracy bites me on the bum'/><author><name>Ali</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='31' height='32' src='http://i96.photobucket.com/albums/l163/tea_and_cakey/random/starguy.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6702157757260886111.post-1006355485252844289</id><published>2008-03-10T14:51:00.000Z</published><updated>2008-03-10T14:54:24.026Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='fortran'/><category scheme='http://www.blogger.com/atom/ns#' term='NaN'/><category scheme='http://www.blogger.com/atom/ns#' term='fortran 95'/><category scheme='http://www.blogger.com/atom/ns#' term='Inf'/><title type='text'>NaN, +Inf, -Inf, horrid things...</title><content type='html'>&lt;a href="http://ftp.aset.psu.edu/pub/ger/fortran/hdk/nan.f90"&gt;This&lt;/a&gt; is the answer.&lt;br /&gt;Based on such, I have a sample function to detect a +Inf:&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(153, 153, 255);"&gt;function ispinf(x)&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(153, 153, 255);"&gt;! function to detect if x is +Inf&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(153, 153, 255);"&gt;integer :: ispinf&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(153, 153, 255);"&gt;double precision :: x&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(153, 153, 255);"&gt;!local variables&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(153, 153, 255);"&gt;integer :: IPInf&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(153, 153, 255);"&gt;real ::  PInf&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(153, 153, 255);"&gt;data IPInf/B'01111111100000000000000000000000'/    ! +Infinity&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(153, 153, 255);"&gt;PInf = transfer(IPinf,Pinf)&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(153, 153, 255);"&gt;if (x.eq.PInf) then&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(153, 153, 255);"&gt;    ispinf = 1&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(153, 153, 255);"&gt;else&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(153, 153, 255);"&gt;    ispinf = 0&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(153, 153, 255);"&gt;endif&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(153, 153, 255);"&gt;end function ispinf&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6702157757260886111-1006355485252844289?l=morecakelessfish.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://morecakelessfish.blogspot.com/feeds/1006355485252844289/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6702157757260886111&amp;postID=1006355485252844289' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6702157757260886111/posts/default/1006355485252844289'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6702157757260886111/posts/default/1006355485252844289'/><link rel='alternate' type='text/html' href='http://morecakelessfish.blogspot.com/2008/03/nan-inf-inf-horrid-things.html' title='NaN, +Inf, -Inf, horrid things...'/><author><name>Ali</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='31' height='32' src='http://i96.photobucket.com/albums/l163/tea_and_cakey/random/starguy.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6702157757260886111.post-4148952947665079911</id><published>2008-02-27T15:56:00.000Z</published><updated>2008-03-20T15:42:09.288Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='NAG'/><category scheme='http://www.blogger.com/atom/ns#' term='fortran'/><category scheme='http://www.blogger.com/atom/ns#' term='fortran 95'/><title type='text'>...in which I pacify the fussy NAG routine</title><content type='html'>As usual, this is of interest to probably no-one but me, but I have just found the bug in my program.&lt;br /&gt;I am trying to call NAG routine &lt;a href="http://www.nag.co.uk/numeric/FL/manual/html/G05/g05_conts.html"&gt;G05MZF&lt;/a&gt; which generates random integers from a probability distribution supplied by you.  I have found routines give unexpected answers if you don't pass them variables of the correct type, so I was careful about this.  The error I was getting at run-time was this:&lt;br /&gt;&lt;br /&gt;&lt;div style="text-align: center;"&gt;&lt;span style="color: rgb(153, 153, 255);"&gt;At line 106 of file /scratch/zohair/FLL3A21DF/fll3a21df/source/g/g05mzfn.f&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(153, 153, 255);"&gt;Fortran runtime error: Missing initial left parenthesis in format&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;I have had errors like this before which have been due to the reference vector (which contains the CDF) being too small, but this wasn't the case here.  Instead, it turned out to be angry about being passed what it considered to be a non-normalized PDF.  For example, passing a PDF which was 307 entries long with each entry set to 1.0D0/307.0D0 (ie. a flat distribution) worked fine.  However, setting each entry to the actual value, 0.32573290D-02 was not accurately normalised enough, and it threw a hissy fit.&lt;br /&gt;&lt;br /&gt;So the moral of the story is:&lt;br /&gt;If you think you've normalized your PDF, the NAG library knows better.  Expressed in code, this is:&lt;br /&gt;&lt;span style="color: rgb(204, 204, 255); font-style: italic;"&gt;P = P/sum(P)&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;In other news, I find it incredible how easy it is to destroy my code.  Simply compiling program.f90 to the output file program.f90 will replace my code with executable junk.  Surely they should have idiot-proofed this?&lt;br /&gt;&lt;br /&gt;&lt;div style="text-align: center;"&gt;&lt;span style="color: rgb(153, 153, 255);"&gt;*********************************&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(153, 153, 255);"&gt;&lt;/span&gt;&lt;/div&gt;&lt;span style="color: rgb(153, 153, 255);"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-weight: bold; color: rgb(153, 153, 255);"&gt;Edit: 20th March 2008&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Actually there's more to it than this.  Firstly, the bizarre and unhelpful error is due to using gcc version 4.1.2 rather than the recommended version 4.2 which I don't yet have.  If you use version 4.3, the error is more helpful, and gives you the value of IFAIL and results in a NAG hard failure telling you the deviation of the probability sum from unity.  There are other issues too, but using the right compiler is helpful!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6702157757260886111-4148952947665079911?l=morecakelessfish.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://morecakelessfish.blogspot.com/feeds/4148952947665079911/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6702157757260886111&amp;postID=4148952947665079911' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6702157757260886111/posts/default/4148952947665079911'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6702157757260886111/posts/default/4148952947665079911'/><link rel='alternate' type='text/html' href='http://morecakelessfish.blogspot.com/2008/02/in-which-i-pacify-fussy-nag-routine.html' title='...in which I pacify the fussy NAG routine'/><author><name>Ali</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='31' height='32' src='http://i96.photobucket.com/albums/l163/tea_and_cakey/random/starguy.png'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6702157757260886111.post-8665446760319059228</id><published>2008-02-08T17:49:00.000Z</published><updated>2008-02-08T17:56:03.211Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='latex'/><category scheme='http://www.blogger.com/atom/ns#' term='install'/><category scheme='http://www.blogger.com/atom/ns#' term='linux'/><title type='text'>Installing a .sty file!</title><content type='html'>At last, I succeed in one thing!&lt;br /&gt;I needed bbding.sty, so I downloaded the whole zip from CTAN.  It included the .ins and .dtx files.  I stuck it in a local temporary place and followed the instructions on &lt;a href="http://en.wikibooks.org/wiki/LaTeX/Packages/Installing_Extra_Packages"&gt;this handy page&lt;/a&gt;.&lt;br /&gt;I ran latex on the .ins file and then on the .dtx file.  I then moved the whole folder and everything in it to my local texmf tree:&lt;br /&gt;&lt;div style="text-align: center;"&gt;&lt;span style="color: rgb(153, 153, 255);"&gt;/usr/local/share/texmf/tex/latex/&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;into a folder of the same name, ie. &lt;span style="color: rgb(153, 153, 255);"&gt;bbding&lt;/span&gt;.  Next, as a superuser I ran:&lt;br /&gt;&lt;span style="color: rgb(204, 204, 255); font-style: italic;"&gt;texhash&lt;/span&gt;&lt;br /&gt;and we all lived happily ever after.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6702157757260886111-8665446760319059228?l=morecakelessfish.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://morecakelessfish.blogspot.com/feeds/8665446760319059228/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6702157757260886111&amp;postID=8665446760319059228' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6702157757260886111/posts/default/8665446760319059228'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6702157757260886111/posts/default/8665446760319059228'/><link rel='alternate' type='text/html' href='http://morecakelessfish.blogspot.com/2008/02/installing-sty-file.html' title='Installing a .sty file!'/><author><name>Ali</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='31' height='32' src='http://i96.photobucket.com/albums/l163/tea_and_cakey/random/starguy.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6702157757260886111.post-5286338405657020457</id><published>2008-01-16T17:27:00.000Z</published><updated>2008-01-16T17:30:55.596Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='linux'/><category scheme='http://www.blogger.com/atom/ns#' term='pdf'/><title type='text'>Merging PDF files</title><content type='html'>Assisted by &lt;a href="https://www.cs.tcd.ie/Shane.OConchuir/Misc/MergingPDFs.html"&gt;this page&lt;/a&gt;, I managed to create a handy pdf file from the six .jpg files of sheet music I'd been sent.  First I opened them in showFoto and printed them to six .pdf files, and then merged them on the linux command-line thus:&lt;br /&gt;&lt;span style="font-style: italic; color: rgb(204, 204, 255);"&gt;gs -dNOPAUSE -sDEVICE=pdfwrite -sOUTPUTFILE=Merged.pdf -dBATCH 1.pdf 2.pdf 3.pdf 3.pdf&lt;/span&gt;&lt;br /&gt;etcetera, etcetera, etcetera...&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6702157757260886111-5286338405657020457?l=morecakelessfish.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://morecakelessfish.blogspot.com/feeds/5286338405657020457/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6702157757260886111&amp;postID=5286338405657020457' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6702157757260886111/posts/default/5286338405657020457'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6702157757260886111/posts/default/5286338405657020457'/><link rel='alternate' type='text/html' href='http://morecakelessfish.blogspot.com/2008/01/merging-pdf-files.html' title='Merging PDF files'/><author><name>Ali</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='31' height='32' src='http://i96.photobucket.com/albums/l163/tea_and_cakey/random/starguy.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6702157757260886111.post-726961307140004152</id><published>2008-01-15T18:25:00.001Z</published><updated>2008-01-16T18:13:11.564Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='linux'/><category scheme='http://www.blogger.com/atom/ns#' term='kwrite'/><category scheme='http://www.blogger.com/atom/ns#' term='fortran'/><category scheme='http://www.blogger.com/atom/ns#' term='fortran 95'/><title type='text'>Keyboard shortcuts for kwrite</title><content type='html'>As usual, this will be of very little interest to anyone but me, but it's actually made my day.  I have accidentally discovered the keyboard shortcuts useful for editing fortran code in kwrite.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic; color: rgb(204, 204, 255);"&gt;Ctrl+I&lt;/span&gt;    -    indents&lt;br /&gt;&lt;span style="font-style: italic; color: rgb(204, 204, 255);"&gt;Ctrl+Shift+I&lt;/span&gt;    -     un-indents&lt;br /&gt;&lt;span style="font-style: italic; color: rgb(204, 204, 255);"&gt;Ctrl + D&lt;/span&gt;    -    comments out code (by ! marks)&lt;br /&gt;&lt;span style="font-style: italic; color: rgb(204, 204, 255);"&gt;Ctrl + Shift + D &lt;/span&gt;   -   un-comments code&lt;br /&gt;&lt;br /&gt;How exciting my day is today.  I actually could have looked this up in the kwrite menu, so I am stupid too!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6702157757260886111-726961307140004152?l=morecakelessfish.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://morecakelessfish.blogspot.com/feeds/726961307140004152/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6702157757260886111&amp;postID=726961307140004152' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6702157757260886111/posts/default/726961307140004152'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6702157757260886111/posts/default/726961307140004152'/><link rel='alternate' type='text/html' href='http://morecakelessfish.blogspot.com/2008/01/keyboard-shortcuts-for-kwrite.html' title='Keyboard shortcuts for kwrite'/><author><name>Ali</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='31' height='32' src='http://i96.photobucket.com/albums/l163/tea_and_cakey/random/starguy.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6702157757260886111.post-4514390148132773632</id><published>2008-01-14T16:01:00.000Z</published><updated>2008-01-14T16:03:50.560Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='fortran'/><category scheme='http://www.blogger.com/atom/ns#' term='fortran 95'/><category scheme='http://www.blogger.com/atom/ns#' term='file I/O'/><title type='text'>File I/O in Fortran 95</title><content type='html'>Can a "unit" be re-used after disconnecting from a previous file?&lt;br /&gt;I believe the answer is yes!  Two different units are only needed when trying to access two files at the same time.  Once a file has been disconnected, one can re-use the number.  Hoorah!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6702157757260886111-4514390148132773632?l=morecakelessfish.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://morecakelessfish.blogspot.com/feeds/4514390148132773632/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6702157757260886111&amp;postID=4514390148132773632' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6702157757260886111/posts/default/4514390148132773632'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6702157757260886111/posts/default/4514390148132773632'/><link rel='alternate' type='text/html' href='http://morecakelessfish.blogspot.com/2008/01/file-io-in-fortran-95.html' title='File I/O in Fortran 95'/><author><name>Ali</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='31' height='32' src='http://i96.photobucket.com/albums/l163/tea_and_cakey/random/starguy.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6702157757260886111.post-6668967945730994502</id><published>2008-01-08T18:02:00.000Z</published><updated>2008-02-27T16:13:25.590Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='fortran'/><category scheme='http://www.blogger.com/atom/ns#' term='fortran 95'/><title type='text'>I can't even remember how to compile!</title><content type='html'>My previous programs which don't require linking to a NAG library seem to compile thus:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic; color: rgb(204, 204, 255);"&gt;gfortran -m32 program.f90 -o program&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;If they do require linkage, I compile like this:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic; color: rgb(204, 204, 255);"&gt;gfortran -m32 program.f90 /opt/NAG/fll3a21dfl/lib/libnag_nag.a -o program&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Silly me.  Won't forget that now, will I?&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6702157757260886111-6668967945730994502?l=morecakelessfish.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://morecakelessfish.blogspot.com/feeds/6668967945730994502/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6702157757260886111&amp;postID=6668967945730994502' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6702157757260886111/posts/default/6668967945730994502'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6702157757260886111/posts/default/6668967945730994502'/><link rel='alternate' type='text/html' href='http://morecakelessfish.blogspot.com/2008/01/i-cant-even-remember-how-to-compile.html' title='I can&apos;t even remember how to compile!'/><author><name>Ali</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='31' height='32' src='http://i96.photobucket.com/albums/l163/tea_and_cakey/random/starguy.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6702157757260886111.post-986100817326299282</id><published>2007-12-19T10:28:00.000Z</published><updated>2007-12-19T10:48:37.093Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='latex'/><category scheme='http://www.blogger.com/atom/ns#' term='mandriva'/><category scheme='http://www.blogger.com/atom/ns#' term='linux'/><category scheme='http://www.blogger.com/atom/ns#' term='revtex'/><category scheme='http://www.blogger.com/atom/ns#' term='kile'/><title type='text'>Another post, in which I continue to destroy/re-build my LaTeX installation with my hopeless fumblings.</title><content type='html'>So, for some reason, I downloaded the TeTeX documentation and stumbled across &lt;span style="color: rgb(153, 153, 255);"&gt;kpathsea.pdf&lt;/span&gt; in the TeTeX documentation menu in Kile.  It seems that this is involved in searching for various files needed for LaTeX.  For some reason, I tried to run &lt;span style="font-style: italic; color: rgb(204, 204, 255);"&gt;mktexlsr&lt;/span&gt; instead of &lt;span style="font-style: italic; color: rgb(204, 204, 255);"&gt;texhash&lt;/span&gt;.  I probably wasn't managing to find the place where the script was saved, but something seemed to run.  But then there was no ls-R file in &lt;span style="color: rgb(153, 153, 255);"&gt;/usr/local/share/texmf&lt;/span&gt; anymore.  When I tried to compile any LaTeX code, the text came out ok, but any mathematical symbols, etc. were totally missing.  On closer inspection, it was secretly crying that kpathsea couldn't find &lt;span style="color: rgb(153, 153, 255);"&gt;mf.base&lt;/span&gt;.  So I managed to stop it finding metafont, or something crazy.  I tried to compile the RevTeX sample which came out as a hopeless jumble of lines and which decided randomly to print itself on the group printer.&lt;br /&gt;The shame!  The despair!&lt;br /&gt;I have since restored &lt;span style="color: rgb(153, 153, 255);"&gt;/usr/share/texmf/web2c/texmf.cnf&lt;/span&gt; to its former glory and run &lt;span style="font-style: italic; color: rgb(204, 204, 255);"&gt;texhash&lt;/span&gt; and I now at least have a working LaTeX again.&lt;br /&gt;Again, I make the changes to &lt;span style="color: rgb(153, 153, 255);"&gt;texmf.cnf&lt;/span&gt; that I made before, and this time run &lt;span style="font-style: italic; color: rgb(204, 204, 255);"&gt;texhash&lt;/span&gt;.  Boo hoo hoo.  Computer says no:&lt;br /&gt;&lt;br /&gt;&lt;div style="text-align: center;"&gt;&lt;span style="color: rgb(153, 153, 255);"&gt;This is dvips(k) 5.95b Copyright 2005 Radical Eye Software (www.radicaleye.com)&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(153, 153, 255);"&gt;' TeX output 2007.12.19:1045' -&gt; atomicstructure.ps&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(153, 153, 255);"&gt;kpathsea: Running mktexpk --mfmode ljfour --bdpi 600 --mag 1+57/600 --dpi 657 cmmi10&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(153, 153, 255);"&gt;kpathsea: Running mktexfmt mf.base&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(153, 153, 255);"&gt;fmtutil: format `mf' not available.&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(153, 153, 255);"&gt;mktexpk: Mismatched mode ljfour and resolution 600; ignoring mode.&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(153, 153, 255);"&gt;mktexpk: Running mf-nowin -progname=mf \mode:=ljfour; mag:=1+57/600; nonstopmode; input cmmi10&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(153, 153, 255);"&gt;This is METAFONT, Version 2.71828 (Web2C 7.5.5)&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(153, 153, 255);"&gt;kpathsea: Running mktexfmt mf.base&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(153, 153, 255);"&gt;fmtutil: format `mf' not available.&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(153, 153, 255);"&gt;I can't find the base file `mf.base'!&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(153, 153, 255);"&gt;grep: cmmi10.log: No such file or directory&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(153, 153, 255);"&gt;mktexpk: `mf-nowin -progname=mf \mode:=ljfour; mag:=1+57/600; nonstopmode; input cmmi10' failed to make cmmi10.657pk.&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(153, 153, 255);"&gt;kpathsea: Appending font creation commands to missfont.log.&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(153, 153, 255);"&gt;dvips: Font cmmi10 not found, characters will be left blank.&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(153, 153, 255);"&gt;kpathsea: Running mktexpk --mfmode ljfour --bdpi 600 --mag 1+0/600 --dpi 600 cmmi8&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(153, 153, 255);"&gt;kpathsea: Running mktexfmt mf.base&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(153, 153, 255);"&gt;fmtutil: format `mf' not available.&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(153, 153, 255);"&gt;mktexpk: Mismatched mode ljfour and resolution 600; ignoring mode.&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(153, 153, 255);"&gt;mktexpk: Running mf-nowin -progname=mf \mode:=ljfour; mag:=1+0/600; nonstopmode; input cmmi8&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(153, 153, 255);"&gt;This is METAFONT, Version 2.71828 (Web2C 7.5.5)&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(153, 153, 255);"&gt;kpathsea: Running mktexfmt mf.base&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(153, 153, 255);"&gt;fmtutil: format `mf' not available.&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(153, 153, 255);"&gt;I can't find the base file `mf.base'!&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(153, 153, 255);"&gt;grep: cmmi8.log: No such file or directory&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(153, 153, 255);"&gt;mktexpk: `mf-nowin -progname=mf \mode:=ljfour; mag:=1+0/600; nonstopmode; input cmmi8' failed to make cmmi8.600pk.&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(153, 153, 255);"&gt;dvips: Font cmmi8 not found, characters will be left blank.&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(153, 153, 255);"&gt;&lt;tex.pro&gt;. [1]&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;I think I must be creating the wrong files.  A more intelligent approach is needed, ie. engage brain.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6702157757260886111-986100817326299282?l=morecakelessfish.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://morecakelessfish.blogspot.com/feeds/986100817326299282/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6702157757260886111&amp;postID=986100817326299282' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6702157757260886111/posts/default/986100817326299282'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6702157757260886111/posts/default/986100817326299282'/><link rel='alternate' type='text/html' href='http://morecakelessfish.blogspot.com/2007/12/another-post-in-which-i-continue-to.html' title='Another post, in which I continue to destroy/re-build my LaTeX installation with my hopeless fumblings.'/><author><name>Ali</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='31' height='32' src='http://i96.photobucket.com/albums/l163/tea_and_cakey/random/starguy.png'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6702157757260886111.post-4291913660241768169</id><published>2007-12-18T17:04:00.000Z</published><updated>2007-12-18T17:06:46.487Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='mandriva'/><category scheme='http://www.blogger.com/atom/ns#' term='sound'/><category scheme='http://www.blogger.com/atom/ns#' term='linux'/><title type='text'>Mandriva sound problems</title><content type='html'>Unfortunately, the version of Mandriva that is installed on my machine at work appears to be incompatible with my soundcard.  That means from time to time it will scream like a banshee, and there's not much I can do about it, except mute the whole sound system.  It can be done on the command-line like this:&lt;br /&gt;&lt;span style="font-style: italic; color: rgb(204, 204, 255);"&gt;aumix-text&lt;/span&gt;&lt;br /&gt;and then choose "mute" or somesuch.  That should stop the screaming.  Thanks Greg!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6702157757260886111-4291913660241768169?l=morecakelessfish.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://morecakelessfish.blogspot.com/feeds/4291913660241768169/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6702157757260886111&amp;postID=4291913660241768169' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6702157757260886111/posts/default/4291913660241768169'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6702157757260886111/posts/default/4291913660241768169'/><link rel='alternate' type='text/html' href='http://morecakelessfish.blogspot.com/2007/12/mandriva-sound-problems.html' title='Mandriva sound problems'/><author><name>Ali</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='31' height='32' src='http://i96.photobucket.com/albums/l163/tea_and_cakey/random/starguy.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6702157757260886111.post-6465592836321844407</id><published>2007-12-17T19:00:00.001Z</published><updated>2007-12-18T17:08:07.687Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='latex'/><category scheme='http://www.blogger.com/atom/ns#' term='linux'/><category scheme='http://www.blogger.com/atom/ns#' term='revtex'/><title type='text'>Installing LaTeX packages</title><content type='html'>This post is going to change a lot as I try this new feat.  I'm writing as I go, and this may not even work.  Worse, I might break my current LaTeX distribution.  Wish me luck.&lt;br /&gt;&lt;br /&gt;I'm using several very helpful pages.  One is the &lt;a href="ftp://aps.org/pub/revtex/README"&gt;readme&lt;/a&gt; file for the package I'm installing, and the other is &lt;a href="http://web.archive.org/web/20030927230105/http://www.ctan.org/installationadvice#overview?action=/installationadvice/"&gt;here&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;I download the package I want:  it happens to be REVTeX4.  It's saved as revtex4.tar.gz somewhere temporary.  My path &lt;span style="color: rgb(153, 153, 255);"&gt;$TEXMFLOCAL&lt;/span&gt; happens to correspond to &lt;span style="color: rgb(153, 153, 255);"&gt;/usr/local/share/texmf&lt;/span&gt;.  This is where all my updates will be stored- in a nice local file, so I can find them again.  In this path, I created some handy directories...&lt;br /&gt;&lt;span style="font-style: italic; color: rgb(204, 204, 255);"&gt;mkdir /usr/local/share/texmf/tex&lt;br /&gt;mkdir /usr/local/share/texmf/tex/latex&lt;/span&gt;&lt;br /&gt;I changed directories here:&lt;br /&gt;&lt;span style="color: rgb(204, 204, 255); font-style: italic;"&gt;cd  /usr/local/share/texmf/tex/latex&lt;/span&gt;&lt;br /&gt;next moved the tar file into this location...&lt;br /&gt;&lt;span style="font-style: italic; color: rgb(204, 204, 255);"&gt;cp /temporarylocation/revtex4.tar.gz .&lt;/span&gt;&lt;br /&gt;the full-stop is not a typo.  I un-tarred it like so:&lt;br /&gt;&lt;span style="font-style: italic; color: rgb(204, 204, 255);"&gt;tar -zxvf revtex4.tar.gz&lt;/span&gt;&lt;br /&gt;I had to be acting as a superuser, of course, to wield such fantastic powers.  I now have a lovely directory named revtex4.  The readme suggests I put the &lt;span style="color: rgb(153, 153, 255);"&gt;*.bst&lt;/span&gt; files in &lt;span style="color: rgb(153, 153, 255);"&gt;$TEXMFLOCAL/bibtex/bst/revtex4&lt;/span&gt;, so I do the following:&lt;br /&gt;&lt;span style="color: rgb(204, 204, 255); font-style: italic;"&gt;cd  /usr/local/share/texmf/&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(204, 204, 255); font-style: italic;"&gt;mkdir bibtex&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(204, 204, 255); font-style: italic;"&gt;mkdir bibtex/bst&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(204, 204, 255); font-style: italic;"&gt;mkdir bibtex/bst/revtex4&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(204, 204, 255); font-style: italic;"&gt;cd bibtext/bst/revtex4&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(204, 204, 255); font-style: italic;"&gt;cp /usr/local/share/texmf/tex/latex/revtex4/*.bst .&lt;/span&gt;&lt;br /&gt;I think I shall also delete them from their current home in &lt;span style="color: rgb(153, 153, 255);"&gt;/tex/latex/revtex4&lt;/span&gt; for good measure.  It is now time to instruct my TeX system where to find it all.  I altered a cunning file:&lt;br /&gt;&lt;span style="font-style: italic; color: rgb(204, 204, 255);"&gt;kwrite /usr/share/texmf/web2c/texmf.cnf&lt;/span&gt;&lt;br /&gt;From here on, I (almost) quote verbatim from &lt;a href="http://web.archive.org/web/20030927230105/http://www.ctan.org/installationadvice#overview?action=/installationadvice/"&gt;this page&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;I had already defined a directory for local material, and stuck everything there.  This was &lt;span style="color: rgb(153, 153, 255);"&gt;/usr/local/share/texmf&lt;/span&gt;.&lt;br /&gt;&lt;br /&gt;&lt;div style="text-align: left;"&gt;&lt;/div&gt;&lt;blockquote&gt;&lt;div style="text-align: left;"&gt;If your configuration file has a line that says  something like:&lt;br /&gt;&lt;div style="text-align: center;"&gt;&lt;span style="color: rgb(153, 153, 255);"&gt;TEXMFLOCAL=$SELFAUTOPARENT/share/texmf  &lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;...then you are fine; leave it alone. Some older distributions instead have a line like&lt;br /&gt;&lt;div style="text-align: center;"&gt;&lt;span style="color: rgb(153, 153, 255);"&gt;TEXMFLOCAL=/usr/local/share/texmf&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;...commented out (it starts with a percent sign).                        If yours is commented out, then below it put the non-commented &lt;span style="color: rgb(153, 153, 255);"&gt;$SELFAUTOPARENT&lt;/span&gt; line                        (and date the change in the file; sometimes that's helpful).&lt;/blockquote&gt;Mine had the "older distribution" option, but it wasn't commented out, so I left it as it was.&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;Turn on searching of that local directory. A bit further down I found this line&lt;br /&gt;&lt;div style="text-align: center;"&gt;&lt;span style="color: rgb(153, 153, 255);"&gt;TEXMF = {$HOMETEXMF,!!$TEXMFLOCAL,!!$TEXMFMAIN}&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;I commented this line out by prefixing a percent sign to the line. Below it I added a new line:&lt;br /&gt;&lt;div style="text-align: center;"&gt;&lt;span style="color: rgb(153, 153, 255);"&gt;TEXMF={$HOMETEXMF,$TEXMFLOCAL,!!$TEXMFMAIN}&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;...in which I've deleted the twin exclamation points.  The twin exclamation points tell the system that if it does not find a file in the                        main tree's ls-R database then it should not go on to search the disk.                        That's OK because your main tree will never change since you will put new things into the local tree.  So the rehashing done [later] will be up to  date forever. (Older versions have a   &lt;span style="color: rgb(153, 153, 255);"&gt;TEXMF=!!$TEXMFMAIN&lt;/span&gt; line which you can comment out and replace with what's above.) &lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;The page also offers wisdom on what I'm actually doing.  The re-hashing I do at the end.&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;Your TeX system can precompute the position of [certain] files so that, instead of scanning the directory tree on your physical disk, your system finds where a file is in a database file called 'ls-R', which lists that directory tree. Then your TeX goes straight to that spot in the directory structure on the disk to get the file's contents. (The software libraries that do this work are called `kpath'.) Point One: If you make any changes to a precomputed portion of your setup then you must rebuild (or `rehash') the database of files, or your changes won't be found.&lt;/blockquote&gt;&lt;br /&gt;I continue:&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;Insure that searching of that local directory is done on disk. For certain kinds of files (such as .vf files), if the system finds a filename database in the directory tree then it will look for that file only in the database -- it will not go on to search the disk (whether there                        are twin exclamation points or not). Thus, for those files, forgetting to rehash                        results in your system saying that it cannot find files that you know are in the right place.                         To avoid that puzzlement, we will omit creation of that database for the local tree... I found this line&lt;br /&gt;&lt;div style="text-align: center;"&gt;&lt;span style="color: rgb(153, 153, 255);"&gt;TEXMFDBS=$TEXMF;$VARTEXFONTS&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;...commented it out with a percent sign, and added this just below it:&lt;br /&gt;&lt;div style="text-align: center;"&gt;&lt;span style="color: rgb(153, 153, 255);"&gt;TEXMFDBS=$TEXMFMAIN;$VARTEXFONTS&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;The version with TEXMF would have caused  TEXMFDBS to expand to include the local tree, but now                        with TEXMFMAIN   it will only include the distribution's tree.&lt;/blockquote&gt;&lt;br /&gt;And now for the hashing of the database:&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;Run the command to remake the ls-R     filename database.  I first checked that there was no   ls-R  file in the local directory &lt;span style="color: rgb(153, 153, 255);"&gt;/usr/local/share/texmf&lt;/span&gt;  and then I did this.&lt;br /&gt;&lt;span style="font-style: italic; color: rgb(204, 204, 255);"&gt;texhash&lt;/span&gt;&lt;br /&gt;The system responded by telling me that it had made   &lt;span style="color: rgb(153, 153, 255);"&gt;/usr/share/texmf/ls-R&lt;/span&gt;  (and also a &lt;span style="color: rgb(153, 153, 255);"&gt;/var/lib/texmf/ls-R&lt;/span&gt; file that                        has to do with user-created fonts that I will not discuss).  The main point is that the system did not make &lt;span style="color: rgb(153, 153, 255);"&gt;/usr/local/share/texmf/ls-R&lt;/span&gt;. Consequently, searches of the local material                         will be made on disk.&lt;/blockquote&gt;&lt;br /&gt;Et voila.  Thank you, oh great author of handy page (and sorry for stealing your text- I reproduce it here in case it disappears, or I can't find it again!)&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;LATER:  Ok, this appears to have broken my LaTeX as predicted.  I'm having problems with finding Metafont.  Will sort this out and post in a later post about it, if I can fix it.&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6702157757260886111-6465592836321844407?l=morecakelessfish.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://morecakelessfish.blogspot.com/feeds/6465592836321844407/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6702157757260886111&amp;postID=6465592836321844407' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6702157757260886111/posts/default/6465592836321844407'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6702157757260886111/posts/default/6465592836321844407'/><link rel='alternate' type='text/html' href='http://morecakelessfish.blogspot.com/2007/12/installing-latex-packages.html' title='Installing LaTeX packages'/><author><name>Ali</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='31' height='32' src='http://i96.photobucket.com/albums/l163/tea_and_cakey/random/starguy.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6702157757260886111.post-443306157189886418</id><published>2007-12-12T14:03:00.000Z</published><updated>2007-12-12T14:07:14.201Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='mandriva'/><category scheme='http://www.blogger.com/atom/ns#' term='linux'/><title type='text'>A really silly post to remind myself of 4 letters</title><content type='html'>&lt;span style="font-style: italic; color: rgb(204, 204, 255);"&gt;ps ux&lt;/span&gt;&lt;br /&gt;... will show me all processes running for my user on my work (mandriva) linux computer.  Then I can get rid of the process number that has hung up via the "kill" command.&lt;br /&gt;&lt;br /&gt;Also, I think perhaps the following is true for mandriva:&lt;br /&gt;&lt;span style="font-style: italic; color: rgb(204, 204, 255);"&gt;urpmi&lt;/span&gt; -install a package&lt;br /&gt;&lt;span style="color: rgb(204, 204, 255); font-style: italic;"&gt;urpme&lt;/span&gt; -uninstall a package&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6702157757260886111-443306157189886418?l=morecakelessfish.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://morecakelessfish.blogspot.com/feeds/443306157189886418/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6702157757260886111&amp;postID=443306157189886418' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6702157757260886111/posts/default/443306157189886418'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6702157757260886111/posts/default/443306157189886418'/><link rel='alternate' type='text/html' href='http://morecakelessfish.blogspot.com/2007/12/really-silly-post-to-remind-myself-of-4.html' title='A really silly post to remind myself of 4 letters'/><author><name>Ali</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='31' height='32' src='http://i96.photobucket.com/albums/l163/tea_and_cakey/random/starguy.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6702157757260886111.post-6397555193214927645</id><published>2007-12-04T15:41:00.001Z</published><updated>2007-12-04T15:48:42.480Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='fortran'/><category scheme='http://www.blogger.com/atom/ns#' term='fortran 95'/><title type='text'>Converting integers to strings in Fortran</title><content type='html'>Assisted by &lt;a href="http://www.ibiblio.org/pub/languages/fortran/ch2-11.html"&gt;this page&lt;/a&gt;, I present the result:&lt;br /&gt;&lt;br /&gt;&lt;div style="text-align: left;"&gt;&lt;span style="color: rgb(153, 153, 255);"&gt;character(11), parameter :: fstart = "Xfiles/Xbin"&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(153, 153, 255);"&gt;character(4), parameter :: fend =".txt"&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(153, 153, 255);"&gt;character(3) :: fnum&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(153, 153, 255);"&gt;character(18) :: fname&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(153, 153, 255);"&gt;integer :: blob&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(153, 153, 255);"&gt;blob = 2&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(153, 153, 255);"&gt;write (fnum,1000) blob&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(153, 153, 255);"&gt;1000  format(I3)&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(153, 153, 255);"&gt;fname = fstart//trim(adjustl(fnum))//fend&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;The double slash "//" concatenates strings.  The strange form of the write command (rather than just char(blob) gives you the value of blob as a character, rather than the ascii character for that number.  The adjustl(fnum) function moves the contents of string "fnum" to the left, to leave all trailing blanks to the right.  The call to trim(string) then removes the trailing blanks.  This is necessary to avoid spaces appearing in "fname" if the value of blob is only 2 digits or less, since I defined "fnum" to be three characters long.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6702157757260886111-6397555193214927645?l=morecakelessfish.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://morecakelessfish.blogspot.com/feeds/6397555193214927645/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6702157757260886111&amp;postID=6397555193214927645' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6702157757260886111/posts/default/6397555193214927645'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6702157757260886111/posts/default/6397555193214927645'/><link rel='alternate' type='text/html' href='http://morecakelessfish.blogspot.com/2007/12/converting-integers-to-strings-in.html' title='Converting integers to strings in Fortran'/><author><name>Ali</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='31' height='32' src='http://i96.photobucket.com/albums/l163/tea_and_cakey/random/starguy.png'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6702157757260886111.post-2984623877762437294</id><published>2007-11-29T09:54:00.000Z</published><updated>2007-11-29T09:57:48.719Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='KDE'/><category scheme='http://www.blogger.com/atom/ns#' term='mandriva'/><category scheme='http://www.blogger.com/atom/ns#' term='linux'/><title type='text'>Three cheers for Greg</title><content type='html'>... who has informed me that when KDE crashes and the title bars disappear from the windows (which it seems to do with annoying regularity), you can just type:&lt;br /&gt;&lt;span style="font-style: italic; color: rgb(204, 204, 255);"&gt;kde-window-decorator &amp;amp;&lt;/span&gt;&lt;br /&gt;to get them back again.  Hoorah.&lt;br /&gt;&lt;br /&gt;Disclaimer:  Greg just said "This might not be a solution, it's crashing much more after that!"&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6702157757260886111-2984623877762437294?l=morecakelessfish.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://morecakelessfish.blogspot.com/feeds/2984623877762437294/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6702157757260886111&amp;postID=2984623877762437294' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6702157757260886111/posts/default/2984623877762437294'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6702157757260886111/posts/default/2984623877762437294'/><link rel='alternate' type='text/html' href='http://morecakelessfish.blogspot.com/2007/11/three-cheers-for-greg.html' title='Three cheers for Greg'/><author><name>Ali</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='31' height='32' src='http://i96.photobucket.com/albums/l163/tea_and_cakey/random/starguy.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6702157757260886111.post-1267024266890467671</id><published>2007-11-28T10:13:00.000Z</published><updated>2007-11-28T10:34:19.551Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='NAG'/><category scheme='http://www.blogger.com/atom/ns#' term='mandriva'/><category scheme='http://www.blogger.com/atom/ns#' term='linux'/><category scheme='http://www.blogger.com/atom/ns#' term='fortran'/><category scheme='http://www.blogger.com/atom/ns#' term='fortran 95'/><category scheme='http://www.blogger.com/atom/ns#' term='gfortran'/><title type='text'>More NAG problemos</title><content type='html'>So, to re-cap, the NAG library wants me to have gfortran 4.2.0 or better.  I installed the only ready-built new version of gfortran I could find for linux (since Mandriva doesn't offer a package newer than version 4.1.2), which was 4.3.0.  I have the NAG library working fine with this new version of gfortran, and it cries if I try to use the old fortran compiler.  To re-cap, I now have two compilers on my computer:&lt;br /&gt;&lt;div style="text-align: center;"&gt;"New"&lt;br /&gt;&lt;span style="color: rgb(153, 153, 255);"&gt;gcc version 4.3.0 20071121 (experimental)&lt;/span&gt;&lt;br /&gt;"Old"&lt;br /&gt;&lt;span style="color: rgb(153, 153, 255);"&gt;gcc version 4.1.2 20070302 (prerelease)&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;So all is splendid (when I use the routine S14BAF to find the incomplete gamma function) after a few angry words about data-types.  You must use double-precision variables (not real(kind = 10) or anything) or else it just returns junk.  This will only work if I compile with the new gfortran version.&lt;br /&gt;&lt;br /&gt;However , (and there's always a "however" with me and linux!), now I try to compile a program which uses the random number routines G05MKF and similar.  The new compiler now gets angry:&lt;br /&gt;&lt;div style="text-align: center;"&gt;&lt;span style="color: rgb(153, 153, 255);"&gt;/opt/NAG/fll3a21dfl/lib/libnag_nag.a(g05mkxn.o): In function `g05mkxn_':&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(153, 153, 255);"&gt;g05mkxn.f:(.text+0xde): undefined reference to `_gfortran_pow_r8_i4'&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(153, 153, 255);"&gt;/opt/NAG/fll3a21dfl/lib/libnag_nag.a(g05mkzn.o): In function `g05mkzn_':&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(153, 153, 255);"&gt;g05mkzn.f:(.text+0xb1): undefined reference to `_gfortran_pow_r8_i4'&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(153, 153, 255);"&gt;collect2: ld returned 1 exit status&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;This subroutine "_gfortran_pow_r8_i4" is apparently supposed to be in libgfortran.a and many people have solved their problems by explicitly telling their compiler where to look for this when linking, eg.&lt;br /&gt;&lt;span style="font-style: italic; color: rgb(204, 204, 255);"&gt;/etc/irun/bin/gfortran -m32 simtest.f90 /opt/NAG/fll3a21dfl/lib/libnag_nag.a -o simtest -L/etc/irun/lib -lgfortran&lt;/span&gt;&lt;br /&gt;But this still doesn't work.  Anyway, I added this directory to the path before hand, so this probably is not the problem.  I look at the contents of the libgfortran library using the command:&lt;br /&gt;&lt;span style="color: rgb(204, 204, 255); font-style: italic;"&gt;nm libgfortran.a |more&lt;/span&gt;&lt;br /&gt;where I've piped it through the "more" doo-dah so it doesn't all flash by at once.  There are lots of similar routines to "_gfortran_pow_r8_i4", but no actual version of the one I want.  So my compiler is not lying!  I have not so far found a new version of the library which contains this, but my old compiler library does!  So for all my random number programs, I must still use the old compiler, which seems to work just fine.  Perhaps I can add the subroutine from the old library into the new one?  Or will there be other issues?&lt;br /&gt;&lt;a href="http://www.fortran.gantep.edu.tr/compiling-g95-basic-guide.html#4"&gt;This page&lt;/a&gt; is quite helpful about libraries, I found...&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6702157757260886111-1267024266890467671?l=morecakelessfish.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://morecakelessfish.blogspot.com/feeds/1267024266890467671/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6702157757260886111&amp;postID=1267024266890467671' title='5 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6702157757260886111/posts/default/1267024266890467671'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6702157757260886111/posts/default/1267024266890467671'/><link rel='alternate' type='text/html' href='http://morecakelessfish.blogspot.com/2007/11/more-nag-problemos.html' title='More NAG problemos'/><author><name>Ali</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='31' height='32' src='http://i96.photobucket.com/albums/l163/tea_and_cakey/random/starguy.png'/></author><thr:total>5</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6702157757260886111.post-6937506402913161348</id><published>2007-11-26T12:02:00.000Z</published><updated>2007-11-27T14:55:16.200Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='NAG'/><category scheme='http://www.blogger.com/atom/ns#' term='mandriva'/><category scheme='http://www.blogger.com/atom/ns#' term='linux'/><category scheme='http://www.blogger.com/atom/ns#' term='fortran'/><category scheme='http://www.blogger.com/atom/ns#' term='fortran 95'/><title type='text'>NAG library- getting the thing to work!</title><content type='html'>So, I receive my license key, and I've installed the library that I needed (FLL3A21DFL, x86-32, Linux, gfortran compiler, Double Precision) and followed the installers instructions on &lt;a href="http://www.nag.com/doc/inun/fl21/l3adfl/in.html"&gt;this page&lt;/a&gt;.  It installed in:&lt;br /&gt;&lt;div style="text-align: center;"&gt;&lt;span style="color: rgb(153, 153, 255);"&gt;/opt/NAG/fll3a21dfl/&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;It's now time to run a test!  The &lt;a href="http://www.nag.com/doc/inun/fl21/l3adfl/un.html#example"&gt;User's Note&lt;/a&gt; suggests to run an example, like thus:&lt;br /&gt;&lt;span style="font-style: italic; color: rgb(204, 204, 255);"&gt;nag_example e04ucf&lt;/span&gt;&lt;br /&gt;...for which I moved to my own directory where I had write permission.  However, then I need to tell it where the nag_example script is, so I actually had to run:&lt;br /&gt;&lt;span style="font-style: italic; color: rgb(204, 204, 255);"&gt;/opt/NAG/fll3a21dfl/scripts/nag_example e04ucf&lt;/span&gt;&lt;br /&gt;The computer said:&lt;br /&gt;&lt;div style="text-align: center;"&gt;&lt;span style="color: rgb(153, 153, 255);"&gt;Copying e04ucfe.f to current directory&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(153, 153, 255);"&gt;cp /opt/NAG/fll3a21dfl/examples/source/e04ucfe.f .&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(153, 153, 255);"&gt;Compiling and linking e04ucfe.f to produce executable e04ucfe.exe&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(153, 153, 255);"&gt;gfortran -m32 e04ucfe.f /opt/NAG/fll3a21dfl/lib/libnag_nag.a -o  e04ucfe.exe&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(153, 153, 255);"&gt;Copying e04ucfe.d to current directory&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(153, 153, 255);"&gt;cp /opt/NAG/fll3a21dfl/examples/data/e04ucfe.d .&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(153, 153, 255);"&gt;Running e04ucfe.exe with data from e04ucfe.d&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(153, 153, 255);"&gt;./e04ucfe.exe &amp;lt e04ucfe.d &amp;gt e04ucfe.r&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(153, 153, 255);"&gt;/opt/NAG/fll3a21dfl/scripts/nag_example: line 58: 12681 Segmentation fault      ./${example}.exe &lt;${example}.d &gt;${example}.r&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;...as it happily seg-faulted.  I guessed this is because it called "gfortran" which still refers to the old version of the compiler on my machine (I still haven't worked out how to change that!)  But now I guess the correct commands to re-compile it:&lt;br /&gt;&lt;span style="font-style: italic; color: rgb(204, 204, 255);"&gt;/etc/irun/bin/gfortran -m32 e04ucfe.f /opt/NAG/fll3a21dfl/lib/libnag_nag.a -o  e04ucfe.exe&lt;/span&gt;&lt;br /&gt;Then to run it:&lt;br /&gt;&lt;span style="color: rgb(204, 204, 255); font-style: italic;"&gt;./e04ucfe.exe &amp;lt e04ucfe.d &amp;gt e04ucfe.r&lt;/span&gt;&lt;br /&gt;And it cried:&lt;br /&gt;&lt;div style="text-align: center;"&gt;&lt;span style="color: rgb(153, 153, 255);"&gt;./e04ucfe.exe: error while loading shared libraries: libgfortran.so.3: cannot open shared object file: No such file or directory&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;No matter, I had forgotten to type&lt;br /&gt;&lt;span style="font-style: italic; color: rgb(204, 204, 255);"&gt;export LD_LIBRARY_FLAG=/etc/irun/lib&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic; color: rgb(204, 204, 255);"&gt;export LD_LIBRARY_PATH=/etc/irun/lib&lt;/span&gt;&lt;br /&gt;...because I still haven't managed to sort this problem out a better way.  Perhaps making a symbolic link to the missing libraries as suggested in the NAG Installer's notes might work:&lt;br /&gt;&lt;blockquote&gt; To simplify access to the libraries you may wish to create symbolic links in a system location such as &lt;span style="color: rgb(153, 153, 255);"&gt;/usr/lib&lt;/span&gt; pointing at the installed libraries. They would then be in the default search path of the linker during the link phase, and be available for execution at run time (in the case of shareable libraries).&lt;/blockquote&gt;Anyway, re-compiling and running now works fine.  Time to call a routine from my program.  Since this is the NAG library (and not the NAG f90 library), I must call functions with strange names like S14AAF.  After adding the compilers own libraries to LD_LIBRARY_PATH (see above!), I additionally added the NAG libraries:&lt;br /&gt;&lt;span style="font-style: italic; color: rgb(204, 204, 255);"&gt;LD_LIBRARY_PATH=/opt/NAG/fll3a21dfl/lib:/opt/NAG/fll3a21dfl/acml:&lt;br /&gt;                                      ${LD_LIBRARY_PATH}&lt;/span&gt;&lt;br /&gt;but really all on one line, and with no spaces.  Then...&lt;br /&gt;&lt;span style="font-style: italic; color: rgb(204, 204, 255);"&gt;export LD_LIBRARY_PATH&lt;/span&gt;&lt;br /&gt;Such that typing:&lt;br /&gt;&lt;span style="font-style: italic; color: rgb(204, 204, 255);"&gt;echo $LD_LIBRARY_PATH&lt;/span&gt;&lt;br /&gt;Gives me:&lt;br /&gt;&lt;div style="text-align: center;"&gt;&lt;span style="color: rgb(153, 153, 255);"&gt;/opt/NAG/fll3a21dfl/lib:/opt/NAG/fll3a21dfl/acml:/etc/irun/lib&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;I've no idea if that was strictly necessary.  (Edit- it doesn't seem to be!)  In my fortran code, I must declare the types of the NAG functions I call, as well as the fact that they are external:&lt;br /&gt;&lt;span style="color: rgb(153, 153, 255);"&gt;real(kind = 10) :: factorial, S14AAF, S14BAF&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(153, 153, 255);"&gt;external S14AAF, S14BAF&lt;/span&gt;&lt;br /&gt;Where factorial is an internal function I wrote myself.  Functions are then called as you would expect...&lt;br /&gt;&lt;span style="color: rgb(153, 153, 255);"&gt;gam = S14AAF(n+1.0,ifail)&lt;/span&gt;&lt;br /&gt;or somesuch line.  The program is compiled using:&lt;br /&gt;&lt;span style="font-style: italic; color: rgb(204, 204, 255);"&gt;/etc/irun/bin/gfortran -m32 gammatest.f90 /opt/NAG/fll3a21dfl/lib/libnag_nag.a -o gammatest&lt;/span&gt;&lt;br /&gt;...since I had to tell the compiler where to find the external functions.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6702157757260886111-6937506402913161348?l=morecakelessfish.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://morecakelessfish.blogspot.com/feeds/6937506402913161348/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6702157757260886111&amp;postID=6937506402913161348' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6702157757260886111/posts/default/6937506402913161348'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6702157757260886111/posts/default/6937506402913161348'/><link rel='alternate' type='text/html' href='http://morecakelessfish.blogspot.com/2007/11/nag-library-getting-thing-to-work.html' title='NAG library- getting the thing to work!'/><author><name>Ali</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='31' height='32' src='http://i96.photobucket.com/albums/l163/tea_and_cakey/random/starguy.png'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6702157757260886111.post-5577242955369480370</id><published>2007-11-22T13:24:00.000Z</published><updated>2007-11-22T14:34:12.008Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='mandriva'/><category scheme='http://www.blogger.com/atom/ns#' term='linux'/><category scheme='http://www.blogger.com/atom/ns#' term='fortran'/><category scheme='http://www.blogger.com/atom/ns#' term='fortran 95'/><category scheme='http://www.blogger.com/atom/ns#' term='gfortran'/><title type='text'>Fun and games with gfortran and the NAG library</title><content type='html'>I am trying to install the NAG library at work to run with gfortran.   The problem is that it won't work with the old version of gfortran (4.1.2), which is the only package available for my version of the Mandriva linux kernel (2007).  I had to update gfortran to 4.2.0 or better.  First I needed to find out which kernel version I had (32 bit or 64 bit on a 64-bit processor?).  I typed:&lt;br /&gt;&lt;span style="font-style: italic; color: rgb(204, 204, 255);"&gt;cat /etc/issue&lt;/span&gt;&lt;br /&gt;which seemed to tell me that I have a 32 bit kernel.  An alternative is to try:&lt;br /&gt;&lt;span style="color: rgb(204, 204, 255); font-style: italic;"&gt;uname =a&lt;/span&gt;&lt;br /&gt;I then downloaded the 32 bit gfortran binaries for Linux, and saved them in a temporary file.  I then changed to the directory in which I wished to install them:&lt;br /&gt;&lt;span style="font-style: italic; color: rgb(204, 204, 255);"&gt;cd /etc&lt;/span&gt;&lt;br /&gt;Next I un-tarred them:&lt;br /&gt;&lt;span style="color: rgb(204, 204, 255); font-style: italic;"&gt;tar -zxvf  $temp_folder_path/gfortran-linux.tar.gz&lt;/span&gt;&lt;br /&gt;Typing:&lt;br /&gt;&lt;span style="font-style: italic; color: rgb(204, 204, 255);"&gt;/etc/irun/bin/gfortran -v&lt;/span&gt;&lt;br /&gt;told me all about the new version I had installed.  When trying to compile my test code, I had to explicitly give the path to the new version, otherwise it used the old version (haven't worked out how to change this yet!)&lt;br /&gt;&lt;span style="color: rgb(204, 204, 255); font-style: italic;"&gt;/etc/irun/bin/gfortran -o test test.f90&lt;/span&gt;&lt;br /&gt;So far, so good, but when I tried to run it:&lt;br /&gt;&lt;span style="font-style: italic; color: rgb(204, 204, 255);"&gt;./test&lt;/span&gt;&lt;br /&gt;The computer screamed:&lt;br /&gt;&lt;div style="text-align: center;"&gt;&lt;span style="color: rgb(153, 153, 255);"&gt;./test: error while loading shared libraries: libgfortran.so.3: cannot open shared object file: No such file or directory&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;Typing:&lt;br /&gt;&lt;span style="color: rgb(204, 204, 255); font-style: italic;"&gt;ldd test&lt;/span&gt;&lt;br /&gt;showed me which libraries the program calls, and which (might) be missing.  To solve this:&lt;br /&gt;&lt;span style="font-style: italic; color: rgb(204, 204, 255);"&gt;export LD_LIBRARY_FLAG=/etc/irun/lib&lt;/span&gt;&lt;br /&gt;and similarly...&lt;br /&gt;&lt;span style="color: rgb(204, 204, 255); font-style: italic;"&gt;export LD_LIBRARY_PATH=/etc/irun/lib&lt;/span&gt;&lt;br /&gt;To see what the variables contain:&lt;br /&gt;&lt;span style="font-style: italic; color: rgb(204, 204, 255);"&gt;echo $LD_LIBRARY_PATH&lt;/span&gt;&lt;br /&gt;More fun to come, as I try and get the NAG library to work...&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6702157757260886111-5577242955369480370?l=morecakelessfish.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://morecakelessfish.blogspot.com/feeds/5577242955369480370/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6702157757260886111&amp;postID=5577242955369480370' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6702157757260886111/posts/default/5577242955369480370'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6702157757260886111/posts/default/5577242955369480370'/><link rel='alternate' type='text/html' href='http://morecakelessfish.blogspot.com/2007/11/i-am-trying-to-install-nag-library-at.html' title='Fun and games with gfortran and the NAG library'/><author><name>Ali</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='31' height='32' src='http://i96.photobucket.com/albums/l163/tea_and_cakey/random/starguy.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6702157757260886111.post-1966328335497585113</id><published>2007-11-20T13:08:00.000Z</published><updated>2007-11-20T13:11:37.527Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='mandriva'/><category scheme='http://www.blogger.com/atom/ns#' term='linux'/><category scheme='http://www.blogger.com/atom/ns#' term='fortran'/><category scheme='http://www.blogger.com/atom/ns#' term='fortran 95'/><title type='text'>Fortran 95</title><content type='html'>Here I am, installing Fortran 95 compilers at work on Mandriva One.  It didn't seem to be installed, so I just installed the two packages pertaining to Fortran from rpmdrake, and now my file test.f90 compiles when I type:&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(204, 204, 255); font-style: italic;"&gt;f95 -o test test.f90&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;and runs with:&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(204, 204, 255); font-style: italic;"&gt;./test&lt;/span&gt;&lt;span style="font-weight: bold; color: rgb(204, 204, 255);"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;Hoorah for that.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6702157757260886111-1966328335497585113?l=morecakelessfish.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://morecakelessfish.blogspot.com/feeds/1966328335497585113/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6702157757260886111&amp;postID=1966328335497585113' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6702157757260886111/posts/default/1966328335497585113'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6702157757260886111/posts/default/1966328335497585113'/><link rel='alternate' type='text/html' href='http://morecakelessfish.blogspot.com/2007/11/fortran-95.html' title='Fortran 95'/><author><name>Ali</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='31' height='32' src='http://i96.photobucket.com/albums/l163/tea_and_cakey/random/starguy.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6702157757260886111.post-6263666114145026075</id><published>2007-11-03T18:12:00.000Z</published><updated>2007-11-03T22:09:33.161Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='midi'/><category scheme='http://www.blogger.com/atom/ns#' term='rosegarden'/><category scheme='http://www.blogger.com/atom/ns#' term='lilypond'/><category scheme='http://www.blogger.com/atom/ns#' term='kubuntu'/><category scheme='http://www.blogger.com/atom/ns#' term='ubuntu'/><title type='text'>Linux distros, Rosegarden, MIDI files and other jollity.</title><content type='html'>This is a brief chronicle of my battles with my computer since my last update.&lt;br /&gt;&lt;br /&gt;I for some reason I had made a move back to Windows.  However, my patience with it was as short lived as most of my houseplants.  I'd also recently been using Mandriva Linux at work, which is very yummy indeed.  I'd always previously used Ubuntu with Gnome at home, but the wonder of Kile for editing LaTeX tempted me towards KDE.  Thus, I spent many evenings installing new distros on my geriatric laptop.  First up was Mandriva, but sadly even trying to boot from a live-cd, it hangs before even starting up.  I switched again, and tried Fedora.  This installed okay eventually, after a few arguments with the disk partitioning.  The automatic partitioner failed to wipe the windows partition from the disk, requiring some serious expletives.  After a few days, I tired of Fedora as it ran so very slowly on my ancient computer, and was full of all kinds of dowithoutables.  Ever faithful to my first linux love, I tried Kubuntu Edgy.  It seems to work fine, but is still a little slow.  Not the last word by any means- I think I'm going to have to try a tiny version of Linux, but now is not the moment.  So, I cope with Kubuntu for the moment.&lt;br /&gt;&lt;br /&gt;Now, for various reasons I require a music notation editor.  After a little research, I settle for a combination of &lt;a href="http://www.rosegardenmusic.com/"&gt;Rosegarden&lt;/a&gt; for the editor, with &lt;a href="http://lilypond.org/web/"&gt;Lilypond&lt;/a&gt; to do my typesetting.  I don't recall how I installed them.&lt;br /&gt;&lt;br /&gt;Rosegarden seems to work all fine and dandy except one little hitch:&lt;br /&gt;&lt;br /&gt;&lt;div style="text-align: center;"&gt;&lt;span style="color: rgb(153, 153, 255);"&gt;System timer resolution is too low!&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;...it cries as it opens.  Apparently my kernel timer resolution is puny and not good enough to accurately time MIDI files on playback in real time.  I could switch to a low-latency kernel, but I can't be bothered.  I want a quick fix and instant results.  I'm happy for my sound to get a bit squished and crap, any sound will do for the moment.  However, apparently I should be hearing my crappy sound even with Rosegarden's little huff.  But I have silence.  I conclude my problems lie deeper than this.  I can't listen to my MIDI file in anyway, Amarok won't recognise it either.&lt;br /&gt;&lt;br /&gt;I find this lovely &lt;a href="https://help.ubuntu.com/community/MidiSoftwareSynthesisHowTo"&gt;how-to&lt;/a&gt; which tells me to install TiMidiy and "freepats" samples.  I reproduce some of it's wisdom here for my own benefit:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic; color: rgb(204, 204, 255);"&gt;timidity music.mid&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;typed in the commandline now lets me here the funky music!  Now, I  load some modules&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic; color: rgb(204, 204, 255);"&gt;sudo modprobe snd-seq-device&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic; color: rgb(204, 204, 255);"&gt;sudo modprobe snd-seq-midi&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic; color: rgb(204, 204, 255);"&gt;sudo modprobe snd-seq-oss&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic; color: rgb(204, 204, 255);"&gt;sudo modprobe snd-seq-midi-event&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic; color: rgb(204, 204, 255);"&gt;sudo modprobe snd-seq&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;and run:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic; color: rgb(204, 204, 255);"&gt;timidity -iA -B2,8 -Os1l -s 44100&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;on the command line.  This loads TiMidity as a midi server and opens 2 midi ports, 128:0 and 128:1  Now Rosegarden makes sounds!  Even with it's timing huff.  To get TiMidity to do it's stuff on startup, I must edit &lt;span style="color: rgb(153, 153, 255);"&gt;/etc/default/timidity&lt;/span&gt; and uncomment:&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(204, 204, 255); font-style: italic;"&gt;TIM_ALSASEQ=true&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;I also add&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic; color: rgb(204, 204, 255);"&gt;snd-seq-device&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic; color: rgb(204, 204, 255);"&gt;snd-seq-midi&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic; color: rgb(204, 204, 255);"&gt;snd-seq-oss&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic; color: rgb(204, 204, 255);"&gt;snd-seq-midi-event&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic; color: rgb(204, 204, 255);"&gt;snd-seq&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;to  &lt;span style="color: rgb(153, 153, 255);"&gt;/etc/modules&lt;/span&gt;.&lt;br /&gt;&lt;br /&gt;I now remember a neat way to get sheet music- some music editors can import MIDI files and create scores from them.  Rosegarden can too, hoorah.  So, I boldly import my MIDI file and lo, I can see the music and hear it too!  Amarok still doesn't like my MIDI file, but I shall save that battle for another day.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6702157757260886111-6263666114145026075?l=morecakelessfish.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://morecakelessfish.blogspot.com/feeds/6263666114145026075/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6702157757260886111&amp;postID=6263666114145026075' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6702157757260886111/posts/default/6263666114145026075'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6702157757260886111/posts/default/6263666114145026075'/><link rel='alternate' type='text/html' href='http://morecakelessfish.blogspot.com/2007/11/linux-distros-rosegarden-midi-files-and.html' title='Linux distros, Rosegarden, MIDI files and other jollity.'/><author><name>Ali</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='31' height='32' src='http://i96.photobucket.com/albums/l163/tea_and_cakey/random/starguy.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6702157757260886111.post-1320555161517677336</id><published>2007-08-13T17:52:00.001+01:00</published><updated>2007-08-13T17:59:20.621+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='pdf'/><title type='text'>PDF imposition</title><content type='html'>Apparently this is where you re-order your PDF pages so that when you print them out two per page and double sided it forms a cute little booklet.&lt;br /&gt;&lt;br /&gt;You need "psutils" installed.&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(204, 204, 255); font-style: italic;"&gt;psbook -s44 inputfile.ps outputfile.ps&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;where the -s tag sets the number of pages your document needs.  This must be divisible by 4.  So, for a 43 page document, you need -s44, and the extra blank page will be added.  Neat.&lt;br /&gt;&lt;br /&gt;Then you can do the following to go back to a pdf:&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(204, 204, 255); font-style: italic;"&gt;ps2pdf outputfile.ps newoutputfile.pdf&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;When you print, you must select "duplex: short side" or else it comes out all screwy with the reverse pages rotated through 180 degrees.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6702157757260886111-1320555161517677336?l=morecakelessfish.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://morecakelessfish.blogspot.com/feeds/1320555161517677336/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6702157757260886111&amp;postID=1320555161517677336' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6702157757260886111/posts/default/1320555161517677336'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6702157757260886111/posts/default/1320555161517677336'/><link rel='alternate' type='text/html' href='http://morecakelessfish.blogspot.com/2007/08/pdf-imposition.html' title='PDF imposition'/><author><name>Ali</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='31' height='32' src='http://i96.photobucket.com/albums/l163/tea_and_cakey/random/starguy.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6702157757260886111.post-6162112818019886894</id><published>2007-08-13T17:49:00.000+01:00</published><updated>2007-08-13T17:58:48.075+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='jabref'/><title type='text'>Jabref</title><content type='html'>Jabref is a marvelous program to sort out all my references.  However, I always forget the command I need to run it under linux:&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(204, 204, 255); font-style: italic;"&gt;java -jar JabRef-2.2.jar&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;..and that's it.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6702157757260886111-6162112818019886894?l=morecakelessfish.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://morecakelessfish.blogspot.com/feeds/6162112818019886894/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6702157757260886111&amp;postID=6162112818019886894' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6702157757260886111/posts/default/6162112818019886894'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6702157757260886111/posts/default/6162112818019886894'/><link rel='alternate' type='text/html' href='http://morecakelessfish.blogspot.com/2007/08/jabref.html' title='Jabref'/><author><name>Ali</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='31' height='32' src='http://i96.photobucket.com/albums/l163/tea_and_cakey/random/starguy.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6702157757260886111.post-2790157563736692598</id><published>2007-07-30T20:50:00.000+01:00</published><updated>2007-07-30T21:05:27.721+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='funny'/><title type='text'>You need to dress a cat. And you will say to a cat together with a family. "It has changed just for a moment".</title><content type='html'>I'm putting off doing the washing up.  After just one glass of wine, I find the following sites hilarious.  I need help.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.petoffice.co.jp/catprin/english/"&gt;Cat Prin- the tailor for a cat you know&lt;/a&gt;&lt;br /&gt;&lt;span style="font-style: italic; color: rgb(204, 204, 255);"&gt;It  is spring new work! They are frog transformation goods!&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://66.249.91.104/translate_c?hl=en&amp;langpair=ja%7Cen&amp;amp;u=http://www.gizmodo.jp/2006/09/post_113.html"&gt;The muffler of the car which does the shape of a kitty&lt;/a&gt;&lt;br /&gt;&lt;span style="font-style: italic; color: rgb(204, 204, 255);"&gt;Is this probably for the person who likes the kitty?  　Or for hateful person?&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Oh dear.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6702157757260886111-2790157563736692598?l=morecakelessfish.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://morecakelessfish.blogspot.com/feeds/2790157563736692598/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6702157757260886111&amp;postID=2790157563736692598' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6702157757260886111/posts/default/2790157563736692598'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6702157757260886111/posts/default/2790157563736692598'/><link rel='alternate' type='text/html' href='http://morecakelessfish.blogspot.com/2007/07/i-m-putting-off-doing-washing-up.html' title='You need to dress a cat. And you will say to a cat together with a family. &quot;It has changed just for a moment&quot;.'/><author><name>Ali</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='31' height='32' src='http://i96.photobucket.com/albums/l163/tea_and_cakey/random/starguy.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6702157757260886111.post-510978374744958771</id><published>2007-05-29T21:24:00.000+01:00</published><updated>2007-05-29T21:30:59.051+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='compilers'/><category scheme='http://www.blogger.com/atom/ns#' term='C'/><category scheme='http://www.blogger.com/atom/ns#' term='C++'/><title type='text'>More excitement from the world of my computer.</title><content type='html'>Horror of horrors, I now find that my computer didn't come with gcc already!  Because I was in a clicky-clicky mood, I went to synaptic package manager, and installed all the gcc- looking things.&lt;br /&gt;I made some crappy C++ program, and tried to compile:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic; color: rgb(204, 204, 255);"&gt;gcc test.cxx&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;But my computer cried:&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(153, 153, 255);"&gt;gcc: installation problem, cannot exec 'cc1plus': No such file or directory&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Boo hoo hoo.  The oracle (internet) suggested:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic; color: rgb(204, 204, 255);"&gt;sudo apt-get install g++&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;And all was merry.  However, mostly I want to remind myself how to compile, since I write so little C code recently:&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(204, 204, 255); font-style: italic;"&gt;gcc test.c -o test&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Where the last flag is to put the output in "test".  Huzzah.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6702157757260886111-510978374744958771?l=morecakelessfish.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://morecakelessfish.blogspot.com/feeds/510978374744958771/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6702157757260886111&amp;postID=510978374744958771' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6702157757260886111/posts/default/510978374744958771'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6702157757260886111/posts/default/510978374744958771'/><link rel='alternate' type='text/html' href='http://morecakelessfish.blogspot.com/2007/05/more-excitement-from-world-of-my.html' title='More excitement from the world of my computer.'/><author><name>Ali</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='31' height='32' src='http://i96.photobucket.com/albums/l163/tea_and_cakey/random/starguy.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6702157757260886111.post-3314919635159208872</id><published>2007-04-14T22:30:00.000+01:00</published><updated>2007-04-14T22:39:10.976+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='last.fm'/><category scheme='http://www.blogger.com/atom/ns#' term='mp3'/><category scheme='http://www.blogger.com/atom/ns#' term='ubuntu'/><title type='text'>Play mp3 files in Ubuntu</title><content type='html'>For my second post of ubuntu battles, I'm going to delve back into historic battles (last night) and talk about how to get mp3's to play in Rhythmbox.  The first time I did it, it was bizzarre and involved lots of messing about, but now I find the following AMAZING program...&lt;br /&gt;&lt;a href="http://easyubuntu.freecontrib.org/"&gt;EasyUbuntu&lt;/a&gt;&lt;br /&gt;Immense.  So easy.&lt;br /&gt;&lt;span style="font-style: italic;"&gt;&lt;span style="font-style: italic;"&gt;&lt;span style="font-style: italic;"&gt;&lt;span style="font-style: italic;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;The best thing is, Rhythmbox has AudioScrobbler built-in, so if you are a &lt;a href="http://www.last.fm"&gt;last.fm&lt;/a&gt; fanatic, you only have to enter your username and password in &lt;span style="font-weight: bold;"&gt;Preferences&gt;AudioScrobbler&lt;/span&gt;.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;Note to self:  Actually RUN the EasyUbuntu program after you download it, before you wonder why mp3's are still not recognised.  Doh.&lt;/span&gt;&lt;span style="font-style: italic;"&gt;&lt;span style="font-style: italic;"&gt;&lt;span style="font-style: italic;"&gt;&lt;span style="font-style: italic;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6702157757260886111-3314919635159208872?l=morecakelessfish.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://morecakelessfish.blogspot.com/feeds/3314919635159208872/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6702157757260886111&amp;postID=3314919635159208872' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6702157757260886111/posts/default/3314919635159208872'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6702157757260886111/posts/default/3314919635159208872'/><link rel='alternate' type='text/html' href='http://morecakelessfish.blogspot.com/2007/04/play-mp3-files-in-ubuntu.html' title='Play mp3 files in Ubuntu'/><author><name>Ali</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='31' height='32' src='http://i96.photobucket.com/albums/l163/tea_and_cakey/random/starguy.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6702157757260886111.post-3514801678616507097</id><published>2007-04-14T21:58:00.000+01:00</published><updated>2007-04-14T22:29:54.387+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='pascal'/><category scheme='http://www.blogger.com/atom/ns#' term='ubuntu'/><title type='text'>Free Pascal</title><content type='html'>For my first thrilling post, I'd like to tell you all about my entire evening trying to install Free Pascal on my laptop which runs Ubuntu Linux (Dapper Drake, no less).  Since I'm not a very experienced user (not at all!) I have been mainly fumbling in the dark.  However, since I just managed to compile my first pascal program, I thought I'd share those fumblings with you, incase you're interested.  So.&lt;br /&gt;&lt;br /&gt;I visited &lt;a href="http://www.freepascal.org/"&gt;this marvellous website&lt;/a&gt;, and downloaded the 2.0.4 release for Linux as a .tar file:&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;fpc-2.0.4.i386-linux.tar&lt;/span&gt;&lt;br /&gt;So far, so good.  I could have had the .deb packages, but they were numerous, and I didn't know what to do with them, or which ones I needed.  So, the .tar version it was.  I un-tarred it like so:&lt;br /&gt;&lt;br /&gt;&lt;div style="text-align: center;"&gt;&lt;span style="color: rgb(204, 204, 255); font-style: italic;"&gt;tar -xvf fpc-2.0.4.i386-linux.tar&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;And then I ran the shell script to install it thus:&lt;br /&gt;&lt;br /&gt;&lt;div style="text-align: center;"&gt;&lt;span style="font-style: italic; color: rgb(204, 204, 255);"&gt;sudo ./install.sh&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;I wrote an incredible program, and named the file "hello.pp" (my first ever pascal program!)&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(153, 153, 255);"&gt;program hello;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(153, 153, 255);"&gt;begin&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(153, 153, 255);"&gt;    writeln ('Hello, world.');&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(153, 153, 255);"&gt;end.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;And then I typed...&lt;br /&gt;&lt;br /&gt;&lt;div style="text-align: center;"&gt;&lt;span style="font-style: italic; color: rgb(204, 204, 255);"&gt;fpc hello.pp&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;But!  Woe is me!  The computer told me:&lt;br /&gt;&lt;br /&gt;&lt;div style="text-align: center;"&gt;&lt;span style="color: rgb(153, 153, 255);"&gt;hello.pp(4,1) Error: Util ld not found, switching to external linking&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;Which was very rude.  However, after much head scratching and manual searching, I found the following enlightenment from the freepascal user manual:&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;Under UNIX systems (such as LINUX) you need to have the following programs installed :&lt;br /&gt;1. GNU as, the GNU assembler.&lt;br /&gt;2. GNU ld, the GNU linker.&lt;br /&gt;3. Optionally (but highly recommended) : GNU make. For easy recompiling of the compiler and Run-Time Library, this is needed.&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;Compiling a compiler?  I can't cope with this!  A bit more detective work lead me to install &lt;span style="font-weight: bold;"&gt;binutils&lt;/span&gt; using the synaptic package manager, which gave me the gnu assembler and linker.  Then my program compiled sweetly and ran when I typed:&lt;br /&gt;&lt;br /&gt;&lt;div style="text-align: center;"&gt;&lt;span style="font-style: italic; color: rgb(204, 204, 255);"&gt;./hello&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;Great stuff.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6702157757260886111-3514801678616507097?l=morecakelessfish.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://morecakelessfish.blogspot.com/feeds/3514801678616507097/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6702157757260886111&amp;postID=3514801678616507097' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6702157757260886111/posts/default/3514801678616507097'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6702157757260886111/posts/default/3514801678616507097'/><link rel='alternate' type='text/html' href='http://morecakelessfish.blogspot.com/2007/04/free-pascal.html' title='Free Pascal'/><author><name>Ali</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='31' height='32' src='http://i96.photobucket.com/albums/l163/tea_and_cakey/random/starguy.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6702157757260886111.post-6874392949482454880</id><published>2007-04-14T21:50:00.000+01:00</published><updated>2008-06-28T16:40:15.446+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='welcome'/><title type='text'>Hello, World.</title><content type='html'>Hello, deep abyss of cyberspace.&lt;br /&gt;&lt;br /&gt;I feel compelled to start my own blog, mainly to chronicle my battles against my computer.  It's going to be a fascinating read, I can just tell.&lt;br /&gt;&lt;br /&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_0"&gt;Everytime&lt;/span&gt; I work out how to do something with &lt;span class="blsp-spelling-corrected" id="SPELLING_ERROR_1"&gt;Linux&lt;/span&gt; (&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_2"&gt;ie&lt;/span&gt;. Installing my printer, taking a whole day) I mean to write it down.  However, I never do, and when my computer finally goes mental (I spill a glass of water on it)   I have to re-install everything.  By this time I've forgotten exactly how I ever got it to play mp3s.  But this is getting more regular, as my computer becomes more geriatric.  So here's my blog of reminders for myself next time it all goes tits up.&lt;br /&gt;&lt;br /&gt;Useful, that is, providing it's not my &lt;span class="blsp-spelling-corrected" id="SPELLING_ERROR_3"&gt;Ethernet&lt;/span&gt; card that gets fried (again).&lt;br /&gt;&lt;br /&gt;So, welcome, complete lack of readers, to this most fascinating and fishy blog.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6702157757260886111-6874392949482454880?l=morecakelessfish.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://morecakelessfish.blogspot.com/feeds/6874392949482454880/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6702157757260886111&amp;postID=6874392949482454880' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6702157757260886111/posts/default/6874392949482454880'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6702157757260886111/posts/default/6874392949482454880'/><link rel='alternate' type='text/html' href='http://morecakelessfish.blogspot.com/2007/04/hello-world.html' title='Hello, World.'/><author><name>Ali</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='31' height='32' src='http://i96.photobucket.com/albums/l163/tea_and_cakey/random/starguy.png'/></author><thr:total>0</thr:total></entry></feed>
