[Top][All Lists]

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

Re: [O] nbsp and /italics/

From: Rasmus
Subject: Re: [O] nbsp and /italics/
Date: Tue, 16 Oct 2012 22:14:24 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.2.50 (gnu/linux)

address@hidden (Thomas S. Dye) writes:

> #+name: ngz-nbsp
> #+begin_src emacs-lisp
> (defun ngz-latex-filter-nobreaks (text backend info)
>   "Ensure \"_\" are properly handled in Beamer/LaTeX export."
>   (when (memq backend '(e-beamer e-latex))
>     (replace-regexp-in-string " " "~" text)))
> (add-to-list 'org-export-filter-plain-text-functions
>              'ngz-latex-filter-nobreaks)
> #+end_src

Hmm, I'm intrigued by this and it could solve one of my long standing
issue with Org LaTeX export.

I write all new sentences with "  ", and for stuff like "fig. " I use
one space.  Pretty consistently.  I would love to modify the function
to recognize "point one space" as ".~" and "point double space" as
".  ".  (i.e. no translation).

Can anyone think of a clever regexp that recognizes the above pattern?
I tried, "\\.[ ]\{1\}" but it didn't work.  And without the \{1\} it's
too strong. . .

Thanks in advance,

I almost cut my hair, it was happened just the other day

reply via email to

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