GithubHelp home page GithubHelp logo

dcarastan / autonumberheadings Goto Github PK

View Code? Open in Web Editor NEW

This project forked from lpanebr/autonumberheadings

0.0 0.0 0.0 156 KB

Auto Number Headings for Google Drive Documents

License: MIT License

JavaScript 64.00% HTML 36.00%

autonumberheadings's Introduction

Auto Number Headings

Use Google Apps Script to Auto Number Headings in a Google Document.

This script¹ lets you easily add or remove numbers to your Google Document Headings and also get them in plain text.

before-after

Features

Current functionalities are:

  • Menu and Addon UIs.
  • Add Headings Numbers
  • Remove Heading Numbers
  • Promote Headings (H1➙Title ... H6➙H5)
  • Demote Headings (Title➙Title, H1➙H2 ... H6➙Normal)
  • Output processed Headings as text only
  • Add/Remove and Promote/Demote only some heading levels (1-6)

How to use

After you install the script, the easiest way to Add/Remove is though the Lord of The Rings shortcut Alt+/ that opens the Help menu with the cursor focused on the find shortcut field. From there you just need to type head to get the basic features:

shortcut

Or you can use mouse:

menu

Or you can use the Addon sidebar, which also lets you access the 'interactive' version and outputs the plain text headings:

addon

Bugs or missing features?

Feel free to add issues or send pull requests! 😉

How to install

Note: You'll only need the files autonumber.gs and sidebar.html. The code.gs is here only for historic reasons.

  1. Open your document
  2. Extensions > Apps Script
  3. Give the project a name and save (this name is how it will appear on the Addons submenu)
  4. Paste the code from the autonumber.gs file over whatever code your file has
  5. Click the ➕ sign and create a HTML file named sidebar
  6. Paste the code from the sidebar.html file over the default file content
  7. Change back to the autonumber.gs file
  8. Click on the Run button on the menu bar to execute the onOpen function and authorize the script for the first time
  9. Change to your Document and reload it.

If all went well you'll see a Heading Tools menu and also the entry in the Extensions menu.

¹ Modified version of this script.

autonumberheadings's People

Contributors

draxil avatar lpanebr avatar pingram3030 avatar rynge avatar tadeaspetak avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.