File: myst-lexing-directives.md

package info (click to toggle)
python-sybil 9.2.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 1,148 kB
  • sloc: python: 4,510; makefile: 90
file content (113 lines) | stat: -rw-r--r-- 2,214 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
This one has arguments a a "title" and then the body:

```{note} This is a note admonition.
This is the second line of the first paragraph.

- The note contains all indented body elements
  following.
- It includes this bullet list.
```

```{admonition} And, by the way...
   You can make up your own admonition too.
```

```{sample}
   This directive has no arguments, just a body.
```

An image with no body followed by one that has params and a body:

```{image} picture.png
```

```{image} picture.jpeg
 :height: 100px
 :width:200 px
 :scale:  50 %
 :alt: alternate text
 :align: right


```

```{figure} picture.png
---
scale: 50 %
alt: map to buried treasure
---
This is the caption of the figure (a simple paragraph).

The legend consists of all elements after the caption.  In this
case, the legend consists of this paragraph and the following
table:

+-----------------------+-----------------------+
| Symbol                | Meaning               |
+=======================+=======================+
| .. image:: tent.png   | Campground            |
+-----------------------+-----------------------+
| .. image:: waves.png  | Lake                  |
+-----------------------+-----------------------+
| .. image:: peak.png   | Mountain              |
+-----------------------+-----------------------+

```


```{topic} Topic Title

    Subsequent indented lines comprise
    the body of the topic, and are
    interpreted as body elements.
```

Now a topic with a class, as used by testfixtures:

```{topic} example.cfg
---
class: read-file
---

 ::

   [A Section]
   dir = frob
```

Another example:

```{sidebar} Optional Sidebar Title
---
  subtitle: Optional Sidebar Subtitle
---
   Subsequent indented lines comprise
   the body of the sidebar, and are
   interpreted as body elements.
```


```{code-block} python
---
lineno-start: 10
emphasize-lines: 1, 3
caption: |
    This is my
    multi-line caption. It is *pretty nifty* ;-)
---
a = 2
print('my 1st line')
print(f'my {a}nd line')
```

```{eval-rst}
.. figure:: img/fun-fish.png
  :width: 100px
  :name: rst-fun-fish

  Party time!

A reference from inside: :ref:`rst-fun-fish`

A reference from outside: :ref:`syntax/directives/parsing`
```