<?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>2657 Productions News &#187; OpenOffice.org</title>
	<atom:link href="http://news.mrdwab.com/category/geekiness/openoffice-org/feed/" rel="self" type="application/rss+xml" />
	<link>http://news.mrdwab.com</link>
	<description>..:: Whereabouts and Whatabouts of the 2657 World ::..</description>
	<lastBuildDate>Sun, 08 Aug 2010 15:23:11 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	
		<item>
		<title>Pivot Tables in Excel and OpenOffice.org Calc</title>
		<link>http://news.mrdwab.com/2010-07-30/pivot-tables/</link>
		<comments>http://news.mrdwab.com/2010-07-30/pivot-tables/#comments</comments>
		<pubDate>Thu, 29 Jul 2010 19:34:42 +0000</pubDate>
		<dc:creator>Ananda</dc:creator>
				<category><![CDATA[(all categories)]]></category>
		<category><![CDATA[Geekiness]]></category>
		<category><![CDATA[OpenOffice.org]]></category>
		<category><![CDATA[Useless Knowledge]]></category>
		<category><![CDATA[data pilot]]></category>
		<category><![CDATA[Excel]]></category>
		<category><![CDATA[pivot tables]]></category>
		<category><![CDATA[summarizing data]]></category>

		<guid isPermaLink="false">http://news.mrdwab.com/?p=785</guid>
		<description><![CDATA[One of the features I find useful in Excel is the ability to create &#8220;pivot&#8221; tables. Essentially pivot tables let you summarize big tables of data in different ways, using different variables to &#8220;pivot&#8221; your data around (hence the name, I guess). Pivot tables are most easily understood through an example, so here&#8217;s one done [...]


Related posts (possibly):<ol><li><a href='http://news.mrdwab.com/2010-08-08/using-the-reshape-packagein-r/' rel='bookmark' title='Permanent Link: Using the reshape package in R for pivot-table-like functionality'>Using the reshape package in R for pivot-table-like functionality</a> <small>A little more than a week ago, I wrote about...</small></li>
<li><a href='http://news.mrdwab.com/2009-09-21/drop-caps-with-openoffice-org-writer/' rel='bookmark' title='Permanent Link: Drop caps with OpenOffice.org Writer'>Drop caps with OpenOffice.org Writer</a> <small>Tutorial Level: Elementary From time to time, I like some...</small></li>
<li><a href='http://news.mrdwab.com/2009-07-26/automation-with-openoffice-org-writer/' rel='bookmark' title='Permanent Link: Automation with OpenOffice.org Writer'>Automation with OpenOffice.org Writer</a> <small>Tutorial Level: Intermediate At the Tata-Dhan Academy where I work,...</small></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p><img src="http://news.mrdwab.com/wp-content/uploads/2010/07/02-Insert-Pivot-Table.jpg" alt="" title="02 - Insert Pivot Table" width="165" height="142" class="alignright size-full wp-image-786" />One of the features I find useful in Excel is the ability to create &#8220;pivot&#8221; tables. Essentially pivot tables let you summarize big tables of data in different ways, using different variables to &#8220;pivot&#8221; your data around (hence the name, I guess). Pivot tables are most easily understood through an example, so here&#8217;s one done using Excel 2007, and the sort-of-equivalent &#8220;Data-Pilot&#8221; in OpenOffice.org Calc (OO.o Calc).</p>
<p><span id="more-785"></span></p>
<p>Below is the data we&#8217;ll be working with. As you can see, it&#8217;s a long spreadsheet with eight columns (Representative, Region, Month, Publisher, Subject, Sales, Margin, and Quantity) and over 300 rows. Certain calculations, like total sum of sales, are easy&#8211;you just select the sales column and use Excel&#8217;s or OO.o Calc&#8217;s sum function. But what if you wanted total sum of sales, but organized first by region, then by representative? That&#8217;s where pivot tables come into play, so let&#8217;s get started!</p>
<p><center><iframe width='500' height='300' frameborder='0' src='http://spreadsheets.google.com/pub?key=0An2f7Ho_4e0fdHFnVVh3aDA2LXpVR2ZLM3BnZ2dhdUE&#038;hl=en&#038;single=true&#038;gid=0&#038;output=html&#038;widget=true'></iframe></center></p>
<p><a href="http://news.mrdwab.com/booksales">Download the CSV file</a> and open it up in Excel. Select all the data, jump over to the &#8220;insert&#8221; menu, and click on &#8220;PivotTable&#8221;. This will open a dialog box similar to the following.</p>
<div id="attachment_787" class="wp-caption aligncenter" style="width: 409px"><a href="http://news.mrdwab.com/wp-content/uploads/2010/07/03-Create-Pivot-Table-dialog.jpg" rel="lightbox[785]"><img src="http://news.mrdwab.com/wp-content/uploads/2010/07/03-Create-Pivot-Table-dialog.jpg" alt="Create PivotTable Dialog Box" title="Create PivotTable Dialog Box" width="399" height="289" class="size-full wp-image-787" /></a><p class="wp-caption-text">Create PivotTable Dialog Box</p></div>
<p>I usually select the option to insert the pivot table in a new sheet, and this brings us to the following screen.</p>
<div id="attachment_788" class="wp-caption aligncenter" style="width: 410px"><a href="http://news.mrdwab.com/wp-content/uploads/2010/07/04-The-pivot-table-screen.jpg" rel="lightbox[785]"><img src="http://news.mrdwab.com/wp-content/uploads/2010/07/04-The-pivot-table-screen-400x213.jpg" alt="Empty PivotTable screen" title="Empty PivotTable screen" width="400" height="213" class="size-medium wp-image-788" /></a><p class="wp-caption-text">Empty PivotTable screen</p></div>
<div id="attachment_790" class="wp-caption alignright" style="width: 150px"><a href="http://news.mrdwab.com/wp-content/uploads/2010/07/05-Example-panel-selections.jpg" rel="lightbox[785]"><img src="http://news.mrdwab.com/wp-content/uploads/2010/07/05-Example-panel-selections-182x400.jpg" alt="Example panel selections" title="Example panel selections" width="140" class="size-medium wp-image-790" /></a><p class="wp-caption-text">Example panel selections</p></div>Pretty plain looking, right?</p>
<p>The important part is the &#8220;PivotTable Field List&#8221; menu to the right of the screen. In the top half, you have a list of the variables in your data. The bottom half is where the &#8220;pivoting&#8221; gets set up simply by dragging the variables into the relevant areas in the bottom. In this example, I started by dragging &#8220;Region&#8221; to be the primary way to summarize the rows, and I dragged &#8220;Representative&#8221; below that to indicate that the rows should be further sorted by the sales representatives, and finally I dragged &#8220;Sales&#8221;, &#8220;Margin&#8221;, and &#8220;Quantity&#8221; to the sum value box. </p>
<p>By default, Excel assumes you want the sum, but you can also do different data summaries by right-clicking on the variables that you&#8217;ve dragged to the &#8220;values&#8221; corner. Whatever you drag into the filters area will create additional filter options for your data.</p>
<p>Experiment a little bit&#8211;drag things around a bit and see what types of consolidated results you end up with. Whatever you change in the PivotTable Field List dialog area is immediately reflected in the main spreadsheet area (which is one huge advantage that Excel 2007 has over OO.o Calc).<br />
<br style="clear:both" /><br />
By dragging some variables around, here&#8217;s what we can quickly end up with:</p>
<p><div id="attachment_789" class="wp-caption aligncenter" style="width: 407px"><a href="http://news.mrdwab.com/wp-content/uploads/2010/07/06-Example-Output.jpg" rel="lightbox[785]"><img src="http://news.mrdwab.com/wp-content/uploads/2010/07/06-Example-Output.jpg" alt="Example PivotTable Output" title="Example PivotTable Output" width="397" height="420" class="size-full wp-image-789" /></a><p class="wp-caption-text">Example PivotTable Output</p></div>
<p>The process in OpenOffice.org Calc is pretty similar. The option can be found under the &#8220;Data&#8221; menu under &#8220;DataPilot&#8221;. The screencap below shows the DataPilot options window with some variables dragged into the relevant areas to create a simple pivot table in OO.o Calc.</p>
<div id="attachment_797" class="wp-caption aligncenter" style="width: 410px"><a href="http://news.mrdwab.com/wp-content/uploads/2010/07/b03-example-panel-selections.jpg" rel="lightbox[785]"><img src="http://news.mrdwab.com/wp-content/uploads/2010/07/b03-example-panel-selections-400x318.jpg" alt="OO.o Calc DataPilot with some options filled in" title="OO.o Calc DataPilot with some options filled in" width="400" height="318" class="size-medium wp-image-797" /></a><p class="wp-caption-text">OO.o Calc DataPilot with some options filled in</p></div>
<p>The &#8220;Page Fields&#8221; region in OO.o Calc is the equivalent of the filters area in Excel 2007. The rest is pretty much the same, just not as pretty. The output (in the screencap below) isn&#8217;t as pretty either, but it serves its function just fine.</p>
<div id="attachment_798" class="wp-caption aligncenter" style="width: 273px"><a href="http://news.mrdwab.com/wp-content/uploads/2010/07/b04-example-output.jpg" rel="lightbox[785]"><img src="http://news.mrdwab.com/wp-content/uploads/2010/07/b04-example-output-263x400.jpg" alt="OO.o Calc&#039;s less pretty but still functional output" title="OO.o Calc&#039;s less pretty but still functional output" width="263" height="400" class="size-medium wp-image-798" /></a><p class="wp-caption-text">OO.o Calc's less pretty but still functional output</p></div>
<p>So, now that you know all about pivot tables in Excel and OO.o Calc, you can have a data sorting and summarizing party. Once you get bored with that, you can sit around impatiently and wait for me to write about how you can do this sort of thing with R.</p>


<p>Related posts (possibly):<ol><li><a href='http://news.mrdwab.com/2010-08-08/using-the-reshape-packagein-r/' rel='bookmark' title='Permanent Link: Using the reshape package in R for pivot-table-like functionality'>Using the reshape package in R for pivot-table-like functionality</a> <small>A little more than a week ago, I wrote about...</small></li>
<li><a href='http://news.mrdwab.com/2009-09-21/drop-caps-with-openoffice-org-writer/' rel='bookmark' title='Permanent Link: Drop caps with OpenOffice.org Writer'>Drop caps with OpenOffice.org Writer</a> <small>Tutorial Level: Elementary From time to time, I like some...</small></li>
<li><a href='http://news.mrdwab.com/2009-07-26/automation-with-openoffice-org-writer/' rel='bookmark' title='Permanent Link: Automation with OpenOffice.org Writer'>Automation with OpenOffice.org Writer</a> <small>Tutorial Level: Intermediate At the Tata-Dhan Academy where I work,...</small></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://news.mrdwab.com/2010-07-30/pivot-tables/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>A little spark for presenting your data</title>
		<link>http://news.mrdwab.com/2010-06-17/a-little-spark-for-presenting-your-data/</link>
		<comments>http://news.mrdwab.com/2010-06-17/a-little-spark-for-presenting-your-data/#comments</comments>
		<pubDate>Thu, 17 Jun 2010 16:18:16 +0000</pubDate>
		<dc:creator>Ananda</dc:creator>
				<category><![CDATA[(all categories)]]></category>
		<category><![CDATA[Geekiness]]></category>
		<category><![CDATA[OpenOffice.org]]></category>
		<category><![CDATA[Useless Knowledge]]></category>
		<category><![CDATA[data]]></category>
		<category><![CDATA[Google Charts]]></category>
		<category><![CDATA[R]]></category>
		<category><![CDATA[sparklines]]></category>

		<guid isPermaLink="false">http://news.mrdwab.com/?p=722</guid>
		<description><![CDATA[For some reason, I&#8217;ve been obsessing over the presentation of data. (Either it is that I&#8217;ve just read all of Edward Tufte&#8216;s books, or I&#8217;m just being a nerd. But I guess that those two things aren&#8217;t exactly exclusive&#8230;.) Considering my obsession, you could imagine how I felt when one of my students stood up [...]


Related posts (possibly):<ol><li><a href='http://news.mrdwab.com/2010-07-11/getting-data-into-r/' rel='bookmark' title='Permanent Link: Getting data into R'>Getting data into R</a> <small>When you first open R, you&#8217;re greeted with a screen...</small></li>
<li><a href='http://news.mrdwab.com/2010-04-18/reshaping-wide-to-long-in-r/' rel='bookmark' title='Permanent Link: Quickly reshaping data from &#8220;wide&#8221; to &#8220;long&#8221; formats in R'>Quickly reshaping data from &#8220;wide&#8221; to &#8220;long&#8221; formats in R</a> <small>A lot of the times, students at the Academy enter...</small></li>
<li><a href='http://news.mrdwab.com/2010-05-16/choropleth-party-with-r/' rel='bookmark' title='Permanent Link: It&#8217;s a choropleth party with R, and everyone&#8217;s invited'>It&#8217;s a choropleth party with R, and everyone&#8217;s invited</a> <small>Map party time. For some reason this happens every once...</small></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>For some reason, I&#8217;ve been obsessing over the presentation of data. (Either it is that I&#8217;ve just read all of <a href="http://www.edwardtufte.com/tufte/" target="_blank">Edward Tufte</a>&#8216;s books, or I&#8217;m just being a nerd. But I guess that those two things aren&#8217;t exactly exclusive&#8230;.) Considering my obsession, you could imagine how I felt when one of my students stood up and made a presentation that included the following slides, along with the typical, &#8220;As you can see here, the production of rice has been decreasing. And as you can see in this chart, the production of wheat has been decreasing,&#8221; for slide after slide after slide.</p>
<p><center><iframe src="http://docs.google.com/viewer?url=http%3A%2F%2Fdl.dropbox.com%2Fu%2F2556524%2FRaj%2527s%2520Data%2520%2528separate%2520slides%2529.pdf&#038;embedded=true" width="500" height="400" style="border: none;"></iframe></center><br />
<em>If for some reason you&#8217;re not able to see the embedded slides, you can also <a href="http://docs.google.com/viewer?url=http://dl.dropbox.com/u/2556524/Raj%2527s%2520Data%2520%2528separate%2520slides%2529.pdf" target="_blank">view the slides in a new window</a>.</em></p>
<p><span id="more-722"></span></p>
<p>For me, there are several problems with this. First, I can&#8217;t really compare the first slide with, say, the eight, because I&#8217;m not given enough time to do so. Second, if the main point is to just talk about &#8220;increasing&#8221; and &#8220;decreasing&#8221;, are this many slides necessary? Third, the axes on the charts aren&#8217;t the same, making comparisons more difficult. Oh, and <a href="http://news.mrdwab.com/wp-content/uploads/2010/06/Rajs-Data-slides.jpg" rel="lightbox[722]">printing out all of your slides as a handout</a> doesn&#8217;t help either.</p>
<p>For something like this, <a href="http://en.wikipedia.org/wiki/Sparkline" target="_blank">sparklines</a>&#8211;one of the many interesting ideas that Tufte suggests&#8211;might be a solution, and they fit in well with my advice to my students that they should prepare presentation &#8220;fact sheets&#8221; or something similar rather than prepare slide after slide in PowerPoint. So, I thought I should figure out what my options are for creating them (short of downloading an illegal copy of Microsoft Office 2010, which is supposed to have sparklines built into the charting options).</p>
<p>It turns out that there are several options for making sparklines, whether you are using <a href="http://www.multiracio.com/eurooffice/products/eurooffice-sparkline" target="_blank">OpenOffice.org</a> or <a href="http://sparklines-excel.blogspot.com/" target="_blank">Microsoft Office</a>, or, for that matter, preparing data for presentation online. And, since it&#8217;s pretty easy to figure out the offline options, I thought I would try out the Google Chart application programming interface (API) to see what I could do with it.</p>
<p>The <a href="http://code.google.com/apis/visualization/documentation/gallery/imagesparkline.html" target="_blank">construct</a> is pretty basic. You have some code that looks like &#8220;data.addColumn(&#8220;number&#8221;, &#8220;Revenue&#8221;);&#8221; representing all of your &#8220;columns&#8221; of data and the data for each column is represented in an array like &#8220;data.setValue(0,0,435);&#8221; where the first number is the position on the x-axis for the item you&#8217;re charting, the second number is the variable you&#8217;re charting (since you might have several), and the third number is the value of the variable at that position. </p>
<p>Here&#8217;s the problem, though. The format that my data is in looks like this:</p>
<p><center><iframe width='500' height='300' frameborder='0' src='https://spreadsheets.google.com/pub?key=0An2f7Ho_4e0fdFhtdmZtLVBfbjFWeS16bTJNZm5ZTHc&#038;hl=en&#038;single=true&#038;gid=0&#038;output=html&#038;widget=true'></iframe></center></p>
<p>To present my data using the Google Chart API would require a lot of annoying cutting and pasting.</p>
<p>Or would it?</p>
<p>Of course we could just make our lives easier by using <a href="http://www.r-project.org" target="_blank">R</a> to prepare our data, and here&#8217;s how.</p>
<p>First, load the data (using &#8220;read.csv&#8221; and creating a data frame), create a new object in R with the column names (we&#8217;re lazy, right, and we don&#8217;t want to type any more than we have to). Also, convert the data frame that you created into a matrix, and convert the values to numeric values. If this sounds complicated, it&#8217;s not. It&#8217;s just the following few lines of code:</p>
<pre style="color:#000000; background-color:#eeeeee; font-size:8pt; font-family:'Courier New';"><span style="color:#ff0080; font-weight:bold">&gt;</span> crop.prod <span style="color:#ff0080; font-weight:bold">=</span> <span style="color:#0080c0">read.csv</span><span style="color:#ff0080; font-weight:bold">(</span><span style="color:#a68500">&quot;http://news.mrdwab.com/cropproduction&quot;</span><span style="color:#ff0080; font-weight:bold">,</span>
<span style="color:#ff0080; font-weight:bold">+</span>                      header <span style="color:#ff0080; font-weight:bold">=</span> <span style="color:#8080c0; font-weight:bold">T</span><span style="color:#ff0080; font-weight:bold">,</span> <span style="color:#0080c0">row.names</span> <span style="color:#ff0080; font-weight:bold">=</span> <span style="color:#800080; font-weight:bold">1</span><span style="color:#ff0080; font-weight:bold">)</span>
<span style="color:#ff0080; font-weight:bold">&gt;</span> crop.prod.names <span style="color:#ff0080; font-weight:bold">=</span> <span style="color:#0080c0">names</span><span style="color:#ff0080; font-weight:bold">(</span>crop.prod<span style="color:#ff0080; font-weight:bold">)</span> <span style="color:#f27900"># object with the column names</span>
<span style="color:#ff0080; font-weight:bold">&gt;</span> crop.prod.num <span style="color:#ff0080; font-weight:bold">=</span> <span style="color:#0080c0">c</span><span style="color:#ff0080; font-weight:bold">(</span><span style="color:#0080c0">as.numeric</span><span style="color:#ff0080; font-weight:bold">(</span><span style="color:#0080c0">as.matrix</span><span style="color:#ff0080; font-weight:bold">(</span>crop.prod<span style="color:#ff0080; font-weight:bold">)))</span> <span style="color:#f27900"># data values</span>
</pre>
<p>Next, we want to set things up so that we can &#8220;paste&#8221; our data together in a form that the Google Chart API can process.</p>
<pre style="color:#000000; background-color:#eeeeee; font-size:8pt; font-family:'Courier New';"><span style="color:#ff0080; font-weight:bold">&gt;</span> prefix.column <span style="color:#ff0080; font-weight:bold">=</span> <span style="color:#a68500">&quot;data.addColumn(</span><span style="color:#ff00ff; font-weight:bold">\&quot;</span><span style="color:#a68500">number</span><span style="color:#ff00ff; font-weight:bold">\&quot;</span><span style="color:#a68500">,</span> <span style="color:#ff00ff; font-weight:bold">\&quot;</span><span style="color:#a68500">&quot;</span> <span style="color:#f27900"># ugly, I know</span>
<span style="color:#ff0080; font-weight:bold">&gt;</span> prefix.value <span style="color:#ff0080; font-weight:bold">=</span> <span style="color:#a68500">&quot;data.setValue(&quot;</span> <span style="color:#f27900"># but we'll clean it up later</span>
<span style="color:#ff0080; font-weight:bold">&gt;</span> end.column <span style="color:#ff0080; font-weight:bold">=</span> <span style="color:#a68500">&quot;</span><span style="color:#ff00ff; font-weight:bold">\&quot;</span><span style="color:#a68500">);&quot;</span> <span style="color:#f27900"># to be pasted at the end of each line of column names</span>
<span style="color:#ff0080; font-weight:bold">&gt;</span> end.value <span style="color:#ff0080; font-weight:bold">=</span> <span style="color:#a68500">&quot;);&quot;</span> <span style="color:#f27900"># to be pasted at the end of each line of data</span>
</pre>
<p>R has this great function where you can paste things together. Well use that function to get our data in a nicer format. We&#8217;ll still have to clean it up a little bit (mostly removing extra commas and quotation marks) but that&#8217;s a simple search-and-replace procedure.</p>
<pre style="color:#000000; background-color:#eeeeee; font-size:8pt; font-family:'Courier New';"><span style="color:#ff0080; font-weight:bold">&gt;</span> <span style="color:#f27900"># pasting together the column names</span>
<span style="color:#ff0080; font-weight:bold">&gt;</span> column.names <span style="color:#ff0080; font-weight:bold">=</span> <span style="color:#0080c0">paste</span><span style="color:#ff0080; font-weight:bold">(</span>prefix.column<span style="color:#ff0080; font-weight:bold">,</span>crop.prod.names<span style="color:#ff0080; font-weight:bold">,</span>end.column<span style="color:#ff0080; font-weight:bold">)</span>
<span style="color:#ff0080; font-weight:bold">&gt;</span> <span style="color:#f27900"># pasting together each measurement of data</span>
<span style="color:#ff0080; font-weight:bold">&gt;</span> crop.prod.data <span style="color:#ff0080; font-weight:bold">=</span> <span style="color:#0080c0">paste</span><span style="color:#ff0080; font-weight:bold">(</span><span style="color:#0080c0">c</span><span style="color:#ff0080; font-weight:bold">(</span><span style="color:#800080; font-weight:bold">0</span><span style="color:#ff0080; font-weight:bold">:</span><span style="color:#800080; font-weight:bold">10</span><span style="color:#ff0080; font-weight:bold">),</span><span style="color:#0080c0">sort</span><span style="color:#ff0080; font-weight:bold">(</span><span style="color:#0080c0">rep</span><span style="color:#ff0080; font-weight:bold">(</span><span style="color:#0080c0">c</span><span style="color:#ff0080; font-weight:bold">(</span><span style="color:#800080; font-weight:bold">0</span><span style="color:#ff0080; font-weight:bold">:</span><span style="color:#800080; font-weight:bold">7</span><span style="color:#ff0080; font-weight:bold">),</span><span style="color:#800080; font-weight:bold">11</span><span style="color:#ff0080; font-weight:bold">)),</span>crop.prod.num<span style="color:#ff0080; font-weight:bold">,</span> sep<span style="color:#ff0080; font-weight:bold">=</span><span style="color:#a68500">&quot;,&quot;</span><span style="color:#ff0080; font-weight:bold">)</span>
<span style="color:#ff0080; font-weight:bold">&gt;</span> crop.prod.data <span style="color:#ff0080; font-weight:bold">=</span> <span style="color:#0080c0">paste</span><span style="color:#ff0080; font-weight:bold">(</span>prefix.value<span style="color:#ff0080; font-weight:bold">,</span>crop.prod.data<span style="color:#ff0080; font-weight:bold">,</span>end.value<span style="color:#ff0080; font-weight:bold">)</span>
</pre>
<p>The most complicated line above is the <span style="color:#000000; background-color:#eeeeee; font-size:8pt; font-family:'Courier New';">crop.prod.data <span style="color:#ff0080; font-weight:bold">=</span> <span style="color:#0080c0">paste</span><span style="color:#ff0080; font-weight:bold">(</span><span style="color:#0080c0">c</span><span style="color:#ff0080; font-weight:bold">(</span><span style="color:#800080; font-weight:bold">0</span><span style="color:#ff0080; font-weight:bold">:</span><span style="color:#800080; font-weight:bold">10</span><span style="color:#ff0080; font-weight:bold">),</span><span style="color:#0080c0">sort</span><span style="color:#ff0080; font-weight:bold">(</span><span style="color:#0080c0">rep</span><span style="color:#ff0080; font-weight:bold">(</span><span style="color:#0080c0">c</span><span style="color:#ff0080; font-weight:bold">(</span><span style="color:#800080; font-weight:bold">0</span><span style="color:#ff0080; font-weight:bold">:</span><span style="color:#800080; font-weight:bold">7</span><span style="color:#ff0080; font-weight:bold">),</span><span style="color:#800080; font-weight:bold">11</span><span style="color:#ff0080; font-weight:bold">)),</span>crop.prod.num<span style="color:#ff0080; font-weight:bold">,</span> sep<span style="color:#ff0080; font-weight:bold">=</span><span style="color:#a68500">&quot;,&quot;</span><span style="color:#ff0080; font-weight:bold">)</span></span> line, but even that is not too difficult to follow. &#8220;crop.prod.data&#8221; is the name of our object. That object comprises three values, each separated by a comma. The first value is the digits 0 to 10, (eleven values overall) looped for as long as required. The second value is eleven 0s, eleven 1s, eleven 2s and so on. The third value is the array from the &#8220;crop.prod.num&#8221; object we had created earlier.</p>
<p>At this point, we&#8217;re pretty much done. We just need to clean things up, and replace the contents of Google&#8217;s example page with our own data. Using <span style="color:#000000; background-color:#eeeeee; font-size:8pt; font-family:'Courier New';"><span style="color:#0080c0">fix</span><span style="color:#ff0080; font-weight:bold">(</span>column.names<span style="color:#ff0080; font-weight:bold">)</span></span> and <span style="color:#000000; background-color:#eeeeee; font-size:8pt; font-family:'Courier New';"><span style="color:#0080c0">fix</span><span style="color:#ff0080; font-weight:bold">(</span>crop.prod.data<span style="color:#ff0080; font-weight:bold">)</span></span> gives us the following output:</p>
<pre style="color:#000000; background-color:#eeeeee; font-size:8pt; font-family:'Courier New';"><span style="color:#f27900"># output from &quot;fix(column.names)&quot;</span>
<span style="color:#0080c0">c</span><span style="color:#ff0080; font-weight:bold">(</span><span style="color:#a68500">&quot;data.addColumn(</span><span style="color:#ff00ff; font-weight:bold">\&quot;</span><span style="color:#a68500">number</span><span style="color:#ff00ff; font-weight:bold">\&quot;</span><span style="color:#a68500">,</span> <span style="color:#ff00ff; font-weight:bold">\&quot;</span> <span style="color:#a68500">Rice</span> <span style="color:#ff00ff; font-weight:bold">\&quot;</span><span style="color:#a68500">);&quot;</span><span style="color:#ff0080; font-weight:bold">,</span> <span style="color:#a68500">&quot;data.addColumn(</span>
<span style="color:#a68500"></span>  <span style="color:#ff00ff; font-weight:bold">\&quot;</span><span style="color:#a68500">number</span><span style="color:#ff00ff; font-weight:bold">\&quot;</span><span style="color:#a68500">,</span> <span style="color:#ff00ff; font-weight:bold">\&quot;</span> <span style="color:#a68500">Wheat</span> <span style="color:#ff00ff; font-weight:bold">\&quot;</span><span style="color:#a68500">);&quot;</span><span style="color:#ff0080; font-weight:bold">,</span> <span style="color:#a68500">&quot;data.addColumn(</span><span style="color:#ff00ff; font-weight:bold">\&quot;</span><span style="color:#a68500">number</span><span style="color:#ff00ff; font-weight:bold">\&quot;</span><span style="color:#a68500">,</span> <span style="color:#ff00ff; font-weight:bold">\&quot;</span> <span style="color:#a68500">Pulses</span> <span style="color:#ff00ff; font-weight:bold">\&quot;</span><span style="color:#a68500">)</span>
<span style="color:#a68500">  ;&quot;</span><span style="color:#ff0080; font-weight:bold">,</span> <span style="color:#a68500">&quot;data.addColumn(</span><span style="color:#ff00ff; font-weight:bold">\&quot;</span><span style="color:#a68500">number</span><span style="color:#ff00ff; font-weight:bold">\&quot;</span><span style="color:#a68500">,</span> <span style="color:#ff00ff; font-weight:bold">\&quot;</span> <span style="color:#a68500">Cereals</span> <span style="color:#ff00ff; font-weight:bold">\&quot;</span><span style="color:#a68500">);&quot;</span><span style="color:#ff0080; font-weight:bold">,</span> <span style="color:#a68500">&quot;data.addColumn(</span>
<span style="color:#a68500"></span>  <span style="color:#ff00ff; font-weight:bold">\&quot;</span><span style="color:#a68500">number</span><span style="color:#ff00ff; font-weight:bold">\&quot;</span><span style="color:#a68500">,</span> <span style="color:#ff00ff; font-weight:bold">\&quot;</span> <span style="color:#a68500">Food.Grains</span> <span style="color:#ff00ff; font-weight:bold">\&quot;</span><span style="color:#a68500">);&quot;</span><span style="color:#ff0080; font-weight:bold">,</span> <span style="color:#a68500">&quot;data.addColumn(</span><span style="color:#ff00ff; font-weight:bold">\&quot;</span><span style="color:#a68500">number</span><span style="color:#ff00ff; font-weight:bold">\&quot;</span><span style="color:#a68500">,</span> <span style="color:#ff00ff; font-weight:bold">\&quot;</span> <span style="color:#a68500">Oil.</span>
<span style="color:#a68500">  Seeds</span> <span style="color:#ff00ff; font-weight:bold">\&quot;</span><span style="color:#a68500">);&quot;</span><span style="color:#ff0080; font-weight:bold">,</span> <span style="color:#a68500">&quot;data.addColumn(</span><span style="color:#ff00ff; font-weight:bold">\&quot;</span><span style="color:#a68500">number</span><span style="color:#ff00ff; font-weight:bold">\&quot;</span><span style="color:#a68500">,</span> <span style="color:#ff00ff; font-weight:bold">\&quot;</span> <span style="color:#a68500">Cotton</span> <span style="color:#ff00ff; font-weight:bold">\&quot;</span><span style="color:#a68500">);&quot;</span><span style="color:#ff0080; font-weight:bold">,</span> <span style="color:#a68500">&quot;data.</span>
<span style="color:#a68500">  addColumn(</span><span style="color:#ff00ff; font-weight:bold">\&quot;</span><span style="color:#a68500">number</span><span style="color:#ff00ff; font-weight:bold">\&quot;</span><span style="color:#a68500">,</span> <span style="color:#ff00ff; font-weight:bold">\&quot;</span> <span style="color:#a68500">Sugarcane</span> <span style="color:#ff00ff; font-weight:bold">\&quot;</span><span style="color:#a68500">);&quot;</span> <span style="color:#ff0080; font-weight:bold">)</span>

<span style="color:#f27900"># extracted output from &quot;fix(crop.prod.data)&quot; </span>
<span style="color:#0080c0">c</span><span style="color:#ff0080; font-weight:bold">(</span><span style="color:#a68500">&quot;data.setValue( 0,0,4500 );&quot;</span><span style="color:#ff0080; font-weight:bold">,</span> <span style="color:#a68500">&quot;data.setValue( 1,0,5000 );&quot;</span><span style="color:#ff0080; font-weight:bold">,</span> <span style="color:#a68500">&quot;data.</span>
<span style="color:#a68500">  setValue( 2,0,6500 );&quot;</span><span style="color:#ff0080; font-weight:bold">,</span> <span style="color:#a68500">&quot;data.setValue( 3,0,1000 );&quot;</span><span style="color:#ff0080; font-weight:bold">,</span> <span style="color:#a68500">&quot;data.setValue(</span>
<span style="color:#a68500">  4,0,1750 );&quot;</span><span style="color:#ff0080; font-weight:bold">,</span> <span style="color:#a68500">&quot;data.setValue( 5,0,1000 );&quot;</span><span style="color:#ff0080; font-weight:bold">,</span> <span style="color:#a68500">&quot;data.setValue( 6,0,1750 </span>
<span style="color:#a68500">  );&quot;</span><span style="color:#ff0080; font-weight:bold">,</span> ... ... ... <span style="color:#a68500">&quot;data.setValue( 2,1,8600 );&quot;</span><span style="color:#ff0080; font-weight:bold">,</span> ... ... ...</pre>
<p>Using any decent text editor (like Notepad++ or Komodo Edit [which I use]) makes getting rid of your unnecessary slashes and quotation marks a two second job, and then you are ready to do one last bit of copying and pasting, using the html <a href="http://code.google.com/apis/visualization/documentation/gallery/imagesparkline.html" target="_blank">on this page</a> as a guide. Here&#8217;s what my final html looked like:</p>
<pre class="brush: xml;">
&lt;html&gt;
  &lt;head&gt;
    &lt;script type=&quot;text/javascript&quot; src=&quot;http://www.google.com/jsapi&quot;&gt;&lt;/script&gt;
    &lt;script type=&quot;text/javascript&quot;&gt;
    google.load(&quot;visualization&quot;, &quot;1&quot;, {packages:[&quot;imagesparkline&quot;]});
    google.setOnLoadCallback(drawChart);
    function drawChart() {
    var data = new google.visualization.DataTable();
      data.addColumn(&quot;number&quot;, &quot; Rice &quot;);
	  data.addColumn(&quot;number&quot;, &quot; Wheat &quot;);
      data.addColumn(&quot;number&quot;, &quot; Pulses &quot;);
	  data.addColumn(&quot;number&quot;, &quot; Cereals &quot;);
      data.addColumn(&quot;number&quot;, &quot; Food Grains &quot;);
	  data.addColumn(&quot;number&quot;, &quot; Oil Seeds &quot;);
      data.addColumn(&quot;number&quot;, &quot; Cotton &quot;);
	  data.addColumn(&quot;number&quot;, &quot; Sugarcane &quot;);
    data.addRows(11);
      data.setValue( 0,0,4500 ); data.setValue( 1,0,5000 );
	  data.setValue( 2,0,6500 ); data.setValue( 3,0,1000 );
	  data.setValue( 4,0,1750 ); data.setValue( 5,0,1000 );
	  data.setValue( 6,0,1750 ); data.setValue( 7,0,1100 );
	  data.setValue( 8,0,1600 ); data.setValue( 9,0,1400 );
	  data.setValue( 10,0,1500 ); data.setValue( 0,1,7200 );
	  data.setValue( 1,1,8300 ); data.setValue( 2,1,8600 );
	  data.setValue( 3,1,4900 ); data.setValue( 4,1,5000 );
	  data.setValue( 5,1,4000 ); data.setValue( 6,1,7400 );
	  data.setValue( 7,1,7200 ); data.setValue( 8,1,6000 );
	  data.setValue( 9,1,7300 ); data.setValue( 10,1,6000 );
	  data.setValue( 0,2,3250 ); data.setValue( 1,2,3600 );
	  data.setValue( 2,2,3750 ); data.setValue( 3,2,2250 );
	  data.setValue( 4,2,3250 ); data.setValue( 5,2,2400 );
	  data.setValue( 6,2,3500 ); data.setValue( 7,2,3400 );
	  data.setValue( 8,2,3250 ); data.setValue( 9,2,3250 );
	  data.setValue( 10,2,2500 ); data.setValue( 0,3,2300 );
	  data.setValue( 1,3,2500 ); data.setValue( 2,3,2400 );
      data.setValue( 3,3,2100 ); data.setValue( 4,3,2700 );
	  data.setValue( 5,3,2400 ); data.setValue( 6,3,3400 );
	  data.setValue( 7,3,2300 ); data.setValue( 8,3,2300 );
      data.setValue( 9,3,1800 ); data.setValue( 10,3,1200 );
	  data.setValue( 0,4,17500 ); data.setValue( 1,4,19000 );
	  data.setValue( 2,4,22000 ); data.setValue( 3,4,10000 );
      data.setValue( 4,4,14000 ); data.setValue( 5,4,11000 );
	  data.setValue( 6,4,16500 ); data.setValue( 7,4,14000 );
	  data.setValue( 8,4,13000 ); data.setValue( 9,4,14000 );
      data.setValue( 10,4,12500 ); data.setValue( 0,5,5700 );
	  data.setValue( 1,5,5700 ); data.setValue( 2,5,5900 );
	  data.setValue( 3,5,4100 ); data.setValue( 4,5,4500 );
	  data.setValue( 5,5,3100 ); data.setValue( 6,5,5500 );
	  data.setValue( 7,5,4800 ); data.setValue( 8,5,5800 );
	  data.setValue( 9,5,5900 ); data.setValue( 10,5,6400 );
	  data.setValue( 0,6,510 ); data.setValue( 1,6,430 );
	  data.setValue( 2,6,420 ); data.setValue( 3,6,250 );
	  data.setValue( 4,6,400 ); data.setValue( 5,6,390 );
	  data.setValue( 6,6,650 ); data.setValue( 7,6,640 );
	  data.setValue( 8,6,750 ); data.setValue( 9,6,840 );
	  data.setValue( 10,6,870 ); data.setValue( 0,7,1650 );
	  data.setValue( 1,7,1600 ); data.setValue( 2,7,2000 );
	  data.setValue( 3,7,1650 ); data.setValue( 4,7,1600 );
	  data.setValue( 5,7,1550 ); data.setValue( 6,7,1750 );
	  data.setValue( 7,7,2000 ); data.setValue( 8,7,2500 );
	  data.setValue( 9,7,2750 ); data.setValue( 10,7,3250 );
    var chart = new google.visualization.ImageSparkLine(document.getElementById('chart_div'));
    chart.draw(data, {width: 170, height: 40, color: '#545454',
	showAxisLines: false, showValueLabels: false, labelPosition: 'left'});
    }
    &lt;/script&gt;
  &lt;/head&gt;

  &lt;body&gt;
    &lt;div id=&quot;chart_div&quot;&gt;&lt;/div&gt;
  &lt;/body&gt;
&lt;/html&gt;
</pre>
<p>The output (seen below) can easily be copied into a MS Word document and more information can be added to it as necessary.<br />
<center><iframe width='190' height='180' frameborder='0' src='http://db.tt/L2xanW'></iframe></center></p>
<p>By the way, here is <a href="http://news.mrdwab.com/wp-content/uploads/2010/06/sparklines-table.pdf">a PDF of a document created in OpenOffice.org</a> demonstrating what this might look like in a table (made using the EuroOffice sparkline plugin) as well as what a stacked line graph would look like. Both of these would make much better handouts during a presentation than the printout of slides shown earlier.</p>


<p>Related posts (possibly):<ol><li><a href='http://news.mrdwab.com/2010-07-11/getting-data-into-r/' rel='bookmark' title='Permanent Link: Getting data into R'>Getting data into R</a> <small>When you first open R, you&#8217;re greeted with a screen...</small></li>
<li><a href='http://news.mrdwab.com/2010-04-18/reshaping-wide-to-long-in-r/' rel='bookmark' title='Permanent Link: Quickly reshaping data from &#8220;wide&#8221; to &#8220;long&#8221; formats in R'>Quickly reshaping data from &#8220;wide&#8221; to &#8220;long&#8221; formats in R</a> <small>A lot of the times, students at the Academy enter...</small></li>
<li><a href='http://news.mrdwab.com/2010-05-16/choropleth-party-with-r/' rel='bookmark' title='Permanent Link: It&#8217;s a choropleth party with R, and everyone&#8217;s invited'>It&#8217;s a choropleth party with R, and everyone&#8217;s invited</a> <small>Map party time. For some reason this happens every once...</small></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://news.mrdwab.com/2010-06-17/a-little-spark-for-presenting-your-data/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Making an A6 booklet in OpenOffice.org the easy way</title>
		<link>http://news.mrdwab.com/2009-11-19/making-an-a6-booklet-in-openoffice-org-the-easy-way/</link>
		<comments>http://news.mrdwab.com/2009-11-19/making-an-a6-booklet-in-openoffice-org-the-easy-way/#comments</comments>
		<pubDate>Thu, 19 Nov 2009 02:46:02 +0000</pubDate>
		<dc:creator>Ananda</dc:creator>
				<category><![CDATA[(all categories)]]></category>
		<category><![CDATA[Geekiness]]></category>
		<category><![CDATA[OpenOffice.org]]></category>
		<category><![CDATA[elementary]]></category>
		<category><![CDATA[tutorial]]></category>

		<guid isPermaLink="false">http://news.mrdwab.com/?p=460</guid>
		<description><![CDATA[Tutorial level: Elementary I recently had to create an A6 booklet for an event that was being hosted by DHAN Foundation/Tata-Dhan Academy. At first, I thought it would be a nightmare to design and print it—particularly because I only had one day to do the layout for a 60+ page book—but it turns out that [...]


Related posts (possibly):<ol><li><a href='http://news.mrdwab.com/2009-07-26/automation-with-openoffice-org-writer/' rel='bookmark' title='Permanent Link: Automation with OpenOffice.org Writer'>Automation with OpenOffice.org Writer</a> <small>Tutorial Level: Intermediate At the Tata-Dhan Academy where I work,...</small></li>
<li><a href='http://news.mrdwab.com/2009-09-21/drop-caps-with-openoffice-org-writer/' rel='bookmark' title='Permanent Link: Drop caps with OpenOffice.org Writer'>Drop caps with OpenOffice.org Writer</a> <small>Tutorial Level: Elementary From time to time, I like some...</small></li>
<li><a href='http://news.mrdwab.com/2010-07-30/pivot-tables/' rel='bookmark' title='Permanent Link: Pivot Tables in Excel and OpenOffice.org Calc'>Pivot Tables in Excel and OpenOffice.org Calc</a> <small>One of the features I find useful in Excel is...</small></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>Tutorial level: Elementary</p>
<p>I recently had to create an A6 booklet for an event that was being hosted by DHAN Foundation/Tata-Dhan Academy. At first, I thought it would be a nightmare to design and print it—particularly because I only had one day to do the layout for a 60+ page book—but it turns out that using OpenOffice.org (OOo) Writer makes the task quite simple.</p>
<p><span id="more-460"></span></p>
<p>Before going into details, here&#8217;s the logic I applied. One option was to assume I was only printing one copy of the book. In that case, it would make sense to lay the book out onto 7.5 A4 sheets (eight pages will fit on one sheet when printed double-sided). But, since I was going to print a couple of thousands of these, I could do the smart thing: do a simple double-sided “brochure” print from OOo Writer, turn my stack of paper around, and print the same file again. That way, you end up with two sets of the same page on each sheet, which means you can simply cut the sheet in half, fold the cut pieces in half, and you have two books ready to be stapled!</p>
<p>Here&#8217;s the simple step-by-step solution:</p>
<ol>
<li>Create an A6 size page in the “Styles and Formatting” panel (A6 is 105mm x 148mm).</li>
<li>Go ahead and type your content as you normally would.</li>
<li>When you are done, go to “File > Print” and in the dialog box, click “Options”. Under “Options” make sure that “Brochure” is selected.</li>
<li>Print a full set of your document (you can duplex too, though this can be done later in the copying stage). </li>
<li>Turn your stack of printed papers around and print a full set again.</li>
</ol>
<p>Imagining you had just a four-page document, you would have something that resembled Illustration 1.</p>
<p><div id="attachment_461" class="wp-caption alignright" style="width: 222px"><a href="http://news.mrdwab.com/2009-11-19/making-an-a6-booklet-in-openoffice-org-the-easy-way/a6-layout/" rel="attachment wp-att-461"><img src="http://news.mrdwab.com/wp-content/uploads/2009/11/A6-Layout-212x300.jpg" alt="If you were creating a four-page booklet, your print might look something like this." title="A6 Layout" width="212" height="300" class="size-medium wp-image-461" /></a><p class="wp-caption-text">If you were creating a four-page booklet, your print might look something like this.</p></div>Now, all you would have to do is cut the sheet in half, fold, and you&#8217;re good to go!</p>
<p>For me, the nice thing about doing the layout this way is that I can easily have not only a print-ready document, but I can also use the PDF export feature built-in to OpenOffice.org Writer and I can also easily have a nice PDF to share say by email or online—all with no extra work.<br />
It really is that easy!</p>
<p>Of course, another option is to simply create an A5 booklet and reduce it to 70% of the original size get the same results, but I think this is much more logical.</p>
<p>By the way, the only time I typically use metric is when I&#8217;m designing for A sheets. Here&#8217;s the breakdown of common A sizing in millimeters:</p>
<ul>
<li>A3 = 297 × 420</li>
<li>A4 = 210 × 297</li>
<li>A5 = 148 × 210</li>
<li>A6 = 105 × 148</li>
</ul>
<p>You&#8217;ve probably noticed that each smaller size is pretty much exactly half of the previous size. This is one advantage over the letter size used in the US. You can read more about <a href="http://en.wikipedia.org/wiki/Paper_size">page sizing standards at Wikipedia</a>.</p>
<h2>Downloads</h2>
<p>The following files might help to give you an idea of what to expect in terms of different types of outputs.</p>
<ul>
<li>OpenOffice.org Writer file [<a href='http://news.mrdwab.com/wp-content/uploads/2009/11/A6-Layout-in-OpenOffice.odt'>download</a>]</li>
<li>Direct PDF export from OpenOffice.org [<a href='http://news.mrdwab.com/wp-content/uploads/2009/11/A6-Layout-in-OpenOffice-regular-export.pdf'>download</a>]</li>
<li>PDF of what you can expect if you used &#8220;File > Print&#8221; with &#8220;Brochure&#8221; selected [<a href='http://news.mrdwab.com/wp-content/uploads/2009/11/A6-Layout-in-OpenOffice-printed-version.pdf'>download</a>]</li>
</ul>


<p>Related posts (possibly):<ol><li><a href='http://news.mrdwab.com/2009-07-26/automation-with-openoffice-org-writer/' rel='bookmark' title='Permanent Link: Automation with OpenOffice.org Writer'>Automation with OpenOffice.org Writer</a> <small>Tutorial Level: Intermediate At the Tata-Dhan Academy where I work,...</small></li>
<li><a href='http://news.mrdwab.com/2009-09-21/drop-caps-with-openoffice-org-writer/' rel='bookmark' title='Permanent Link: Drop caps with OpenOffice.org Writer'>Drop caps with OpenOffice.org Writer</a> <small>Tutorial Level: Elementary From time to time, I like some...</small></li>
<li><a href='http://news.mrdwab.com/2010-07-30/pivot-tables/' rel='bookmark' title='Permanent Link: Pivot Tables in Excel and OpenOffice.org Calc'>Pivot Tables in Excel and OpenOffice.org Calc</a> <small>One of the features I find useful in Excel is...</small></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://news.mrdwab.com/2009-11-19/making-an-a6-booklet-in-openoffice-org-the-easy-way/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Drop caps with OpenOffice.org Writer</title>
		<link>http://news.mrdwab.com/2009-09-21/drop-caps-with-openoffice-org-writer/</link>
		<comments>http://news.mrdwab.com/2009-09-21/drop-caps-with-openoffice-org-writer/#comments</comments>
		<pubDate>Mon, 21 Sep 2009 15:23:44 +0000</pubDate>
		<dc:creator>Ananda</dc:creator>
				<category><![CDATA[(all categories)]]></category>
		<category><![CDATA[Geekiness]]></category>
		<category><![CDATA[OpenOffice.org]]></category>
		<category><![CDATA[elementary]]></category>
		<category><![CDATA[tutorial]]></category>

		<guid isPermaLink="false">http://news.mrdwab.com/?p=419</guid>
		<description><![CDATA[Tutorial Level: Elementary From time to time, I like some minor embellishments in my design, and one such embellishment I use is the drop cap that you commonly find in magazines and so on. In OpenOffice.org (OOo) it is pretty easy to do this throughout a document. As with the last tutorial, this one is [...]


Related posts (possibly):<ol><li><a href='http://news.mrdwab.com/2009-07-26/automation-with-openoffice-org-writer/' rel='bookmark' title='Permanent Link: Automation with OpenOffice.org Writer'>Automation with OpenOffice.org Writer</a> <small>Tutorial Level: Intermediate At the Tata-Dhan Academy where I work,...</small></li>
<li><a href='http://news.mrdwab.com/2009-11-19/making-an-a6-booklet-in-openoffice-org-the-easy-way/' rel='bookmark' title='Permanent Link: Making an A6 booklet in OpenOffice.org the easy way'>Making an A6 booklet in OpenOffice.org the easy way</a> <small>Tutorial level: Elementary I recently had to create an A6...</small></li>
<li><a href='http://news.mrdwab.com/2010-07-30/pivot-tables/' rel='bookmark' title='Permanent Link: Pivot Tables in Excel and OpenOffice.org Calc'>Pivot Tables in Excel and OpenOffice.org Calc</a> <small>One of the features I find useful in Excel is...</small></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>Tutorial Level: Elementary</p>
<p style="text-align: center;"><a href="http://news.mrdwab.com/wp-content/uploads/2009/09/screenshot.5.png" rel="lightbox[419]"><img class="size-full wp-image-420 aligncenter" title="Drop Caps with OpenOffice.org Writer" src="http://news.mrdwab.com/wp-content/uploads/2009/09/screenshot.5.png" alt="Drop Caps with OpenOffice.org Writer" width="381" height="262" /></a></p>
<p>From time to time, I like some minor embellishments in my design, and one such embellishment I use is the drop cap that you commonly find in magazines and so on. In OpenOffice.org (OOo) it is pretty easy to do this throughout a document. As with <a href="http://news.mrdwab.com/2009-07-26/automation-with-openoffice-org-writer/">the last tutorial</a>, this one is also going to focus on how it can be done automatically using “Styles and Formatting” rather than having to manually recreate the effect on each paragraph.</p>
<p><span id="more-419"></span></p>
<p>First, there is one assumption. We do not want a drop cap on all paragraphs—that would look silly. The only place we want the drop cap is in the first paragraph immediately following a level 1 heading (which we&#8217;ll assume is being used for chapter titles and so on).</p>
<p>With that assumption, here&#8217;s how I would proceed.</p>
<div id="attachment_425" class="wp-caption aligncenter" style="width: 310px"><a rel="attachment wp-att-425" href="http://news.mrdwab.com/2009-09-21/drop-caps-with-openoffice-org-writer/screenshot-1-2/"><img class="size-medium wp-image-425" title="Paragraph Style Organizer Tab" src="http://news.mrdwab.com/wp-content/uploads/2009/09/screenshot.1-300x230.png" alt="Illustration 1: Paragraph Style Organizer Tab (click for more info)" width="300" height="230" /></a><p class="wp-caption-text">Illustration 1: Paragraph Style Organizer Tab (click for more info)</p></div>
<ol>
<li>Create a style called “Text body drop cap”.
<ul>
<li>To do this, first open “Styles and Formatting”, then right click in the “Paragraph Styles” section and select “new”.</li>
<li>Under the “Organizer” tab, use the following settings: “Next Style” is “Text body”. “Linked With” is also “Text body” (see Illustration 1).</li>
<li>Under the “Drop Caps” tab, make sure that “Display drop caps” is checked and modify according to your preference. Note here that you can either have single letter drop caps, multiple letter drop caps, or whole word drop caps (See Illustration 2).</li>
<li>When you&#8217;re done setting your styles, click on “OK.”</li>
</ul>
</li>
<li>With “Styles and Formatting” still open, style your “Heading 1” to your liking. Also, on the “Organizer” tab, change “Next Style” from “Text body” to your new style, “Text body drop cap”.</li>
</ol>
<div id="attachment_426" class="wp-caption aligncenter" style="width: 310px"><a rel="attachment wp-att-426" href="http://news.mrdwab.com/2009-09-21/drop-caps-with-openoffice-org-writer/screenshot-2/"><img class="size-medium wp-image-426" title="Paragraph Styles Drop Caps Tab" src="http://news.mrdwab.com/wp-content/uploads/2009/09/screenshot.2-300x230.png" alt="Settings for Drop Caps under the Paragraph Styles menu (click for more info)" width="300" height="230" /></a><p class="wp-caption-text">Illustration 2: Settings for Drop Caps under the Paragraph Styles menu (click for more info)</p></div>
<p>And that&#8217;s it! Now you have nice drop caps for your document.</p>
<h2>Making your drop caps fancy</h2>
<p>Sometimes, it is nice to make your drop caps look a little different from the rest of your text by, say, using a different font or a different color. Again, using “Styles and Formatting” this is quite easy. What is required is that we also create what&#8217;s called a “character style” to be applied to the drop cap. (OOo lets you create styles for paragraphs, characters, frames, pages, and lists.)</p>
<p>You&#8217;ll see that there is already a character style called “Drop Caps”. Right click on that and select “Modify” to get a dialogue box where you can change things like the font, the font color, and so on. Then, go back to the third sub-point of step two above (Illustration 2) and, where it says “Character Style”, select “Drop Caps” from the drop-down menu.</p>
<h2>Additional notes</h2>
<p>One of the things that OOo does automatically for you is eliminate drop caps or make drop caps smaller according to your paragraph length. If, for example, your drop caps were set to be three lines, but your paragraph is only one line, it would not have a drop cap; similarly, if the paragraph were two lines, the drop cap would only cover those two lines.</p>
<p>Another thing you can do is adjust the spacing between your drop cap and the rest of your text. This can be useful if the font you&#8217;ve used for the drop cap is particularly ornamental and needs to be visually offset from the rest of the text.</p>
<h3>Downloads</h3>
<p>Download the following OpenDocument text file to see what my settings were in OOo and the PDF to see what the output could look like.</p>
<ul>
<li>OpenOffice.org Writer file [<a href="http://news.mrdwab.com/wp-content/uploads/2009/09/OpenOffice-Drop-Caps.odt">download</a>]</li>
<li>Final PDF output [<a href="http://news.mrdwab.com/wp-content/uploads/2009/09/OpenOffice-Drop-Caps.pdf">download</a>]</li>
</ul>


<p>Related posts (possibly):<ol><li><a href='http://news.mrdwab.com/2009-07-26/automation-with-openoffice-org-writer/' rel='bookmark' title='Permanent Link: Automation with OpenOffice.org Writer'>Automation with OpenOffice.org Writer</a> <small>Tutorial Level: Intermediate At the Tata-Dhan Academy where I work,...</small></li>
<li><a href='http://news.mrdwab.com/2009-11-19/making-an-a6-booklet-in-openoffice-org-the-easy-way/' rel='bookmark' title='Permanent Link: Making an A6 booklet in OpenOffice.org the easy way'>Making an A6 booklet in OpenOffice.org the easy way</a> <small>Tutorial level: Elementary I recently had to create an A6...</small></li>
<li><a href='http://news.mrdwab.com/2010-07-30/pivot-tables/' rel='bookmark' title='Permanent Link: Pivot Tables in Excel and OpenOffice.org Calc'>Pivot Tables in Excel and OpenOffice.org Calc</a> <small>One of the features I find useful in Excel is...</small></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://news.mrdwab.com/2009-09-21/drop-caps-with-openoffice-org-writer/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Automation with OpenOffice.org Writer</title>
		<link>http://news.mrdwab.com/2009-07-26/automation-with-openoffice-org-writer/</link>
		<comments>http://news.mrdwab.com/2009-07-26/automation-with-openoffice-org-writer/#comments</comments>
		<pubDate>Sun, 26 Jul 2009 10:30:16 +0000</pubDate>
		<dc:creator>Ananda</dc:creator>
				<category><![CDATA[(all categories)]]></category>
		<category><![CDATA[Geekiness]]></category>
		<category><![CDATA[OpenOffice.org]]></category>
		<category><![CDATA[intermediate]]></category>
		<category><![CDATA[tutorial]]></category>

		<guid isPermaLink="false">http://news.mrdwab.com/?p=245</guid>
		<description><![CDATA[Tutorial Level: Intermediate At the Tata-Dhan Academy where I work, with each new batch of students, we try to promote the adoption of freeware or open-source software instead of promoting the already ridiculous levels of piracy that goes on around here. So, during our orientation, we introduce the students to OpenOffice.org—something which, unfortunately, causes many [...]


Related posts (possibly):<ol><li><a href='http://news.mrdwab.com/2009-09-21/drop-caps-with-openoffice-org-writer/' rel='bookmark' title='Permanent Link: Drop caps with OpenOffice.org Writer'>Drop caps with OpenOffice.org Writer</a> <small>Tutorial Level: Elementary From time to time, I like some...</small></li>
<li><a href='http://news.mrdwab.com/2009-11-19/making-an-a6-booklet-in-openoffice-org-the-easy-way/' rel='bookmark' title='Permanent Link: Making an A6 booklet in OpenOffice.org the easy way'>Making an A6 booklet in OpenOffice.org the easy way</a> <small>Tutorial level: Elementary I recently had to create an A6...</small></li>
<li><a href='http://news.mrdwab.com/2010-07-30/pivot-tables/' rel='bookmark' title='Permanent Link: Pivot Tables in Excel and OpenOffice.org Calc'>Pivot Tables in Excel and OpenOffice.org Calc</a> <small>One of the features I find useful in Excel is...</small></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>Tutorial Level: Intermediate</p>
<p>At the <strong>Tata-Dhan Academy</strong> where I work, with each new batch of students, we try to promote the adoption of freeware or open-source software instead of promoting the already ridiculous levels of piracy that goes on around here. So, during our orientation, we introduce the students to <a href="http://www.openoffice.org/" target="_blank">OpenOffice.org</a>—something which, unfortunately, causes many of them to groan and complain. However, I really do prefer OpenOffice.org Writer over Microsoft Word for several reasons, and one reason is that I find it very easy to automate certain document layout features that would require a lot of extra work in Microsoft Word.</p>
<p>Consider the following requirements:</p>
<ul>
<li>You&#8217;re compiling an A5-sized booklet of stories.</li>
<li>You want each story to have its title on a right-hand (odd numbered) page, and you want this page to have a background color.</li>
<li>The story itself should also start on a right-hand page, about halfway down the page (maybe you&#8217;re planning to put a picture in the top half of the page).</li>
<li>The first paragraph of the story should have a drop-cap of two to three lines (depending on how many lines the actual paragraph takes up); the rest of the paragraphs 	will have normal styling.</li>
<li>When the story goes beyond its first page, you want the text to be in two columns.</li>
</ul>
<p>So, is there a way to “automate” this to a certain extent?</p>
<p>With OpenOffice.org (OOo) Writer&#8217;s style options, once you&#8217;ve spent a little bit of time setting your styles up, doing something like this is not too difficult.</p>
<p>Here&#8217;s how we go about it.<br />
<span id="more-245"></span></p>
<h2>Step 1: Page Styles</h2>
<div id="attachment_246" class="wp-caption alignright" style="width: 175px"><a rel="attachment wp-att-246" href="http://news.mrdwab.com/2009-07-26/automation-with-openoffice-org-writer/screenshot-6/"><img class="size-medium wp-image-246" title="OpenOffice.org Styles and Formatting" src="http://news.mrdwab.com/wp-content/uploads/2009/07/screenshot.6-165x300.jpg" alt="&quot;Applied Styles&quot; in the Styles and Formatting toolbar in OO.o" width="165" height="300" /></a><p class="wp-caption-text">&quot;Applied Styles&quot; in the Styles and Formatting toolbar in OO.o. Click on image to read more.</p></div><br />
We need at least three page styles here: (1) one for the story&#8217;s title; (2) one for the story&#8217;s first page; and (3) one for the rest of the story. So, heading over to “page styles” section of the “Styles and Formatting” panel in OOo Writer, we can go ahead and create some custom pages. We will also link these three page styles so that the program knows that first it needs to apply page style 1, then page style 2, then page style 3.</p>
<p>For this purpose, I&#8217;ve created three page styles: “Story Title,” “Story First Page,” and “Story Continuation.” For “Story Title” I&#8217;ve set the margins to zero all around, and applied a background color. I&#8217;ve then assigned the “next style” setting to be “Story First Page.” For “Story First Page,” I&#8217;ve set my top page margin to four inches and I&#8217;ve set the “next style” to be “Story Continuation.” For these two pages, I&#8217;ve declared that they are only “right” pages—always an odd number. For “Story Continuation,” I&#8217;ve said to turn the header and footer on (so I can put the story title in the header, and the page number in the footer), I&#8217;ve said that text on the page should be in two columns, and  I&#8217;ve left the “next style” as “Story Continuation.” These pages have been declared as both right and left, so they will continue logically.</p>
<p><div id="attachment_247" class="wp-caption alignnone" style="width: 310px"><a rel="attachment wp-att-247" href="http://news.mrdwab.com/2009-07-26/automation-with-openoffice-org-writer/screenshot-1/"><img class="size-medium wp-image-247" title="The &quot;Next Style&quot; option" src="http://news.mrdwab.com/wp-content/uploads/2009/07/screenshot.1-300x221.jpg" alt="For most elements in the &quot;Styles and Formatting&quot; toolbar, you can define the &quot;Next Style&quot;" width="300" height="221" /></a><p class="wp-caption-text">For most elements in the &quot;Styles and Formatting&quot; toolbar, you can define the &quot;Next Style&quot;. Click on image to read more.</p></div>
<h2>Step 2: Text Styles</h2>
<p>For this particular document, I need at least three text styles: (1) one for the story title; (2) one for the first paragraph of the story (where we have the drop-cap); and (3) one for the rest of the story.</p>
<p>Because I might want to create a table of contents at some time, I will use “Heading 1” for the story title, and I&#8217;ll create two special styles for the rest of the document: “Story Text First Paragraph” and “Story Text Continuation Paragraph.” Remember, I want my story title (Heading 1) to be on the “Story Title” page, my first paragraph (Story Text First Paragraph) to be on a “Story First Page” styled page. So, when I am defining the styles for “Heading 1,” I set the next style to be “Story Text First Paragraph” and I select the options to insert a page break before, with the page style “Story Title” applied. Similarly, for “Story Text First Paragraph,” I set the next style to be “Story Text Continuation Paragraph” and I select the option to insert a page break before with the page style “Story First Page” applied.</p>
<div id="attachment_248" class="wp-caption alignnone" style="width: 310px"><a rel="attachment wp-att-248" href="http://news.mrdwab.com/2009-07-26/automation-with-openoffice-org-writer/screenshot-3/"><img class="size-medium wp-image-248" title="Automatic Page Breaks" src="http://news.mrdwab.com/wp-content/uploads/2009/07/screenshot.3-300x230.jpg" alt="Automatic page breaks are possible with different types of text. " width="300" height="230" /></a><p class="wp-caption-text">Automatic page breaks are possible with different types of text. Click on image to read more.</p></div>
<h2>Step 3: Start Typing</h2>
<p>No. Really, that&#8217;s pretty much it. You can now start typing your document and have it automatically insert blank pages where it should, start pages in the right place, format text correctly for you and so on. You can do some further embellishments, like having the headers on your page automatically change according to the story you&#8217;re on. This is simple to do since you are using a heading, but I think I&#8217;ll save that lesson for another time.</p>
<h2>Downloads</h2>
<p>Anyway, download these two files to see exactly which styles I applied and to view the resulting PDF.</p>
<ul>
<li>OpenOffice.org Writer File [<a href="http://news.mrdwab.com/wp-content/uploads/2009/07/OpenOffice.org-Automation.odt">Download</a>] [<a rel="attachment wp-att-249" href="http://news.mrdwab.com/2009-07-26/automation-with-openoffice-org-writer/openoffice-org-automation/">Read More</a>]</li>
<li>Final PDF output [<a href="http://news.mrdwab.com/wp-content/uploads/2009/07/OpenOffice.org-Automation.pdf">Download</a>] [<a rel="attachment wp-att-250" href="http://news.mrdwab.com/2009-07-26/automation-with-openoffice-org-writer/openoffice-org-automation-2/">Read More</a>]</li>
</ul>


<p>Related posts (possibly):<ol><li><a href='http://news.mrdwab.com/2009-09-21/drop-caps-with-openoffice-org-writer/' rel='bookmark' title='Permanent Link: Drop caps with OpenOffice.org Writer'>Drop caps with OpenOffice.org Writer</a> <small>Tutorial Level: Elementary From time to time, I like some...</small></li>
<li><a href='http://news.mrdwab.com/2009-11-19/making-an-a6-booklet-in-openoffice-org-the-easy-way/' rel='bookmark' title='Permanent Link: Making an A6 booklet in OpenOffice.org the easy way'>Making an A6 booklet in OpenOffice.org the easy way</a> <small>Tutorial level: Elementary I recently had to create an A6...</small></li>
<li><a href='http://news.mrdwab.com/2010-07-30/pivot-tables/' rel='bookmark' title='Permanent Link: Pivot Tables in Excel and OpenOffice.org Calc'>Pivot Tables in Excel and OpenOffice.org Calc</a> <small>One of the features I find useful in Excel is...</small></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://news.mrdwab.com/2009-07-26/automation-with-openoffice-org-writer/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
