<?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>Presented Without Proof &#187; TeX</title>
	<atom:link href="http://301south.net/tag/tex/feed/" rel="self" type="application/rss+xml" />
	<link>http://301south.net</link>
	<description>(an exercise for the reader)</description>
	<lastBuildDate>Fri, 23 Jul 2010 22:15:20 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Convert LaTeX figures to stand-alone graphics</title>
		<link>http://301south.net/2009/08/convert-latex-figures-to-stand-alone-graphics/</link>
		<comments>http://301south.net/2009/08/convert-latex-figures-to-stand-alone-graphics/#comments</comments>
		<pubDate>Sun, 16 Aug 2009 00:02:12 +0000</pubDate>
		<dc:creator>brandon</dc:creator>
				<category><![CDATA[null]]></category>
		<category><![CDATA[software]]></category>
		<category><![CDATA[bash]]></category>
		<category><![CDATA[file oriented programming]]></category>
		<category><![CDATA[pstricks]]></category>
		<category><![CDATA[TeX]]></category>

		<guid isPermaLink="false">http://301south.net/?p=88</guid>
		<description><![CDATA[As I am wont to do, I&#8217;ve been frittering away the hours poking and prodding TeX to make beautiful graphics.  This is my way of giving myself the impression of working hard, and actually accomplishing things, though not things that necessarily advance my career.
I&#8217;m quite fond of PSTricks, a LaTeX package which allows the author [...]]]></description>
			<content:encoded><![CDATA[<p>As I am wont to do, I&#8217;ve been frittering away the hours poking and prodding TeX to make beautiful graphics.  This is my way of giving myself the impression of working hard, and actually accomplishing things, though not things that necessarily advance my career.</p>
<p>I&#8217;m quite fond of <a href="http://www.tug.org/PSTricks/main.cgi?file=examples">PSTricks</a>, a LaTeX package which allows the author to make use of PostScript&#8217;s extensive computational and graphical capabilities from within a TeX document.  My project for this week was to come up with a way to give these figures to my advisor, who works exclusively in MS Word.  So what I needed was a way to export TeX figures to graphics files.  Here&#8217;s what I came up with.<br />
<span id="more-88"></span><br />
Essentially, I create a file which includes the <code>\pspicture</code> environment and all the graphics commands, which I call <code>somepicture.fig</code>.  I then <code>\input{somepicture.fig}</code> into my main document when I want the picture to appear.  When I then want to convert the picture into a standalone graphic, I run a script called <code>figuretops.sh</code><a href="http://301south.net/~b/doc/figuretops.sh">(link to file)</a> which performs the conversion by making use of the very neat &#8220;file here&#8221; notation in bash:</p>
<pre>cat &gt;&gt; filename.tex &lt;&lt;EOF
\documentclass{article}
\usepackage{pstricks-add}
\usepackage{calc}

\begin{document}
\thispagestyle{empty}
\color{white}
\fbox{
\color{black}
\input{}
}
\end{document}
EOF</pre>
<p>When I run LaTeX on this file, it gets to the blank <code>\input{}</code> directive and asks the user for the filename.  I solve this by <code>echo</code>ing the filename into the LaTeX invocation in the bash script.  I then clean up temporary files and use</p>
<pre>convert -density 300 somefigure.eps somefigure.png</pre>
<p>to convert the eps image to a 300-DPI image.</p>
<p>Here&#8217;s a <a href="http://301south.net/~b/doc/displacement-annotated.fig">source figure</a>, the <a href="http://301south.net/~b/doc/figuretops.sh">bash script</a>, and an image it produced:</p>
<p style="text-align: center"><a href="http://301south.net/files/2009/08/displacement.png"><img class="size-medium wp-image-89 aligncenter" src="http://301south.net/files/2009/08/displacement-400x195.png" alt="displacement" width="400" height="195" /></a></p>
<p>Here&#8217;s another (naively crafted: <a href="http://301south.net/~b/doc/basic-mfa-model.fig">TeX source</a>) but more interesting figure:</p>
<p style="text-align: center">
<a href="http://301south.net/files/2009/08/basic-mfa-model.png"><img class="aligncenter size-large wp-image-95" src="http://301south.net/files/2009/08/basic-mfa-model-800x417.png" alt="basic-mfa-model" width="560" height="292" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://301south.net/2009/08/convert-latex-figures-to-stand-alone-graphics/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>On Hacks, bugs, and tools</title>
		<link>http://301south.net/2009/06/on-hacks-bugs-and-tools/</link>
		<comments>http://301south.net/2009/06/on-hacks-bugs-and-tools/#comments</comments>
		<pubDate>Wed, 17 Jun 2009 07:28:06 +0000</pubDate>
		<dc:creator>brandon</dc:creator>
				<category><![CDATA[software]]></category>
		<category><![CDATA[coding]]></category>
		<category><![CDATA[poster]]></category>
		<category><![CDATA[TeX]]></category>

		<guid isPermaLink="false">http://301south.net/?p=51</guid>
		<description><![CDATA[This is pretty neat.  For whatever reason, Internet Explorer has a quirk about how it interprets CSS properties.  So, the CSS maintainers adopt a clarification to their rules (in CSS 2.1) which explicitly allows the quirk, and it becomes a way for web authors to recognize and adapt to any other idiosyncrasies that happened to [...]]]></description>
			<content:encoded><![CDATA[<p><a title="the Underscore Hack" href="http://wellstyled.com/css-underscore-hack.html">This</a> is pretty neat.  For whatever reason, Internet Explorer has a quirk about how it interprets <a title="Cascading style sheets" href="http://www.w3.org/Style/CSS/">CSS properties</a>.  So, the CSS maintainers adopt a clarification to their rules (in CSS 2.1) which explicitly allows the quirk, and it becomes a way for web authors to recognize and adapt to any <em>other</em> idiosyncrasies that happened to make their way into IE.</p>
<p>I&#8217;ve been thinking about idiosyncrasies and coding lately&#8211; mostly because I&#8217;ve been laying out a new poster for display at the <a href="http://www.isie2009.com/">2009 ISIE</a> conference in Lisbon, which I sadly won&#8217;t be able to attend, owing (at some distance) to California&#8217;s present financial difficulties.  But at least my poster will kick ass.  I laid it out in TeX using the &#8220;<a href="http://ocean.301south.net/software/arbitrary.zip">arbitrary</a>&#8221; class, a derivative of a0poster which appears to be missing from the <a href="http://ctan.org/cgi-bin/filenameSearch.py?filename=arbitrary&amp;Search=Search">comprehensive TeX archive network.</a> Anyway, it&#8217;s the only way I know of to make a 48&#8243;x36&#8243; PDF in LaTeX.</p>
<p><span id="more-51"></span>Every time I sit down to use TeX I end up whiling away the hours..  Sunday night I picked up the poster I had made for SBC 2008, which I had been very happy with, to adapt it to the new conference.  It took me probably 90 minutes to solve a technical issue on the install  that I had already solved at least once before (it was my first time making a poster on a new laptop, and I probably solved it the same way on the last machine the last time I made a poster).  Whenever I spend time solving the same problems multiple times it gives me an opportunity to berate myself for using such idiosyncratic software when anyone &#8220;sensible&#8221; (implicitly including everyone else in my department and, it seems, the entire conference-attending public) uses PowerPoint.</p>
<p>Instead I find myself investing 4 hours into learning how to <a href="http://tug.org/PSTricks/main.cgi?file=pst-plot/FunctionExamples">plot data with PSTricks</a>&#8230; maybe 6&#8230; anyway, it was spread out over two days and involved searching for bugs and bug fixes.  Because doing new stuff in TeX never works properly the first several times through.</p>
<p>Searching for bugs and bug fixes is the characteristic behavior in the use of open-source technology.  Because anyone can contribute solutions (some projects have broader user participation than others&#8211; compare TeX to, say, <a href="http://octave.sourceforge.net/">octave-forge</a>), the question faced by the user is, &#8220;How have other people solved this problem?&#8221;  And that was how I came to search for bugs in the pstricks &#8220;\savedata&#8221; mechanism and found <a href="http://www.tug.org/pipermail/pstricks/1997/000063.html">this</a>.  Or something very similar.  Behold!  The problem had long ago (1997) been discovered and worked around.  I just have to make sure that I don&#8217;t use \savedata inside another macro, otherwise it won&#8217;t work.  Anyway, now I could continue with my work.  Only took 45 minutes of troubleshooting followed by 5 minutes of google.</p>
<p>I don&#8217;t suppose anything like that ever comes up in PowerPoint when you&#8217;re using its built-in data-plotter and axes-maker, but I wouldn&#8217;t know.</p>
<p>So I berate myself.  Maybe if I weren&#8217;t distracted by all the technical difficulties, I would get more real work done.  I spend all this time solving all these problems and what do I have to show for it?</p>
<p>(Aside from carpal tunnel collapse and a sore neck, I mean): A <a href="http://301south.net/files/2009/06/isie2009-poster.pdf">beautiful poster</a>.  Entirely TeX (though it is a bit of a mess: <a href="http://ocean.301south.net/works/isie2009-poster.tex">source</a>).  It turns out that yes, it is the right tool for the job.  If you have the time to sink into it.</p>
<p>I&#8217;m sure it&#8217;s possible to make the same poster in PowerPoint (plus, probably, Excel.. and EndNote.. ) but for now I&#8217;ll stick to the tools I [more or less] know.  I wouldn&#8217;t go so far as to say TeX is pleasant to work with, but at least I can grope my way through it when there&#8217;s a problem.  And maybe I do need an instruction manual every time I want to change arrow styles.  But hey- that&#8217;s why I have <a href="http://library.gnome.org/users/user-guide/2.18/overview-workspaces.html.en">multiple desktops</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://301south.net/2009/06/on-hacks-bugs-and-tools/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
