<?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>pro-web.at &#187; Google Docs</title>
	<atom:link href="http://pro-web.at/archives/tag/google-docs/feed" rel="self" type="application/rss+xml" />
	<link>http://pro-web.at</link>
	<description></description>
	<lastBuildDate>Sat, 06 Mar 2010 13:40:33 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>CSS Counter Test / Auto numbering your google docs headlines with CSS</title>
		<link>http://pro-web.at/archives/css-counter-test-auto-numbering-your-google-docs-headlines-with-css</link>
		<comments>http://pro-web.at/archives/css-counter-test-auto-numbering-your-google-docs-headlines-with-css#comments</comments>
		<pubDate>Mon, 20 Jul 2009 11:25:47 +0000</pubDate>
		<dc:creator>Daniel Prieler</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[Google Docs]]></category>

		<guid isPermaLink="false">http://pro-web.at/?p=143</guid>
		<description><![CDATA[In the firstplace I did the numbering of the google-docs headlines with css. But the numbering in the google-docs always got messed up after some time, which was caused by:
a) The behaviour of google-docs: It sometimes wraps the headlines in an extra div (which i consider as a bug)
b) Browser limitations of css numbering, if [...]


Related posts:<ol><li><a href='http://pro-web.at/archives/auto-numbering-your-google-docs-headings' rel='bookmark' title='Permanent Link: Auto numbering your google docs headings / headlines'>Auto numbering your google docs headings / headlines</a></li></ol>]]></description>
			<content:encoded><![CDATA[<p>In the firstplace I did the numbering of the google-docs headlines with css. But the numbering in the google-docs always got messed up after some time, which was caused by:<br />
a) The behaviour of google-docs: It sometimes wraps the headlines in an extra div (which i consider as a bug)<br />
b) Browser limitations of css numbering, if the numbered elements are not all on the same dom level (because of the extra google-docs div)<br />
<span id="more-143"></span></p>
<h2>Test-Case</h2>
<p>I wrote up some test-cases with diffeerent order of h1/h2/div elements.<br />
As you can see (at least in firefox 3 and google chrome), the numbering does not count up for sub-headlines<br />
(Note: For my post here in wordpress i changed &lt;h1&gt; to &lt;div class=&quot;head1&quot;&gt;)</p>
<style>
.counter-test {
	counter-reset: counter-h1;
}
.counter-test .head1, .counter-test .head2 {
	font-size: 12px;
	padding: 0;
	margin: 0;
}
.counter-test .head1 {
	counter-increment: counter-h1;
	counter-reset: counter-h2;
}
.counter-test .head2 {
	counter-increment: counter-h2;
}
.counter-test .head1:before {
	content: counter(counter-h1) ". ";
	color: #777;
}
.counter-test .head2:before {
	content: counter(counter-h1) "." counter(counter-h2) ". ";
	color: #777;
}</p>
</style>
<p>all counters on one level</p>
<div class="counter-test">
<div class="head1">h1</div>
<div class="head2">h2</div>
<div class="head2">h2</div>
<div class="head1">h1</div>
<div class="head2">h2</div>
<div class="head2">h2</div>
</div>
<p>all counters wrapped in a separate div</p>
<div class="counter-test">
<div>
<div class="head1">h1</div>
</div>
<div>
<div class="head2">h2</div>
</div>
<div>
<div class="head2">h2</div>
</div>
<div>
<div class="head1">h1</div>
</div>
<div>
<div class="head2">h2</div>
</div>
<div>
<div class="head2">h2</div>
</div>
</div>
<p>sub-counters wrapped in a sub-div</p>
<div class="counter-test">
<div>
<div class="head1">h1</div>
</div>
<div>
<div class="head2">h2</div>
<div class="head2">h2</div>
<div>
<div class="head2">h2</div>
</div>
<div>
<div class="head2">h2</div>
</div></div>
<div>
<div class="head1">h1</div>
</div>
<div>
<div class="head2">h2</div>
<div class="head2">h2</div>
</p></div>
<div>
<div class="head2">h2</div>
<div class="head2">h2</div>
</p></div>
</div>
<p>only h2-counters wrappwed</p>
<div class="counter-test">
<div class="head1">h1</div>
<div>
<div class="head2">h2</div>
</div>
<div>
<div class="head2">h2</div>
</div>
<div class="head1">h1</div>
<div>
<div class="head2">h2</div>
</div>
<div>
<div class="head2">h2</div>
</div>
</div>
<h2>My current solution</h2>
<p>If the numbering gets messed up i start firebug and remove the surrounding div of the wrong headline. Maybe i will create a bookmarklet for this task when i get too annoyed at working with google-docs again :)</p>
<h2>css-Stylesheet</h2>
<p>And here&#8217;s my last stylesheet, which i add to all my google-docs.</p>
<p>You can preview a published document <a href="http://docs.google.com/View?id=dckpfphk_35f4xpz7dr" target="_blank">here</a></p>

<div class="wp_syntax"><div class="code"><pre class="css" style="font-family:monospace;"><span style="color: #00AA00;">*</span> <span style="color: #00AA00;">&#123;</span>
 <span style="color: #000000; font-weight: bold;">line-height</span><span style="color: #00AA00;">:</span> <span style="color: #933;"><span style="color: #cc66cc;">160</span>%</span><span style="color: #00AA00;">;</span>
 <span style="color: #000000; font-weight: bold;">font-size</span><span style="color: #00AA00;">:</span> <span style="color: #933;">10pt</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
&nbsp;
<span style="color: #808080; font-style: italic;">/** HEADLINES **/</span>
h1 <span style="color: #00AA00;">&#123;</span>
 <span style="color: #000000; font-weight: bold;">font-size</span><span style="color: #00AA00;">:</span> <span style="color: #933;">20pt</span><span style="color: #00AA00;">;</span>
 <span style="color: #000000; font-weight: bold;">counter-increment</span><span style="color: #00AA00;">:</span> counter-h1<span style="color: #00AA00;">;</span>
 <span style="color: #000000; font-weight: bold;">counter-reset</span><span style="color: #00AA00;">:</span> counter-h2<span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
h2 <span style="color: #00AA00;">&#123;</span>
 <span style="color: #000000; font-weight: bold;">font-size</span><span style="color: #00AA00;">:</span> <span style="color: #933;">17pt</span><span style="color: #00AA00;">;</span>
 <span style="color: #000000; font-weight: bold;">counter-increment</span><span style="color: #00AA00;">:</span> counter-h2<span style="color: #00AA00;">;</span>
 <span style="color: #000000; font-weight: bold;">counter-reset</span><span style="color: #00AA00;">:</span> counter-h3<span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
h3 <span style="color: #00AA00;">&#123;</span>
 <span style="color: #000000; font-weight: bold;">font-size</span><span style="color: #00AA00;">:</span> <span style="color: #933;">14pt</span><span style="color: #00AA00;">;</span>
 <span style="color: #000000; font-weight: bold;">counter-increment</span><span style="color: #00AA00;">:</span> counter-h3<span style="color: #00AA00;">;</span>
 <span style="color: #000000; font-weight: bold;">counter-reset</span><span style="color: #00AA00;">:</span> counter-h4<span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
h4 <span style="color: #00AA00;">&#123;</span>
 <span style="color: #000000; font-weight: bold;">font-size</span><span style="color: #00AA00;">:</span> <span style="color: #933;">11pt</span><span style="color: #00AA00;">;</span>
 <span style="color: #000000; font-weight: bold;">font-weight</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">bold</span><span style="color: #00AA00;">;</span>
 <span style="color: #000000; font-weight: bold;">counter-increment</span><span style="color: #00AA00;">:</span> counter-h4<span style="color: #00AA00;">;</span>
 <span style="color: #000000; font-weight: bold;">counter-reset</span><span style="color: #00AA00;">:</span> counter-h5<span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
h5 <span style="color: #00AA00;">&#123;</span>
 <span style="color: #000000; font-weight: bold;">font-size</span><span style="color: #00AA00;">:</span> <span style="color: #933;">11pt</span><span style="color: #00AA00;">;</span>
 <span style="color: #000000; font-weight: bold;">font-weight</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">bold</span><span style="color: #00AA00;">;</span>
 <span style="color: #000000; font-weight: bold;">counter-increment</span><span style="color: #00AA00;">:</span> counter-h5<span style="color: #00AA00;">;</span>
 <span style="color: #000000; font-weight: bold;">counter-reset</span><span style="color: #00AA00;">:</span> counter-h6<span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
h6 <span style="color: #00AA00;">&#123;</span>
 <span style="color: #000000; font-weight: bold;">font-size</span><span style="color: #00AA00;">:</span> <span style="color: #933;">11pt</span><span style="color: #00AA00;">;</span>
 <span style="color: #000000; font-weight: bold;">font-weight</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">bold</span><span style="color: #00AA00;">;</span>
 <span style="color: #000000; font-weight: bold;">counter-increment</span><span style="color: #00AA00;">:</span> counter-h6<span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
h1<span style="color: #3333ff;">:before </span><span style="color: #00AA00;">&#123;</span>
 <span style="color: #000000; font-weight: bold;">content</span><span style="color: #00AA00;">:</span> counter<span style="color: #00AA00;">&#40;</span>counter-h1<span style="color: #00AA00;">&#41;</span> <span style="color: #ff0000;">&quot;. &quot;</span><span style="color: #00AA00;">;</span>
 <span style="color: #000000; font-weight: bold;">color</span><span style="color: #00AA00;">:</span> <span style="color: #cc00cc;">#777</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
h2<span style="color: #3333ff;">:before </span><span style="color: #00AA00;">&#123;</span>
 <span style="color: #000000; font-weight: bold;">content</span><span style="color: #00AA00;">:</span> counter<span style="color: #00AA00;">&#40;</span>counter-h1<span style="color: #00AA00;">&#41;</span> <span style="color: #ff0000;">&quot;.&quot;</span> counter<span style="color: #00AA00;">&#40;</span>counter-h2<span style="color: #00AA00;">&#41;</span> <span style="color: #ff0000;">&quot;. &quot;</span><span style="color: #00AA00;">;</span>
 <span style="color: #000000; font-weight: bold;">color</span><span style="color: #00AA00;">:</span> <span style="color: #cc00cc;">#777</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
h3<span style="color: #3333ff;">:before </span><span style="color: #00AA00;">&#123;</span>
 <span style="color: #000000; font-weight: bold;">content</span><span style="color: #00AA00;">:</span> counter<span style="color: #00AA00;">&#40;</span>counter-h1<span style="color: #00AA00;">&#41;</span> <span style="color: #ff0000;">&quot;.&quot;</span> counter<span style="color: #00AA00;">&#40;</span>counter-h2<span style="color: #00AA00;">&#41;</span> <span style="color: #ff0000;">&quot;.&quot;</span> counter<span style="color: #00AA00;">&#40;</span>counter-h3<span style="color: #00AA00;">&#41;</span> <span style="color: #ff0000;">&quot;. &quot;</span><span style="color: #00AA00;">;</span>
 <span style="color: #000000; font-weight: bold;">color</span><span style="color: #00AA00;">:</span> <span style="color: #cc00cc;">#777</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
h4<span style="color: #3333ff;">:before </span><span style="color: #00AA00;">&#123;</span>
 <span style="color: #000000; font-weight: bold;">content</span><span style="color: #00AA00;">:</span> counter<span style="color: #00AA00;">&#40;</span>counter-h1<span style="color: #00AA00;">&#41;</span> <span style="color: #ff0000;">&quot;.&quot;</span> counter<span style="color: #00AA00;">&#40;</span>counter-h2<span style="color: #00AA00;">&#41;</span> <span style="color: #ff0000;">&quot;.&quot;</span> counter<span style="color: #00AA00;">&#40;</span>counter-h3<span style="color: #00AA00;">&#41;</span> <span style="color: #ff0000;">&quot;.&quot;</span> counter<span style="color: #00AA00;">&#40;</span>counter-h4<span style="color: #00AA00;">&#41;</span> <span style="color: #ff0000;">&quot;. &quot;</span><span style="color: #00AA00;">;</span>
 <span style="color: #000000; font-weight: bold;">color</span><span style="color: #00AA00;">:</span> <span style="color: #cc00cc;">#777</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
h5<span style="color: #3333ff;">:before </span><span style="color: #00AA00;">&#123;</span>
 <span style="color: #000000; font-weight: bold;">content</span><span style="color: #00AA00;">:</span> counter<span style="color: #00AA00;">&#40;</span>counter-h1<span style="color: #00AA00;">&#41;</span> <span style="color: #ff0000;">&quot;.&quot;</span> counter<span style="color: #00AA00;">&#40;</span>counter-h2<span style="color: #00AA00;">&#41;</span> <span style="color: #ff0000;">&quot;.&quot;</span> counter<span style="color: #00AA00;">&#40;</span>counter-h3<span style="color: #00AA00;">&#41;</span> <span style="color: #ff0000;">&quot;.&quot;</span> counter<span style="color: #00AA00;">&#40;</span>counter-h4<span style="color: #00AA00;">&#41;</span> <span style="color: #ff0000;">&quot;.&quot;</span> counter<span style="color: #00AA00;">&#40;</span>counter-h5<span style="color: #00AA00;">&#41;</span> <span style="color: #ff0000;">&quot;. &quot;</span><span style="color: #00AA00;">;</span>
 <span style="color: #000000; font-weight: bold;">color</span><span style="color: #00AA00;">:</span> <span style="color: #cc00cc;">#777</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
h6<span style="color: #3333ff;">:before </span><span style="color: #00AA00;">&#123;</span>
 <span style="color: #000000; font-weight: bold;">content</span><span style="color: #00AA00;">:</span> counter<span style="color: #00AA00;">&#40;</span>counter-h1<span style="color: #00AA00;">&#41;</span> <span style="color: #ff0000;">&quot;.&quot;</span> counter<span style="color: #00AA00;">&#40;</span>counter-h2<span style="color: #00AA00;">&#41;</span> <span style="color: #ff0000;">&quot;.&quot;</span> counter<span style="color: #00AA00;">&#40;</span>counter-h3<span style="color: #00AA00;">&#41;</span> <span style="color: #ff0000;">&quot;.&quot;</span> counter<span style="color: #00AA00;">&#40;</span>counter-h4<span style="color: #00AA00;">&#41;</span> <span style="color: #ff0000;">&quot;.&quot;</span> counter<span style="color: #00AA00;">&#40;</span>counter-h5<span style="color: #00AA00;">&#41;</span> <span style="color: #ff0000;">&quot;.&quot;</span> counter<span style="color: #00AA00;">&#40;</span>counter-h6<span style="color: #00AA00;">&#41;</span> <span style="color: #ff0000;">&quot;. &quot;</span><span style="color: #00AA00;">;</span>
 <span style="color: #000000; font-weight: bold;">color</span><span style="color: #00AA00;">:</span> <span style="color: #cc00cc;">#777</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
&nbsp;
<span style="color: #808080; font-style: italic;">/** TEXT **/</span>
p <span style="color: #00AA00;">&#123;</span>
 <span style="color: #000000; font-weight: bold;">padding</span><span style="color: #00AA00;">:</span> <span style="color: #933;">5pt</span> <span style="color: #cc66cc;">0</span> <span style="color: #933;">10pt</span> <span style="color: #cc66cc;">0</span><span style="color: #00AA00;">;</span>
 <span style="color: #000000; font-weight: bold;">text-align</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">justify</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
li <span style="color: #00AA00;">&#123;</span>
 <span style="color: #000000; font-weight: bold;">text-align</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">justify</span><span style="color: #00AA00;">;</span>
 <span style="color: #000000; font-weight: bold;">padding-bottom</span><span style="color: #00AA00;">:</span> <span style="color: #933;">5pt</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
li p <span style="color: #00AA00;">&#123;</span>
 <span style="color: #000000; font-weight: bold;">padding</span><span style="color: #00AA00;">:</span> <span style="color: #933;">5pt</span> <span style="color: #cc66cc;">0</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
li p<span style="color: #3333ff;">:first-child </span><span style="color: #00AA00;">&#123;</span>
 <span style="color: #000000; font-weight: bold;">padding-top</span><span style="color: #00AA00;">:</span> <span style="color: #cc66cc;">0</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
li p<span style="color: #3333ff;">:last-child </span><span style="color: #00AA00;">&#123;</span>
 <span style="color: #000000; font-weight: bold;">padding-bottom</span><span style="color: #00AA00;">:</span> <span style="color: #cc66cc;">0</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span></pre></div></div>



<p>Related posts:<ol><li><a href='http://pro-web.at/archives/auto-numbering-your-google-docs-headings' rel='bookmark' title='Permanent Link: Auto numbering your google docs headings / headlines'>Auto numbering your google docs headings / headlines</a></li></ol></p>]]></content:encoded>
			<wfw:commentRss>http://pro-web.at/archives/css-counter-test-auto-numbering-your-google-docs-headlines-with-css/feed</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>Auto numbering your google docs headings / headlines</title>
		<link>http://pro-web.at/archives/auto-numbering-your-google-docs-headings</link>
		<comments>http://pro-web.at/archives/auto-numbering-your-google-docs-headings#comments</comments>
		<pubDate>Fri, 03 Apr 2009 08:48:45 +0000</pubDate>
		<dc:creator>Daniel Prieler</dc:creator>
				<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[Google Docs]]></category>

		<guid isPermaLink="false">http://v2.pro-web.at/?p=74</guid>
		<description><![CDATA[Google-docs-writer is great for collaborating, but it lacks of many features.
At least i created a small bookmarklet to add numbering to all headlines in your document.

The numbering is done in the style of:
1. headline
1.1. subheadline 1
1.2. subheadline 2
&#8230;
How to use / install
Just drag the link below to your bookmarks-bar, open your google document and press [...]


Related posts:<ol><li><a href='http://pro-web.at/archives/css-counter-test-auto-numbering-your-google-docs-headlines-with-css' rel='bookmark' title='Permanent Link: CSS Counter Test / Auto numbering your google docs headlines with CSS'>CSS Counter Test / Auto numbering your google docs headlines with CSS</a></li></ol>]]></description>
			<content:encoded><![CDATA[<p>Google-docs-writer is great for collaborating, but it lacks of many features.<br />
At least i created a small bookmarklet to add numbering to all headlines in your document.<br />
<span id="more-74"></span><br />
The numbering is done in the style of:</p>
<p>1. headline<br />
1.1. subheadline 1<br />
1.2. subheadline 2<br />
&#8230;</p>
<h2>How to use / install</h2>
<p>Just drag the link below to your bookmarks-bar, open your google document and press the &#8220;gDocs: headline numbering&#8221; button.<br />
<a title="blub" href="javascript:(function(){var doc=window.frames['wys_frame'].document;var elements=doc.getElementsByTagName('*');var numbers=[0,0,0,0,0,0,0];for(var i in elements){var e=elements[i];if(!e||!e.tagName||!e.tagName.match(/^H([1-6])$/)){continue}var eLevel=RegExp.$1;var txt='';numbers[eLevel]++;for(var l=1;l<=6;l++){if(l<=eLevel){txt+=numbers[l]+'.'}else{numbers[l]=0}}e.textContent=txt+' '+e.textContent.replace(/^[0-9\.\s]+/,'')}})();">gDocs: headline numbering</a></p>
<h2>Source</h2>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;"><span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
&nbsp;
<span style="color: #003366; font-weight: bold;">var</span> doc <span style="color: #339933;">=</span> window.<span style="color: #660066;">frames</span><span style="color: #009900;">&#91;</span><span style="color: #3366CC;">'wys_frame'</span><span style="color: #009900;">&#93;</span>.<span style="color: #660066;">document</span><span style="color: #339933;">;</span>
<span style="color: #003366; font-weight: bold;">var</span> elements <span style="color: #339933;">=</span> doc.<span style="color: #660066;">getElementsByTagName</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'*'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #003366; font-weight: bold;">var</span> numbers <span style="color: #339933;">=</span> <span style="color: #009900;">&#91;</span><span style="color: #CC0000;">0</span><span style="color: #339933;">,</span><span style="color: #CC0000;">0</span><span style="color: #339933;">,</span><span style="color: #CC0000;">0</span><span style="color: #339933;">,</span><span style="color: #CC0000;">0</span><span style="color: #339933;">,</span><span style="color: #CC0000;">0</span><span style="color: #339933;">,</span><span style="color: #CC0000;">0</span><span style="color: #339933;">,</span><span style="color: #CC0000;">0</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
<span style="color: #000066; font-weight: bold;">for</span> <span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">var</span> i <span style="color: #000066; font-weight: bold;">in</span> elements<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
    <span style="color: #003366; font-weight: bold;">var</span> e <span style="color: #339933;">=</span> elements<span style="color: #009900;">&#91;</span>i<span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
    <span style="color: #000066; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #339933;">!</span>e <span style="color: #339933;">||</span> <span style="color: #339933;">!</span>e.<span style="color: #660066;">tagName</span> <span style="color: #339933;">||</span> <span style="color: #339933;">!</span>e.<span style="color: #660066;">tagName</span>.<span style="color: #660066;">match</span><span style="color: #009900;">&#40;</span><span style="color: #009966; font-style: italic;">/^H([1-6])$/</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
        <span style="color: #000066; font-weight: bold;">continue</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span>
&nbsp;
    <span style="color: #003366; font-weight: bold;">var</span> eLevel <span style="color: #339933;">=</span> RegExp.$<span style="color: #CC0000;">1</span><span style="color: #339933;">;</span>
    <span style="color: #003366; font-weight: bold;">var</span> txt <span style="color: #339933;">=</span> <span style="color: #3366CC;">''</span><span style="color: #339933;">;</span>
&nbsp;
    numbers<span style="color: #009900;">&#91;</span>eLevel<span style="color: #009900;">&#93;</span><span style="color: #339933;">++;</span>
    <span style="color: #000066; font-weight: bold;">for</span> <span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">var</span> l <span style="color: #339933;">=</span> <span style="color: #CC0000;">1</span><span style="color: #339933;">;</span> l<span style="color: #339933;">&lt;=</span><span style="color: #CC0000;">6</span><span style="color: #339933;">;</span> l<span style="color: #339933;">++</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
        <span style="color: #000066; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span>l <span style="color: #339933;">&lt;=</span> eLevel<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
            txt <span style="color: #339933;">+=</span> numbers<span style="color: #009900;">&#91;</span>l<span style="color: #009900;">&#93;</span><span style="color: #339933;">+</span><span style="color: #3366CC;">'.'</span><span style="color: #339933;">;</span>
        <span style="color: #009900;">&#125;</span> <span style="color: #000066; font-weight: bold;">else</span> <span style="color: #009900;">&#123;</span>
            numbers<span style="color: #009900;">&#91;</span>l<span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #CC0000;">0</span><span style="color: #339933;">;</span>
        <span style="color: #009900;">&#125;</span>
    <span style="color: #009900;">&#125;</span>
&nbsp;
    e.<span style="color: #660066;">textContent</span> <span style="color: #339933;">=</span> txt<span style="color: #339933;">+</span><span style="color: #3366CC;">' '</span><span style="color: #339933;">+</span>e.<span style="color: #660066;">textContent</span>.<span style="color: #660066;">replace</span><span style="color: #009900;">&#40;</span><span style="color: #009966; font-style: italic;">/^[0-9\.\s]+/</span><span style="color: #339933;">,</span> <span style="color: #3366CC;">''</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<h2>Updates</h2>
<ul>
<li>because of changes in google-docs i modified how the document is accessed</li>
</ul>


<p>Related posts:<ol><li><a href='http://pro-web.at/archives/css-counter-test-auto-numbering-your-google-docs-headlines-with-css' rel='bookmark' title='Permanent Link: CSS Counter Test / Auto numbering your google docs headlines with CSS'>CSS Counter Test / Auto numbering your google docs headlines with CSS</a></li></ol></p>]]></content:encoded>
			<wfw:commentRss>http://pro-web.at/archives/auto-numbering-your-google-docs-headings/feed</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
	</channel>
</rss>
