From: John Hendy <jw.hendy@gmail.com>
To: Johannes Rainer <johannes.rainer@gmail.com>
Cc: emacs-orgmode <emacs-orgmode@gnu.org>
Subject: Re: R source code, break long lines
Date: Tue, 13 May 2014 11:16:04 -0500 [thread overview]
Message-ID: <CA+M2ft9kWji5DGDcqFeg5rVT8JOkaKXR2kFDSqxhq__pCVy6OQ@mail.gmail.com> (raw)
In-Reply-To: <CABxYo6oMxBN9T4Q7AyrvhZVpt3mmKNYskyEGWxq2uJQdW5teEw@mail.gmail.com>
On Tue, May 13, 2014 at 1:04 AM, Johannes Rainer
<johannes.rainer@gmail.com> wrote:
> dear all,
>
> I'm extensively using org-mode in combination with R source code blocks. The
> only thing I miss is the possibility to break long lines of R code in the
> exported pdf.
> Is there a way to tell org, or the latex exporter, to have automatic line
> breaks for long lines?
>
I think these are treated as verbatim... so what's in your buffer is
what you'll get in PDF. You might consider editing the block with C-c
' (Ctrl + C, then single quote). From there, when you hit a reasonable
point (<=80 characters), press return and Org will auto-indent things
pretty nicely, at least in my experience with R.
If you get odd results, perhaps check this thread, as I was having
issues with Org exporting the code blocks exactly as I'd typed them:
- https://www.mail-archive.com/emacs-orgmode@gnu.org/msg81100.html
Tl;dr is that you should check the variables
org-src-preserve-indentation, and possibly the variable
indent-tabs-mode.
Best regards,
John
> thanks in advance!
>
> cheers, jo
next prev parent reply other threads:[~2014-05-13 16:16 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-05-13 6:04 R source code, break long lines Johannes Rainer
2014-05-13 16:16 ` John Hendy [this message]
-- strict thread matches above, loose matches on Subject: below --
2014-05-13 19:26 Johannes Rainer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.orgmode.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CA+M2ft9kWji5DGDcqFeg5rVT8JOkaKXR2kFDSqxhq__pCVy6OQ@mail.gmail.com \
--to=jw.hendy@gmail.com \
--cc=emacs-orgmode@gnu.org \
--cc=johannes.rainer@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).