Debian Codegraph @

docs/src/markdown/extensions/smartsymbols.md

raw
1 ---
2 icon: lucide/graduation-cap
3 ---
4 [:octicons-file-code-24:][_smartsymbols]{: .source-link }
5
6 # SmartSymbols
7
8 ## Overview
9
10 SmartSymbols adds syntax for creating special characters such as trademarks, arrows, fractions, etc. It basically
11 allows for more "smarty-pants" like replacements. It is meant to be used along side Python Markdown's `smarty`
12 extension not to replace.
13
14 Markdown | Result
15 -------------- |--------
16 `(tm)` | (tm)
17 `(c)` | (c)
18 `(r)` | (r)
19 `c/o` | c/o
20 `+/-` | +/-
21 `-->` | -->
22 `<--` | <--
23 `<-->` | <-->
24 `=/=` | =/=
25 `1/4, etc.` | 1/4, etc.
26 `1st 2nd etc.` |1st 2nd etc.
27
28 The SmartSymbols extension can be included in Python Markdown by using the following:
29
30 ```py3
31 import markdown
32 md = markdown.Markdown(extensions=['pymdownx.smartsymbols'])
33 ```
34
35 ## Options
36
37 Option | Type | Default | Description
38 ----------------- | ---- | ----------- |------------
39 `trademark` | bool | `#!py3 True` | Add syntax for trademark symbol.
40 `copyright` | bool | `#!py3 True` | Add syntax for copyright symbol.
41 `registered` | bool | `#!py3 True` | Add syntax for registered symbol.
42 `care_of` | bool | `#!py3 True` | Add syntax for care / of.
43 `plusminus` | bool | `#!py3 True` | Add syntax for plus / minus.
44 `arrows` | bool | `#!py3 True` | Add syntax for creating arrows.
45 `notequal` | bool | `#!py3 True` | Add syntax for not equal symbol.
46 `fractions` | bool | `#!py3 True` | Add syntax for common fractions.
47 `ordinal_numbers` | bool | `#!py3 True` | Add syntax for ordinal numbers.