问题
How do I handle quotes in org-mode? Similar to the >
in stackoverflow.
回答1:
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.
回答2:
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.
回答3:
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
来源:https://stackoverflow.com/questions/12681289/how-to-handle-quotes-in-org-mode