# Re: [Orgmode] latex wrap

Hi Carsten,

On 27.06.2009 09:00 Carsten Dominik wrote:
>
> On Jun 26, 2009, at 11:13 PM, hello world wrote:
>
>> bla bla
>> $$>>$$1+1=2$$>>$$
>>
>> into
>>
>> bla bla $$1+1=2$$
>
> Why would you press M-q in such a location?

This behaviour is also bothering me. The example may not illustrate the problem
explicitly enough. Here is a more elaborate one:

I often find myself writing a paragraph that includes an equation like in this
example:

-----------------------------------------------------------------------
Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam
nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat,
sed diam voluptua. At vero eos et accusam et justo duo dolores et ea
rebum.
$a^2 + b^ = c^2$
Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum
dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing
elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore
magna aliquyam erat, sed diam voluptua. At vero eos et accusam et
justo duo dolores et ea rebum.
-----------------------------------------------------------------------

When writing such a paragraph you need to use M-q. In AUCTeX this is no problem.
You easily get the above paragraph using M-q. In org-mode, however, you get
this:

-----------------------------------------------------------------------
Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam
nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat,
sed diam voluptua. At vero eos et accusam et justo duo dolores et ea
rebum.  $a^2 + b^ = c^2$ Stet clita kasd gubergren, no sea
takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit
amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor
invidunt ut labore et dolore magna aliquyam erat, sed diam
voluptua. At vero eos et accusam et justo duo dolores et ea rebum.
-----------------------------------------------------------------------

This is quite confusing. A possible workaround to this problem is to insert
newlines around the equation like this:

-----------------------------------------------------------------------
Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam
nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat,
sed diam voluptua. At vero eos et accusam et justo duo dolores et ea
rebum.

$a^2 + b^ = c^2$

Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum
dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing
elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore
magna aliquyam erat, sed diam voluptua. At vero eos et accusam et
justo duo dolores et ea rebum.
-----------------------------------------------------------------------+

However, the equation is then put into a new paragraph which is not intended
here: The resulting PDF contains additional spacing around the equations. The
intention that this should be a single paragraph is not achieved.

It would be very nice to have the same behaviour in this setting as AUCTeX.

Cheers,
Patrick

_______________________________________________
Emacs-orgmode mailing list
Remember: use Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode
`