From: Robert Klein <RoKlein@roklein.de>
To: Peter Davis <pfd@pfdstudio.com>
Cc: emacs-orgmode@gnu.org
Subject: Re: Forcing line breaks in src (monospace) examples
Date: Sun, 14 Jun 2015 17:36:37 +0200 [thread overview]
Message-ID: <20150614173637.7633a81e@zotac> (raw)
In-Reply-To: <557D950F.7030009@pfdstudio.com>
Hi,
On Sun, 14 Jun 2015 10:51:59 -0400
Peter Davis <pfd@pfdstudio.com> wrote:
>
>
> On 6/14/15 10:44 AM, Peter Davis wrote:
> > #+BEGIN_LaTeX
> > curl -v -X GET -H "Authorization:...\", \"access_token\": \"..."
> > "http://blah.blah.blah.com/v1/REST_API_STUFF/..."
> > #+END_LaTeX
> Sorry, that should be:
>
>
> #+BEGIN_LaTeX
> \tt{curl -v -X GET -H "Authorization:...\", \"access_token\":
> \"..." "http://blah.blah.blah.com/v1/REST_API_STUFF/..."}
> #+END_LaTeX
>
>
This will do the job:
#+LaTeX_HEADER: \usepackage{xcolor}
#+LaTeX_HEADER: \lstset{
#+LaTeX_HEADER: basicstyle=\ttfamily,
#+LaTeX_HEADER: breaklines=true,
#+LaTeX_HEADER: prebreak=\mbox{\ensuremath{\triangleright}},
#+LaTeX_HEADER: columns=fullflexible,
#+LaTeX_HEADER: keepspaces=true
#+LaTeX_HEADER: }
#+begin_src sh
curl -v -X GET -H "Authorization:...", "access_token": "..."
"http://blah.blah.blah.com/v1/REST_API_STUFF/..."
#+end_src
Note I use a `sh' source block, not `curl' and not a LaTeX block. So
you'll also be able to publish to HTML and someone using the document
can copy and past the command to her/his command line.
The `prebreak' setting for some reasons needs some kind of box or the
LaTeX process croaks.
Also nice, I got this from
tex.stackexchange.com/questions/116534/lstlisting-line-wrapping is
this postbreak setting for lstlistings (needs the xcolor package above):
postbreak=\raisebox{0ex}[0ex][0ex]{\ensuremath{\color{red}\hookrightarrow\space}},
Best regards
Robert
next prev parent reply other threads:[~2015-06-14 15:36 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-06-14 14:44 Forcing line breaks in src (monospace) examples Peter Davis
2015-06-14 14:51 ` Peter Davis
2015-06-14 15:36 ` Robert Klein [this message]
2015-06-14 15:53 ` Peter Davis
2015-06-14 16:11 ` Robert Klein
2015-06-14 16:23 ` Peter Davis
2015-06-14 16:36 ` Peter Davis
2015-06-14 16:38 ` Robert Klein
2015-06-14 17:01 ` Peter Davis
2015-06-23 14:59 ` Peter Davis
2015-06-23 15:11 ` Kaushal
2015-06-23 15:30 ` Peter Davis
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=20150614173637.7633a81e@zotac \
--to=roklein@roklein.de \
--cc=emacs-orgmode@gnu.org \
--cc=pfd@pfdstudio.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).