Much of what makes Markdown great is the ability to write plain text, and getgreat formatted output as a result. To keep the slate clean for the next author,your Markdown should be simple and consistent with the whole corpus whereverpossible.
- Markdown Google Docs
- Markdown Google Maps
- Markdown Google Extension
- Markdown Google Colab
- Markdown Google Doc
- Markdown Google Drive Image
- Markdown Google Search
- Apr 08, 2017 Markdown is a great way to write cleanly-formatted text online. However, it doesn’t always play nicely with web services like Google Drive. Here are three editors and one script that will improve your Google Drive/Markdown relationship.
- Markdown Tools is a simple Google Doc add-on which will add heading numbers to the normal headings/styles in a Google docs document. Optionally, it can add the heading numbers along with the markdown hash tags that are appropriate for each heading level.
Nearly all Markdown applications support the basic syntax outlined in John Gruber’s original design document. There are minor variations and discrepancies between Markdown processors — those are noted inline wherever possible. To create a heading, add number signs (#) in front of a word or phrase. The number of number signs you.
We seek to balance three goals:
- Source text is readable and portable.
- Markdown files are maintainable over time and across teams.
- The syntax is simple and easy to remember.
Contents:
- Headings
- Lists
- Code
- Links
Document layout
In general, most documents benefit from some variation of the following layout:
# Document Title
: The first heading should be a level one heading, andshould ideally be the same or nearly the same as the filename. The firstlevel one heading is used as the page<title>
.author
: Optional. If you’d like to claim ownership of the document orif you are very proud of it, add yourself under the title. However,revision history generally suffices.Short introduction.
1-3 sentences providing a high-level overview of thetopic. Imagine yourself as a complete newbie, who landed on your “ExtendingFoo” doc and needs to know the most basic assumptions you take for granted.“What is Foo? Why would I extend it?”[TOC]
: if you use hosting that supports table of contents, such as Gitiles,put[TOC]
after the short introduction. See[TOC]
documentation.## Topic
: The rest of your headings should start from level 2.## See also
: Put miscellaneous links at the bottom for the user who wantsto know more or didn’t find what she needed.
Markdown Google Docs
Character line limit
Obey projects’ character line limit wherever possible. Long URLs and tables arethe usual suspects when breaking the rule. (Headings also can’t be wrapped, butwe encourage keeping them short). Otherwise, wrap your text:
Often, inserting a newline before a long link preserves readability whileminimizing the overflow:
Trailing whitespace
Don’t use trailing whitespace, use a trailing backslash.
The CommonMark spec decreesthat two spaces at the end of a line should insert a <br />
tag. However, manydirectories have a trailing whitespace presubmit check in place, and many IDEswill clean it up anyway.
Best practice is to avoid the need for a <br />
altogether. Markdown createsparagraph tags for you simply with newlines: get used to that.
Headings
ATX-style headings
Headings with =
or -
underlines can be annoying to maintain and don’t fitwith the rest of the heading syntax. The user has to ask: Does ---
mean H1 orH2?
Add spacing to headings
Prefer spacing after #
and newlines before and after:
Lack of spacing makes it a little harder to read in source:
Lists
Use lazy numbering for long lists
Markdown is smart enough to let the resulting HTML render your numbered listscorrectly. For longer lists that may change, especially long nested lists, use“lazy” numbering:
However, if the list is small and you don’t anticipate changing it, prefer fullynumbered lists, because it’s nicer to read in source:
Nested list spacing
When nesting lists, use a 4 space indent for both numbered and bulleted lists:
The following works, but it’s very messy:
Even when there’s no nesting, using the 4 space indent makes layout consistentfor wrapped text:
However, when lists are small, not nested, and a single line, one space cansuffice for both kinds of lists:
Code
Inline
`Backticks` designate inline code
, and will render all wrapped contentliterally. Use them for short code quotations and field names:
Use inline code when referring to file types in an abstract sense, rather than aspecific file:
Backticks are the most common approach for “escaping” Markdown metacharacters;in most situations where escaping would be needed, code font just makes senseanyway.
Codeblocks
For code quotations longer than a single line, use a codeblock:
Declare the language
It is best practice to explicitly declare the language, so that neither thesyntax highlighter nor the next editor must guess.
Indented codeblocks are sometimes cleaner
Four-space indenting is also interpreted as a codeblock. These can lookcleaner and be easier to read in source, but there is no way to specify thelanguage. We encourage their use when writing many short snippets:
Escape newlines
Because most commandline snippets are intended to be copied and pasted directlyinto a terminal, it’s best practice to escape any newlines. Use a singlebackslash at the end of the line:
Nest codeblocks within lists
If you need a codeblock within a list, make sure to indent it so as to not breakthe list:
You can also create a nested code block with 4 spaces. Simply indent 4additional spaces from the list indentation:
Links
Long links make source Markdown difficult to read and break the 80 characterwrapping. Wherever possible, shorten your links.
Use informative Markdown link titles
Markdown link syntax allows you to set a link title, just as HTML does. Use itwisely.
Markdown Google Maps
Titling your links as “link” or “here” tells the reader precisely nothing whenquickly scanning your doc and is a waste of space:
Instead, write the sentence naturally, then go back and wrap the mostappropriate phrase with the link:
Images
Use images sparingly, and prefer simple screenshots. This guide is designedaround the idea that plain text gets users down to the business of communicationfaster with less reader distraction and author procrastination. However, it’ssometimes very helpful to show what you mean.
See image syntax.
Prefer lists to tables
Any tables in your Markdown should be small. Complex, large tables are difficultto read in source and most importantly, a pain to modify later.
Lists and subheadings usually suffice to present the same informationin a slightly less compact, though much more edit-friendly way:
However, there are times when a small table is called for:
Strongly prefer Markdown to HTML
Please prefer standard Markdown syntax wherever possible and avoid HTML hacks.If you can’t seem to accomplish what you want, reconsider whether you reallyneed it. Except for big tables, Markdown meets almostall needs already.
Every bit of HTML or Javascript hacking reduces the readability and portability.This in turn limits the usefulness of integrations withother tools, which may either present the source as plain text or render it. SeePhilosophy.
Gitiles does not render HTML.
Much of what makes Markdown great is the ability to write plain text, and getgreat formatted output as a result. To keep the slate clean for the next author,your Markdown should be simple and consistent with the whole corpus whereverpossible.
We seek to balance three goals:
- Source text is readable and portable.
- Markdown files are maintainable over time and across teams.
- The syntax is simple and easy to remember.
Markdown Google Extension
Contents:
- Headings
- Lists
- Code
- Links
Document layout
In general, most documents benefit from some variation of the following layout:
# Document Title
: The first heading should be a level one heading, andshould ideally be the same or nearly the same as the filename. The firstlevel one heading is used as the page<title>
.author
: Optional. If you’d like to claim ownership of the document orif you are very proud of it, add yourself under the title. However,revision history generally suffices.Short introduction.
1-3 sentences providing a high-level overview of thetopic. Imagine yourself as a complete newbie, who landed on your “ExtendingFoo” doc and needs to know the most basic assumptions you take for granted.“What is Foo? Why would I extend it?”[TOC]
: if you use hosting that supports table of contents, such as Gitiles,put[TOC]
after the short introduction. See[TOC]
documentation.## Topic
: The rest of your headings should start from level 2.## See also
: Put miscellaneous links at the bottom for the user who wantsto know more or didn’t find what she needed.
Character line limit
Obey projects’ character line limit wherever possible. Long URLs and tables arethe usual suspects when breaking the rule. (Headings also can’t be wrapped, butwe encourage keeping them short). Otherwise, wrap your text:
Often, inserting a newline before a long link preserves readability whileminimizing the overflow:
Trailing whitespace
Don’t use trailing whitespace, use a trailing backslash.
The CommonMark spec decreesthat two spaces at the end of a line should insert a <br />
tag. However, manydirectories have a trailing whitespace presubmit check in place, and many IDEswill clean it up anyway.
Best practice is to avoid the need for a <br />
altogether. Markdown createsparagraph tags for you simply with newlines: get used to that.
Markdown Google Colab
Headings
ATX-style headings
Headings with =
or -
underlines can be annoying to maintain and don’t fitwith the rest of the heading syntax. The user has to ask: Does ---
mean H1 orH2?
Add spacing to headings
Prefer spacing after #
and newlines before and after:
Lack of spacing makes it a little harder to read in source:
Lists
Use lazy numbering for long lists
Markdown is smart enough to let the resulting HTML render your numbered listscorrectly. For longer lists that may change, especially long nested lists, use“lazy” numbering:
However, if the list is small and you don’t anticipate changing it, prefer fullynumbered lists, because it’s nicer to read in source:
Nested list spacing
When nesting lists, use a 4 space indent for both numbered and bulleted lists:
The following works, but it’s very messy:
Even when there’s no nesting, using the 4 space indent makes layout consistentfor wrapped text:
However, when lists are small, not nested, and a single line, one space cansuffice for both kinds of lists:
Code
Inline
Markdown Google Doc
`Backticks` designate inline code
, and will render all wrapped contentliterally. Use them for short code quotations and field names:
Use inline code when referring to file types in an abstract sense, rather than aspecific file:
Backticks are the most common approach for “escaping” Markdown metacharacters;in most situations where escaping would be needed, code font just makes senseanyway.
Codeblocks
For code quotations longer than a single line, use a codeblock:
Declare the language
It is best practice to explicitly declare the language, so that neither thesyntax highlighter nor the next editor must guess.
Indented codeblocks are sometimes cleaner
Four-space indenting is also interpreted as a codeblock. These can lookcleaner and be easier to read in source, but there is no way to specify thelanguage. We encourage their use when writing many short snippets:
Escape newlines
Because most commandline snippets are intended to be copied and pasted directlyinto a terminal, it’s best practice to escape any newlines. Use a singlebackslash at the end of the line:
Nest codeblocks within lists
If you need a codeblock within a list, make sure to indent it so as to not breakthe list:
You can also create a nested code block with 4 spaces. Simply indent 4additional spaces from the list indentation:
Links
Markdown Google Drive Image
Long links make source Markdown difficult to read and break the 80 characterwrapping. Wherever possible, shorten your links.
Use informative Markdown link titles
Markdown link syntax allows you to set a link title, just as HTML does. Use itwisely.
Titling your links as “link” or “here” tells the reader precisely nothing whenquickly scanning your doc and is a waste of space:
Instead, write the sentence naturally, then go back and wrap the mostappropriate phrase with the link:
Images
Use images sparingly, and prefer simple screenshots. This guide is designedaround the idea that plain text gets users down to the business of communicationfaster with less reader distraction and author procrastination. However, it’ssometimes very helpful to show what you mean.
See image syntax.
Prefer lists to tables
Any tables in your Markdown should be small. Complex, large tables are difficultto read in source and most importantly, a pain to modify later.
Lists and subheadings usually suffice to present the same informationin a slightly less compact, though much more edit-friendly way:
However, there are times when a small table is called for:
Markdown Google Search
Strongly prefer Markdown to HTML
Please prefer standard Markdown syntax wherever possible and avoid HTML hacks.If you can’t seem to accomplish what you want, reconsider whether you reallyneed it. Except for big tables, Markdown meets almostall needs already.
Every bit of HTML or Javascript hacking reduces the readability and portability.This in turn limits the usefulness of integrations withother tools, which may either present the source as plain text or render it. SeePhilosophy.
Gitiles does not render HTML.