Yes, org-mode can be coerced into exporting nested <blockquote>
elements.
1. Create inner quote inside org
code block. Add :results html
header to code block.
#+NAME: inner-quote-org
#+BEGIN_SRC org :results html replace
,#+BEGIN_QUOTE
hey hey
,#+END_QUOTE
#+END_SRC
2. Create outer quote inside org
code block and put a language specific variable, e.g. ruby syntax, as place holder for inner quote.
#+NAME: outer-quote-org
#+BEGIN_SRC org :results html replace
,#+BEGIN_QUOTE
hey ho
#{inner_quote}
ho ho
,#+END_QUOTE
#+END_SRC
3. Create new code block, e.g. ruby, with a matching:var
header, e.g :var inner_quote="Hello World!"
. Then add :noweb yes
header to insert outer quote block. Add :results
header so output will rendered as html
.
#+NAME: nested-quotes-html
#+BEGIN_SRC ruby :var inner_quote="Hello World!" :results html replace
output = <<-ORGSRC
<<outer-quote-org()>>
ORGSRC
#+END_SRC
Finished code blocks should look similar to example below:
#+NAME: inner-quote-org
#+BEGIN_SRC org :results html replace
,#+BEGIN_QUOTE
hey hey
,#+END_QUOTE
#+END_SRC
#+NAME: outer-quote-org
#+BEGIN_SRC org :results html replace
,#+BEGIN_QUOTE
hey ho
#{inner_quote}
ho ho
,#+END_QUOTE
#+END_SRC
#+NAME: nested-quotes-html
#+BEGIN_SRC ruby :var inner_quote="Hello World!" :results html replace
output = <<-ORGSRC
<<outer-quote-org()>>
ORGSRC
#+END_SRC
To export nested <blockquote>
as HTML, use #+CALL:
with :results html
.
#+CALL: nested-quotes-html(inner_quote=inner-quote-org()) :results html replace
Notice: inner_quote=inner-quote-org()
is how we dynamically set value of inner quote after outer quote was rendered as html
.
Result exported as HTML using C-c
C-e
h H
<blockquote>
<p>
hey ho
<blockquote>
<p>
hey hey
</p>
</blockquote>
ho ho
</p>
</blockquote>
Hope that helped!
I use a similar technique to create dynamic nested code templates using org
code blocks that send output to a drawer
. It works really well but I'm always looking for a better method.
Code tested using
GNU Emacs 24.4.1 (x86_64-apple-darwin14.0.0, NS apple-appkit-1343.14)
Org-mode version 8.3.1 (8.3.1-87-g4ef2c0-elpa)
<blockquote>foo<blockquote>bar</blockquote>baz</blockquote>
. Please edit your question and state exactly (a) what the output currently looks like and (b) what the output produced by the exporter should look like.