#209 rst2latex uses quote environment for literal blocks

sandbox
pending-works-for-me
nobody
None
5
2017-09-22
2012-10-20
Alan
No

The rst2latex writer places literal blocks in a quote environment. This abuse of the quote environment means that quotes cannot be styled without affecting literal blocks, which is clearly a bug in the writer.

Proposed solution: wrap literal blocks in a custom environment.

Comment: the reason literal blocks are wrapped in the quote environment is simply to force indentation of literal blocks. **Separately** from this bug, I would urge the developers to rethink this decision and leave it up to users. Forcing indentation introduces many problems. E.g., as a result of this imposition, the rst2beamer writer output is horrible when literal blocks are included. Although I have proposed a solution above that allows continuation of the current practice, I believe that a better solution is not to wrap literal blocks in an extra environment, and leave indentation decisions up to users. (Who can e.g. set the indentation of the listings environment.)

Discussion

  • Günter Milde

    Günter Milde - 2017-09-22
    • status: open --> pending-works-for-me
    • Group: --> sandbox
     
  • Günter Milde

    Günter Milde - 2017-09-22

    With the recent addition to class handling of environments in the latex writer, independent styling of quotes and literal blocks becomes possible (although tricky).
    Since 2017-09-22, the wrapping in quote environments is replaced by a global xleftmargin setting if "lstlistings" is used for literal blocks. This can be customized in preamble code or a custom style sheet.

     

Log in to post a comment.