emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Bernt Hansen <bernt@norang.ca>
To: Erik Butz <erik.butz@googlemail.com>
Cc: emacs-orgmode@gnu.org
Subject: Re: \nbsp usage
Date: Tue, 13 Jul 2010 20:37:06 -0400	[thread overview]
Message-ID: <874og2x5jh.fsf@gollum.intra.norang.ca> (raw)
In-Reply-To: <AANLkTim1KXY82fUKydHpAHZmTjK6DejgZgUMtNJpJ6KS@mail.gmail.com> (Erik Butz's message of "Tue\, 13 Jul 2010 18\:16\:05 +0200")

Erik Butz <erik.butz@googlemail.com> writes:

> Hi all,
>
> I have a somewhat stupid problem, but didn't find a solution in the
> manual or the list archive.
> I want to use the \nbsp macro to generate a '~' symbol for Latex, but
> I don't seem to get it to work correctly in my case.
> I want to write 200~m²
>
> If I do: 200\nbspm^2
> it gets exported as: 200\nbspm$^2$,  so the symbol is not recognized.
>
> If I do: 200\nbsp m^2
> it gets exported as 198~ m$^2$, so in addition to the nbsp there is
> another space at which a linebreak can occur
>
> trying: 200\nbsp{}m^2 in analogy to other commands
> I get: 200~\{\}m$^2$, so the parentheses are not recognized as
> belonging to the command.
>
> I am using the latest org version (just did a git pull and checked
> that the behavior is still there) with emacs 23.1.1
>
> Any hints appreciated.

Hi Erik,

This seems to work for me:

,----[ sample org file ]
| * nbsp
| If I do: one two three four five six seven eight nine ten eleven twelve 200\nbsp m^2 it gets exported
`----

this exports as 

,----[ latex output ]
| ...
| \label{sec-1}
| 
| If I do: one two three four five six seven eight nine ten eleven twelve 200~ m\^{}2 it gets exported
| \end{document}
`----

and when I look at that as a PDF it doesn't break between the 200 and
m^2.  I tried adding x and xx before the 200 and it pushes the entire
thing to the next line.  I can't make it break on a line so 200 is at
the end of one line and m^2 is on the following line.

Does this work for you?

-Bernt

  reply	other threads:[~2010-07-14  0:37 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-07-13 16:16 \nbsp usage Erik Butz
2010-07-14  0:37 ` Bernt Hansen [this message]
2010-07-14  4:23   ` Nick Dokos
2010-07-14  7:19     ` Sébastien Vauban
2010-07-14  8:55       ` Carsten Dominik
2010-07-14 11:37         ` Erik Butz
2010-07-14 12:32           ` Bernt Hansen
2010-07-14 14:54             ` Nick Dokos
2010-07-15 12:00               ` Erik Butz
2010-07-14 11:54     ` Bernt Hansen

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=874og2x5jh.fsf@gollum.intra.norang.ca \
    --to=bernt@norang.ca \
    --cc=emacs-orgmode@gnu.org \
    --cc=erik.butz@googlemail.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).