From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nicolas Goaziou Subject: Re: New LaTeX exporter, link to \ref Date: Sun, 16 Sep 2012 09:40:33 +0200 Message-ID: <87sjaih0um.fsf@gmail.com> References: Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([208.118.235.92]:59985) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TD9Wx-0000P6-3V for emacs-orgmode@gnu.org; Sun, 16 Sep 2012 03:44:39 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TD9Wv-0004sb-Jh for emacs-orgmode@gnu.org; Sun, 16 Sep 2012 03:44:39 -0400 Received: from mail-wi0-f177.google.com ([209.85.212.177]:63429) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TD9Wv-0004r4-D3 for emacs-orgmode@gnu.org; Sun, 16 Sep 2012 03:44:37 -0400 Received: by mail-wi0-f177.google.com with SMTP id hn17so1095696wib.12 for ; Sun, 16 Sep 2012 00:44:37 -0700 (PDT) In-Reply-To: (Thomas S. Dye's message of "Sat, 15 Sep 2012 15:02:29 -1000") List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: "Thomas S. Dye" Cc: Org-mode Hello, tsd@tsdye.com (Thomas S. Dye) writes: > This in the org file: > > (fig. [[fig:old-wood]]) > > exports to this in the latex file: > > (fig. \ref{fig-old-wood}) > > I think the exporter is replacing the colon with a hyphen, which breaks > the reference. Correct. It's done by the function `org-export-solidify-link-text'. The problem is that it isn't used consistently across the back-end. It should be fixed now. > Also, is there some way to toggle a non-breaking space, e.g., > (fig.~\ref{fig:old-wood})? I thought to use \tilde{}, but this wouldn't > work with other back ends. You may use \nbsp{} entity. My keyboard layout allows for easy access to non-breaking spaces. So I use the following instead (_ character stands for the non-breaking space): #+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 HTH, Regards, -- Nicolas Goaziou