141

With the new Add-Ons for Google Drive, you can get code highlighting with the Code Blocks add-on. After installing the add-on, you can access it by selecting the code you want to format, go to _Add-ons → Code Blocks → Start: This pops up a sidebar where you can select the programming language and a theme: After clicking Format, the result looks ...


64

As Lipis poins out, you still cannot create your own styles. So, you are left to repurpose an existing one. The downside to using Heading is this will result in "code" in my Table of Contents (TOC). :/ I found that using Title and Subtitle styles for code prevents those styles from showing in TOC.


58

With the new Add-Ons for Google Drive, you can get code highlighting with the Code Pretty add-on. After installing it, you can access the add-on by clicking Add-ons → Code Pretty, → Format Selection: This results in:


49

A lot of the solutions don't work inline. This is a cleaned-up solution offered by @AlekseyBykov using Google App Scripts to add a custom menu action: Create a new script (Tools > Script Editor) Copy the following code into the editor: // Add new menu item function onOpen() { DocumentApp.getUi() .createMenu('Styles') .addItem('Format Code', '...


48

I'm honestly not sure when this was updated, but centering a table directly appears to be possible now. Simply right-click on the table and go to "Table Properties", "Table Alignment", "Center". Click OK.


47

You could send it as code using three back-ticks, similar to formatting code here on StackExchange: *word* = word ```*word*``` = *word* (Note: it will use a monospace font).


24

Guide to Adding Custom Number Formats Click on Format Go to Number > More Formats > Custom number formats Paste custom number format (see below) Click Apply . . Different Custom Number Formats Output: ###-###-#### Syntax: ##########000"-"000"-"0000 Output: (###) ###-#### Syntax: ##########"("000") "000"-"0000 Output: 1-###-###-#### Syntax: #########...


23

You can add-on Code Block for Google Docs. 1*- Google Docs --> Add-ons Tab --> 2*- Get Add-ons ... --> Search For: 'Code Blocks' 3*- Then you go to Add-ons --> Code Block --> Start 4*- Select Theme(50+)


22

You can reduce the gap at the top of a table by placing the cursor above the table, and reducing the font size. I can't seem to reduce it below 6 points, and even this required me to type the number into the "Font size" box. However, it does at least move the table up a bit. I had to do the same thing at the bottom of my table. If anybody wants to log this ...


16

The gratis Google Docs extension Paragraph Styles+ allows to create custom paragraph styles (plus decimal system outline numbering for headings and a table of contents with page numbering). I just tested it, and here's my first impression: Good start. For small-ish documents, it should be good to use :-) However it runs quite slow, even though recent ...


15

To quote, you can also select the text and use the keyboard shortcut Ctrl+Shift+9 on Windows and Cmd+Shift+9 on OS X. This shortcut works only in rich text mode.


15

May be an old question but its still being looked up - so here is the workaround: Importrange as we all know will only import raw un formatted data into a new googlesheet. As a workaround to avoid the hassle of redoing all the conditional formatting rules on the new import data sheet, do the following: - on the original sheet which you plan to import data ...


13

Right now you can fully hide the line with font size 1 and custom line spacing .06, I visually verified that saving as PDF shows no whitespace at the top. Also, in regards to not being able to insert text before the table, it is possible to get back to the invisible line using the left arrow key while inside the table.


13

You can install the Markdown Here extension for Chrome and write the code in markdown format in the email compose window. You can either write the code with a four-space indent: this is some code Or with the triple backtick format: ``` this is some code ``` Then, to turn the markdown code into a properly formatted email, activate the extension ...


13

Conditional formatting: If checkbox ticked in cell A1, change color/strikethrough of cells from B1-F1. Insert a checkbox from "Insert" tab to A1. Select the cells (B1-F1) that needs to be of different color/strikethrough when a checkbox in A1 is ticked/ selected. From tab above, "Format" > "Conditional formatting". In 'Single color' tab, "Apply to ...


11

The workaround I've come to rely on is the Copy/Paste Format feature shortcut. As the format "clipboard" is separate from the text clipboard, it is preserved for as long as you have the document open. To use: find a section you have formatted as "code", e.g. Consolas 9pt. Use option + command + c or Ctrl + Alt + c or use the Paint Format icon Wherever ...


11

It does not appear to be possible to update the default style for links in your Google doc. This is because Google docs does not treat links as styles. This is understandable, as a link might be applied within text formatted with any other style (e.g., Heading 1, normal text, etc.) If you try highlighting a link and checking the context menu, note that the ...


11

For Google Spreadsheets, it is possible by writing a script: function copyValuesAndFormatting() { var sheet = SpreadsheetApp.getActiveSpreadsheet(); var fromRange = sheet.getRange("A2:A"); var toRange = sheet.getRange("B2:B"); var values = fromRange.getValues(); var fontColors = fromRange.getFontColors(); var backgrounds = fromRange....


10

It is true that the notation for the binomial coefficient isn't included in the menu, but you can still use it by using the automatic shortcuts. When in the equation editor, type \choose then press space That's it!


10

I just checked and currently it is not possible to do that, on the table itself. There's however a "hack" option available: add a table in a table, see screenshot. Screenshot Example See example doc I've created: table in a table Note If you set the color of the grid lines to be white, than it will fade away. It will also give you flexibility to ...


10

Excerpt from the official WhatsApp FAQ: Note: There is no option to disable this feature. See https://www.whatsapp.com/faq/en/general/26000002


10

I couldn't find an absolute setting to just disable this function. However, you can disable the function from continuing to create links or start creating links in a new document simply by selecting all the cells (Ctrl+A), right-click and select "Unlink" from the options menu. As soon as you do this, Google Sheets saves the change and no hyperlinks will ...


9

I just published a free add-on for precisely this task. It's called Link Style, and is available here.


9

I use this formula to convert the date time values IFTTT spits out to a useful format: =VALUE(SUBSTITUTE(A1, " at ", " ")) Where A1 is the cell containing the date string This gives you a decimal number that you can format as "Date Time".


9

Headers and Footers show up in the Print dialog box. Click print and look for "Headers & footers" toward the bottom of the right panel. You can select page numbers, Workbook title, Sheet name and more as well as "EDIT CUSTOM FIELDS"


9

Yes you can, but I don't know how to do it, at least not directly. However, it is possible. If you copy in text that's already small caps (e.g. from wikipedia), Docs will preserve the setting. You can then set one of the styles (e.g. Heading n) to this copied text and use it to format other bits of your document as needed. Changing the font, size, and ...


8

I realize this question is nearly 5-years-old, but since the problem still persists in Google Docs, I'll share the solution that works for me. Simply, use the “print” feature within the Chrome browser. Rather than exporting to a PDF within Google Docs, click on the menu button in Chrome and select print. Change the destination to “save as PDF.” Formatting ...


8

I fetched my twitter profile with the Twitter API. Here is how it looks - ... "screen_name":"iAmBibhas","location":"Bangalore, India","description":"Hungry and lazy developer.\r\nCurrently building @lxidd. ","url":"http:\/\/bibhas.in", ... As you can see, there is \r\n just before Currently building @lxidd. That means the line breaks are being saved in ...


8

Working on a Google doc, there is a header titled "Add-ons" - click on that. Then select "Get Add-ons". I did a search on small cap and 'Capitals' came up. Download the program. Highlight the text or group of text you'd like to appear in small caps, go to the "Add-ons" header, select 'Capitals' and "Add small caps". Hope this works for you too!


Only top voted, non community-wiki answers of a minimum length are eligible