<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>K. Aning&#039;s Web Log</title>
	<atom:link href="http://blog.kaning.co.uk/feed" rel="self" type="application/rss+xml" />
	<link>http://blog.kaning.co.uk</link>
	<description>Web development for the inexperienced and mildly skilled</description>
	<lastBuildDate>Mon, 16 Apr 2012 08:39:55 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>A standalone java/jar application from Scala sources using Proguard &#8211; Part 1</title>
		<link>http://blog.kaning.co.uk/archives/325</link>
		<comments>http://blog.kaning.co.uk/archives/325#comments</comments>
		<pubDate>Sun, 12 Feb 2012 11:46:12 +0000</pubDate>
		<dc:creator>Kwabena Aning</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Scala]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[scala]]></category>

		<guid isPermaLink="false">http://blog.kaning.co.uk/?p=325</guid>
		<description><![CDATA[After about an hour of digging around and looking for a way to package a simulation I wrote in Scala for a coleague, I came across this process of doing it. I have reduced it down to a bash script which will &#8230; <a href="http://blog.kaning.co.uk/archives/325">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>After about an hour of digging around and looking for a way to package a simulation I wrote in Scala for a coleague, I came across this process of doing it. I have reduced it down to a bash script which will be at the bottom of this post but I thought I should go through the steps a bit as the script makes certain assumptions.</p>
<p>The first assumption is that you have the necessary libraries and such to run it they are as follows:</p>
<ul>
<li>Scala Library (That goes without saying if you&#8217;re going to be writing Scala code) I have a custom path for mine as I want to manually sync my libraries, compilers and so on with the latest versions. I have extracted my copy to ~/Bin/Scala-2.9.1.final this will be the path my bash script will assume, you must change this to your path if it&#8217;s different.</li>
<li>Proguard: I am using version 4.7, version 4.4 comes with ubuntu but, seeing as I like to keep it at the latest and I am impatient my proguard lives in ~/Bin/Proguard4.7</li>
<li>Java (This also goes without saying. You will probably need the JDK as well as the JRE so install them both) Proguard uses the java libraries extensively so you need that.</li>
</ul>
<p>My simulation is in the following directory structure<br />
engine<br />
| &#8211; src<br />
| &#8212; | &#8212;  Engine.scala<br />
| &#8211; build-app.sh<br />
| &#8211; scala-config.pro</p>
<p>The engine-&gt;src-&gt;Engine.scala is my scala application with the object Engine defined as my entry point this is important for the MANIFEST.MF file the script will be creating</p>
<p><strong>Now the steps</strong></p>
<ul>
<li>First we can create a little folder to hold the output of the scala compiler so we create  a folder called bin inside of the engine folder itself so that the folder structure now looks like this<br />
engine<br />
| &#8211; src<br />
| &#8212; | &#8212; Engine.scala<br />
| &#8211; bin<br />
| &#8211; build-app.sh<br />
| &#8211; scala-config.pro<br />
by running</p>
<pre class="brush:shell">mkdir bin</pre>
<p>then run the following while you&#8217;re inside engine which from now on I will refer to as root</p>
<pre class="brush:shell">scalac -sourcepath src -d bin src/Engine.scala</pre>
<p>this will compile the Engine.scala code into java classes inside of the bin folder</li>
<li>This completes the scala bit, everything else following is run with Java so we need a MANIFEST.MF file to compile a jar
<pre class="brush:shell">echo "Main-Class: Engine" &gt; MANIFEST.MF</pre>
<p>this will do it for you. Bear in mind you are still at the root level</p>
<p>Now at this point we change directory to the bin folder where scalac has created our classes and compile our jar using the manifest we have just created so this should do it:</p>
<pre class="brush:shell">cd bin
jar -cfm ../engine-no-scala.jar ../MANIFEST.MF *.*</pre>
<p>You can obviously do this a different way by staying in the root and making sure your path is correct, personally I found this easier.</p>
<p>This above code will create our engine called engine-no-scala.jar with the MANIFEST.MF file<br />
bear in mind at this point if you ran java -jar engine-no-scala.jar it may fail if your scala code required the scala library to run<br />
mine does so now I need to package this WITH the scala library into a complete self-contained java application<br />
now earlier I did say that my scala home was in a custom location so we need to keep that in mind for the next section</p>
<p><strong>PROGUARD</strong></li>
<li>Not only does proguard include the required libraries and so on, it also obfuscates and discards any unused classes and packages this is very nifty for distribution as it cuts down by orders of magnitude the size of your application.When I did this without proguard my application was over 8 MB because the entire scala library was in my jar<br />
after I finished with proguard I am looking at an 8 KB application, and I think I can even get it smaller if I optimise my code a little bit morebut that&#8217;s for another time. Proguard however needs a configuration file to work properly in my case, I went to their site and downloaded a<a title="Proguard examples (Click on the scala link for the scala example)" href="http://proguard.sourceforge.net/#manual/examples.html" target="_blank"> sample scala-config file</a> (click on the Scala link) I just made the following changes to the vanilla one they provided</p>
<pre class="brush:shell">-injars engine-no-scala.jar
-injars /home/kwabena/Bin/scala-2.9.1.final/lib/scala-library.jar
-outjars engine.jar
-libraryjars &lt;java.home&gt;/lib/rt.jar

-dontwarn scala.**
-verbose</pre>
<p>I just changed the path to my jar file and my scala library and I also turned on verbosity (I like to know what&#8217;s going on) my build script now has the following lines</p>
<pre class="brush:shell">cd ../
echo "Adding Scala library, obfuscating..."
#proguard
proguard.sh @scala-config.pro</pre>
<p>after that you can remove any side effects from the script with</p>
<pre class="brush:shell">rm -rf bin MANIFEST.MF engine-no-scala.jar</pre>
<p>bear in mind that we changed the our current workind directory to the root level<br />
after a few minutes of compiling, obfuscating, optimisation and shrinking you should have a nice jar to run by itself on a computer with ONLY the JRE installed</li>
</ul>
<p>The complete script follows you can just copy this, save it into a file called &#8220;build-app.sh&#8221; as it is in my folder structure change the permissions to execute with</p>
<pre class="brush:shell">chmod +x build-app.sh</pre>
<p>and run it</p>
<pre class="brush:shell">#!/bin/bash

echo "Creating required directories"
mkdir bin

echo "Compiling scala sources"
scalac -sourcepath src -d bin src/Engine.scala

echo "Creating Manifest"
#build manifest
echo "Main-Class: Engine" &gt; MANIFEST.MF

echo "Building java archive from scala classes"
#create jar
cd bin
jar -cfm ../engine-no-scala.jar ../MANIFEST.MF *.*

cd ../

echo "Adding Scala library, obfuscating..."
#proguard
proguard.sh @scala-config.pro

#remove fluff
echo "Removing fluff..."
rm -rf bin MANIFEST.MF engine-no-scala.jar</pre>
<p>I hope you find it as useful as I would have should this have been available earlier.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.kaning.co.uk/archives/325/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Web frameworks for Scala</title>
		<link>http://blog.kaning.co.uk/archives/316</link>
		<comments>http://blog.kaning.co.uk/archives/316#comments</comments>
		<pubDate>Tue, 11 Oct 2011 14:37:21 +0000</pubDate>
		<dc:creator>Kwabena Aning</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[play framework]]></category>
		<category><![CDATA[scala]]></category>

		<guid isPermaLink="false">http://blog.kaning.co.uk/?p=316</guid>
		<description><![CDATA[The best way for me to learn a language generally is to build a project using that language. I have decided to start on this Scala journey and so far it&#8217;s been all theory and very little practice. In any &#8230; <a href="http://blog.kaning.co.uk/archives/316">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>The best way for me to learn a language generally is to build a project using that language. I have decided to start on this Scala journey and so far it&#8217;s been all theory and very <a title="First Scala Attempt" href="http://github.com/kaning/ini-file-reader" target="_blank">little practice</a>. In any case I have always been a web developer and that is where I would like to stay. So a web project in Scala is naturally the path I would want to go with. I kept stumbling across the <a title="Lift Framework" href="http://liftweb.net/" target="_blank">Lift framework</a>, I like Lift but it&#8217;s a bit tricky for me right now at this level and so I will perhaps visit it later.</p>
<p>I then came across the parsimonious <a title="Scalatra" href="http://www.scalatra.org/" target="_blank">Scalatra</a>. I love it it&#8217;s light elegant and doesn&#8217;t require you to do too much to get started. I have not used it long enough to say that this is going to be my weapon of choice for any future developments but it&#8217;s a very strong candidate.</p>
<p>I only just now discovered the Play framework and on first glance it&#8217;s a brilliant looking MVC framework, honing in on my Zend experience with PHP. It feels like Zend, I have not actually started writing anything in it yet but I am going to attempt a full blown web project in it and see how that goes. Perhaps something for an EC2 instance.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.kaning.co.uk/archives/316/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Setting Up SBT on Ubuntu</title>
		<link>http://blog.kaning.co.uk/archives/311</link>
		<comments>http://blog.kaning.co.uk/archives/311#comments</comments>
		<pubDate>Thu, 29 Sep 2011 11:56:15 +0000</pubDate>
		<dc:creator>Kwabena Aning</dc:creator>
				<category><![CDATA[Scala]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[scala]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://blog.kaning.co.uk/?p=311</guid>
		<description><![CDATA[So I have had to re-install my OS several times over the past month mainly due to my impatience (installing 11.10 beta and not having it working properly) and I have found that my SBT configurations generally evaporate with every &#8230; <a href="http://blog.kaning.co.uk/archives/311">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>So I have had to re-install my OS several times over the past month mainly due to my impatience (installing 11.10 beta and not having it working properly) and I have found that my SBT configurations generally evaporate with every re-installation so I wrote a little script to automate the whole process. A bit like my previous get Scala script so once again just copy and paste this into a text file, make it executable with chmod +x &lt;filename&gt; and run it</p>
<pre class="brush:shell">#!/bin/bash

cd ~

echo --------------------------------------------------------------------------------------------
echo - Getting SBT Launcher
echo --------------------------------------------------------------------------------------------
wget http://typesafe.artifactoryonline.com/typesafe/ivy-releases/org.scala-tools.sbt/sbt-launch/0.11.0/sbt-launch.jar

printf 'java -Xmx512M -jar `dirname $0`/sbt-launch.jar "$@"' &gt; sbt

chmod +x ./sbt

echo --------------------------------------------
echo - Move sbt and sbt-lauch to share
echo --------------------------------------------

sudo mv sbt /usr/share/sbt
sudo mv sbt /usr/share/sbt-launch.jar

echo --------------------------------------------------------------------------------------------
echo - symlinking sbt and sbt-lauch to /usr/bin/{sbt, sbt-lanch.jar}
echo --------------------------------------------------------------------------------------------
sudo ln -s /usr/share/sbt /usr/bin/sbt
sudo ln -s /usr/share/sbt-launch.jar /usr/bin/sbt-launch.jar</pre>
<p>I suppose, when I get time I can make this accept parameters so you can specify the version of SBT you want and the file name you want to use etc but for now this should suffice&#8230;<br />
comments welcome.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.kaning.co.uk/archives/311/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Installing Scala on Debian Based Systems (e.g Ubuntu)</title>
		<link>http://blog.kaning.co.uk/archives/306</link>
		<comments>http://blog.kaning.co.uk/archives/306#comments</comments>
		<pubDate>Mon, 15 Aug 2011 14:39:06 +0000</pubDate>
		<dc:creator>Kwabena Aning</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Scala]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[scala]]></category>

		<guid isPermaLink="false">http://blog.kaning.co.uk/?p=306</guid>
		<description><![CDATA[Having followed instructions from here, which I thought was really easy, I put together a little bash script to do exactly that. And being a sucker for the latest I went with the 2.9.0.1 installation. I am honestly not sure &#8230; <a href="http://blog.kaning.co.uk/archives/306">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Having followed instructions from <a title="Installing Scala" href="http://wiki.summercode.com/how_to_install_scala_on_ubuntu_scala_2_8_1_and_ubuntu_10_04" target="_blank">here</a>, which I thought was really easy, I put together a little bash script to do exactly that. And being a sucker for the latest I went with the 2.9.0.1 installation.<del> I am honestly not sure why Ubuntu still has 2.7.7 in its repository</del>. Ubuntu 11.10 (oneiric)  now has scala 2.9.x so you may want to use that instead of this script but if you want to keep up to date with the latest Scala release then:</p>
<p>Simply copy this and paste into a file, name it whatever you want, and make it executable with chmod +x</p>
<pre class="brush:shell">#!/bin/bash

cd ~

echo --------------------------------------------------------------------------------------------
echo - Getting Scala 2.9.0.1
echo --------------------------------------------------------------------------------------------
wget http://www.scala-lang.org/downloads/distrib/files/scala-2.9.0.1.tgz

echo --------------------------------------------------------------------------------------------
echo - Decompressing
echo --------------------------------------------------------------------------------------------
tar zxf scala-2.9.0.1.tgz

echo --------------------------------------------------------------------------------------------
echo - moving scala to /usr/share/scala
echo --------------------------------------------------------------------------------------------
sudo mv scala-2.9.0.1 /usr/share/scala

echo --------------------------------------------------------------------------------------------
echo - Symlinking executables
echo --------------------------------------------------------------------------------------------
sudo ln -s /usr/share/scala/bin/scala /usr/bin/scala
sudo ln -s /usr/share/scala/bin/scalac /usr/bin/scalac
sudo ln -s /usr/share/scala/bin/fsc /usr/bin/fsc
sudo ln -s /usr/share/scala/bin/sbaz /usr/bin/sbaz
sudo ln -s /usr/share/scala/bin/sbaz-setup /usr/bin/sbaz-setup
sudo ln -s /usr/share/scala/bin/scaladoc /usr/bin/scaladoc
sudo ln -s /usr/share/scala/bin/scalap /usr/bin/scalap</pre>
]]></content:encoded>
			<wfw:commentRss>http://blog.kaning.co.uk/archives/306/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>MySQL and Scala &#8211; Simple selects</title>
		<link>http://blog.kaning.co.uk/archives/298</link>
		<comments>http://blog.kaning.co.uk/archives/298#comments</comments>
		<pubDate>Fri, 29 Jul 2011 09:45:11 +0000</pubDate>
		<dc:creator>Kwabena Aning</dc:creator>
				<category><![CDATA[Scala]]></category>
		<category><![CDATA[scala]]></category>

		<guid isPermaLink="false">http://blog.kaning.co.uk/?p=298</guid>
		<description><![CDATA[So after about an hour of research and experimenting, I found out how to make Scala work with MySQL without too much hassle, I found a really helpful guide here. Going down the SBT route, I first created a project &#8230; <a href="http://blog.kaning.co.uk/archives/298">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>So after about an hour of research and experimenting, I found out how to make Scala work with MySQL without too much hassle, I found a really helpful guide <a title="Simple order application" href="https://github.com/ollekullberg/SimpleOrder" target="_blank">here</a>. Going down the SBT route, I first created a project and all that, then inside of the build folder I created a Scala class that ensured that when I started building, I would have the right dependencies downloaded and ready.</p>
<pre class="brush:scala">import sbt._

class MyDataEngineProject(info: ProjectInfo)
    extends DefaultProject(info) {
  // Declare MySQL connector Dependency
  val mysql = "mysql" % "mysql-connector-java" % "5.1.17"
}</pre>
<p>Once you have got this in project/build/MyDataEngineProject.scala, you are ready to start the connection stuff. In src/main/scala you can start creating your application here. I use the &#8220;def main&#8221; approach so when i start from the command line i simply pass in my parameters and I&#8217;m ready to go:</p>
<pre class="brush:scala">import java.sql.{Connection, DriverManager, SQLException, ResultSet}

object DataEngine {

	private var driverLoaded = false

	private def loadDriver()  {
		try{
			Class.forName("com.mysql.jdbc.Driver").newInstance
			driverLoaded = true
		}catch{
			case e: Exception  =&gt; {
			    println("ERROR: Driver not available: " + e.getMessage)
			    throw e
			}
		}
	}

	def main(args: Array[String]) {
		if (args.length &lt; 1){
			println("No arguments provided, exitting...")
			return
		}
		println ("Attempting to load MySQL JBDC Driver...")
		println
		this.synchronized {
		  if(! driverLoaded) loadDriver()
		}

		val conString = "jdbc:mysql://localhost:3306/db_name?user="+args(0)+"&amp;password="+args(1)
		classOf[com.mysql.jdbc.Driver]
		val con = DriverManager.getConnection(conString)
		try{
			val handle = con.createStatement(ResultSet.TYPE_FORWARD_ONLY, ResultSet.CONCUR_READ_ONLY)
			val rs = handle.executeQuery("select * from auth limit 1")
			println ("Connection established...")
			while(rs.next){
				println("User Handle: "+rs.getString("handle"))
			}
		}catch{
			case e: Exception  =&gt; {
		    	println("ERROR: No connection: " + e.getMessage)
		    	throw e
		  	}
			case _ =&gt; println("A problem!")
		}finally{
			println("Closing connection and exiting...")
			con.close()
		}
  	}
}</pre>
<p>Save the file as Main.scala and you can just type in run with your db username and password as space-separated arguments and you&#8217;re ready to go. Of course you will need to change some bits in here to reflect your database schema, but aside that it&#8217;s that simple. In my next post I will work on inserting data and updating data as well.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.kaning.co.uk/archives/298/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Moving to Scala</title>
		<link>http://blog.kaning.co.uk/archives/290</link>
		<comments>http://blog.kaning.co.uk/archives/290#comments</comments>
		<pubDate>Tue, 26 Jul 2011 13:49:02 +0000</pubDate>
		<dc:creator>Kwabena Aning</dc:creator>
				<category><![CDATA[Lift]]></category>
		<category><![CDATA[Scala]]></category>
		<category><![CDATA[lift]]></category>
		<category><![CDATA[scala]]></category>

		<guid isPermaLink="false">http://blog.kaning.co.uk/?p=290</guid>
		<description><![CDATA[So after about 8 &#8211; 9 years of PHP and enjoying it thoroughly, I have decided to default to Scala pronounced {skah-lah}. I am not going to go into any reasons why I am moving but all I can say &#8230; <a href="http://blog.kaning.co.uk/archives/290">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>So after about 8 &#8211; 9 years of PHP and enjoying it thoroughly, I have decided to default to Scala pronounced {skah-lah}. I am not going to go into any reasons why I am moving but all I can say is that, I think the Lift Framework is amazing and Scala is a lot more elegant in my opinion, very expressive and perhaps my biggest reason is that I would like to expand those horizons, (I was getting a bit too comfortable in this space).</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.kaning.co.uk/archives/290/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Using images in LaTeX</title>
		<link>http://blog.kaning.co.uk/archives/261</link>
		<comments>http://blog.kaning.co.uk/archives/261#comments</comments>
		<pubDate>Fri, 08 Apr 2011 06:43:48 +0000</pubDate>
		<dc:creator>Kwabena Aning</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Academic]]></category>
		<category><![CDATA[LaTeX]]></category>

		<guid isPermaLink="false">http://blog.kaning.co.uk/?p=261</guid>
		<description><![CDATA[Note to self and perhaps others who might be wondering why your images are not displaying in your tex document. Despite using the correct syntax: &#160; &#160; \begin{figure}[htb] \begin{center} \includegraphics{image.png} \end{center} \caption{Fig 1: image} \label{fig1} \end{figure} You may find a &#8230; <a href="http://blog.kaning.co.uk/archives/261">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Note to self and perhaps others who might be wondering why your images are not displaying in your tex document.</p>
<p>Despite using the correct syntax:</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p><code></p>
<pre class="brush:shell">\begin{figure}[htb]
    \begin{center}
        \includegraphics{image.png}
    \end{center}
    \caption{Fig 1: image}
    \label{fig1}
\end{figure}</pre>
<p></code><br />
You may find a box with with only the image path being displayed as your image. Please check that you are not using the &#8220;draft&#8221; argument at the top of your document when specifying your document class. A bit like</p>
<pre class="brush:php">\documentclass[12pt,a4paper,draft]{article}</pre>
<p>Make sure there is no &#8220;draft&#8221; in there so that it reads</p>
<pre class="brush:php">\documentclass[12pt,a4paper]{article}</pre>
<p>Spent about half an hour trying to figure out why everyone else&#8217;s images were displaying except mine.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.kaning.co.uk/archives/261/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>LyX</title>
		<link>http://blog.kaning.co.uk/archives/257</link>
		<comments>http://blog.kaning.co.uk/archives/257#comments</comments>
		<pubDate>Sat, 26 Feb 2011 23:23:31 +0000</pubDate>
		<dc:creator>Kwabena Aning</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Academic]]></category>
		<category><![CDATA[LaTeX]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://blog.kaning.co.uk/?p=257</guid>
		<description><![CDATA[So on recommendations I have installed LyX. I am actually writing this on LyX now. I just thought I should post my thoughts on this programme. I am not sure why I had not tried this first, it is mainly &#8230; <a href="http://blog.kaning.co.uk/archives/257">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<div id="_mcePaste">So on recommendations I have installed LyX. I am actually writing this on LyX now. I just thought I should post my thoughts on this programme.</div>
<div></div>
<div id="_mcePaste">I am not sure why I had not tried this first, it is mainly a WYSISYG editor that outputs LaTeX source or any other LaTeX-like source code for that matter. So you can type documents up as you would in a normal text editor and then not have to worry about all that LaTeX markup that you need to make it look like it should because there are a myriad of buttons you can use for styling.</div>
<div></div>
<div id="_mcePaste">I will start first with the interface. It seems very simple to use very straight forward. With the version I am using 1.6.7, I have a choice of two interfaces “Default” and “Classic” I noticed only a few differences between where menu items were placed and the toolbar buttons.</div>
<div></div>
<div id="_mcePaste">The best thing about this is programme is that you can easily use it to learn a lot more about LaTeX mark up just by being productive, this I like.</div>
<div></div>
<div id="_mcePaste">The insert command also gives you a drop down of almost everything you would need to insert in a document, from citations to images, labels to index entries unless you&#8217;re doing some very custom layouts and so on chances are that LyX will probably have what you need as a simple menu item. Then again I haven&#8217;t been using LaTeX long enough to be sure about this.</div>
<div></div>
<div id="_mcePaste">I don&#8217;t think I can give a very comprehensive review as I installed and only started using it this evening, but what I think stands it apart from every other editor I have tried is the version control that comes with it. I am not sure what backend manages this yet as I have not delved deeply into it but my first attempt at an “initial commit” failed. I will have to look into this further.</div>
<div></div>
<div id="_mcePaste">You can also split your screen between the WYSIWIG view and the source where you see valid LyX/LaTeX source being generated as you put your document together as though it were a full blown word processor.</div>
<div></div>
<div id="_mcePaste">My first impressions of this is that I love it and it is a strong contender to LaTeXilla, which I installed and have been using till now. I will give this one a try this week and see how it works for me. I have to re-iterate though that the good thing about open source and these things in general is that you don&#8217;t have to choose one as you have not shelled out tonnes of money for a license&#8230;</div>
]]></content:encoded>
			<wfw:commentRss>http://blog.kaning.co.uk/archives/257/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>LaTeX editors</title>
		<link>http://blog.kaning.co.uk/archives/253</link>
		<comments>http://blog.kaning.co.uk/archives/253#comments</comments>
		<pubDate>Sun, 13 Feb 2011 15:17:37 +0000</pubDate>
		<dc:creator>Kwabena Aning</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Academic]]></category>
		<category><![CDATA[LaTeX]]></category>

		<guid isPermaLink="false">http://blog.kaning.co.uk/?p=253</guid>
		<description><![CDATA[I have been looking into LaTeX (pronounced La Tek) editors for my writing now and after a lot of trials and tribulations, I finally settled on LateXila. Not only does it look identical to my favourite text editor / IDE &#8230; <a href="http://blog.kaning.co.uk/archives/253">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I have been looking into LaTeX (pronounced La Tek) editors for my writing now and after a lot of trials and tribulations, I finally settled on LateXila.</p>
<p>Not only does it look identical to my favourite text editor / IDE of all time &#8211; gEdit. It supports syntax highlighting, decent support for BibTex referencing. It also has a very user friendly interface and it&#8217;s also customizable as per any GTK interface in GNOME.</p>
<p>I have not checked if there are versions for other Operating Systems but I am pretty certain anyone wishing to try this out with any Linux distribution can do it with the built in package/software manager, shipped with it.</p>
<p>This is obviously not to say the others do not have advantages over LaTeXila, this is just the one I have felt most at home with. I have tried the LaTex plug-in for gEdit, that is also quite good especially the support you get when using the \cite command, it handily provides a drop down of keys available in any BibTeX files you have referenced in that LaTeX doument. I haven&#8217;t played with LaTeXila&#8217;s preferences extensively so I am not sure if it has that too.</p>
<p>You can find sourceforge page here <a href="http://latexila.sourceforge.net/">http://latexila.sourceforge.net/</a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.kaning.co.uk/archives/253/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>A note on Zend Pagination</title>
		<link>http://blog.kaning.co.uk/archives/246</link>
		<comments>http://blog.kaning.co.uk/archives/246#comments</comments>
		<pubDate>Tue, 07 Sep 2010 13:52:40 +0000</pubDate>
		<dc:creator>Kwabena Aning</dc:creator>
				<category><![CDATA[php]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[Zend]]></category>
		<category><![CDATA[Zend_Paginator]]></category>

		<guid isPermaLink="false">http://blog.kaning.co.uk/?p=246</guid>
		<description><![CDATA[Having gone round in so many circles I finally found out that when useing Zend Pagination and the current route you are using has more than one dynamic variable i.e $router-&#62;addRoute( 'listingswithpage', new Zend_Controller_Router_Route( '/listing/:type/:page', array('controller' =&#62; 'listing', 'action' =&#62; &#8230; <a href="http://blog.kaning.co.uk/archives/246">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Having gone round in so many circles I finally found out that when useing Zend Pagination and the current route you are using has more than one dynamic variable i.e</p>
<pre class="brush:php">$router-&gt;addRoute(
                'listingswithpage',
                new Zend_Controller_Router_Route(
                        '/listing/:type/:page',
                        array('controller' =&gt; 'listing',
                            'action' =&gt; 'index')
                )
        );</pre>
<p>Your pagination view helper gets a bit thrown if you go by the documentation. The first thing you need to do is find a way to specify the first page initially. I went with specifying my first page in my route definition so it looked something like this</p>
<pre class="brush:php">$router-&gt;addRoute(
                'listingswithpage',
                new Zend_Controller_Router_Route(
                        '/listing/:type/:page',
                        array('controller' =&gt; 'listing',
                            'action' =&gt; 'index',
                            'page' =&gt; 1)
                )
        );</pre>
<p>And that worked. Failing that you have to figure out a way to pass the complete URL path to you pagination view which might be something like &#8220;controls.phtml&#8221; or &#8220;pagination.phtml&#8221;. and constructing the url properly there.</p>
<p>I will perhaps post a more detailed description of what this means but leave a comment if you are impatient and I will try and respond when I get a moment.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.kaning.co.uk/archives/246/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

