Re: [O] Forcing line breaks in src (monospace) examples

2015-06-23 Thread Peter Davis
Thanks! I think for my purposes with HTML, it would be sufficient to replace ... with Is there a way to get org to do that on export, or do I have to keep editing the HTML output? Thank you. -pd On 6/23/15 11:11 AM, Kaushal wrote: On the topic of exporting auto-wrapped lines in source

Re: [O] Forcing line breaks in src (monospace) examples

2015-06-23 Thread Kaushal
On the topic of exporting auto-wrapped lines in source code blocks to .tex/.pdf: If you use minted instead of listings, the latest minted 2.0 (probably not yet on tex-live) latex package does line wrapping in the source code blocks very elegantly. https://github.com/gpoore/minted (se

Re: [O] Forcing line breaks in src (monospace) examples

2015-06-23 Thread Peter Davis
So getting line breaks in exported LaTeX/PDF src examples is now working beautifully. Is there any way to do this in exported HTML? Thank you, -pd

Re: [O] Forcing line breaks in src (monospace) examples

2015-06-14 Thread Peter Davis
Ah! I wound up adding this: #+LaTeX_HEADER: \renewenvironment{verbatim}{\begin{lstlisting}}{\end{lstlisting}\ignorespacesafterend} but your approach is cleaner. Thanks! -pd On 6/14/15 12:38 PM, Robert Klein wrote: Hi Peter, hmm, yes, you have to tell org to use the listings package. It w

Re: [O] Forcing line breaks in src (monospace) examples

2015-06-14 Thread Robert Klein
Hi Peter, hmm, yes, you have to tell org to use the listings package. It works when I use this one-line .emacs: (setq org-latex-listings t) and your example file plus `#+LaTeX_HEADER: \usepackage{listings}': --- snip --- #+LaTeX_HEADER: \usepackage{listings} #+LaTeX_HEADER: \usepackage{xcolor

Re: [O] Forcing line breaks in src (monospace) examples

2015-06-14 Thread Peter Davis
FWIW, here's the tex generated from my current test: % Created 2015-06-14 Sun 12:33 \documentclass[11pt]{article} \usepackage[utf8]{inputenc} \usepackage[T1]{fontenc} \usepackage{fixltx2e} \usepackage{graphicx} \usepackage{longtable} \usepackage{float} \usepackage{wrapfig} \usepackage{rotating} \

Re: [O] Forcing line breaks in src (monospace) examples

2015-06-14 Thread Peter Davis
Hi, Robert, That helps (it gets rid of the extra first page), but I'm still not getting the line to wrap. Thanks, -pd Robert Klein writes: > Hi Peter, > > sorry, I have > > (add-to-list 'org-latex-packages-alist '("" "listingsutf8")) > > in my .emacs (utf8 version of listings so I can use

Re: [O] Forcing line breaks in src (monospace) examples

2015-06-14 Thread Robert Klein
Hi Peter, sorry, I have (add-to-list 'org-latex-packages-alist '("" "listingsutf8")) in my .emacs (utf8 version of listings so I can use umlauts). You can also simply put #+LaTeX_HEADER: \usepackage{listings} to the top of the file. (PS: you won't need the xcolor package unless you want

Re: [O] Forcing line breaks in src (monospace) examples

2015-06-14 Thread Peter Davis
Robert Klein writes: > Hi, > > On Sun, 14 Jun 2015 10:51:59 -0400 > Peter Davis 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/..."; >> > #+E

Re: [O] Forcing line breaks in src (monospace) examples

2015-06-14 Thread Robert Klein
Hi, On Sun, 14 Jun 2015 10:51:59 -0400 Peter Davis 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: > >

Re: [O] Forcing line breaks in src (monospace) examples

2015-06-14 Thread Peter Davis
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\": \"...

[O] Forcing line breaks in src (monospace) examples

2015-06-14 Thread Peter Davis
I'm writing a document which includes several example commands, which I've wrapped in #+BEGIN_SRC/#+END_SRC. In LaTeX/PDF export, these come out in Courier, as I hoped, but they run off the right edge of the page. For example: #+BEGIN_SRC curl curl -v -X GET -H "Authorization:...\", \"acces