<?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>20papercups :: Michael Marner&#039;s Website &#187; eclipse</title>
	<atom:link href="http://www.20papercups.net/tag/eclipse/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.20papercups.net</link>
	<description>The (awesome) website of Michael Marner</description>
	<lastBuildDate>Tue, 15 Nov 2011 01:09:33 +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>Latex, Texlipse, and EPS Figures</title>
		<link>http://www.20papercups.net/latex/latex-texclipse-and-eps-figures/</link>
		<comments>http://www.20papercups.net/latex/latex-texclipse-and-eps-figures/#comments</comments>
		<pubDate>Wed, 15 Jun 2011 01:00:20 +0000</pubDate>
		<dc:creator>Michael</dc:creator>
				<category><![CDATA[LaTeX]]></category>
		<category><![CDATA[eclipse]]></category>
		<category><![CDATA[eps]]></category>
		<category><![CDATA[epstopdf]]></category>
		<category><![CDATA[figure]]></category>
		<category><![CDATA[latex]]></category>
		<category><![CDATA[mac]]></category>
		<category><![CDATA[osx]]></category>
		<category><![CDATA[texlipse]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://www.20papercups.net/?p=383</guid>
		<description><![CDATA[I&#8217;m currently in the early stages of writing my PhD thesis. I&#8217;m writing it using LaTeX, and I&#8217;m trying to get the perfect build system and editing environment going. Yesterday I had a look at Texlipse, a plugin for Eclipse. There was one problem: EPS figures didn&#8217;t work. In newish versions of Latex, if you [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.20papercups.net/wp-content/uploads/2011/06/800px-LaTeX_logo.svg_-e1308095178677.png"><img class="size-full wp-image-384 alignleft" title="800px-LaTeX_logo.svg" src="http://www.20papercups.net/wp-content/uploads/2011/06/800px-LaTeX_logo.svg_-e1308095178677.png" alt="" width="150" height="62" /></a> I&#8217;m currently in the early stages of writing my PhD thesis. I&#8217;m writing it using LaTeX, and I&#8217;m trying to get the <em>perfect</em> build system and editing environment going. Yesterday I had a look at Texlipse, a plugin for Eclipse. There was one problem: EPS figures didn&#8217;t work.</p>
<p>In newish versions of Latex, if you use the epstopdf package, your images are converted on the fly, but this wasn&#8217;t  working in Texlipse. Luckily the fix is easy, and the rest of this post explains what to do.<br />
<span id="more-383"></span></p>
<p style="text-align: center;"><script type="text/javascript"><!--
google_ad_client = "pub-9376349336558898";
google_ad_slot = "0815367707";
google_ad_width = 468;
google_ad_height = 60;
//--></script>
<script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>
</p>
<p>Lets start with a minimum working example to demonstrate the problem:</p>

<div class="wp_syntax"><div class="code"><pre class="latex" style="font-family:monospace;"><span style="color: #E02020; ">\</span><span style="color: #800000;">documentclass</span><span style="color: #E02020; ">{</span><span style="color: #2020C0; font-weight: normal;">minimal</span><span style="color: #E02020; ">}</span>
<span style="color: #E02020; ">\</span><span style="color: #800000;">usepackage</span><span style="color: #E02020; ">{</span><span style="color: #2020C0; font-weight: normal;">epsfig</span><span style="color: #E02020; ">}</span>
<span style="color: #E02020; ">\</span><span style="color: #800000;">usepackage</span><span style="color: #E02020; ">{</span><span style="color: #2020C0; font-weight: normal;">epstopdf</span><span style="color: #E02020; ">}</span>
<span style="color: #E02020; ">\</span><span style="color: #800000;">usepackage</span><span style="color: #E02020; ">{</span><span style="color: #2020C0; font-weight: normal;">graphicx</span><span style="color: #E02020; ">}</span>
&nbsp;
<span style="color: #C00000; font-weight: normal;">\begin</span><span style="color: #E02020; ">{</span><span style="color: #2020C0; font-weight: normal;"><span style="color: #0000D0; font-weight: normal;">document</span></span><span style="color: #E02020; ">}</span>
&nbsp;
Here's an EPS Figure:
&nbsp;
<span style="color: #E02020; ">\</span><span style="color: #800000;">includegraphics</span><span style="color: #E02020; ">[</span><span style="color: #C08020; font-weight: normal;">height=5cm</span><span style="color: #E02020; ">]{</span><span style="color: #2020C0; font-weight: normal;">unisa</span><span style="color: #E02020; ">}</span>
&nbsp;
<span style="color: #C00000; font-weight: normal;">\end</span><span style="color: #E02020; ">{</span><span style="color: #2020C0; font-weight: normal;"><span style="color: #0000D0; font-weight: normal;">document</span></span><span style="color: #E02020; ">}</span></pre></div></div>

<p>Download <a title="Unisa EPS Logo" href="20papercups.net/wp-content/uploads/2011/06/unisa.eps">unisa.eps</a>, and try this yourself. On Ubuntu, I get output that looks like this:</p>
<div id="attachment_391" class="wp-caption aligncenter" style="width: 254px"><a href="http://www.20papercups.net/wp-content/uploads/2011/06/eps-broken.png"><img class="size-full wp-image-391" title="eps-broken" src="http://www.20papercups.net/wp-content/uploads/2011/06/eps-broken.png" alt="" width="244" height="193" /></a><p class="wp-caption-text">Broken PDFLatex output on Ubuntu</p></div>
<p style="text-align: center;">&nbsp;</p>
<p>If you look at the console output generated by TexLipse, you will see one of two problems, described below.</p>
<h3>Problem 1: Shell escape feature is not enabled</h3>
<p>I encountered this problem on Ubuntu. If you see the following output:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">pdflatex<span style="color: #000000; font-weight: bold;">&gt;</span> Package epstopdf Warning: Shell escape feature is not enabled.</pre></div></div>

<p>Then you have encountered this. The fix is quite easy.</p>
<ol>
<li>Open up Eclipse Preferences</li>
<li>Click on Texlipse Builder Settings</li>
<li>Click on PdfLatex program, and press the edit button</li>
<li>Add &#8211;shell-escape to the argument list as the first argument.</li>
<li>You&#8217;re done! Rebuild your project and it should work fine.</li>
</ol>
<h3>Problem 2: Cannot Open Ghostscript</h3>
<p>I encountered this problem on OSX. Weird how the two systems have the same symptoms with different causes, but whatever. If you see the output:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">pdflatex<span style="color: #000000; font-weight: bold;">&gt;</span> <span style="color: #000000; font-weight: bold;">!!!</span> Error: Cannot open Ghostscript <span style="color: #000000; font-weight: bold;">for</span> piped input</pre></div></div>

<p>Then you are suffering from problem 2. This problem is caused by the PATH environment variable not being set correctly when Texclipse runs pdflatex. Essentially, the Ghostcript program, gs, cannot be found by pdflatex. The fix is to add an environment variable to Texlipse&#8217;s builder settings so the path is corrected.</p>
<h4>Step 1: Locate Ghostscript, Repstopdf, and Perl</h4>
<p>Open up a terminal, and type:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">which</span> <span style="color: #c20cb9; font-weight: bold;">gs</span></pre></div></div>

<p>This should show you the directory where Ghostscript lives on your system. On my laptop it is:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>bin</pre></div></div>

<p>Repeat the process with repstopdf:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">which</span> repstopdf</pre></div></div>

<p>Which on my system gives:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>texbin</pre></div></div>

<p>And with perl:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">which</span> <span style="color: #c20cb9; font-weight: bold;">perl</span></pre></div></div>

<p>gives me:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">/</span>opt<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>bin</pre></div></div>

<p>The exact paths will depend on how you have installed these things. For example, Perl lives in /opt on my system because I installed it using macports. It doesn&#8217;t really matter. However, if you don&#8217;t have any of these packages installed, you will need to do so.</p>
<h4>Step 2: Create the Environment Variable</h4>
<p>Now that we know where the programs are installed, we need to create a PATH environment variable for Texlipse to use.</p>
<ol>
<li>Open up Eclipse Preferences</li>
<li>Go down to Environment, which is under Texlipse Builder Settings</li>
<li>Click new to create a new environment variable</li>
<li>the key should be set to PATH. The value should be the three directories, separated by colons (:). For example, on my system:<br />
<a href="http://www.20papercups.net/wp-content/uploads/2011/06/add-environment-variable.png"><img class="aligncenter size-full wp-image-402" title="add-environment-variable" src="http://www.20papercups.net/wp-content/uploads/2011/06/add-environment-variable.png" alt="" width="453" height="210" /></a></li>
<li>You&#8217;re done! Save the settings and everything should work.</li>
</ol>
<h3>Conclusions</h3>
<p>If you complete the steps above, depending on what problem you had  (you may have even had both), then you should see the correct output,  which looks like this:</p>
<div id="attachment_403" class="wp-caption aligncenter" style="width: 254px"><a href="http://www.20papercups.net/wp-content/uploads/2011/06/eps-fixed.png"><img class="size-full wp-image-403" title="eps-fixed" src="http://www.20papercups.net/wp-content/uploads/2011/06/eps-fixed.png" alt="" width="244" height="193" /></a><p class="wp-caption-text">EPS Figure working!</p></div>
<p>Well, I hope that helps someone. Its surprising that this error came up on both of my computers. Searching the internet finds others with the same problem, but as yet no solutions. This post should fix that.</p>
<p style="text-align: center;"><script type="text/javascript"><!--
google_ad_client = "pub-9376349336558898";
google_ad_slot = "0815367707";
google_ad_width = 468;
google_ad_height = 60;
//--></script>
<script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>
</p>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.20papercups.net/latex/latex-texclipse-and-eps-figures/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Java Tutorial 08 &#8211; Intro To Eclipse</title>
		<link>http://www.20papercups.net/java-vtm-tutorials/java-vtm08-intro-to-eclipse/</link>
		<comments>http://www.20papercups.net/java-vtm-tutorials/java-vtm08-intro-to-eclipse/#comments</comments>
		<pubDate>Thu, 11 Dec 2008 01:54:54 +0000</pubDate>
		<dc:creator>Michael</dc:creator>
				<category><![CDATA[Java Video Tutorials]]></category>
		<category><![CDATA[eclipse]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[tutorial]]></category>
		<category><![CDATA[video]]></category>

		<guid isPermaLink="false">http://www.20papercups.net/?p=98</guid>
		<description><![CDATA[This video gives an overview of the Eclipse IDE. Eclipse is a feature packed Java development environment that is also free and open source. In this video we see how we create projects in eclipse and run our programs. Note that this video is 1024&#215;768, so hit the full screen button to get more readable [...]]]></description>
			<content:encoded><![CDATA[<p>This video gives an overview of the Eclipse IDE. Eclipse is a feature packed Java development environment that is also free and open source. In this video we see how we create projects in eclipse and run our programs.<span id="more-98"></span></p>
<p style="text-align: center;"><img src="http://www.20papercups.net/wp-content/plugins/flash-video-player/default_video_player.gif" /></p>
<p style="text-align: left;">Note that this video is 1024&#215;768, so hit the full screen button to get more readable detail.</p>
<p style="text-align: center;"><script type="text/javascript"><!--
google_ad_client = "pub-9376349336558898";
google_ad_slot = "0815367707";
google_ad_width = 468;
google_ad_height = 60;
//--></script>
<script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>
</p>
<p style="text-align: center;">
<p style="text-align: left;"><strong>Notes:</strong></p>
<p style="text-align: left;">You can get Eclipse from http://www.eclipse.org. It is available for pretty much all platforms. If you&#8217;re on Linux it is probably in your distribution&#8217;s repository.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.20papercups.net/java-vtm-tutorials/java-vtm08-intro-to-eclipse/feed/</wfw:commentRss>
		<slash:comments>10</slash:comments>
		</item>
	</channel>
</rss>

