How to handle quotes in org-mode?

The only built-in mechanism I can think of is #+begin_quote blocks, which may be meant for export. I personally either leave > from emails, or use emacs boxes.


You can customize the CSS of blockquote element to get a nicer formatting.

Why blockquote element? If you use browser's inspect function to inspect the quote block, you can find its style is controlled by blockquote element.

Below is an example of SO-like quote block, you can find the configuration by inspecting the styles of blockquote in SO.

#+BEGIN_EXPORT html
<style>
blockquote {
    margin-bottom: 10px;
    padding: 10px;
    background-color: #FFF8DC;
    border-left: 2px solid #ffeb8e;
    border-left-color: rgb(255, 228, 102);
    display: block;
    margin-block-start: 1em;
    margin-block-end: 1em;
    margin-inline-start: 40px;
    margin-inline-end: 40px;
}
</style>
#+END_EXPORT

#+BEGIN_QUOTE
By customizing the style of blockquote element, we get a SO-like style quote block in org-mode.
#+END_QUOTE

It renders like

enter image description here


You can use :

I've only ever needed to use it when quoting org code itself.

Instead, use #+BEGIN_SRC, which gives you the chance to do very neat remote-highlighting of code in HTML output.

See the excellent manual for that.

Tags:

Org Mode