<?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>Static in the Ether &#187; LyX</title>
	<atom:link href="http://lair.moria.org/blog/archives/tag/lyx/feed" rel="self" type="application/rss+xml" />
	<link>http://lair.moria.org/blog</link>
	<description>Unix, Information Security &#38; Systems Administration</description>
	<lastBuildDate>Wed, 11 Nov 2009 09:14:29 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>BibTeX frequency table</title>
		<link>http://lair.moria.org/blog/archives/36</link>
		<comments>http://lair.moria.org/blog/archives/36#comments</comments>
		<pubDate>Wed, 04 Jun 2008 04:39:23 +0000</pubDate>
		<dc:creator>Barry Irwin</dc:creator>
				<category><![CDATA[LyX]]></category>
		<category><![CDATA[PhD]]></category>
		<category><![CDATA[BibTex]]></category>
		<category><![CDATA[Scripts]]></category>

		<guid isPermaLink="false">http://lair.moria.org/blog/?p=36</guid>
		<description><![CDATA[Something I usually ask my students to do us to draw up a frequency table of their use of references in their Theses. This is useful to see if one is over-citing particular sources, or disregarding sources that are more significant. Up until now most have gone the paper and pencil route. Fred Otten came [...]]]></description>
			<content:encoded><![CDATA[<p>Something I usually ask my students to do us to draw up a  frequency table of their use of references in their Theses.  This is useful to see if one is over-citing particular sources, or disregarding sources that are more significant.  Up until now most have gone the paper and pencil route.</p>
<p><a href="http://www.facebook.com/people/Fred_Otten/764675017">Fred Otten</a> came up with the following script using good old sed, awk and some plumbing, that draws up a nice list based on an input <a href="http://www.lyx.org/" target="_blank"><acronym title="LyX – The Document Processor">Lyx</acronym></a> file.</p>
<blockquote><p><code><br />
#!/bin/sh<br />
cat $1 | grep key\ \" |\<br />
awk '{ print  substr($2,2,length($2)-2)}' | \<br />
sed -e s/,/\\n/g | \<br />
awk 'BEGIN {i=0}             \<br />
  { if (temp[$1]) { temp[$1]=temp[$1]+1 } \<br />
else { temp[$1]=1; tmp[i]=$1; i++; }; }  \<br />
END { for (j=0; j { print tmp[j] " " temp[tmp[j]] } }' | sort<br />
</code></p></blockquote>
<p>This gives a two column listing of the citation keys and their frequency count.  This of course can be extended using further awk statements to transpose the columns, or sort by frequency, rather than citation key.</p>
]]></content:encoded>
			<wfw:commentRss>http://lair.moria.org/blog/archives/36/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>
