[kramdown-users] IAL quotes for LaTex?

Thomas Leitner t_leitner at gmx.at
Sun Jun 13 02:29:18 EDT 2010

On 2010-06-12 21:28 +0200 Michael Franzl wrote:
> Would this feature make sense?
> Source:
>      {: .smallquote }
>      > ghi
>      >
>      > jkl
> LaTex output:
>      \begin{smallquote}
>      ghi
>      jkl
>      \end{smallquote}
> A user could then define the "smallquote" LaTex environment with:
>      \newenvironment{smallquote}{\begin{quote}\small}{\end{quote}}

Interesting idea. So basically you want the blockquote enviornment be
substituted by another environment based on a class attribute. What if
two classes are set on the blockquote:

    {: .quote1 .quote2}
    > Some quote

Which one should be used? Or should both be used, in the order they are

We would probably also have to define a list of possible custom latex
"blockquote" environment names so that this feature cannot accidentally
be invoked...

So, how about this:

* New option "quote_envs" for LaTeX converter, which is an array of
  allowed environment names, defaults to `[]` (i.e. empty array)

* If a blockquote does not have a class attribute, just handle it like
  it is currently done. Otherwise extract the class names in order and
  do the following for each class name: If the class name is contained
  in the "quote_envs" array, wrap the block quote contents in a thus
  named environment, otherwise do nothing.

-- Thomas

More information about the kramdown-users mailing list