emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Nicolas Goaziou <n.goaziou@gmail.com>
To: "Thomas S. Dye" <tsd@tsdye.com>
Cc: Org-mode <emacs-orgmode@gnu.org>
Subject: Re: New LaTeX exporter, link to \ref
Date: Sun, 16 Sep 2012 09:40:33 +0200	[thread overview]
Message-ID: <87sjaih0um.fsf@gmail.com> (raw)
In-Reply-To: <m14nmyok4a.fsf@tsdye.com> (Thomas S. Dye's message of "Sat, 15 Sep 2012 15:02:29 -1000")

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

  reply	other threads:[~2012-09-16  7:44 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-09-16  1:02 New LaTeX exporter, link to \ref Thomas S. Dye
2012-09-16  7:40 ` Nicolas Goaziou [this message]
2012-09-16 18:05   ` Thomas S. Dye
2012-09-16 20:42     ` Sebastien Vauban

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=87sjaih0um.fsf@gmail.com \
    --to=n.goaziou@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=tsd@tsdye.com \
    /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).