Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to handle quotes in org-mode?

Tags:

org-mode

How do I handle quotes in org-mode? Similar to the > in stackoverflow.

like image 840
Reactormonk Avatar asked Oct 01 '12 21:10

Reactormonk


People also ask

Why is ORG mode so great?

Elegant Markup Org mode is routinely used to build and manage complex workflows. It does this using an elegantly simple syntax that scales from basic markup to full LaTeX typesetting and from plain text notes to literate programs. Everything you need to get started is demonstrated in the example.

How do you write org mode?

To enable Org mode on your current document, type M-x org-mode which will enable the Org mode on the current document. Those are minuses, not underscores. MY PROJECT is the title of the document, this can be anything. This will enable Org mode for this document, no matter what the file-ending is.

What can Org mode do?

Org Mode offers the ability to insert source code in the document being edited, which is automatically exported and/or executed when exporting the document; the result(s) produced by this code can be automatically fetched back in the resulting output.

Is org mode a text mode?

Org is a highly flexible structured plain text file format, composed of a few simple, yet versatile, structures — constructed to be both simple enough for the novice and powerful enough for the expert.


2 Answers

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.

like image 118
Nikana Reklawyks Avatar answered Sep 23 '22 03:09

Nikana Reklawyks


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

like image 26
Ynjxsjmh Avatar answered Sep 22 '22 03:09

Ynjxsjmh