You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Add special span classes
* Add callout for format exceptions
(cherry picked from commit 4deb131)
Co-authored-by: Charlotte Wickham <[email protected]>
Copy file name to clipboardExpand all lines: docs/authoring/markdown-basics.qmd
+39-3Lines changed: 39 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -397,7 +397,12 @@ Videos can refer to video files (e.g. MPEG) or can be links to videos published
397
397
398
398
## Divs and Spans {#sec-divs-and-spans}
399
399
400
-
You can add classes, attributes, and other identifiers to regions of content using Divs and Spans (you'll see an example of this below in [Callout Blocks]).
400
+
You can add classes, attributes, and other identifiers to regions of content using Divs and Spans.
401
+
Although the terms *Div* and *Span* originate in HTML, the syntax is used in Quarto across output formats.
402
+
For example, [Callout Blocks](#callout-blocks) are specified using the div syntax, and [Small Caps](#other-spans) are specified using the span syntax, and both work for many formats beyond HTML.
403
+
You may also use CSS and/or a [Filter](/docs/extensions/filters.qmd) along with Divs and Spans to provide styling or other behavior within rendered documents beyond what Quarto provides.
404
+
405
+
### Divs
401
406
402
407
For example, here we add the "border" class to a region of content using a div (`:::`):
403
408
@@ -441,6 +446,8 @@ Once rendered to HTML, Quarto will translate the markdown into:
441
446
442
447
Fences without attributes are always closing fences. Unlike with fenced code blocks, the number of colons in the closing fence need not match the number in the opening fence. However, it can be helpful for visual clarity to use fences of different lengths to distinguish nested divs from their parents.
443
448
449
+
### Spans
450
+
444
451
A bracketed sequence of inlines, as one would use to begin a link, will be treated as a `Span` with attributes if it is followed immediately by attributes:
445
452
446
453
```markdown
@@ -455,8 +462,6 @@ Once rendered to HTML, Quarto will translate the markdown into:
455
462
</span>
456
463
```
457
464
458
-
Typically, you'll use CSS and/or a [Filter](/docs/extensions/filters.qmd) along with Divs and Spans to provide styling or other behavior within rendered documents.
459
-
460
465
### Ordering of Attributes
461
466
462
467
Both divs and spans in Pandoc can have any combination of identifiers, classes, and (potentially many) key-value attributes. In order for these to be recognized by Pandoc, they have to be provided in a specific order: identifiers, classes, and then key-value attributes. Any of these can be omitted, but must follow that order if they are provided. For example, the following is valid:
@@ -514,6 +519,37 @@ Learn more in the article on [Callout Blocks](callouts.qmd).
0 commit comments