emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: John Hendy <jw.hendy@gmail.com>
To: Andreas Leha <andreas.leha@med.uni-goettingen.de>
Cc: emacs-orgmode <emacs-orgmode@gnu.org>
Subject: Re: Preservation of white space in babel blocks, exporting to PDF
Date: Fri, 31 Jan 2014 22:08:55 -0600	[thread overview]
Message-ID: <CA+M2ft8qRKW664GZdFL-VEn15+3Jk_ihZP32Rp8p8E8xeij1xA@mail.gmail.com> (raw)
In-Reply-To: <87lhxv7mym.fsf@med.uni-goettingen.de>

[-- Attachment #1: Type: text/plain, Size: 3460 bytes --]

On Jan 31, 2014 5:26 PM, "Andreas Leha" <andreas.leha@med.uni-goettingen.de>
wrote:
>
> Hi,
>
> John Hendy <jw.hendy@gmail.com> writes:
>
> > On Fri, Jan 31, 2014 at 5:04 PM, Nicolas Goaziou <n.goaziou@gmail.com>
wrote:
> >> John Hendy <jw.hendy@gmail.com> writes:
> >>
> >>>> I cannot reproduce the problem.
> >>>
> >>> In the .tex file or in the .pdf?
> >>
> >> Both.
> >
> > Weird.
> >
> >>
> >>> I know that #+begin/end_example works properly, so I took a look at
> >>> the difference between them:
> >>>
> >>> \begin{frame}[fragile,label=sec-1]{begin src}
> >>>  \begin{verbatim}
> >>> a <- "Test of whitespace preservation"
> >>>
> >>> b <- cat("Let's see what happens when we spill",
> >>> "onto multiple lines but want the text",
> >>> "being passed to cat() to be aligned")
> >>> \end{verbatim}
> >>> \end{frame}
> >>
> >> I don't know why or how you get this, but this has nothing to do with
> >> `org-src-preserve-indentation' since there in no global indentation in
> >> your code (i.e., a line starts at column 0).
> >>
> >>> \begin{frame}[fragile,label=sec-2]{begin example}
> >>>  \begin{verbatim}
> >>> a <- "Test of whitespace preservation"
> >>>
> >>> b <- cat("Let's see what happens when we spill",
> >>>          "onto multiple lines but want the text",
> >>>          "being passed to cat() to be aligned")
> >>> \end{verbatim}
> >>> \end{frame}
> >>> \end{document}
> >>>
> >>> Source blocks are exported with what appears to be some sort of tab
> >>> character;
> >>
> >> You can use C-u C-x = in order to know what it is.
> >>
> >
> > Here's what I get:
> >
> >              position: 754 of 1188 (63%), column: 0
> >             character: TAB (displayed as TAB) (codepoint 9, #o11, #x9)
> >     preferred charset: ascii (ASCII (ISO646 IRV))
> > code point in charset: 0x09
> >                syntax:   which means: whitespace
> >              to input: type "C-x 8 RET HEX-CODEPOINT" or "C-x 8 RET
NAME"
> >           buffer code: #x09
> >             file code: #x09 (encoded by coding system utf-8-unix)
> >               display: no font available
> >
> > I checked my locale, and it's set to en_US.utf8 (Arch Linux)
> >
> >> What happens if you run (org-export-execute-babel-code) on your Org
> >> buffer?
> >
> > I'm not used to running functions. I placed this in the document,
> > selected the text, and did `M-x eval-region`. Nothing appears to have
> > happened, but the *Messages* buffer printed out: "org-babel-exp
> > process R at line 9..."
> >
> > Does that help any?
> >
> >
> > John
> >
>
>
> I have not been following this thread.  So please scratch this in case
> it is not relevant here.  But I once had problems concerning tabs and
> source blocks in beamer documents.  So, this is what I have in my .emacs
> (quite crude):
>
> --8<---------------cut here---------------start------------->8---
> (defun my-e-beamer-final-filter (contents backend info)
>   (replace-regexp-in-string "\t" "        " contents))
> (add-to-list 'org-export-filter-final-output-functions
'my-e-beamer-final-filter)
> --8<---------------cut here---------------end--------------->8---
>

Certainly looks like it would do what needs to be done based on my issue.
I'll try it this weekend.

I'd still like to understand the src vs. example block discrepancy if
possible. It's really odd, especially since Nicholas isn't able to
reproduce even with the same minimal config.

Thanks for posting your solution,
John

> Regards,
> Andreas
>
>

[-- Attachment #2: Type: text/html, Size: 5239 bytes --]

  reply	other threads:[~2014-02-01  4:09 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-01-31  5:58 Preservation of white space in babel blocks, exporting to PDF John Hendy
2014-01-31  8:09 ` Nicolas Goaziou
2014-01-31 22:16   ` John Hendy
2014-01-31 22:25     ` Nicolas Goaziou
2014-01-31 22:46       ` John Hendy
2014-01-31 23:04         ` Nicolas Goaziou
2014-01-31 23:16           ` John Hendy
2014-01-31 23:25             ` Andreas Leha
2014-02-01  4:08               ` John Hendy [this message]
2014-02-01  8:28                 ` Nicolas Goaziou
2014-02-01 17:54                   ` John Hendy
2014-02-01 20:27                     ` Nicolas Goaziou
2014-02-01 21:02                       ` Nicolas Goaziou
2014-02-02  1:33                       ` John Hendy
2014-02-02  8:45                         ` Nicolas Goaziou
2014-02-02 15:59                           ` John Hendy

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+M2ft8qRKW664GZdFL-VEn15+3Jk_ihZP32Rp8p8E8xeij1xA@mail.gmail.com \
    --to=jw.hendy@gmail.com \
    --cc=andreas.leha@med.uni-goettingen.de \
    --cc=emacs-orgmode@gnu.org \
    /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).