How to Quote Text and Script Code Blocks

You can format text as quotation by prepending a > Simple as that :slight_smile:

Example:

This…

> quoted text

becomes this …

quoted text

Yeah, I agree to a large degree :slight_smile:

The other answers shortly (as far as I can).

IMO, it is best to actually quote (using the ">" as @Tom suggested) a very brief section that communicates the main point, and then provide a link to the entire article for those who wish to know more.

1 Like

Using > threw me as I was expecting quotation marks to show up but didn't. So I looked it up and found this:

Block Quoting uses the greater than (>) to indent the text into a grey box.

So indented text within a grey box = quoted text here. Not complaining and that's not exactly obvious. I see it's clearer looking and simpler once the convention is known. Thank you Tom.

And yes, @JMichaelTX, brief section + link is an elegant solution. Will do going forward. Thank you.

1 Like

Not sure what you mean with a “gray box” (?)

Just prepend anyting that is quotation with a > and you should be fine and the readers know that is it is quoted text.

If it’s multiple paragraphs, then prepend each one with the >

Ah, OK, with grey box you mean the “code blocks”, certainly.

You can get them with a triple backticks:

my text

like this

  ```
  my text
  ```

Concerning the quoted text: I would just recommend to indent it or preface it with > and it should be OK. Isn’t it?

I guess the KM Wiki has some more solutions, if this doesn’t work…


PS:

This is a good cheat sheet for the Git Markdown flavor, which —as far as I know— is also the flavor of this forum site.

Bookmarked cheat sheet and read the KM wiki section on formatting. Thank you.

Don't know how to use the keyboard shortcuts with CTRL + OPT + key to get formatting: https://wiki.keyboardmaestro.com/wiki/syntax?s[]=quoting&s[]=text

As for quoting, I guess I've been rigidly stuck in an outdated view. Indenting and background coloring it is :rocket:

Don't know how to use the keyboard shortcuts with CTRL + OPT + key to get formatting: https://wiki.keyboardmaestro.com/wiki/syntax?s[]=quoting&s[]=text

It seems the section structure in that Wiki article is wrong: “Toolbar Button Shortcuts” doesn’t belong to “Keyboard Shortcuts”, I think. So, the “CTRL + OPT + ” is probably only referring to “General Keys”.

For example, if you are in the general forum view (not in an editor window) you can press ⌃⌥F to open a search. (In Safari ⌘F does the same.)

For formatting (in an editor window) you can use – besides the toolbar buttons – the usual Mac shortcuts like ⌘B for bold, ⌘I for italics. (At least in Safari.)

As for quoting, I guess I've been rigidly stuck in an outdated view. Indenting and background coloring it is

No need to background-color it. This should happen automatically if the paragraph is formatted as quotation (via CSS).


BTW: If you don’t like Markdown and are more familiar with HTML you can also write your post just in HTML.

For example this…

<blockquote>My quoted paragraphs here.</blockquote>

…should produce the same as this…

> My quoted paragraphs here.

Result:

My quoted paragraphs here.

Quoting myself:

This is wrong. Just seen it now, I’m sorry. Indentation produces a code block. (Like the fenced code blocks with ```). Use > for block quotes.

Quotation (> or <blockquote>):

My quoted text.

Code block (``` or indentation or <pre><code>):

My code.

Both are “gray boxes”, with the difference that the block quote has the vertical bar at the left, which marks it as quotation. The code block doesn’t have that bar, it formats the text in a pre-defined monospaced font and it does not interpret meta characters (like < or \ etc.).


BTW (I just found out), you can also combine the two, apparently without any glitches:

> My quoted normal text here.
> A second line of normal text
> ```html
> My <it>quoted</it> code here.
> ```
> _And_ __another__ *line* **of** <i>normal</i> <b>text</b>.
> Another piece of code on the next line:
> ```applescript
> tell application "Finder" to …
> ```

Result:

My quoted normal text here.
A second line of normal text

My <i>quoted</i> code here.

And another line of normal text.
Another piece of code on the next line:

tell application "Finder" to …

Note that the language tags (“html”, “applescript”) of the code blocks most of the time are not needed, since the script seems to be pretty smart now in detecting the language by itself. At least with the more common languages. (A correctly indicated/auto-detected language is needed for the appropriate syntax highlighting.)

I’ve seen you used “—” apparently as section separator in your post above.

You can build a visually more appealing separator with…

---

…or…

***

…or as HTML

<hr>

Result:


Doesn't work for me. Don't know if this is bad info or something glitching on my setup.

Thank you for clearing up code block vs quotations.

Thanks for the better looking separators :smiley:!

My tummy is full, need to digest for a bit.

Thanks again!

Happy digesting! (I think the chances to produce an obstipation are negligible :grinning:)

For formatting (in an editor window) you can use – besides the toolbar buttons – the usual Mac shortcuts like ⌘B for bold, ⌘I for italics. (At least in Safari.)

Doesn't work for me. Don't know if this is bad info or something glitching on my setup.

You are on the forum with Safari, right? Here – on my Mac[1] –, it definitly works with Safari (⌘I, ⌘B). I use it all the times. I don’t know how other browsers behave.


1: Safari 12.1, OS 10.14.4

Yes Safari, same versions.

OK.

So, just to get things right, you are saying that while in an post editor window of the KM forum page you are unable to format a selected text as bold by pressing ⌘B?

“bold” means that after pressing ⌘B the selected text is surrounded by two asterisks. (The Markdown syntax for bold.)

Exactly.

I do not have any clue :wink:

Just testing it again in this very post: ⌘B produces bold text.

You are on Mojave, too, right? (10.14.4)

Maybe just do a reboot of your machine (if it doesn’t significantly hurt your work). (A reboot usually is the first and also the most effective service measure.)

Though I doubt that it will help in this case. But who knows.

Right 10.14.4.

Maybe a safari extension or safari preference setting. I’ll check tonight and report back if it changes.

Maybe the Fates telling me to calm down and not carry on :sob::partying_face::rofl::wink:

1 Like

Leave the “Fates” doing whatever they prefer to do, but do not connect it to tightly to your fate. Don’t get me wrong, the Fates are important, also to me, but the crucial thing is the balance betwen the fates and what needs to be done. Hard to explain. :slight_smile:

I already checked my Safari for Extensions, and I don’t think an extension is allowed to hinder those shortcuts. But, which extensions do you have loaded?

Maybe a “Trust in God and row away from the rocks" like thought. Easier sharing agency then standing all alone.

I’ll check extensions tonight...

1 Like