Guia de sensetaxi Markdown

Sensetaxi essencial para formatear documents

Resumen

Markdown es un lenguaje de marcado ligero para añadir format a documents de text plano. Creado por John Gruber en 2004, es uno de los més usados del món.

Markdown no es como un editor WYSIWYG (p. ej. Word), on formateas con botones y ves los canvis al instante. En Markdown añades sensetaxi al text para indicar què debe verse distinto.

Capçaleras

Para crear un capçalera, pon almohadillas (#) delante. El número de # corresponde al nivel (### = nivel 3).

Sensetaxi Markdown
Etiquetas HTML
Resultado
# Heading level 1
<h1>Heading level 1</h1>

Heading level 1

## Heading level 2
<h2>Heading level 2</h2>

Heading level 2

### Heading level 3
<h3>Heading level 3</h3>

Heading level 3

#### Heading level 4
<h4>Heading level 4</h4>

Heading level 4

##### Heading level 5
<h5>Heading level 5</h5>
Heading level 5
###### Heading level 6
<h6>Heading level 6</h6>
Heading level 6

Párrafos

Para crear párrafos, separa líneas de text con una línea en blanco.

Sensetaxi Markdown
Etiquetas HTML
Resultado
I really like using Markdown.

It lets me write easily.
<p>I really like using Markdown.</p>
<p>It lets me write easily.</p>

I really like using Markdown.

It lets me write easily.

Saltos de línea

Para un salto de línea, termina la línea con dos o més espacios y pulsa Intro.

Sensetaxi Markdown
Etiquetas HTML
Resultado
This is the first line.
And this is the second line.
<p>This is the first line.<br>
And this is the second line.</p>

This is the first line.
And this is the second line.

Énfasis

Puedes dar énfasis en negreta o cursiva.

Negreta

Para negreta, usa dos asteriscos (**) o guiones sotas (__) abans y després.

Sensetaxi Markdown
Etiquetas HTML
Resultado
I just love **bold text**.
I just love <strong>bold text</strong>.

I just love bold text.

I just love __bold text__.
I just love <strong>bold text</strong>.

I just love bold text.

Cursiva

Para cursiva, usa un asterisco (*) o guión sota (_) abans y després.

Sensetaxi Markdown
Etiquetas HTML
Resultado
The *cat* meows.
The <em>cat</em> meows.

The cat meows.

The _cat_ meows.
The <em>cat</em> meows.

The cat meows.

Negreta y cursiva

Para ambos, usa tres asteriscos (***) o guiones sotas (___) abans y després.

Sensetaxi Markdown
Etiquetas HTML
Resultado
This text is ***really important***.
This text is <strong><em>really important</em></strong>.

This text is really important.

This text is ___really important___.
This text is <strong><em>really important</em></strong>.

This text is really important.

Citas

Para una cita, pon > delante del párrafo.

Sensetaxi Markdown
Etiquetas HTML
Resultado
> Dorothy followed her through many of the beautiful rooms in her castle.
<blockquote><p>Dorothy followed her through many of the beautiful rooms in her castle.</p></blockquote>

Dorothy followed her through many of the beautiful rooms in her castle.

Citas anidadas

Las cites pueden anidarse. Usa >> delante del párrafo anidado.

Sensetaxi Markdown
Resultado
> Dorothy followed her through many of the beautiful rooms in her castle.
>
>> The Witch bade her clean the pots and kettles and sweep the floor and keep the fire fed with wood.

Dorothy followed her through many of the beautiful rooms in her castle.

The Witch bade her clean the pots and kettles and sweep the floor and keep the fire fed with wood.

Llistas

Puedes organizar elements en llistas orderess o sense orden.

Llistas orderess

Usa números seguidos de punto (1. 2. 3.). El orden numérico no importa, pero empieza por 1.

Sensetaxi Markdown
Etiquetas HTML
Resultado
1. First item
2. Second item
3. Third item
4. Fourth item
<ol>
  <li>First item</li>
  <li>Second item</li>
  <li>Third item</li>
  <li>Fourth item</li>
</ol>
  1. First item
  2. Second item
  3. Third item
  4. Fourth item

Llistas sense orden

Usa guiones (-), asteriscos (*) o més (+) delante de cada element.

Sensetaxi Markdown
Etiquetas HTML
Resultado
- First item
- Second item
- Third item
- Fourth item
<ul>
  <li>First item</li>
  <li>Second item</li>
  <li>Third item</li>
  <li>Fourth item</li>
</ul>
  • First item
  • Second item
  • Third item
  • Fourth item

Codi

Para marcar codi, enciérralo en comillas invertidas (`).

Sensetaxi Markdown
Etiquetas HTML
Resultado
At the command prompt, type `nano`.
At the command prompt, type <code>nano</code>.

At the command prompt, type nano.

Bloques de codi

Indenta con 4 espacios o 1 tabulación, o usa triple comilla (```) abans y després del bloque.

Sensetaxi Markdown
Resultado
```
{
  "firstName": "John",
  "lastName": "Smith",
  "age": 25
}
```
{
  "firstName": "John",
  "lastName": "Smith",
  "age": 25
}

Líneas horizontales

Usa tres o més asteriscos (***), guiones (---) o guiones sotas (___) en una línea sola.

Sensetaxi Markdown
Etiquetas HTML
Resultado
***
<hr>

---
<hr>

___
<hr>

Imágenes

Imatge: ![alt](URL). Opcionalmente, un título entre comillas tras la URL.

Sensetaxi Markdown
HTML
Resultado
![The San Juan Mountains](https://mdg.imgix.net/assets/images/san-juan-mountains.jpg "San Juan Mountains")
<img src="https://mdg.imgix.net/assets/images/san-juan-mountains.jpg" alt="The San Juan Mountains" title="San Juan Mountains">
The San Juan Mountains

Escapar caracteres

Para mostrar un carácter especial literal, pon una barra invertida (\) delante.

Sensetaxi Markdown
Resultado
\* Without the backslash, this would be a bullet in an unordered list.

* Without the backslash, this would be a bullet in an unordered list.

Caracteres que puedes escapar

Puedes escapar aquests caracteres con \:

\backslash
`backtick
*asterisk
_underscore
{ }curly braces
[ ]brackets
( )parentheses
#pound sign
+plus sign
-minus sign (hyphen)
.dot
!exclamation mark
|pipe

Taulas

Usa tres o més guiones (---) per a l' capçalera de cada columna y tuberías (|) para separar columnas.

Sensetaxi Markdown
Resultado
| Syntax    | Description |
| --------- | ----------- |
| Header    | Title       |
| Paragraph | Text        |
SyntaxDescription
HeaderTitle
ParagraphText

Alineació

Alinea a esquerra, dreta o centre añadiendo dos puntos (:) a la esquerra, dreta o ambos lados de los guiones del capçalera.

Sensetaxi Markdown
Resultado
| Align Left | Align Center | Align Right |
| :--- | :---: | ---: |
| This | This | This |
| column | column | column |
| will | will | will |
| align | align | align |
| left | center | right |
EsquerraCentreDreta
ThisThisThis
columncolumncolumn
willwillwill
alignalignalign
leftcenterright