emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] monospace (=) and quotes not getting along


From: Michael Hannon
Subject: Re: [O] monospace (=) and quotes not getting along
Date: Thu, 25 Aug 2011 20:53:45 -0700 (PDT)

Michael Gauland <address@hidden> wrote:

> Michael Hannon <jm_hannon <at> yahoo.com> writes:
>
> > To define =my_frabbitz= in this model, we issue the command:
> >    => my_frabbitz = "someRandomWord"=
> > The "my_frabbitz" in the sentence comes out in monospace, but the
> > R codedoesn't.  It seems that the quotation marks are killing the process.
>
> I don't remember why this happens, but I've dealt with it by inserting a null
> between the quote and the equals. I use export hooks to remove the null from
> the
> exported HTML and LaTeX files:
>
>
> (add-hook 'org-export-latex-final-hook
>       (lambda ()
>         (goto-char (point-min))
>         (while (re-search-forward "^@" nil t)
>           (replace-match "")
>           )
>         )
>       )
> (add-hook 'org-export-html-final-hook
>       (lambda ()
>         (goto-char (point-min))
>         (while (re-search-forward "^@" nil t)
>           (replace-match "")
>           )
>         )
>       )

Hi, Mike.  I was going to object that this was a dangerous approach in my
situation, as I intend to pass the .org file on to someone else after I've
revised it, and there'd be no way to guarantee that "future generations" would
have the same hooks defined.

Nevertheless, I tried inserting ^@ as you suggested and then exporting to
HTML, WITHOUT defining the hooks, just to see what would happen.  The answer
is that the HTML document looked just fine!  (This is with Org-mode version
7.7 on Emacs 23.2.1 on 64-bit linux.)

I don't know if this matters, but I placed the LHS and RHS of the R _expression_
on different, consecutive lines, as:

    => someVar ==
    =^@"someString"address@hidden

In HTML these are glommed together anyway.

I really appreciate your suggestion.  And, if anybody asks me, I'll be
recommending you for a MacArthur award.

-- Mike


reply via email to

[Prev in Thread] Current Thread [Next in Thread]