Google Docs add on ideas


#1

Having created three add-ons for Google Docs to solve my own problems (Text Cleaner, Footnote Style, Link Style), I though it might be worth asking Paperpile users whether there is anything they wish they could do in Docs, including stuff to do with Paperpile.

If anyone proposes an idea that looks useful and achievable, I’m up for taking it on. One caveat though: the scripting language used for Google Docs add-ons is very limited (e.g. you cannot use page numbers, hence no unofficial TOC add-on was available – google had to create it). So things that might seem easy to an end user can be impossible to code (e.g. columns).

Anyway, if I get any ideas I’ll give some feedback on their feasibility.


#2

It would be great if Docs did reference fields, such as cross-refs to tables, figures and such. I notice that PP already manages this for refs. Nice if it can create lists of figures as so on as well. I appreciate this is probably a big ask.

Another nice thing more relevant to PP would be some ability to insert direct quotes from PDF articles PP has on board, perhaps that have been highlighted.

Finally, the ability for me to import my own PDF margin comments would be great since I am developing an alternative to the Cornell method of note taking which involves writing blocks of thesis in comments with papers. I would then somehow automagically pull them in to thesis in Docs, with citations.

Great products anyway, thanks!!
Craig


#3

I agree that an extension to manage cross-references to tables, figures, and chapter or section headings would be very useful, if that’s possible at all.


#4

Can you elaborate on what you mean by ‘manage’ cross-references. I don’t really use them much, so I need an idea of the kinds of tasks you would like to perform. cheers


#5

Sorry not to have explained this before. I meant that it would be very useful to be able to add a reference in the text to a table, a figure, or to another section of the document (i.e. just to say “Figure 1”, “Section 3.2”, or whatever), and to have those references update automatically if the table, figure or section number changes. As it stands, if I insert a table somewhere in the middle of a document and then renumber the subsequent tables, I have to manually change all the corresponding references in the text.

Again, I don’t know if this is possible with the Google Docs script - but it would certainly be useful if it is.


#6

This sounds like an interesting challenge actually. It’s not obviously impossible, as some ideas are (actually, I can think of some ways it could be done). I’ll have a think about how it might be implemented.


#7

Great! Let us know if you work out how to implement something like that.


#8

Will do. I might ask further questions about desirable functionality… and maybe recruit some testers here as well


#9

Add on is coming on quickly. Turns out it wasn’t that hard. Stay tuned.


#10

So an early version is now available here. It might have some bugs. I’m in the process of adding more options.


#11

Fantastic - this really works. Honestly I haven’t figured out how to use the four menu options (“set figure label to selection”, etc.). But manually inserting hyperlinks with the URLs you’ve specified works perfectly.

This will definitely make it much easier to manage figure and table references. Thanks!


#12

Hi Rob, I’m glad it’s working!

So the four options work as follows. If you want the figure labels to read Fig. 1, then just type that text anywhere in the document (and italicise it if you want), then select it as though you were going to format it (not including the number, but including the space). Then, in the menu, click the ‘set figure label to selection’ button, and the script will save your selection as the label format.

One caveat with this tool is that if you choose non-italic text for your figures, then it will remove italics from text that has been italicised for other reasons. So if there’s a figure reference in an italicised sentence, it will remove its italics. Not that likely a scenario though.


#13

Great, thanks, now I understand. So those functions are working too.

One point I’ve noticed is that if I use “set figure reference to selection” to set references to be in italics or having an initial capital letter, and then try to change back to non-italic text or all lower-case letters, then the second set of changes don’t get picked up. Another slightly strange example is that, if I define the figure reference format as "FIGURE ", and then afterwards redefine it as "figure ", what actually appears is "Figure ".

I guess it could be useful (e.g. for some journals) to be able to put figure and table references in bold text, in the same way that it’s now possible to put them in italics (but with the same caveat that will mean sometimes switching bold formatting off, rather than switching it on).


#14

You’re right, styling is still a bit odd. At the moment, the add-on is designed to detect capital letters in the text to be replaced (to avoid ending up with the wrong capitalisation). This is obviously interfering with the styling options. Styles turning off is vital. I thought it did that, but evidently not. This will be fixed soon.

For now, the best solution is to manually style your labels and references and only copy text if you want it. That is, when you insert a label or reference, make it italic or whatever rather than setting italics as the label/reference style. Cross Reference should preserve this formatting.

I’m not that far off from finishing the more advanced version with a sidebar to choose options, so I’ll leave this version up for now.


#15

Understood. Anyway, this functionality is great to have. Thanks very much for all your work on this.


#16

Your welcome! To be honest, it’s more of a hobby than work…


#17

The new version is now up which allows better configuration and avoids the problems listed above.

WARNING: the new version uses #figur instead of #figure for the labels (the final ‘e’ is missing).


#18

Yes, it works perfectly now. Amazing. Thank you again!