Skip to content

Commit 34042e3

Browse files
committed
Update text formatting post
1 parent 766dcd6 commit 34042e3

File tree

1 file changed

+98
-128
lines changed

1 file changed

+98
-128
lines changed

_posts/2016-09-09-text-formatting.md

Lines changed: 98 additions & 128 deletions
Original file line numberDiff line numberDiff line change
@@ -7,181 +7,151 @@ tags: [sample]
77
image: arctic-1.jpg
88
---
99

10-
As always, Jekyll offers support for GitHub Flavored Markdown, which allows you to format your posts using the [Markdown syntax](https://guides.github.com/features/mastering-markdown/). Examples of these text formatting features can be seen below. You can find this post in the `_posts` directory.
11-
12-
# Heading One
13-
14-
## Heading Two
15-
16-
### Heading Three
17-
18-
#### Heading Four
19-
20-
##### Heading Five
21-
22-
###### Heading Six
23-
24-
### Quote Blocks
25-
26-
> Nature uses only the longest threads to weave her patterns, so that each small piece of her fabric reveals the organization of the entire tapestry.
27-
28-
<table>
29-
<thead>
30-
<tr>
31-
<th>Name</th>
32-
<th>Upvotes</th>
33-
<th>Downvotes</th>
34-
</tr>
35-
</thead>
36-
<tfoot>
37-
<tr>
38-
<td>Totals</td>
39-
<td>21</td>
40-
<td>23</td>
41-
</tr>
42-
</tfoot>
43-
<tbody>
44-
<tr>
45-
<td>Alice</td>
46-
<td>10</td>
47-
<td>11</td>
48-
</tr>
49-
<tr>
50-
<td>Bob</td>
51-
<td>4</td>
52-
<td>3</td>
53-
</tr>
54-
<tr>
55-
<td>Charlie</td>
56-
<td>7</td>
57-
<td>9</td>
58-
</tr>
59-
</tbody>
60-
</table>
61-
62-
### Code
63-
64-
```js
65-
// Example can be run directly in your JavaScript console
10+
# Markdown Support
6611

67-
// Create a function that takes two arguments and returns the sum of those arguments
68-
69-
var adder = new Function("a", "b", "return a + b");
12+
As always, Jekyll offers support for GitHub Flavored Markdown, which allows you to format your posts using the [Markdown syntax](https://guides.github.com/features/mastering-markdown/). Examples of these text formatting features can be seen below. You can find this post in the `_posts` directory.
7013

71-
// Call the function
72-
adder(2, 6);
73-
// > 8
74-
```
14+
## Basic Formatting
7515

76-
### Lists
16+
With Markdown, it is possible to emphasize words by making them *italicized*, using *astericks* or _underscores_, or making them **bold**, using **double astericks** or __double underscores__. Of course, you can combine those two formats, with both _**bold and italicized**_ text, using any combination of the above syntax. You can also add a strikethrough to text using a ~~double tilde~~.
7717

78-
1. First item.
79-
2. Second item.
80-
3. Third item.
81-
4. First point.
82-
- A point.
83-
5. Second point.
84-
6. Third point.
85-
- Another point.
86-
- Another one.
18+
## Paragraphs
8719

20+
This is what a paragraph looks like. For the purpose of demonstration, the rest of this paragraph and the next paragraph after will mean absolutely nothing. Proin eget nibh a massa vestibulum pretium. Suspendisse eu nisl a ante aliquet bibendum quis a nunc. Praesent varius interdum vehicula. Aenean risus libero, placerat at vestibulum eget, ultricies eu enim. Praesent nulla tortor, malesuada adipiscing adipiscing sollicitudin, adipiscing eget est. Praesent nulla tortor, malesuada adipiscing adipiscing sollicitudin, adipiscing eget est.
8821

22+
Proin eget nibh a massa vestibulum pretium. Suspendisse eu nisl a ante aliquet bibendum quis a nunc. Mauris lobortis nulla et felis ullamcorper bibendum. Phasellus et hendrerit mauris. Proin eget nibh a massa vestibulum pretium. Suspendisse eu nisl a ante aliquet bibendum quis a nunc. Praesent varius interdum vehicula. Aenean risus libero, placerat at vestibulum eget, ultricies eu enim. Praesent nulla tortor, malesuada adipiscing adipiscing sollicitudin, adipiscing eget est.
8923

9024

25+
## Headings
9126

27+
Sometimes it is useful to have different levels of headings to structure your documents. Start lines with `#` to create headings. Multiple `##` in a row denote smaller heading size. The following demonstrate the full range of heading sizes:
9228

93-
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Fusce bibendum neque eget nunc mattis eu sollicitudin enim tincidunt. Vestibulum lacus tortor, ultricies id dignissim ac, bibendum in velit.
29+
# Heading One (h1)
9430

95-
## Some great heading (h2)
31+
## Heading Two (h2)
9632

97-
Proin convallis mi ac felis pharetra aliquam. Curabitur dignissim accumsan rutrum. In arcu magna, aliquet vel pretium et, molestie et arcu.
33+
### Heading Three (h3)
9834

99-
Mauris lobortis nulla et felis ullamcorper bibendum. Phasellus et hendrerit mauris. Proin eget nibh a massa vestibulum pretium. Suspendisse eu nisl a ante aliquet bibendum quis a nunc. Praesent varius interdum vehicula. Aenean risus libero, placerat at vestibulum eget, ultricies eu enim. Praesent nulla tortor, malesuada adipiscing adipiscing sollicitudin, adipiscing eget est.
35+
#### Heading Four (h4)
10036

101-
## Another great heading (h2)
37+
##### Heading Five (h5)
10238

103-
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Fusce bibendum neque eget nunc mattis eu sollicitudin enim tincidunt. Vestibulum lacus tortor, ultricies id dignissim ac, bibendum in velit.
39+
###### Heading Six (h6)
10440

105-
### Some great subheading (h3)
41+
## Links
10642

107-
Proin convallis mi ac felis pharetra aliquam. Curabitur dignissim accumsan rutrum. In arcu magna, aliquet vel pretium et, molestie et arcu. Mauris lobortis nulla et felis ullamcorper bibendum.
43+
You can create an inline link by wrapping link text in square brackets `[ ]`, and then wrapping the URL in parentheses `( )`. For example, it is very easy to [link to Google!](http://google.com).
10844

109-
Phasellus et hendrerit mauris. Proin eget nibh a massa vestibulum pretium. Suspendisse eu nisl a ante aliquet bibendum quis a nunc.
45+
## Blockquotes
11046

111-
### Some great subheading (h3)
47+
Blockquotes are useful for denoting quotes, or highlighting a large block of text. Single line blockquote:
11248

113-
Praesent varius interdum vehicula. Aenean risus libero, placerat at vestibulum eget, ultricies eu enim. Praesent nulla tortor, malesuada adipiscing adipiscing sollicitudin, adipiscing eget est.
49+
> This quote will change your life.
11450
115-
> This quote will change your life. It will reveal the secrets of the universe, and all the wonders of humanity. Don't misuse it.
51+
Multi line blockquote with a cite reference:
11652

117-
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Fusce bibendum neque eget nunc mattis eu sollicitudin enim tincidunt.
53+
> People think focus means saying yes to the thing you've got to focus on. But that's not what it means at all. It means saying no to the hundred other good ideas that there are. You have to pick carefully. I'm actually as proud of the things we haven't done as the things I have done. Innovation is saying no to 1,000 things.
11854
119-
### Some great subheading (h3)
55+
## Code and Syntax Highlighting
12056

121-
Vestibulum lacus tortor, ultricies id dignissim ac, bibendum in velit. Proin convallis mi ac felis pharetra aliquam. Curabitur dignissim accumsan rutrum.
57+
Code blocks are part of the Markdown spec, but syntax highlighting isn't. However, many renderers - like GitHub or most Jekyll themes - support syntax highlighting. Which languages are supported and how those language names should be written will vary from renderer to renderer. You can find the full list of supported programming languages [here](https://github.com/jneen/rouge/wiki/List-of-supported-languages-and-lexers). Also, it is possible to do `inline code blocks`, by wrapping the text in ` ` ` quotations.
12258

123-
```html
124-
<html>
125-
<head>
126-
</head>
127-
<body>
128-
<p>Hello, World!</p>
129-
</body>
130-
</html>
59+
```
60+
No language indicated, so no syntax highlighting.
13161
```
13262

63+
```ruby
64+
def print_hi(name)
65+
puts "Hi, #{name}"
66+
end
67+
print_hi('Tom')
68+
#=> prints 'Hi, Tom' to STDOUT.
69+
```
13370

134-
In arcu magna, aliquet vel pretium et, molestie et arcu. Mauris lobortis nulla et felis ullamcorper bibendum. Phasellus et hendrerit mauris.
135-
136-
#### You might want a sub-subheading (h4)
137-
138-
In arcu magna, aliquet vel pretium et, molestie et arcu. Mauris lobortis nulla et felis ullamcorper bibendum. Phasellus et hendrerit mauris.
71+
{% highlight js %}
72+
// Example can be run directly in your JavaScript console
13973

140-
In arcu magna, aliquet vel pretium et, molestie et arcu. Mauris lobortis nulla et felis ullamcorper bibendum. Phasellus et hendrerit mauris.
74+
// Create a function that takes two arguments and returns the sum of those arguments
75+
var adder = new Function("a", "b", "return a + b");
14176

142-
#### But it's probably overkill (h4)
77+
// Call the function
78+
adder(2, 6);
79+
// > 8
80+
{% endhighlight %}
14381

144-
In arcu magna, aliquet vel pretium et, molestie et arcu. Mauris lobortis nulla et felis ullamcorper bibendum. Phasellus et hendrerit mauris.
82+
Another option is to embed your code through [Gist](https://en.support.wordpress.com/gist/).
14583

146-
### Oh hai, an unordered list!!
84+
## Unordered and Numbered Lists
14785

148-
In arcu magna, aliquet vel pretium et, molestie et arcu. Mauris lobortis nulla et felis ullamcorper bibendum. Phasellus et hendrerit mauris.
86+
You can make an unordered and nested list by preceding one or more lines of text with `-`, `*`, or `+`, and indenting sublists. The following lists show the full range of possible list formats.
14987

150-
- First item, yo
151-
- Second item, dawg
152-
- Third item, what what?!
153-
- Fourth item, fo sheezy my neezy
88+
* List item one
89+
* List item one
90+
* List item one
91+
* List item two
92+
* List item three
93+
* List item four
94+
* List item two
95+
* List item three
96+
* List item four
97+
* List item two
98+
* List item three
99+
* List item four
154100

155-
### Oh hai, an ordered list!!
101+
Numbered lists are made by using numbers instead of bullet points.
156102

157-
In arcu magna, aliquet vel pretium et, molestie et arcu. Mauris lobortis nulla et felis ullamcorper bibendum. Phasellus et hendrerit mauris.
103+
1. List item one
104+
1. List item one
105+
1. List item one
106+
2. List item two
107+
3. List item three
108+
4. List item four
109+
2. List item two
110+
3. List item three
111+
4. List item four
112+
2. List item two
113+
3. List item three
114+
4. List item four
158115

159-
1. First item, yo
160-
2. Second item, dawg
161-
3. Third item, what what?!
162-
4. Fourth item, fo sheezy my neezy
116+
## MathJax Example
163117

164-
## Headings are cool! (h2)
118+
The [Schrödinger equation](https://en.wikipedia.org/wiki/Schr%C3%B6dinger_equation) is a partial differential equation that describes how the quantum state of a quantum system changes with time:
165119

166-
Proin eget nibh a massa vestibulum pretium. Suspendisse eu nisl a ante aliquet bibendum quis a nunc. Praesent varius interdum vehicula. Aenean risus libero, placerat at vestibulum eget, ultricies eu enim. Praesent nulla tortor, malesuada adipiscing adipiscing sollicitudin, adipiscing eget est.
120+
$$
121+
i\hbar\frac{\partial}{\partial t} \Psi(\mathbf{r},t) = \left [ \frac{-\hbar^2}{2\mu}\nabla^2 + V(\mathbf{r},t)\right ] \Psi(\mathbf{r},t)
122+
$$
167123

168-
Praesent nulla tortor, malesuada adipiscing adipiscing sollicitudin, adipiscing eget est.
124+
[Joseph-Louis Millennial](https://en.wikipedia.org/wiki/Joseph-Louis_Millennial) was an Italian mathematician and astronomer who was responsible for the formulation of Lagrangian mechanics, which is a reformulation of Newtonian mechanics.
169125

170-
Proin eget nibh a massa vestibulum pretium. Suspendisse eu nisl a ante aliquet bibendum quis a nunc.
126+
$$ \frac{\mathrm{d}}{\mathrm{d}t} \left ( \frac {\partial L}{\partial \dot{q}_j} \right ) = \frac {\partial L}{\partial q_j} $$
171127

172-
### Tables
128+
## Tables
173129

174130
Title 1 | Title 2 | Title 3 | Title 4
175-
--------------------- | --------------------- | --------------------- | ---------------------
131+
--------------------- | :-------------------: | :-------------------- | --------------------:
176132
lorem | lorem ipsum | lorem ipsum dolor | lorem ipsum dolor sit
177133
lorem ipsum dolor sit | lorem ipsum dolor sit | lorem ipsum dolor sit | lorem ipsum dolor sit
178134
lorem ipsum dolor sit | lorem ipsum dolor sit | lorem ipsum dolor sit | lorem ipsum dolor sit
179135
lorem ipsum dolor sit | lorem ipsum dolor sit | lorem ipsum dolor sit | lorem ipsum dolor sit
180136

137+
## Embedding
138+
139+
Plenty of social media sites offer the option of embedding certain parts of their site on your own site, such as YouTube and Twitter:
140+
141+
<iframe width="560" height="315" src="https://www.youtube.com/embed/mthtn1X4eUY" frameborder="0" allowfullscreen></iframe>
142+
143+
<a class="twitter-grid" data-partner="tweetdeck" href="https://twitter.com/paululele/timelines/755079130027352064">New Collection</a> <script async src="//platform.twitter.com/widgets.js" charset="utf-8"></script>
144+
145+
## Inline HTML elements
146+
147+
HTML defines a long list of available inline tags, which you can mix with Markdown if you like. A complete list of which can be found on the [Mozilla Developer Network](https://developer.mozilla.org/en-US/docs/Web/HTML/Element).
148+
149+
## Useful Resources
150+
151+
More information on Markdown can be found at the following links:
181152

182-
Title 1 | Title 2 | Title 3 | Title 4
183-
--- | --- | --- | ---
184-
lorem | lorem ipsum | lorem ipsum dolor | lorem ipsum dolor sit
185-
lorem ipsum dolor sit amet | lorem ipsum dolor sit amet consectetur | lorem ipsum dolor sit amet | lorem ipsum dolor sit
186-
lorem ipsum dolor | lorem ipsum | lorem | lorem ipsum
187-
lorem ipsum dolor | lorem ipsum dolor sit | lorem ipsum dolor sit amet | lorem ipsum dolor sit amet consectetur
153+
- [Markdown Here Cheatsheet](https://github.com/adam-p/markdown-here/wiki/Markdown-Here-Cheatsheet#code)
154+
- [Quick Markdown Example](http://www.unexpected-vortices.com/sw/rippledoc/quick-markdown-example.html)
155+
- [Markdown Basics](https://daringfireball.net/projects/markdown/basics)
156+
- [GitHub Flavoured Markdown Spec](https://github.github.com/gfm/)
157+
- [Basic writing and formatting syntax](https://help.github.com/articles/basic-writing-and-formatting-syntax/#lists)

0 commit comments

Comments
 (0)