(Update: If you have Google Gears, temporarily disable it for Google Docs by removing docs.google.com from the list of allowed sites in Google Gears Settings.)
For example, to generate a table of contents from the headings of a document, just paste this code in the address bar:
javascript:mr("TocSettings");
You should see a dialog that lets you choose the numbering style.
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhnc1yiHHHD3Q6Kdjh7mFPBdOUE_eaOnPgzrdW6NAoc4eLiuhxnLNAjXRQ6B1SewXL7KSEFys5a2co99iZ7KuDm6UbUjhm31av8kUB8ILEPMwjcPUCiLXbMLuaGkXgWtPNu0g7Z/s640/google-docs-toc.png)
There's also an option to insert a HTML snippet without editing the HTML code. The dialog can be invoked by pasting in the address bar:
javascript:dy();
A word processor is more useful if you can easily access a dictionary, an encyclopedia and other sources of information. Select some text from a document and paste the following lines to show information from:
Encyclopædia Britannica
javascript:MC=NC();GC("encyclopedia");
Merriam-Webster's Online Dictionary
javascript:MC=NC();GC("dictionary");
Merriam-Webster's Online Thesaurus
javascript:MC=NC();GC("thesaurus");
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhzx0SKs62yUzOrR4sVk3Rus5FK4iJHJpztc7Cv7hZ1ElzhyJ0jGhlripCKhm3PtzIXNzYdzksgNpmhG0aboaA9amxg3sydv6sEEw-pUxDvDXGU6WqYry7TMwARy1F_bjCjlbeg/s640/google-docs-thesaurus.png)
Hopefully, these features will soon be added in the interface.
Not sure why, but when I paste one of those lines into the address bar and hit "enter", nothing happen, except that when I try the table of contents, it downloads the doc as a pdf. I'm using FF3.
ReplyDeleteOtherwise, it will be great when these features get into the interface. And, just curious: how did you figure this out? Do you have to actually read the code, or do you find documentation? Just wondering . . .
me2! ;)
ReplyDeleteYou'd need to sort thru the code.
ReplyDeleteto: Ephilei
ReplyDeleteHow to do it ?
I insert the code "[script type='text/javascipr']mr("TocSettings")[/script]" but it ignored
I first got the same "save as PDF" when pasting the code "mr("TocSettings");" into firebug...
ReplyDeleteThen I disabled gears (offline access to google docs) and tried again, and it worked.
(and "updating the table of contents" works too, when I launch the command again)
So I suppose this only works - at least for now - with the online version of google docs ; maybe that's why it doesn't appear in the menus ?
Yes, it works with disabled of gears.
ReplyDelete@Pascal:
ReplyDeleteThanks for noticing that. I updated the post.
I find mine does the same as Pascal's (in FF v3.0.1) but it works if i leave the ';void(0);' or just 'void(0);' off
ReplyDelete(i have gears, but don't have offline access enabled for docs)
@Ionut : thanks to you for your posts :-)
ReplyDeleteGenerating a Table of contents was something I really missed in Google Docs ; glad it's becoming possible !
(And looking forward to seeing it possible with gears activated too ! )
But what about footnotes?
ReplyDeleteI struggled for some time to get this to work until I discovered it only works if you have English US set"
ReplyDeleteHyperwords does similar things also without the need for Javascript codes and also has more options. I think it is a more effective tool than this one but if Google builds it in, then it will be good.
ReplyDeletefor footnotes i suggest http://writer.zoho.com
ReplyDelete