diff --git a/help/code-blocks.md b/help/code-blocks.md index d55791566d..97019ad400 100644 --- a/help/code-blocks.md +++ b/help/code-blocks.md @@ -4,6 +4,16 @@ ## Insert code formatting +Zulip's compose box has a smart **Code** () button, which inserts contextually appropriate code +formatting: + +- If no text is selected, the button inserts code block (` ``` `) formatting. +- If selected text is on one line, the button inserts code span (`` ` ``) + formatting. +- If selected text is on multiple lines, the button inserts code block (` ``` `) + formatting. + {start_tabs} {tab|via-compose-box-buttons} @@ -13,9 +23,11 @@ 1. _(optional)_ Select the text you want to format. 1. Click the **Code** () icon at the - bottom of the compose box to insert code formatting. The appropriate inline - or block formatting will be applied automatically depending on whether you - selected a whole line, part of a line, or multiple lines. + bottom of the compose box to insert code formatting. + +1. _(optional)_ To enable syntax highlighting in a code bock, start typing the + name of the desired programming language directly after the initial ` ``` `. + Select the language from the auto-complete suggestions. !!! tip "" diff --git a/help/latex.md b/help/latex.md index 8ad1ff27c0..5ea9bc3683 100644 --- a/help/latex.md +++ b/help/latex.md @@ -4,6 +4,16 @@ ## Insert LaTeX formatting +Zulip's compose box has a smart **LaTeX** () button, which inserts contextually appropriate LaTeX +formatting: + +- If no text is selected, the button inserts displayed LaTeX (````math`) formatting. +- If selected text is on one line, the button inserts inline LaTeX (`$$`) + formatting. +- If selected text is on multiple lines, the button inserts displayed LaTeX + (````math`) formatting. + {start_tabs} {tab|via-compose-box-buttons} @@ -13,9 +23,7 @@ 1. _(optional)_ Select the text you want to format. 1. Click the **LaTeX** () icon at the - bottom of the compose box to insert LaTeX formatting. The appropriate inline - or block formatting will be applied automatically depending on whether you - selected a whole line, part of a line, or multiple lines. + bottom of the compose box to insert LaTeX formatting. !!! tip ""