1

I am using Emacs' Org mode to scribble up some notes which all of which are being exported to HTML.

I often need to insert a lot of paragraphs verbatim while citing other research papers. The #+BEGIN_QUOTE ... #+END_QUOTE environment is perfect for that.

However, I would also like the quotes to be surrounded by a gray box snapped tight around the quote.

e.g. almost exactly like how the poem Twinkle Twinkle Little Star appears below.

Twinkle, twinkle, little star,

How I wonder what you are!

Up above the world so high,

Like a diamond in the sky.

2

You can achieve this by simply adding the following style to your org file:

#+HTML_HEAD_EXTRA: <style> blockquote {background:#EEEEEE; padding: 3px 13px}</style>

You can also put it in a css file (e.g. yourStyle.css):

blockquote {
    background: #EEEEEE;
    padding: 3px 13px;
}

and include it

#+HTML_HEAD: <link rel="stylesheet" href="yourStyle.css">

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.