two-column layouts in RStudio presentations/slidify/pandoc

前端 未结 7 2034
有刺的猬
有刺的猬 2020-11-30 19:00

I\'m trying to come up with a good system for generating slides and accompanying handouts. The ideal system would have the following properties:

  • beautiful in b
7条回答
  •  青春惊慌失措
    2020-11-30 19:21

    So far I haven't been able to do better than hacking my own little bit of markup on top of the rmd format: I call my source file rmd0 and run a script including this sed tidbit to translate it to rmd before calling knit:

    sed -e 's/BEGIN2COLS\(.*\)/
    /' \ -e 's/SWITCH2COLS/<\/td>/' \ -e 's/END2COLS/<\/td><\/tr><\/table>/' ...

    There are a few reasons I don't like this. (1) It's ugly and special-purpose, and I don't have a particularly good way to allow optional arguments (e.g. relative widths of columns, alignment, etc.). (2) It has to be tweaked for each output format (e.g. if I wanted LaTeX/beamer output I would need to substitute \begin{columns}\begin{column}{5cm} ... \end{column}\begin{column}{5cm} ... \end{column}\end{columns} instead (as it turns out I want to ignore the two-column formatting when I make LaTeX-format handouts, so it's a little easier, but it's still ugly).

    Slidify may yet be the answer.

    提交回复
    热议问题