Skip to content

文字格式化

底下內容主要是參考官網上的範例,但是會加上一下官網上面沒有的說明!

⚙️ mkdocs.yml設定

markdown_extensions:
  - pymdownx.critic
  - pymdownx.mark
  - pymdownx.caret
  - pymdownx.tilde
  - pymdownx.keys

標示(Highlight)變更

📌 原始文字

Text can be {--deleted--} and replacement text {++added++}. This can also be combined into {~~one~>a single~~} operation. {==Highlighting==} is also possible {>>and comments can be added inline<<}.

{==

Formatting can also be applied to blocks by putting the opening and closing tags on separate lines and adding new lines between the tags and the content.

==}

📌 呈現效果

Text can be deleted and replacement text added. This can also be combined into onea single operation. Highlighting is also possible and comments can be added inline.

Formatting can also be applied to blocks by putting the opening and closing tags on separate lines and adding new lines between the tags and the content.

標示(Highlight)文字

📌 原始文字

  • ==This was marked (highlight)==
  • ^^This was inserted (underline)^^
  • ~~This was deleted (strikethrough)~~

📌 呈現效果

  • This was marked (highlight)
  • This was inserted (underline)
  • This was deleted (strikethrough)

上標及下標字

📌 原始文字

  • H~2~O
  • A^T^A

📌 呈現效果

  • H2O
  • ATA

按鍵效果

📌 原始文字

++ctrl+alt+del++

📌 呈現效果

Ctrl+Alt+Del

Note

++符號中間不要有空格! 如果是自訂的字元或文字,需要加上引號"

📖 參考資料