pzhaonet / bookdownplus

The easiest way to use R package bookdown for writing varied types of books and documents
MIT License
255 stars 32 forks source link

Constraining code chunk #47

Closed pablobernabeu closed 4 years ago

pablobernabeu commented 4 years ago

Hello,

I'd like to ask about the possibility of constraining a code chunk inside the designated area. Specifically, in the Copernicus example paper, a code chunk on Page 2 surpasses the right margin into the second column. I've tried to correct this by changing the indentation (in the discussion template in this case, because I can't render the copernicus format).

I've changed the indentation of the third line from the default one

bookdownplus::
  bookdownplus(template = 'article',
               more_output = c('html', 'word', 'epub'))

to this,

bookdownplus::
  bookdownplus(template = 'article',
  more_output = c('html', 'word', 'epub'))

to keep to the space in the copernicus format paper.

Yet, in the rendered document, the format didn't change. It was still

bookdownplus::
  bookdownplus(template = 'article',
               more_output = c('html', 'word', 'epub'))

I'd be.really grateful for any advice.

pzhaonet commented 4 years ago

I guess the following might be a solution:

bookdownplus::
  bookdownplus(
    template = 'article',
    more_output = c('html', 'word', 'epub'))
pablobernabeu commented 4 years ago

Thanks a lot! This worked beautifully.