Google Docs interprets typed Markdown commands for simpler writing


Type text in Markdown in Google Docs for fast, platform-independent formatting of styles (bold, italic), headers, links, lists and more.

Screenshot of two Google Docs. Left one, titled Type this, with command that include *italic*, **bold**, ***bold and italic***, along with headers, and other formatting described in the article. The left screenshot shows the resulting italic, bold, and bold and italic text, along with 6 levels of document headers, a link and markdown list options.
Enable Markdown recognition in Google Docs so that when you type text (as shown on the left), the system automatically transforms it into formatted text (as shown on the right).

Many people who write content to be published on the web use Markdown, since Markdown allows you to indicate formatting in human-readable plain text. In late March 2022, Google added the ability to recognize text typed in Markdown format and turn it into appropriately formatted content in a Google Doc. You may add italics, bold, strikethrough text, links, headers and lists all with a few taps of Markdown-style keys.

SEE: Feature comparison: Time tracking software and systems (TechRepublic Premium)

In a Google Doc, Markdown commands not only let you format text quickly with keys you type (no need to access a menu, a mouse or touchpad), but also work consistently, regardless of your operating system. Built-in system key combinations are different on different systems: To turn selected text bold on a Chromebook or Windows system you press Ctrl+B, whereas the combination is Command-B on macOS. With Markdown command recognition enabled in Google Docs, you may surround text with two asterisks, and Google Docs will turn the text bold, regardless of whether you use a Chromebook, Windows or Mac. If you often switch between systems, Markdown format recognition may reduce the number of times you press a key combination that doesn’t work on a device.

For the examples below, you’ll need to have the Automatically detect Markdown and Automatically detect lists options active in Google Docs. To check the settings, while in a Google Doc on the web, go to Tools | Preferences, then make sure that the boxes to the left of each of those options are checked.

Screenshot with Tools | Preference displayed, and a square drawn around both Automatically detect Markdown and Automatically detect lists. Checkbox selected next to both options.
Open a Google Doc on the web, select Tools | Preferences, then make sure the boxes by both Automatically detect Markdown and Automatically detect lists are enabled. These settings let you type Markdown-style commands to format text in a Google Doc.

How to add italics, bold and strikethrough with Markdown commands

In a Google Doc, you may use either asterisk or underscore keys to format text. Surround text with:

  • * or _ to make text italics (one asterisk or underscore),
  • ** or __ to make text bold (two asterisks or underscores), or
  • *** or ___ to make text italics and bold (three asterisks or underscores).

For example:

  • Type *example* or _example_ for italics: example
  • Type **example** or _example_ for bold: example
  • Type ***example*** or ___example___ for italics and bold: example

Note that you do not type any spaces between the asterisk or underscore and the text to be formatted.

Similarly, for a strikethrough effect, you surround text with:

– to create a strikethrough effect: -example- results in example

How to create a link from Markdown format

To make a link in a Google Doc with standard Markdown format requires you to type the display text and the destination URL. Surround the display text with brackets, and surround the destination URL with parentheses, as follows:

[Example display text](URL)

For example, if you want to create a link to TechRepublic, you might type:

[Example text link to TechRepublic](https://techrepublic.com)

In a Google Doc with automatically detected Markdown enabled, this would be converted to the following:

Example text link to TechRepublic

I find it helpful to remember that Markdown links are made with punctuation in alphabetical order. In other words, that you format Markdown links with brackets before parentheses or, b-before-p.

How to enter headers Markdown style

To type headers in Markdown, use the number sign (now often known as the hashtag) followed by a space, then your header text. To type different levels of headers, you may use anywhere from one number sign to as many as six number signs. This works as follows:

  • # Title1 results in heading 1 text (Title1),
  • ## Title2 results in heading 2 text (Title2), and so on, up to
  • ###### Title6 results in heading 6 text (Title6).

The tap of the spacebar after the hashtag key is important. If you omit it, the system will interpret your text as a number indicator (e.g., #5) and will not reformat it as a heading.

If you enter more than six hashtags in a row follow by a space, Google Docs simply displays the text you have entered, for example: ####### Header7.

How to enter lists Markdown style

In a Google Doc, you may use an asterisk or dash followed by a space to make an unordered list. For example, either press:

– followed by a space to start an unordered dash list, or

* followed by a space to start an unordered bullet list.

To create a checkbox list, type the left and right bracket symbols with no space between them. For example, use [] to start a checkbox list.

To start a new numbered list, type the number 1 followed by a period and a space. Google Docs will recognize this as a new numbered list and indent the 1. and continue to auto-increment list items as you enter content.

For all of the list types above, tap enter (or return) twice to end the list and return to standard text entry.

What’s your experience?

I welcome the ability to type Markdown commands that Google Docs recognizes and turns into appropriately styled or formatted text. A bit ironically, I had to temporarily turn the feature off in order to write this article, since the system kept automatically recognizing and changing my explanatory text.

Are you familiar with Markdown? Do you enter Markdown key commands in Google Docs? Do you find the various options described above helpful? Or have you chosen to turn off auto-recognition of either Markdown or list options in Google Docs? Let me know what you think of this added support for Markdown-style text entry in Google Docs, either with a comment below or on Twitter (@awolber).





Source link