How to handle quotes in org-mode?

瘦欲@ 提交于 2020-01-03 07:04:27

问题


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

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!