Skip to content

Latest commit

 

History

History
142 lines (85 loc) · 2.26 KB

restructuredText_Cheatsheet.rst

File metadata and controls

142 lines (85 loc) · 2.26 KB

reStructuredText Cheatsheet

Formatting text

Paragraphs are simply chunks of text separated by one or more blank lines.

It's simple to use inline markup to have italic text, bold text, and inline source codes.

It's a little complicated to write a GMT option. You need to use backslash + pipe to have a pipe (|) and backslash + whitespace to separate inline markups.

-Avalue[+wpen][+a|b|c]

Lists

Bullet list:

  • Point A
  • Point B
  • Point C
  • Point D

Numbered list:

  1. Point 1
  2. Point 2
  3. Point 3
  4. Point 4

Definition list:

term1
Definition of term1
term2
Definition of term2

Table

ReST supports multiple ways to make a table.

Simple Table

A B A and B
False False False
True False False
False True False
True True True

Grid Table

Header row, column 1 Header 2 Header 3 Header 4
body row 1, column 1 column 2 column 3 column 4
body row 2 ... ...  

Links

External links

https://www.generic-mapping-tools.org

GMT Forum

Internal links

Link to the a module with :doc:`plot` or :doc:`/plot`.

Link to a section title with Lists.

Link to a target with :ref:`Link to a table <tbl-grid>`.

Link to a GMT parameter :term:`FONT_TITLE`.

Codes

gmt begin map
gmt basemap -R0/10/0/10 -JX10c/10c -Baf
gmt end

Images

Use the figure directive to include images:

/_images/GMT_coverlogo.png

Figure caption

Math

reST also supports LaTeX-style math.

This is an inline math x^2+y^2=z^2.

For long equations, use the math directive:

\gamma = \sqrt{(\alpha^2 + \beta^2)}